From e2b9572a83badb7084f5b54e1a7e108af8e327f6 Mon Sep 17 00:00:00 2001 From: Thomas Edvalson Date: Wed, 6 Apr 2016 02:12:02 -0400 Subject: 3DS: Initial commit --- configure | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 7 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 0e7a5a9b56..fbf6fab379 100755 --- a/configure +++ b/configure @@ -439,7 +439,7 @@ get_system_exe_extension() { arm-riscos) _exeext=",ff8" ;; - dreamcast | ds | gamecube | n64 | ps2 | psp | wii) + dreamcast | ds | 3ds | gamecube | n64 | ps2 | psp | wii) _exeext=".elf" ;; gph-linux) @@ -842,7 +842,7 @@ Usage: $0 [OPTIONS]... Configuration: -h, --help display this help and exit - --backend=BACKEND backend to build (android, tizen, dc, dingux, ds, gcw0, + --backend=BACKEND backend to build (android, tizen, dc, dingux, ds, 3ds, gcw0, gph, iphone, ios7, linuxmoto, maemo, n64, null, openpandora, ps2, psp, samsungtv, sdl, webos, wii, wince) [sdl] @@ -879,6 +879,7 @@ Special configuration feature: raspberrypi for Raspberry Pi dreamcast for Sega Dreamcast ds for Nintendo DS + 3ds for Nintendo 3DS gamecube for Nintendo GameCube gcw0 for GCW Zero gp2x for GP2X @@ -1351,6 +1352,11 @@ ds) _host_cpu=arm _host_alias=arm-eabi ;; +3ds) + _host_os=3ds + _host_cpu=arm + _host_alias=arm-none-eabi + ;; gamecube) _host_os=gamecube _host_cpu=powerpc @@ -1584,7 +1590,7 @@ android) exit 1 fi ;; -ds | gamecube | wii) +ds | 3ds | gamecube | wii) if test -z "$DEVKITPRO"; then echo "Please set DEVKITPRO in your environment. export DEVKITPRO=" exit 1 @@ -1840,7 +1846,7 @@ if test "$have_gcc" = yes ; then case $_host_os in # newlib-based system include files suppress non-C89 function # declarations under __STRICT_ANSI__ - amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | tizen | wii | wince ) + amigaos* | android | dreamcast | ds | 3ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | tizen | wii | wince ) ;; *) append_var CXXFLAGS "-ansi" @@ -2354,7 +2360,7 @@ case $_host_os in echo "Could not determine prefix for static libraries" fi fi - + # If _xcodetoolspath is not set yet use xcode-select to get the path if test -z "$_xcodetoolspath"; then _xcodetoolspath=`xcode-select -print-path`/Tools @@ -2400,6 +2406,27 @@ case $_host_os in append_var LDFLAGS "-L$DEVKITPRO/libnds/lib" append_var LIBS "-lnds9" ;; + 3ds) + _optimization_level=-O2 + append_var DEFINES "-D__3DS__" + append_var DEFINES "-D_3DS" + append_var DEFINES "-DARM11" + append_var CXXFLAGS "-march=armv6k" + append_var CXXFLAGS "-mtune=mpcore" + append_var CXXFLAGS "-mword-relocations" + append_var CXXFLAGS "-mfloat-abi=hard" + append_var CXXFLAGS "-ffunction-sections" + append_var CXXFLAGS "-fomit-frame-pointer" + append_var CXXFLAGS "-isystem $DEVKITPRO/libctru/include" + append_var CXXFLAGS "-isystem $DEVKITPRO/devkitARM/arm-none-eabi/include" + append_var CXXFLAGS "-isystem $DEVKITPRO/portlibs/3ds/include" + if test "$_dynamic_modules" = no ; then + append_var LDFLAGS "-Wl,--gc-sections" + else + append_var LDFLAGS "-Wl,--no-gc-sections" + fi + append_var LIBS "-lcitro3d -lctru" + ;; freebsd*) append_var LDFLAGS "-L/usr/local/lib" append_var CXXFLAGS "-I/usr/local/include" @@ -2706,6 +2733,25 @@ if test -n "$_host"; then _mt32emu=no _port_mk="backends/platform/ds/ds.mk" ;; + 3ds) + append_var DEFINES "-DDISABLE_FANCY_THEMES" + append_var DEFINES "-DDISABLE_SID" + append_var DEFINES "-DDISABLE_NES_APU" + append_var DEFINES "-DDISABLE_NES_APU" + append_var DEFINES "-DSTREAM_AUDIO_FROM_DISK" + _backend="3ds" + _build_scalers=no + _vkeybd=yes + _mt32emu=no + _vorbis=no + _tremor=yes + _mad=yes + _zlib=yes + _jpeg=yes + _png=yes + _freetype2=yes + _port_mk="backends/platform/3ds/3ds.mk" + ;; gamecube) _backend="wii" _build_scalers=no @@ -3221,7 +3267,7 @@ esac # Enable 16bit support only for backends which support it # case $_backend in - android | dingux | dc | gph | iphone | ios7 | maemo | openpandora | psp | samsungtv | sdl | tizen | webos | wii) + android | dingux | dc | 3ds | gph | iphone | ios7 | maemo | openpandora | psp | samsungtv | sdl | tizen | webos | wii) if test "$_16bit" = auto ; then _16bit=yes else @@ -3300,7 +3346,7 @@ case $_host_os in amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | ps3 | psp | wii | wince) _posix=no ;; - android | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | ios7 | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos) + 3ds | android | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | ios7 | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos) _posix=yes ;; os2-emx*) -- cgit v1.2.3 From fe8d48005717a4c77d34da1a5f9e4b5bfc597c6f Mon Sep 17 00:00:00 2001 From: Thomas Edvalson Date: Wed, 6 Apr 2016 12:12:46 -0400 Subject: 3DS: Add to backend configuration list --- configure | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure') diff --git a/configure b/configure index fbf6fab379..03fd5a858d 100755 --- a/configure +++ b/configure @@ -3231,6 +3231,8 @@ case $_backend in append_var DEFINES "-DSDL_BACKEND" add_line_to_config_mk "SDL_BACKEND = 1" ;; + 3ds) + ;; sdl) ;; *) -- cgit v1.2.3 From f5d73cac8a2d21962ed34b18de5aee36c2bce9ad Mon Sep 17 00:00:00 2001 From: Thomas Edvalson Date: Mon, 11 Apr 2016 15:15:42 -0400 Subject: 3DS: Add CIA format build, add timer handler thread, fix APT service suspending/sleeping/exiting --- configure | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 03fd5a858d..c23f9e703c 100755 --- a/configure +++ b/configure @@ -2409,7 +2409,7 @@ case $_host_os in 3ds) _optimization_level=-O2 append_var DEFINES "-D__3DS__" - append_var DEFINES "-D_3DS" + append_var DEFINES "-DARM" append_var DEFINES "-DARM11" append_var CXXFLAGS "-march=armv6k" append_var CXXFLAGS "-mtune=mpcore" @@ -2737,8 +2737,6 @@ if test -n "$_host"; then append_var DEFINES "-DDISABLE_FANCY_THEMES" append_var DEFINES "-DDISABLE_SID" append_var DEFINES "-DDISABLE_NES_APU" - append_var DEFINES "-DDISABLE_NES_APU" - append_var DEFINES "-DSTREAM_AUDIO_FROM_DISK" _backend="3ds" _build_scalers=no _vkeybd=yes @@ -2749,6 +2747,8 @@ if test -n "$_host"; then _zlib=yes _jpeg=yes _png=yes + _flac=yes + _faad=yes _freetype2=yes _port_mk="backends/platform/3ds/3ds.mk" ;; @@ -4592,6 +4592,9 @@ case $_backend in # during linking stage append_var LIBS "-lc -lgcc -lnosys" ;; + 3ds) + append_var LIBS "-logg -lpng" + ;; esac -- cgit v1.2.3 From 1ea737bbd87b27c1acf068f20845611a44adb98d Mon Sep 17 00:00:00 2001 From: Thomas Edvalson Date: Thu, 14 Apr 2016 00:39:27 -0400 Subject: 3DS: Maintain alphabetical order in configure file --- configure | 120 ++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 59 insertions(+), 61 deletions(-) (limited to 'configure') diff --git a/configure b/configure index c23f9e703c..449271a8cc 100755 --- a/configure +++ b/configure @@ -439,7 +439,7 @@ get_system_exe_extension() { arm-riscos) _exeext=",ff8" ;; - dreamcast | ds | 3ds | gamecube | n64 | ps2 | psp | wii) + 3ds | dreamcast | ds | gamecube | n64 | ps2 | psp | wii) _exeext=".elf" ;; gph-linux) @@ -842,9 +842,9 @@ Usage: $0 [OPTIONS]... Configuration: -h, --help display this help and exit - --backend=BACKEND backend to build (android, tizen, dc, dingux, ds, 3ds, gcw0, + --backend=BACKEND backend to build (3ds, android, dc, dingux, ds, gcw0, gph, iphone, ios7, linuxmoto, maemo, n64, null, openpandora, - ps2, psp, samsungtv, sdl, webos, wii, wince) [sdl] + ps2, psp, samsungtv, sdl, tizen, webos, wii, wince) [sdl] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -870,16 +870,15 @@ Fine tuning of the installation directories: Special configuration feature: --host=HOST cross-compile to target HOST (arm-linux, ...) - special targets: android-arm for Android ARM + special targets: 3ds for Nintendo 3DS + android-arm for Android ARM android-mips for Android MIPS android-x86 for Android x86 - tizen for Samsung Tizen caanoo for Caanoo dingux for Dingux raspberrypi for Raspberry Pi dreamcast for Sega Dreamcast ds for Nintendo DS - 3ds for Nintendo 3DS gamecube for Nintendo GameCube gcw0 for GCW Zero gp2x for GP2X @@ -897,6 +896,7 @@ Special configuration feature: ps3 for PlayStation 3 psp for PlayStation Portable samsungtv for Samsung TV + tizen for Samsung Tizen webos for HP Palm WebOS wii for Nintendo Wii wince for Windows CE @@ -1304,6 +1304,11 @@ get_system_exe_extension $guessed_host NATIVEEXEEXT=$_exeext case $_host in +3ds) + _host_os=3ds + _host_cpu=arm + _host_alias=arm-none-eabi + ;; android | android-arm | android-v7a | android-arm-v7a | ouya) _host_os=android _host_cpu=arm @@ -1352,11 +1357,6 @@ ds) _host_cpu=arm _host_alias=arm-eabi ;; -3ds) - _host_os=3ds - _host_cpu=arm - _host_alias=arm-none-eabi - ;; gamecube) _host_os=gamecube _host_cpu=powerpc @@ -1590,7 +1590,7 @@ android) exit 1 fi ;; -ds | 3ds | gamecube | wii) +3ds | ds | gamecube | wii) if test -z "$DEVKITPRO"; then echo "Please set DEVKITPRO in your environment. export DEVKITPRO=" exit 1 @@ -1846,7 +1846,7 @@ if test "$have_gcc" = yes ; then case $_host_os in # newlib-based system include files suppress non-C89 function # declarations under __STRICT_ANSI__ - amigaos* | android | dreamcast | ds | 3ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | tizen | wii | wince ) + 3ds | amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | tizen | wii | wince ) ;; *) append_var CXXFLAGS "-ansi" @@ -2146,6 +2146,27 @@ esac echo_n "Checking hosttype... " echo $_host_os case $_host_os in + 3ds) + _optimization_level=-O2 + append_var DEFINES "-D__3DS__" + append_var DEFINES "-DARM" + append_var DEFINES "-DARM11" + append_var CXXFLAGS "-march=armv6k" + append_var CXXFLAGS "-mtune=mpcore" + append_var CXXFLAGS "-mword-relocations" + append_var CXXFLAGS "-mfloat-abi=hard" + append_var CXXFLAGS "-ffunction-sections" + append_var CXXFLAGS "-fomit-frame-pointer" + append_var CXXFLAGS "-I$DEVKITPRO/libctru/include" + append_var CXXFLAGS "-I$DEVKITPRO/portlibs/3ds/include" + if test "$_dynamic_modules" = no ; then + append_var LDFLAGS "-Wl,--gc-sections" + else + append_var LDFLAGS "-Wl,--no-gc-sections" + fi + append_var LDFLAGS "-L$DEVKITPRO/portlibs/3ds/lib" + append_var LIBS "-lcitro3d -lctru" + ;; amigaos*) append_var LDFLAGS "-Wl,--export-dynamic" append_var LDFLAGS "-L/sdk/local/newlib/lib" @@ -2406,27 +2427,6 @@ case $_host_os in append_var LDFLAGS "-L$DEVKITPRO/libnds/lib" append_var LIBS "-lnds9" ;; - 3ds) - _optimization_level=-O2 - append_var DEFINES "-D__3DS__" - append_var DEFINES "-DARM" - append_var DEFINES "-DARM11" - append_var CXXFLAGS "-march=armv6k" - append_var CXXFLAGS "-mtune=mpcore" - append_var CXXFLAGS "-mword-relocations" - append_var CXXFLAGS "-mfloat-abi=hard" - append_var CXXFLAGS "-ffunction-sections" - append_var CXXFLAGS "-fomit-frame-pointer" - append_var CXXFLAGS "-isystem $DEVKITPRO/libctru/include" - append_var CXXFLAGS "-isystem $DEVKITPRO/devkitARM/arm-none-eabi/include" - append_var CXXFLAGS "-isystem $DEVKITPRO/portlibs/3ds/include" - if test "$_dynamic_modules" = no ; then - append_var LDFLAGS "-Wl,--gc-sections" - else - append_var LDFLAGS "-Wl,--no-gc-sections" - fi - append_var LIBS "-lcitro3d -lctru" - ;; freebsd*) append_var LDFLAGS "-L/usr/local/lib" append_var CXXFLAGS "-I/usr/local/include" @@ -2604,6 +2604,18 @@ if test -n "$_host"; then # Cross-compiling mode - add your target here if needed echo "Cross-compiling to $_host" case "$_host" in + 3ds) + append_var DEFINES "-DDISABLE_FANCY_THEMES" + append_var DEFINES "-DDISABLE_SID" + append_var DEFINES "-DDISABLE_NES_APU" + _backend="3ds" + _build_scalers=no + _vkeybd=yes + _mt32emu=no + # Should use Tremor instead of Vorbis + _vorbis=no + _port_mk="backends/platform/3ds/3ds.mk" + ;; android | android-arm | android-v7a | android-arm-v7a | android-mips | android-x86 | ouya) # we link a .so as default append_var LDFLAGS "-shared" @@ -2733,25 +2745,6 @@ if test -n "$_host"; then _mt32emu=no _port_mk="backends/platform/ds/ds.mk" ;; - 3ds) - append_var DEFINES "-DDISABLE_FANCY_THEMES" - append_var DEFINES "-DDISABLE_SID" - append_var DEFINES "-DDISABLE_NES_APU" - _backend="3ds" - _build_scalers=no - _vkeybd=yes - _mt32emu=no - _vorbis=no - _tremor=yes - _mad=yes - _zlib=yes - _jpeg=yes - _png=yes - _flac=yes - _faad=yes - _freetype2=yes - _port_mk="backends/platform/3ds/3ds.mk" - ;; gamecube) _backend="wii" _build_scalers=no @@ -3081,6 +3074,8 @@ fi # Backend related stuff # case $_backend in + 3ds) + ;; android) append_var DEFINES "-DREDUCE_MEMORY_USAGE" append_var CXXFLAGS "-Wa,--noexecstack" @@ -3183,6 +3178,8 @@ case $_backend in append_var LDFLAGS "-shared" append_var LDFLAGS "-fpic" ;; + sdl) + ;; tizen) # dirent.h not available. NONSTANDARD_PORT==ensure portdefs.h is included append_var DEFINES "-DTIZEN -DDISABLE_STDIO_FILESTREAM -DNONSTANDARD_PORT" @@ -3231,10 +3228,6 @@ case $_backend in append_var DEFINES "-DSDL_BACKEND" add_line_to_config_mk "SDL_BACKEND = 1" ;; - 3ds) - ;; - sdl) - ;; *) echo "support for $_backend backend not implemented in configure script yet" exit 1 @@ -3269,7 +3262,7 @@ esac # Enable 16bit support only for backends which support it # case $_backend in - android | dingux | dc | 3ds | gph | iphone | ios7 | maemo | openpandora | psp | samsungtv | sdl | tizen | webos | wii) + 3ds | android | dingux | dc | gph | iphone | ios7 | maemo | openpandora | psp | samsungtv | sdl | tizen | webos | wii) if test "$_16bit" = auto ; then _16bit=yes else @@ -4561,6 +4554,14 @@ fi # after all of CXXFLAGS, LDFLAGS, LIBS etc. have been setup # case $_backend in + 3ds) + if test "$_freetype2" = yes -a "$_png" = yes; then + append_var LIBS "-lpng" + fi + if test "$_tremor" = yes -o "$_flac" = yes; then + append_var LIBS "-logg" + fi + ;; android) # ssp at this point so the cxxtests link if test "$_debug_build" = yes; then @@ -4592,9 +4593,6 @@ case $_backend in # during linking stage append_var LIBS "-lc -lgcc -lnosys" ;; - 3ds) - append_var LIBS "-logg -lpng" - ;; esac -- cgit v1.2.3