aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds
diff options
context:
space:
mode:
authorCameron Cawley2017-11-14 23:00:56 +0000
committerEugene Sandulenko2018-04-07 09:30:07 +0200
commit9111998c49958646a9216548b9c886136afd7c14 (patch)
treeb54641021cc27c9c9d3960001f929e8639a5bb2f /backends/platform/ds
parent668084c58a2267897f58eb6a6d9baac09b65969d (diff)
downloadscummvm-rg350-9111998c49958646a9216548b9c886136afd7c14.tar.gz
scummvm-rg350-9111998c49958646a9216548b9c886136afd7c14.tar.bz2
scummvm-rg350-9111998c49958646a9216548b9c886136afd7c14.zip
DS: Fix compilation with devkitARM r47
Diffstat (limited to 'backends/platform/ds')
-rw-r--r--backends/platform/ds/arm9/source/cdaudio.cpp2
-rw-r--r--backends/platform/ds/arm9/source/dsmain.cpp2
-rw-r--r--backends/platform/ds/arm9/source/dsmain.h2
-rw-r--r--backends/platform/ds/arm9/source/dsoptions.cpp2
-rw-r--r--backends/platform/ds/arm9/source/fat/disc_io.c2
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp1
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h2
-rw-r--r--backends/platform/ds/arm9/source/wordcompletion.cpp2
-rw-r--r--backends/platform/ds/arm9/source/zipreader.cpp3
-rw-r--r--backends/platform/ds/ds.mk11
10 files changed, 18 insertions, 11 deletions
diff --git a/backends/platform/ds/arm9/source/cdaudio.cpp b/backends/platform/ds/arm9/source/cdaudio.cpp
index c963f4d8bd..3952eeb6ab 100644
--- a/backends/platform/ds/arm9/source/cdaudio.cpp
+++ b/backends/platform/ds/arm9/source/cdaudio.cpp
@@ -23,10 +23,10 @@
// Disable symbol overrides for FILE as that is used in FLAC headers
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
+#include "dsmain.h"
#include "cdaudio.h"
#include "backends/fs/ds/ds-fs.h"
#include "common/config-manager.h"
-#include "dsmain.h"
#include "NDS/scummvm_ipc.h"
#define WAV_FORMAT_IMA_ADPCM 0x14
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index b7c9c108a6..ac030dbe2e 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -573,7 +573,7 @@ void initGame() {
s_currentGame = &gameList[0]; // Default game
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];
// consolePrintf("Game list num: %d\n", r);
}
diff --git a/backends/platform/ds/arm9/source/dsmain.h b/backends/platform/ds/arm9/source/dsmain.h
index fec97d878e..7345fc2ceb 100644
--- a/backends/platform/ds/arm9/source/dsmain.h
+++ b/backends/platform/ds/arm9/source/dsmain.h
@@ -23,6 +23,8 @@
#ifndef _DSMAIN_H
#define _DSMAIN_H
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include <nds.h>
#include "osystem_ds.h"
diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp
index 733592e958..562038166b 100644
--- a/backends/platform/ds/arm9/source/dsoptions.cpp
+++ b/backends/platform/ds/arm9/source/dsoptions.cpp
@@ -20,8 +20,8 @@
*
*/
-#include "dsoptions.h"
#include "dsmain.h"
+#include "dsoptions.h"
#include "gui/dialog.h"
#include "gui/gui-manager.h"
#include "gui/widgets/list.h"
diff --git a/backends/platform/ds/arm9/source/fat/disc_io.c b/backends/platform/ds/arm9/source/fat/disc_io.c
index 5896cbb750..74fc8fb09b 100644
--- a/backends/platform/ds/arm9/source/fat/disc_io.c
+++ b/backends/platform/ds/arm9/source/fat/disc_io.c
@@ -367,7 +367,7 @@ bool disc_setDsSlotInterface (void)
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];
memcpy(name, &_dldi_driver_name, 48);
name[47] = '\0';
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index 861ee2e0c5..03d336e804 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -23,6 +23,7 @@
// Allow use of stuff in <time.h>
#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
#include "common/system.h"
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index f883bd14d1..585f72bd31 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -24,6 +24,8 @@
#ifndef _OSYSTEM_DS_H_
#define _OSYSTEM_DS_H_
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include "backends/base-backend.h"
#include "common/events.h"
#include "nds.h"
diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp
index 36fa31247c..2257c49005 100644
--- a/backends/platform/ds/arm9/source/wordcompletion.cpp
+++ b/backends/platform/ds/arm9/source/wordcompletion.cpp
@@ -20,8 +20,8 @@
*
*/
-#include "wordcompletion.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
#ifdef ENABLE_AGI
diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp
index 0de2b0c981..2ad0a39ed2 100644
--- a/backends/platform/ds/arm9/source/zipreader.cpp
+++ b/backends/platform/ds/arm9/source/zipreader.cpp
@@ -23,6 +23,7 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
+#include "common/str.h"
#include "zipreader.h"
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);
return true; // Got it!
} else {
diff --git a/backends/platform/ds/ds.mk b/backends/platform/ds/ds.mk
index 78216cb9a2..f2e7707a7f 100644
--- a/backends/platform/ds/ds.mk
+++ b/backends/platform/ds/ds.mk
@@ -75,7 +75,7 @@ endif
# 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
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
@@ -170,10 +171,10 @@ dsclean:
# HACK/FIXME: C compiler, for cartreset.c -- we should switch this to use CXX
# 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
-OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-eabi-objcopy
+OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-objcopy
#
# Set various flags
@@ -194,7 +195,7 @@ ARM7_CFLAGS := -g -Wall -O2\
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.
# We do this because it is a .c file, not a .cpp file and so is outside our