diff options
author | Neil Millstone | 2007-02-15 23:23:03 +0000 |
---|---|---|
committer | Neil Millstone | 2007-02-15 23:23:03 +0000 |
commit | 45ed48a8609bbf41360f124c272b788c5ee315ee (patch) | |
tree | f0d5fe33763be134ad49bfe65ed4e8a617c62ca7 /backends/platform/ds/arm9/source/fat | |
parent | 26a3ad56e5fbceea3b8fc111a9b1ad37ca2bd78a (diff) | |
download | scummvm-rg350-45ed48a8609bbf41360f124c272b788c5ee315ee.tar.gz scummvm-rg350-45ed48a8609bbf41360f124c272b788c5ee315ee.tar.bz2 scummvm-rg350-45ed48a8609bbf41360f124c272b788c5ee315ee.zip |
Changes made for 0.9.1a beta2 release backported to trunk
svn-id: r25617
Diffstat (limited to 'backends/platform/ds/arm9/source/fat')
-rw-r--r-- | backends/platform/ds/arm9/source/fat/disc_io.c | 22 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/fat/disc_io.h | 1 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/fat/io_dldi.h | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/fat/io_dldi.s | 2 |
4 files changed, 27 insertions, 0 deletions
diff --git a/backends/platform/ds/arm9/source/fat/disc_io.c b/backends/platform/ds/arm9/source/fat/disc_io.c index 988810073d..006d4f3d0f 100644 --- a/backends/platform/ds/arm9/source/fat/disc_io.c +++ b/backends/platform/ds/arm9/source/fat/disc_io.c @@ -92,6 +92,8 @@ LPIO_INTERFACE active_interface = 0; */ int discDetect = 0; +int dldiFound = FALSE; + #ifdef DISC_CACHE #include <string.h> @@ -339,6 +341,15 @@ FATDevice disc_getDeviceId() { return currentDevice; } +void disc_getDldiId(char* id) { + char* driverId = (char *) &_io_dldi; + id[0] = driverId[0]; + id[1] = driverId[1]; + id[2] = driverId[2]; + id[3] = driverId[3]; + id[4] = '\0'; +} + #ifdef NDS // Check the DS card slot for a valid memory card interface // If an interface is found, it is set as the default interace @@ -355,6 +366,17 @@ bool disc_setDsSlotInterface (void) active_interface = DLDI_GetInterface(); + if (stricmp(&_dldi_driver_name, "Default (No interface)")) { + char name[48]; + memcpy(name, &_dldi_driver_name, 48); + name[47] = '\0'; + consolePrintf("DLDI Device:\n'%s'\n", name); + dldiFound = TRUE; + } else { + consolePrintf("DLDI Driver not patched!\n"); + dldiFound = FALSE; + } + if (active_interface->fn_StartUp()) { consolePrintf("DLDI Driver Initialised OK!\n"); currentDevice = DEVICE_DLDI; diff --git a/backends/platform/ds/arm9/source/fat/disc_io.h b/backends/platform/ds/arm9/source/fat/disc_io.h index 2fff7f3bd5..1fbcc78c19 100644 --- a/backends/platform/ds/arm9/source/fat/disc_io.h +++ b/backends/platform/ds/arm9/source/fat/disc_io.h @@ -105,6 +105,7 @@ extern bool disc_IsInserted(void) ; extern void disc_setEnable(int en); extern FATDevice disc_getDeviceId(); +void disc_getDldiId(char* id); /*----------------------------------------------------------------- disc_ReadSectors diff --git a/backends/platform/ds/arm9/source/fat/io_dldi.h b/backends/platform/ds/arm9/source/fat/io_dldi.h index 6f97ca7b45..4ef3625eba 100644 --- a/backends/platform/ds/arm9/source/fat/io_dldi.h +++ b/backends/platform/ds/arm9/source/fat/io_dldi.h @@ -23,6 +23,8 @@ extern IO_INTERFACE _io_dldi; +extern u8 _dldi_driver_name; + // export interface static inline LPIO_INTERFACE DLDI_GetInterface(void) { #ifdef NDS diff --git a/backends/platform/ds/arm9/source/fat/io_dldi.s b/backends/platform/ds/arm9/source/fat/io_dldi.s index 8d21522baf..c2314e772d 100644 --- a/backends/platform/ds/arm9/source/fat/io_dldi.s +++ b/backends/platform/ds/arm9/source/fat/io_dldi.s @@ -2,6 +2,7 @@ .align 4 .arm .global _io_dldi + .global _dldi_driver_name @--------------------------------------------------------------------------------- .equ FEATURE_MEDIUM_CANREAD, 0x00000001 .equ FEATURE_MEDIUM_CANWRITE, 0x00000002 @@ -21,6 +22,7 @@ @--------------------------------------------------------------------------------- @ Text identifier - can be anything up to 47 chars + terminating null -- 16 bytes .align 4 +_dldi_driver_name: .asciz "Default (No interface)" @--------------------------------------------------------------------------------- |