msx2: megasd falls back to slot 2-3 on probe fail
authorgeijoenr <enric.geijo@gmail.com>
Tue, 30 May 2017 18:06:46 +0000 (20:06 +0200)
committergeijoenr <geijoenr@gmail.com>
Mon, 5 Jun 2017 18:23:50 +0000 (20:23 +0200)
this makes it easier to set-up on openmsx

Kernel/platform-msx2/devmegasd.c

index e0bb3dc..90690f6 100644 (file)
@@ -45,7 +45,7 @@ uint8_t slotmfr;
 int megasd_probe()
 {
     uint8_t *sigp = (uint8_t *) MSD_MAGIC_ADDR;
-    uint8_t slot = 1;
+    uint8_t slot;
 
     for (slot = 1; slot < 3; slot++) {
         /* try to find MegaFlashRom signature in slots 1 and 2 */
@@ -56,7 +56,11 @@ int megasd_probe()
             goto found;
     }
     mapslot_bank1(slotram);
-    return 0;
+    // XXX: this that makes it easier to run witn megaSD when using openmsx
+    //      otherwise setting up the megaSD for proper detection is a hassle
+    slot = 2;
+    slotmfr = 0x80 | MSD_SUBSLOT << 2 | 2;
+    //return 0;
 
 found:
     mapslot_bank1(slotram);