[Scummvm-cvs-logs] SF.net SVN: scummvm: [24380] scummvm/branches/branch-0-9-0/backends/ds/arm9 /source/fat

agent-q at users.sourceforge.net agent-q at users.sourceforge.net
Thu Oct 19 01:03:59 CEST 2006


Revision: 24380
          http://svn.sourceforge.net/scummvm/?rev=24380&view=rev
Author:   agent-q
Date:     2006-10-18 16:03:53 -0700 (Wed, 18 Oct 2006)

Log Message:
-----------
Allow SCSD to be manually selected

Modified Paths:
--------------
    scummvm/branches/branch-0-9-0/backends/ds/arm9/source/fat/disc_io.c
    scummvm/branches/branch-0-9-0/backends/ds/arm9/source/fat/disc_io.h

Modified: scummvm/branches/branch-0-9-0/backends/ds/arm9/source/fat/disc_io.c
===================================================================
--- scummvm/branches/branch-0-9-0/backends/ds/arm9/source/fat/disc_io.c	2006-10-18 21:42:18 UTC (rev 24379)
+++ scummvm/branches/branch-0-9-0/backends/ds/arm9/source/fat/disc_io.c	2006-10-18 23:03:53 UTC (rev 24380)
@@ -88,6 +88,7 @@
 		Added by www.neoflash.com 
 
 */
+int discDetect = 0;
 
 #ifdef DISC_CACHE
 
@@ -96,7 +97,6 @@
 #define CACHE_FREE 0xFFFFFFFF
 	
 static u8 cacheBuffer[ DISC_CACHE_COUNT * 512 ];
-bool M3SDDetect = false;
 
 static struct {
 	u32 sector;
@@ -220,8 +220,8 @@
 
 */
 
-void disc_setM3SDEnable(bool on) {
-	M3SDDetect = on;
+void disc_setEnable(int disc) {
+	discDetect = disc;
 }
 
 bool disc_setGbaSlotInterface (void)
@@ -239,7 +239,7 @@
 
 
 #ifdef SUPPORT_M3SD
-	if (M3SDDetect)	{
+	if (discDetect == 1)	{
 		// check if we have a M3 perfect SD plugged in
 		active_interface = M3SD_GetInterface() ;
 		if (active_interface->fn_StartUp())
@@ -250,6 +250,9 @@
 	}
 #endif
 
+
+
+
 #ifdef SUPPORT_MMCF
 	// check if we have a GBA Flash Cart plugged in
 	active_interface = MMCF_GetInterface() ;
@@ -317,18 +320,8 @@
 #endif
 
 
-#ifdef SUPPORT_SCSD
-	// check if we have a SuperCard SD plugged in
-	active_interface = SCSD_GetInterface() ;
-	if (active_interface->fn_StartUp())
-	{
-		// set SC SD as default IO
-		return true ;
-	} ;
-#endif
 
 
-
 	return false;
 }
 
@@ -346,6 +339,19 @@
 	WAIT_CR |= (1<<11);
 #endif
 
+#ifdef SUPPORT_SCSD
+	// check if we have a SuperCard SD plugged in
+	if (discDetect == 2) {
+		active_interface = SCSD_GetInterface() ;
+		consolePrintf("SCSD!");
+		if (active_interface->fn_StartUp())
+		{
+			// set SC SD as default IO
+			return true ;
+		} ;
+	}
+#endif
+
 #ifdef SUPPORT_NJSD
 	// check if we have a GBA Flash Cart plugged in
 	active_interface = NJSD_GetInterface() ;
@@ -439,7 +445,9 @@
 	}
 	return true;
 #else*/
+#ifdef DISC_CACHE
 	disc_CacheInit();
+#endif
 	if (active_interface) return active_interface->fn_WriteSectors(sector,numSecs,buffer) ;
 	return false ;
 //#endif

Modified: scummvm/branches/branch-0-9-0/backends/ds/arm9/source/fat/disc_io.h
===================================================================
--- scummvm/branches/branch-0-9-0/backends/ds/arm9/source/fat/disc_io.h	2006-10-18 21:42:18 UTC (rev 24379)
+++ scummvm/branches/branch-0-9-0/backends/ds/arm9/source/fat/disc_io.h	2006-10-18 23:03:53 UTC (rev 24380)
@@ -87,7 +87,7 @@
 extern bool disc_IsInserted(void) ;
 
 
-extern void disc_setM3SDEnable(bool on);
+extern void disc_setEnable(int en);
 /*-----------------------------------------------------------------
 disc_ReadSectors
 Read 512 byte sector numbered "sector" into "buffer"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list