Skip to content

pico: implement ROM mirroring for small cartridges#262

Open
ZengGengSen wants to merge 1 commit intolibretro:masterfrom
ZengGengSen:master
Open

pico: implement ROM mirroring for small cartridges#262
ZengGengSen wants to merge 1 commit intolibretro:masterfrom
ZengGengSen:master

Conversation

@ZengGengSen
Copy link
Copy Markdown

Hardware-accurate ROM mirroring is now applied to all cartridges smaller than 4MB. By rounding the ROM size up to the next power-of-two and mapping it repeatedly across the 4MB window:

  1. It matches real hardware mirroring behavior.
  2. It prevents FAME/M68K Fetch table misses where Fetch[n] would be 0.
  3. It fixes SIGSEGV crashes caused by the CPU jumping to unmapped memory regions within the cartridge space.

Hardware-accurate ROM mirroring is now applied to all cartridges smaller
than 4MB. By rounding the ROM size up to the next power-of-two and
mapping it repeatedly across the 4MB window:
1. It matches real hardware mirroring behavior.
2. It prevents FAME/M68K Fetch table misses where Fetch[n] would be 0.
3. It fixes SIGSEGV crashes caused by the CPU jumping to unmapped
   memory regions within the cartridge space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant