Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

Retro-Go: Mega Drive long-word ROM reads inside the ROM, README pictures

Mason3639bd42c3a39a1
diff --git a/games/retrogo/README.md b/games/retrogo/README.md
index 82804888..006105dc 100644
--- a/games/retrogo/README.md
+++ b/games/retrogo/README.md
@@ -39,6 +39,14 @@ You pick the games on NumPlay's customizer website: it puts them inside your Num
<td align="center"><img src="docs/coltab.png" width="320" alt="Retro-Go's ColecoVision tab with two games"><br><sub>The ColecoVision tab</sub></td>
<td align="center"><img src="docs/col.png" width="320" alt="Bankruptcy Builder, a ColecoVision homebrew game"><br><sub>Bankruptcy Builder on the ColecoVision</sub></td>
</tr>
+ <tr>
+ <td align="center"><img src="docs/gwtab.png" width="320" alt="Retro-Go's Game & Watch tab: a gold background with the console"><br><sub>The Game & Watch tab</sub></td>
+ <td align="center"><img src="docs/mdtab.png" width="320" alt="Retro-Go's Mega Drive tab: a dark grey background with the console"><br><sub>The Mega Drive tab</sub></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="docs/md.png" width="320" alt="Cave Story MD, a Mega Drive homebrew game, in its first cave"><br><sub>Cave Story MD on the Mega Drive</sub></td>
+ <td></td>
+ </tr>
</table>
## Controls
diff --git a/games/retrogo/docs/gwtab.png b/games/retrogo/docs/gwtab.png
new file mode 100644
index 00000000..107aaa13
Binary files /dev/null and b/games/retrogo/docs/gwtab.png differ
diff --git a/games/retrogo/docs/md.png b/games/retrogo/docs/md.png
new file mode 100644
index 00000000..3d76fc73
Binary files /dev/null and b/games/retrogo/docs/md.png differ
diff --git a/games/retrogo/docs/mdtab.png b/games/retrogo/docs/mdtab.png
new file mode 100644
index 00000000..d7cce43d
Binary files /dev/null and b/games/retrogo/docs/mdtab.png differ
diff --git a/games/retrogo/src/md/m68k.h b/games/retrogo/src/md/m68k.h
index 524c6e1a..2c90cd3b 100644
--- a/games/retrogo/src/md/m68k.h
+++ b/games/retrogo/src/md/m68k.h
@@ -166,7 +166,7 @@
extern unsigned int md_rom_mask;
#define FETCH8ROM(A) ((ROM_DATA[((A) ^ 1) & md_rom_mask]))
#define FETCH16ROM(A) ((*(unsigned short *)&ROM_DATA[(A) & md_rom_mask]))
-#define FETCH32ROM(A) ( (*(unsigned int *)&ROM_DATA[(A) & md_rom_mask] << 16) | (*(unsigned int *)&ROM_DATA[(A) & md_rom_mask] >> 16) )
+#define FETCH32ROM(A) (((unsigned int)FETCH16ROM(A) << 16) | FETCH16ROM((A) + 2)) /* (each word inside the ROM) */
#if GNW_TARGET_MARIO !=0 || GNW_TARGET_ZELDA!=0