Skip to content

Commit 241ca5d

Browse files
committed
Fix blastem patch to match new addressing scheme
1 parent 81277c4 commit 241ca5d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

emulator-patches/blastem-0.6.2.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
commit ae6a97d3d053c29e0d1544f8fe09b9d2c2ba7c7d
1+
commit 5126640d303a7411d7e84e8d41cfd5d92b88c1bd
22
Author: Joey Parrish <[email protected]>
33
Date: Wed Mar 27 07:39:28 2024 -0700
44

@@ -156,7 +156,7 @@ index c91273c..f637add 100755
156156

157157
def gchannel(Val):
158158
diff --git a/romdb.c b/romdb.c
159-
index 79afa76..416647f 100644
159+
index 79afa76..feb6fcb 100644
160160
--- a/romdb.c
161161
+++ b/romdb.c
162162
@@ -14,6 +14,7 @@
@@ -190,11 +190,11 @@ index 79afa76..416647f 100644
190190
+ info->map[1].end = 0xA13100;
191191
+ // In our hardware, we use A1-A3 to address various special ports. A0 (low
192192
+ // byte / high byte) doesn't exist in the cartridge interface. But we
193-
+ // effectively respond to changes in the bottom 4 bits.
194-
+ // Therefore our port address is 0xA13000 and the mask is 0x00F.
195-
+ // In real hardware, the range would wrap around and 0x...00, 0x...10,
196-
+ // 0x...20, ... would all map to the same port.
197-
+ info->map[1].mask = 0x00000F;
193+
+ // effectively respond to changes in the bottom 5 bits.
194+
+ // Therefore our port address is 0xA13000 and the mask is 0x01F.
195+
+ // In real hardware, the range would wrap around and 0x...00, 0x...20,
196+
+ // 0x...40, ... would all map to the same port.
197+
+ info->map[1].mask = 0x00001F;
198198
+
199199
+ info->map[2].start = 0x000000;
200200
+ info->map[2].end = 0x200000;

0 commit comments

Comments
 (0)