From 19b962d0a80310ce25e9d6137a39035841fc6d81 Mon Sep 17 00:00:00 2001 From: geijoenr Date: Tue, 30 May 2017 20:06:46 +0200 Subject: [PATCH] msx2: megasd falls back to slot 2-3 on probe fail this makes it easier to set-up on openmsx --- Kernel/platform-msx2/devmegasd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Kernel/platform-msx2/devmegasd.c b/Kernel/platform-msx2/devmegasd.c index e0bb3dcb..90690f67 100644 --- a/Kernel/platform-msx2/devmegasd.c +++ b/Kernel/platform-msx2/devmegasd.c @@ -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); -- 2.34.1