DS: Fix compilation with devkitARM r47

This commit is contained in:
Cameron Cawley 2017-11-14 23:00:56 +00:00 committed by Eugene Sandulenko
parent 668084c58a
commit 9111998c49
15 changed files with 35 additions and 21 deletions

View file

@ -29,6 +29,10 @@
#include <stdarg.h> #include <stdarg.h>
#include <math.h> #include <math.h>
#if defined(__DS__)
#include "dsmain.h"
#endif
#include "mame.h" #include "mame.h"
#include "audio/mixer.h" #include "audio/mixer.h"
@ -40,10 +44,6 @@
#include "common/config-manager.h" #include "common/config-manager.h"
#endif #endif
#if defined(__DS__)
#include "dsmain.h"
#endif
namespace OPL { namespace OPL {
namespace MAME { namespace MAME {

View file

@ -24,9 +24,9 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
#if defined(__DS__) #if defined(__DS__)
#include "dsmain.h" //for the isGBAMPAvailable() function
#include "backends/fs/ds/ds-fs-factory.h" #include "backends/fs/ds/ds-fs-factory.h"
#include "backends/fs/ds/ds-fs.h" #include "backends/fs/ds/ds-fs.h"
#include "dsmain.h" //for the isGBAMPAvailable() function
namespace Common { namespace Common {
DECLARE_SINGLETON(DSFilesystemFactory); DECLARE_SINGLETON(DSFilesystemFactory);

View file

@ -23,12 +23,12 @@
// Disable symbol overrides for FILE as that is used in FLAC headers // Disable symbol overrides for FILE as that is used in FLAC headers
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
#include "dsmain.h"
#include "common/str.h" #include "common/str.h"
#include "common/util.h" #include "common/util.h"
//#include <NDS/ARM9/console.h> //basic print funcionality //#include <NDS/ARM9/console.h> //basic print funcionality
#include "backends/fs/ds/ds-fs.h" #include "backends/fs/ds/ds-fs.h"
#include "backends/fs/stdiostream.h" #include "backends/fs/stdiostream.h"
#include "dsmain.h"
#include "fat/gba_nds_fat.h" #include "fat/gba_nds_fat.h"
#include "common/bufferedstream.h" #include "common/bufferedstream.h"

View file

@ -23,10 +23,10 @@
// Disable symbol overrides for FILE as that is used in FLAC headers // Disable symbol overrides for FILE as that is used in FLAC headers
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
#include "dsmain.h"
#include "cdaudio.h" #include "cdaudio.h"
#include "backends/fs/ds/ds-fs.h" #include "backends/fs/ds/ds-fs.h"
#include "common/config-manager.h" #include "common/config-manager.h"
#include "dsmain.h"
#include "NDS/scummvm_ipc.h" #include "NDS/scummvm_ipc.h"
#define WAV_FORMAT_IMA_ADPCM 0x14 #define WAV_FORMAT_IMA_ADPCM 0x14

View file

@ -573,7 +573,7 @@ void initGame() {
s_currentGame = &gameList[0]; // Default game s_currentGame = &gameList[0]; // Default game
for (int r = 0; r < NUM_SUPPORTED_GAMES; r++) { for (int r = 0; r < NUM_SUPPORTED_GAMES; r++) {
if (!stricmp(gameName, gameList[r].gameId)) { if (!scumm_stricmp(gameName, gameList[r].gameId)) {
s_currentGame = &gameList[r]; s_currentGame = &gameList[r];
// consolePrintf("Game list num: %d\n", r); // consolePrintf("Game list num: %d\n", r);
} }

View file

@ -23,6 +23,8 @@
#ifndef _DSMAIN_H #ifndef _DSMAIN_H
#define _DSMAIN_H #define _DSMAIN_H
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include <nds.h> #include <nds.h>
#include "osystem_ds.h" #include "osystem_ds.h"

View file

@ -20,8 +20,8 @@
* *
*/ */
#include "dsoptions.h"
#include "dsmain.h" #include "dsmain.h"
#include "dsoptions.h"
#include "gui/dialog.h" #include "gui/dialog.h"
#include "gui/gui-manager.h" #include "gui/gui-manager.h"
#include "gui/widgets/list.h" #include "gui/widgets/list.h"

View file

@ -367,7 +367,7 @@ bool disc_setDsSlotInterface (void)
active_interface = DLDI_GetInterface(); active_interface = DLDI_GetInterface();
if (stricmp((char *)(&_dldi_driver_name), "Default (No interface)")) { if (strcasecmp((char *)(&_dldi_driver_name), "Default (No interface)")) {
char name[48]; char name[48];
memcpy(name, &_dldi_driver_name, 48); memcpy(name, &_dldi_driver_name, 48);
name[47] = '\0'; name[47] = '\0';

View file

@ -23,6 +23,7 @@
// Allow use of stuff in <time.h> // Allow use of stuff in <time.h>
#define FORBIDDEN_SYMBOL_EXCEPTION_time_h #define FORBIDDEN_SYMBOL_EXCEPTION_time_h
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h" #include "common/scummsys.h"
#include "common/system.h" #include "common/system.h"

View file

@ -24,6 +24,8 @@
#ifndef _OSYSTEM_DS_H_ #ifndef _OSYSTEM_DS_H_
#define _OSYSTEM_DS_H_ #define _OSYSTEM_DS_H_
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "backends/base-backend.h" #include "backends/base-backend.h"
#include "common/events.h" #include "common/events.h"
#include "nds.h" #include "nds.h"

View file

@ -20,8 +20,8 @@
* *
*/ */
#include "wordcompletion.h"
#include "osystem_ds.h" #include "osystem_ds.h"
#include "wordcompletion.h"
#include "engines/agi/agi.h" // Caution for #define for NUM_CHANNELS, causes problems in mixer_intern.h #include "engines/agi/agi.h" // Caution for #define for NUM_CHANNELS, causes problems in mixer_intern.h
#ifdef ENABLE_AGI #ifdef ENABLE_AGI

View file

@ -23,6 +23,7 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL #define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h" #include "common/scummsys.h"
#include "common/str.h"
#include "zipreader.h" #include "zipreader.h"
ZipFile::ZipFile() { ZipFile::ZipFile() {
@ -193,7 +194,7 @@ bool ZipFile::findFile(const char *search) {
} }
if (!stricmp(name, searchName)) { if (!scumm_stricmp(name, searchName)) {
// consolePrintf("'%s'=='%s'\n", name, searchName); // consolePrintf("'%s'=='%s'\n", name, searchName);
return true; // Got it! return true; // Got it!
} else { } else {

View file

@ -75,7 +75,7 @@ endif
# Compiler options for files which should be optimised for speed # Compiler options for files which should be optimised for speed
OPT_SPEED := -O3 -mno-thumb OPT_SPEED := -O3 -marm
# Compiler options for files which should be optimised for space # Compiler options for files which should be optimised for space
OPT_SIZE := -Os -mthumb OPT_SIZE := -Os -mthumb
@ -134,7 +134,8 @@ engines/teenagent/actor.o: CXXFLAGS:=$(CXXFLAGS) $(OPT_SPEED)
# #
############################################################################# #############################################################################
all: scummvm.nds scummvm.ds.gba # FIXME: Newer versions of devkitARM don't include dsbuild, which is needed to create scummvm.ds.gba
all: scummvm.nds # scummvm.ds.gba
clean: dsclean clean: dsclean
@ -170,10 +171,10 @@ dsclean:
# HACK/FIXME: C compiler, for cartreset.c -- we should switch this to use CXX # HACK/FIXME: C compiler, for cartreset.c -- we should switch this to use CXX
# as soon as possible. # as soon as possible.
CC := $(DEVKITPRO)/devkitARM/bin/arm-eabi-gcc CC := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-gcc
# HACK/TODO: Pointer to objcopy. This should really be set by configure # HACK/TODO: Pointer to objcopy. This should really be set by configure
OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-eabi-objcopy OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-objcopy
# #
# Set various flags # Set various flags
@ -194,7 +195,7 @@ ARM7_CFLAGS := -g -Wall -O2\
ARM7_CXXFLAGS := $(ARM7_CFLAGS) -fno-exceptions -fno-rtti ARM7_CXXFLAGS := $(ARM7_CFLAGS) -fno-exceptions -fno-rtti
ARM7_LDFLAGS := -g $(ARM7_ARCH) -mno-fpu ARM7_LDFLAGS := -g $(ARM7_ARCH) -mfloat-abi=soft
# HACK/FIXME: Define a custom build rule for cartreset.c. # HACK/FIXME: Define a custom build rule for cartreset.c.
# We do this because it is a .c file, not a .cpp file and so is outside our # We do this because it is a .c file, not a .cpp file and so is outside our

View file

@ -20,6 +20,8 @@
* *
*/ */
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h" #include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(__DS__) #if defined(DYNAMIC_MODULES) && defined(__DS__)

13
configure vendored
View file

@ -1476,7 +1476,7 @@ dreamcast)
ds) ds)
_host_os=ds _host_os=ds
_host_cpu=arm _host_cpu=arm
_host_alias=arm-eabi _host_alias=arm-none-eabi
;; ;;
gamecube) gamecube)
_host_os=gamecube _host_os=gamecube
@ -2555,7 +2555,8 @@ case $_host_os in
append_var DEFINES "-DARM" append_var DEFINES "-DARM"
append_var DEFINES "-DNONSTANDARD_PORT" append_var DEFINES "-DNONSTANDARD_PORT"
append_var CXXFLAGS "-isystem $DEVKITPRO/libnds/include" append_var CXXFLAGS "-isystem $DEVKITPRO/libnds/include"
append_var CXXFLAGS "-isystem $DEVKITPRO/devkitARM/arm-eabi/include" append_var CXXFLAGS "-I$DEVKITPRO/portlibs/nds/include"
append_var CXXFLAGS "-I$DEVKITPRO/portlibs/armv5te/include"
append_var CXXFLAGS "-mcpu=arm9tdmi" append_var CXXFLAGS "-mcpu=arm9tdmi"
append_var CXXFLAGS "-mtune=arm9tdmi" append_var CXXFLAGS "-mtune=arm9tdmi"
append_var CXXFLAGS "-fomit-frame-pointer" append_var CXXFLAGS "-fomit-frame-pointer"
@ -2566,7 +2567,7 @@ case $_host_os in
append_var CXXFLAGS "-fuse-cxa-atexit" append_var CXXFLAGS "-fuse-cxa-atexit"
append_var LDFLAGS "-specs=ds_arm9.specs" append_var LDFLAGS "-specs=ds_arm9.specs"
append_var LDFLAGS "-mthumb-interwork" append_var LDFLAGS "-mthumb-interwork"
append_var LDFLAGS "-mno-fpu" append_var LDFLAGS "-mfloat-abi=soft"
append_var LDFLAGS "-Wl,-Map,map.txt" append_var LDFLAGS "-Wl,-Map,map.txt"
if test "$_dynamic_modules" = no ; then if test "$_dynamic_modules" = no ; then
append_var LDFLAGS "-Wl,--gc-sections" append_var LDFLAGS "-Wl,--gc-sections"
@ -2576,6 +2577,8 @@ case $_host_os in
# append_var LDFLAGS "-Wl,--retain-symbols-file,ds.syms" # append_var LDFLAGS "-Wl,--retain-symbols-file,ds.syms"
fi fi
append_var LDFLAGS "-L$DEVKITPRO/libnds/lib" append_var LDFLAGS "-L$DEVKITPRO/libnds/lib"
append_var LDFLAGS "-L$DEVKITPRO/portlibs/nds/lib"
append_var LDFLAGS "-L$DEVKITPRO/portlibs/armv5te/lib"
append_var LIBS "-lnds9" append_var LIBS "-lnds9"
;; ;;
freebsd*) freebsd*)
@ -3727,7 +3730,7 @@ POST_OBJS_FLAGS := -Wl,--no-whole-archive
append_var DEFINES "-DUNCACHED_PLUGINS" append_var DEFINES "-DUNCACHED_PLUGINS"
append_var DEFINES "-DELF_NO_MEM_MANAGER" append_var DEFINES "-DELF_NO_MEM_MANAGER"
_mak_plugins=' _mak_plugins='
PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwork -mno-fpu PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwork -mfloat-abi=soft
' '
;; ;;
freebsd*) freebsd*)
@ -5232,6 +5235,7 @@ cat > config.h << EOF
$_config_h_data $_config_h_data
/* Data types */ /* Data types */
#ifndef SCUMMVM_DONT_DEFINE_TYPES
typedef unsigned $type_1_byte byte; typedef unsigned $type_1_byte byte;
typedef unsigned int uint; typedef unsigned int uint;
typedef unsigned $type_1_byte uint8; typedef unsigned $type_1_byte uint8;
@ -5242,6 +5246,7 @@ typedef signed $type_1_byte int8;
typedef signed $type_2_byte int16; typedef signed $type_2_byte int16;
typedef signed $type_4_byte int32; typedef signed $type_4_byte int32;
typedef signed $type_8_byte int64; typedef signed $type_8_byte int64;
#endif
typedef $type_ptr uintptr; typedef $type_ptr uintptr;