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

agent-q at users.sourceforge.net agent-q at users.sourceforge.net
Thu Oct 19 01:07:47 CEST 2006


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

Log Message:
-----------
Adding selection of SCSD and M3SD on boot

Modified Paths:
--------------
    scummvm/branches/branch-0-9-0/backends/ds/arm9/source/dsmain.cpp

Modified: scummvm/branches/branch-0-9-0/backends/ds/arm9/source/dsmain.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/backends/ds/arm9/source/dsmain.cpp	2006-10-18 23:03:53 UTC (rev 24380)
+++ scummvm/branches/branch-0-9-0/backends/ds/arm9/source/dsmain.cpp	2006-10-18 23:07:40 UTC (rev 24381)
@@ -2018,7 +2018,7 @@
 	consolePrintf("---------------------------\n");
 	consolePrintf("ScummVM DS\n");
 	consolePrintf("Ported by Neil Millstone\n");
-	consolePrintf("Version 0.9.1beta4 ");
+	consolePrintf("Version 0.9.1beta6 ");
 #if defined(DS_BUILD_A)
 	consolePrintf("build A\n");
 	consolePrintf("Supports: Lucasarts SCUMM\n");
@@ -2054,8 +2054,41 @@
 	int extraData = DSSaveFileManager::getExtraData();
 	bool present = DSSaveFileManager::isExtraDataPresent();
 
-	swiWaitForVBlank();
+	for (int r = 0; r < 30; r++) {
+		swiWaitForVBlank();
+	}
 
+	int mode = extraData & 0x03;
+
+	if (mode == 0) {
+		if ((keysHeld() & KEY_L) && !(keysHeld() & KEY_R)) {
+			mode = 1;
+		} else if (!(keysHeld() & KEY_L) && (keysHeld() & KEY_R)) {
+			mode = 2;
+		}
+	} else {
+		if ((keysHeld() & KEY_L) && !(keysHeld() & KEY_R)) {
+			mode = 0;
+		}
+	}
+
+
+	if (mode == 0) {
+		consolePrintf("On startup hold L if you have\n");
+		consolePrintf("an M3 SD or R for an SC SD\n");
+	} else if (mode == 1) {
+		consolePrintf("Using M3 SD Mode.\n");
+		consolePrintf("Hold L on startup to disable.\n");
+	} else if (mode == 2) {
+		consolePrintf("Using SC SD Mode.\n");
+		consolePrintf("Hold L on startup to disable.\n");
+	}
+
+	disc_setEnable(mode);
+	DSSaveFileManager::setExtraData(mode);
+
+
+/*
 	if ((present) && (extraData & 0x00000001)) {
 
 		if (keysHeld() & KEY_L) {
@@ -2077,8 +2110,9 @@
 	}
 
 	disc_setM3SDEnable(extraData & 0x00000001);
+*/
+	// Create a file system node to force search for a zip file in GBA rom space
 
-	// Create a file system node to force search for a zip file in GBA rom space
 	DSFileSystemNode* node = new DSFileSystemNode();
 	if (!node->getZip() || (!node->getZip()->isReady())) {
 		// If not found, init CF/SD driver


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