From 5e648a8db32e898510f8b4b95115e629a011e7bf Mon Sep 17 00:00:00 2001 From: Arisotura Date: Fri, 30 Apr 2021 03:01:52 +0200 Subject: [PATCH] fill most gaps in ROM list --- src/NDSCart.cpp | 19 +++++++++++++++++++ src/ROMList.h | 20 ++++++++++---------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp index 488bd9a2..4d102033 100644 --- a/src/NDSCart.cpp +++ b/src/NDSCart.cpp @@ -754,6 +754,25 @@ u8 CartRetail::SRAMWrite_FLASH(u8 val, u32 pos, bool last) if (last) SRAMStatus &= ~(1<<1); return 0; + case 0x0B: // fast read + if (pos <= 3) + { + SRAMAddr <<= 8; + SRAMAddr |= val; + return 0; + } + else if (pos == 4) + { + // dummy byte + return 0; + } + else + { + u8 ret = SRAM[SRAMAddr & (SRAMLength-1)]; + SRAMAddr++; + return ret; + } + case 0x9F: // read JEDEC IC // GBAtek says it should be 0xFF. verify? return 0xFF; diff --git a/src/ROMList.h b/src/ROMList.h index af2eab1c..30be9812 100644 --- a/src/ROMList.h +++ b/src/ROMList.h @@ -478,7 +478,7 @@ ROMListEntry ROMList[] = {0x45365241, 0x00800000, 0x00000002}, {0x45365242, 0x02000000, 0x00000002}, {0x45365259, 0x02000000, 0x00000002}, - {0x45365342, 0x01000000, 0xFFFFFFFF}, + {0x45365342, 0x01000000, 0x00000001}, {0x45365343, 0x04000000, 0x00000002}, {0x45365359, 0x04000000, 0x00000005}, {0x45365541, 0x00800000, 0x00000002}, @@ -492,7 +492,7 @@ ROMListEntry ROMList[] = {0x45373359, 0x01000000, 0x00000001}, {0x45373442, 0x01000000, 0x00000001}, {0x45373541, 0x01000000, 0x00000008}, - {0x45373542, 0x00800000, 0xFFFFFFFF}, + {0x45373542, 0x00800000, 0x00000002}, {0x45373643, 0x00800000, 0x00000001}, {0x45374143, 0x02000000, 0x00000002}, {0x45374159, 0x02000000, 0x00000002}, @@ -845,7 +845,7 @@ ROMListEntry ROMList[] = {0x45444E43, 0x04000000, 0x00000002}, {0x45444E59, 0x02000000, 0x00000001}, {0x45445041, 0x01000000, 0x00000002}, - {0x45445042, 0x04000000, 0xFFFFFFFF}, + {0x45445042, 0x04000000, 0x00000002}, {0x45445043, 0x02000000, 0x00000001}, {0x45445054, 0x08000000, 0x00000001}, {0x45445241, 0x02000000, 0x00000001}, @@ -913,7 +913,7 @@ ROMListEntry ROMList[] = {0x45463641, 0x08000000, 0x00000003}, {0x45463642, 0x08000000, 0x00000001}, {0x45463659, 0x02000000, 0x00000000}, - {0x45463742, 0x01000000, 0xFFFFFFFF}, + {0x45463742, 0x01000000, 0x00000001}, {0x45463743, 0x01000000, 0x00000003}, {0x45463859, 0x08000000, 0x00000008}, {0x45464159, 0x02000000, 0x00000002}, @@ -939,7 +939,7 @@ ROMListEntry ROMList[] = {0x45464C42, 0x10000000, 0x00000003}, {0x45464C43, 0x02000000, 0x00000001}, {0x45464D41, 0x01000000, 0x00000001}, - {0x45464D44, 0x02000000, 0xFFFFFFFF}, + {0x45464D44, 0x02000000, 0x00000001}, {0x45464D59, 0x04000000, 0x00000003}, {0x45464E41, 0x02000000, 0x00000005}, {0x45465042, 0x04000000, 0x00000002}, @@ -1643,7 +1643,7 @@ ROMListEntry ROMList[] = {0x45534754, 0x02000000, 0x00000001}, {0x45534759, 0x04000000, 0x00000003}, {0x45534841, 0x02000000, 0x00000002}, - {0x45534844, 0x02000000, 0xFFFFFFFF}, + {0x45534844, 0x02000000, 0x00000002}, {0x45534859, 0x02000000, 0x00000003}, {0x45534941, 0x01000000, 0x00000001}, {0x45534959, 0x04000000, 0x00000002}, @@ -2616,7 +2616,7 @@ ROMListEntry ROMList[] = {0x4A354F41, 0x02000000, 0x00000005}, {0x4A354F42, 0x10000000, 0x00000005}, {0x4A354F59, 0x04000000, 0x00000003}, - {0x4A355154, 0x04000000, 0xFFFFFFFF}, + {0x4A355154, 0x04000000, 0x00000001}, {0x4A355159, 0x01000000, 0x00000002}, {0x4A355442, 0x08000000, 0x00000002}, {0x4A355543, 0x04000000, 0x00000002}, @@ -3131,7 +3131,7 @@ ROMListEntry ROMList[] = {0x4A464B54, 0x04000000, 0x00000005}, {0x4A464B59, 0x02000000, 0x00000001}, {0x4A464C42, 0x10000000, 0x00000003}, - {0x4A464D44, 0x02000000, 0xFFFFFFFF}, + {0x4A464D44, 0x02000000, 0x00000001}, {0x4A464F41, 0x02000000, 0x00000003}, {0x4A464F59, 0x02000000, 0x00000003}, {0x4A465041, 0x04000000, 0x00000002}, @@ -5654,7 +5654,7 @@ ROMListEntry ROMList[] = {0x50504C43, 0x04000000, 0x00000003}, {0x50504C59, 0x00800000, 0x00000002}, {0x50504D43, 0x04000000, 0x00000001}, - {0x50504D44, 0x10000000, 0xFFFFFFFF}, + {0x50504D44, 0x10000000, 0x00000000}, {0x50504E41, 0x01000000, 0x00000001}, {0x50504E42, 0x04000000, 0x00000001}, {0x50504E43, 0x01000000, 0x00000002}, @@ -6400,7 +6400,7 @@ ROMListEntry ROMList[] = {0x56534256, 0x02000000, 0x00000001}, {0x56534556, 0x04000000, 0x00000001}, {0x56534656, 0x08000000, 0x00000003}, - {0x56534844, 0x02000000, 0xFFFFFFFF}, + {0x56534844, 0x02000000, 0x00000002}, {0x56544156, 0x02000000, 0x00000001}, {0x56554B56, 0x04000000, 0x00000001}, {0x56555A56, 0x02000000, 0x00000002},