All Projects → TheGag96 → 3ds-hello-dlang

TheGag96 / 3ds-hello-dlang

Licence: other
A 3DS homebrew example written in D!

Programming Languages

d
599 projects
Makefile
30231 projects

Projects that are alternatives of or similar to 3ds-hello-dlang

m3diaLib-CTR
A C++ library for easier homebrew development for the Nintendo 3DS
Stars: ✭ 39 (+105.26%)
Mutual labels:  libctru, 3ds, 3ds-homebrew, citro3d
3DS.py
Python on your Nintendo 3DS
Stars: ✭ 90 (+373.68%)
Mutual labels:  devkitpro, 3ds, devkitarm, 3ds-homebrew
tangerine
A work-in-progress music player for the Nintendo 3DS and Nintendo Switch
Stars: ✭ 20 (+5.26%)
Mutual labels:  3ds, citro3d
libstarlight
3DS Homebrew Application Framework
Stars: ✭ 28 (+47.37%)
Mutual labels:  3ds, 3ds-homebrew
Notepad3DS
Text editor for the Nintendo 3DS console
Stars: ✭ 17 (-10.53%)
Mutual labels:  3ds, 3ds-homebrew
ctroller
Use your 3DS as a gamepad on linux
Stars: ✭ 34 (+78.95%)
Mutual labels:  3ds, 3ds-homebrew
dslibris
An ebook reader for the Nintendo DS, DS Lite, and DSi.
Stars: ✭ 31 (+63.16%)
Mutual labels:  devkitpro, devkitarm
dses
Dead Simple Eula Set
Stars: ✭ 31 (+63.16%)
Mutual labels:  3ds, 3ds-homebrew
smmdb
cross console/emulator sharing platform for Super Mario Maker courses
Stars: ✭ 51 (+168.42%)
Mutual labels:  3ds, 3ds-homebrew
ocs
A one click setup for 3ds
Stars: ✭ 13 (-31.58%)
Mutual labels:  3ds, 3ds-homebrew
sm64-port
My mirror of the sm64-port. You probably want to look at the 3DS port branch: https://github.com/mkst/sm64-port/tree/3ds-port
Stars: ✭ 167 (+778.95%)
Mutual labels:  3ds, 3ds-homebrew
3dsMax-Python-HowTos
3ds Max python samples
Stars: ✭ 86 (+352.63%)
Mutual labels:  3ds
borica-3ds
PHP Borica EMV 3DS library
Stars: ✭ 15 (-21.05%)
Mutual labels:  3ds
Rich-Presence-U
Display your Nintendo games on Discord.
Stars: ✭ 77 (+305.26%)
Mutual labels:  3ds
3ds-template
Template Project for Code::Blocks for developing 3ds homebrew
Stars: ✭ 22 (+15.79%)
Mutual labels:  devkitpro
old-browserhax
Fast and free old 3ds browser exploit for latest firmware.
Stars: ✭ 37 (+94.74%)
Mutual labels:  3ds
switch-cmake
CMake toolchain for Nintendo Switch homebrew development
Stars: ✭ 38 (+100%)
Mutual labels:  devkitpro
Sunshell
Multifunction shell for 3DS
Stars: ✭ 26 (+36.84%)
Mutual labels:  3ds-homebrew
3ds
Javascript front-end to the titledb API
Stars: ✭ 12 (-36.84%)
Mutual labels:  3ds
Sonic-1-2-2013-Decompilation
Sonic 1/2 (2013) Decompilation for New 3DS
Stars: ✭ 41 (+115.79%)
Mutual labels:  3ds

3DS Homebrew Hello World Example in D

Screenshot

Compiling with LDC

LDC has made this process very simple!

First, go install devkitPro like normal. Make sure to install 3DS support!

Then, clone this repo.

git clone https://github.com/TheGag96/3ds-hello-dlang

Go download/install the latest version of LDC.

Inside the Makefile, notice find line:

export LDC := ldc2

Edit this to be command/path to your LDC executable if need be.

Then, finally...

cd /path/to/3ds-hello-dlang
make

Compiling with GDC (not recommended)

This is how I first got this working, though I don't recommend it due to how difficult it is and how outdated GDC is.

First, go install devkitPro like normal. Make sure to install 3DS support!

Then, clone this repo.

git clone https://github.com/TheGag96/3ds-hello-dlang

Grab the devkitPro buildscripts repo:

git clone https://github.com/devkitPro/buildscripts
cd buildscripts

Follow the "Preparing to build" section in README.txt for your system.

Edit the file dkarm-eabi/scripts/build-gcc.sh and add d to the list of enabled languages:

../../gcc-$GCC_VER/configure \
  --enable-languages=c,c++,objc,lto,d \
  --with-gnu-as --with-gnu-ld --with-gcc \
  --with-march=armv4t\

When you're ready to build, do...

./build-devkit.sh

...as it says under "Building the devkits". Make sure to build devkitARM, and when prompted to enter a path to install it to, choose some folder that is NOT /opt/devkitpro.

Let everything build. In my experience, the script halted because GDB failed to build. If so, that's fine.

Copy the contents of the devkitARM folder you built to into /opt/devkitpro/devkitARM

sudo cp -r /path/to/my/devkitpro/devkitARM/* /opt/devkitpro/devkitARM

From another GDC installation, copy the D standard library files into the devkitARM folder (on my Ubuntu-based installation, it's in /usr/lib/gcc/x86_64-pc-linux-gnu/9.0.1/include/d):

sudo cp -r /some/gdc/path/.../include/d /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/include/

Then, finally...

cd /path/to/3ds-hello-dlang
make

Extra libraries

If you want to use my bindings for citro3d and citro2d, follow the setup instructions to install those libraries.

What's working so far

  • Using a betterC-like subset of D
  • (Mostly complete) bindings for libctru
  • (Mostly complete) bindings for citro3d
  • (Mostly complete) bindings for citro2d
  • Some support for core.stdc (needs to be modified to support newlib's libc implementation)

Known issues

  • Bindings referencing things like sockets or other stuff in the C standard library are incomplete
  • Certain D standard library files have to be tweaked to compile properly, and I'm not sure if it can be made better or if that's just how it has to be in this environment.
  • The bindings I've written so far have enums renamed to fit the D naming convention, but nothing else really is. Still not sure how I plan on cleaning things like that up.
  • My hacky Makefile edits currently copy the path of every D source file into the compile command, which makes it HUGE... Need to figure out how to use -I properly. I tried, but I couldn't override the standard library files with my hacked-up versions that way.

Thanks to...

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].