aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds/arm9/source/fat
diff options
context:
space:
mode:
authorNeil Millstone2007-06-30 23:03:03 +0000
committerNeil Millstone2007-06-30 23:03:03 +0000
commit75a05652e5851d9b6189088093a13b391e2a8b0c (patch)
treec9c2c94fad280961bca1dafb3e7a61a7efad9f16 /backends/platform/ds/arm9/source/fat
parentdc512c6dafeec519a76ee43e0f35acabd336606d (diff)
downloadscummvm-rg350-75a05652e5851d9b6189088093a13b391e2a8b0c.tar.gz
scummvm-rg350-75a05652e5851d9b6189088093a13b391e2a8b0c.tar.bz2
scummvm-rg350-75a05652e5851d9b6189088093a13b391e2a8b0c.zip
- Show mouse cursor option
- Support for SAGA, CINE, and AGI - Key bindings for Gob3 - Assembler optimisations submitted by Robin Watts svn-id: r27803
Diffstat (limited to 'backends/platform/ds/arm9/source/fat')
-rw-r--r--backends/platform/ds/arm9/source/fat/disc_io.c2
-rw-r--r--backends/platform/ds/arm9/source/fat/disc_io.h4
-rw-r--r--backends/platform/ds/arm9/source/fat/gba_nds_fat.c13
-rw-r--r--backends/platform/ds/arm9/source/fat/io_dldi.h2
4 files changed, 18 insertions, 3 deletions
diff --git a/backends/platform/ds/arm9/source/fat/disc_io.c b/backends/platform/ds/arm9/source/fat/disc_io.c
index c706cf8b3e..3cb70f510b 100644
--- a/backends/platform/ds/arm9/source/fat/disc_io.c
+++ b/backends/platform/ds/arm9/source/fat/disc_io.c
@@ -358,7 +358,7 @@ void disc_getDldiId(char* id) {
bool disc_setDsSlotInterface (void)
{
#ifdef ARM9
- REG_EXMEMCNT &= ~(1<<11);
+ REG_EXEMEMCNT &= ~(1<<11);
#endif
#ifdef ARM7
REG_EXEMEMCNT |= (1<<11);
diff --git a/backends/platform/ds/arm9/source/fat/disc_io.h b/backends/platform/ds/arm9/source/fat/disc_io.h
index 1fbcc78c19..06804afec7 100644
--- a/backends/platform/ds/arm9/source/fat/disc_io.h
+++ b/backends/platform/ds/arm9/source/fat/disc_io.h
@@ -33,7 +33,11 @@
// Disk caching is disabled on GBA to conserve memory
#define DISC_CACHE // uncomment this line to enable disc caching
+#ifdef DS_BUILD_F
+#define DISC_CACHE_COUNT 128 // maximum number of sectors to cache (512 bytes per sector)
+#else
#define DISC_CACHE_COUNT 32 // maximum number of sectors to cache (512 bytes per sector)
+#endif
//#define DISK_CACHE_DMA // use DMA for cache copies. If this is enabled, the data buffers must be word aligned
diff --git a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c
index f343c4b997..b5fdd665df 100644
--- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c
+++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c
@@ -1362,9 +1362,18 @@ DIR_ENT FAT_DirEntFromPath (const char* path)
DIR_ENT dirEntry;
u32 dirCluster;
bool flagLFN, dotSeen;
-
// Start at beginning of path
pathPos = 0;
+
+#ifdef DS_BUILD_F
+ // Problems with Kyrandia doing a load of path lookups are reduced by this hack.
+ if (strstr(path, ".voc") || strstr(path, ".voc"))
+ {
+ dirEntry.name[0] = FILE_FREE;
+ dirEntry.attrib = 0x00;
+ return;
+ }
+#endif
if (path[pathPos] == '/')
{
@@ -2499,6 +2508,7 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin)
u32 position;
u32 curPos;
+
if ((file == NULL) || (file->inUse == false)) // invalid file
{
return -1;
@@ -2613,6 +2623,7 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin)
}
return 0;
+
}
/*-----------------------------------------------------------------
diff --git a/backends/platform/ds/arm9/source/fat/io_dldi.h b/backends/platform/ds/arm9/source/fat/io_dldi.h
index 86c3407374..053de3a94c 100644
--- a/backends/platform/ds/arm9/source/fat/io_dldi.h
+++ b/backends/platform/ds/arm9/source/fat/io_dldi.h
@@ -30,7 +30,7 @@ extern u8 _dldi_driver_name;
static inline LPIO_INTERFACE DLDI_GetInterface(void) {
#ifdef NDS
// NDM: I'm really not sure about this change ARM9 - ARM7
- REG_EXMEMCNT &= ~(ARM7_OWNS_ROM | ARM7_OWNS_CARD);
+ REG_EXEMEMCNT &= ~(ARM7_OWNS_ROM | ARM7_OWNS_CARD);
#endif // defined NDS
return &_io_dldi;
}