Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong retro_memory_descriptor on NPOT mappings #26

Open
Alcaro opened this issue Nov 25, 2016 · 0 comments
Open

wrong retro_memory_descriptor on NPOT mappings #26

Alcaro opened this issue Nov 25, 2016 · 0 comments

Comments

@Alcaro
Copy link
Contributor

Alcaro commented Nov 25, 2016

[info: cartridge region=NTSC]
[info:   rom name=program.rom size=0x300000]
[info:   ram name=save.ram size=0x2000]
[info:   map id=rom address=00-3f,80-bf:8000-ffff]
[info:   map id=rom address=40-7f,c0-ff:0000-ffff]
[info:   map id=ram address=10-3f,90-bf:6000-7fff mask=0xe000]

RetroArch [INFO] ::    ndx flags  ptr  offset   start    select   disconn  len      addrspace
RetroArch [INFO] ::    005 M1A1bc WRAM 00000000 007E0000 00FE0000 00000000 00020000
RetroArch [INFO] ::    006 M1A1bc WRAM 00000000 00800000 00C0E000 00000000 00002000
RetroArch [INFO] ::    007 M1A1bc WRAM 00000000 00000000 00C0E000 00000000 00002000
RetroArch [INFO] ::    014 M1A1bc SRAM 00000000 00906000 00D0E000 00000000 00002000
RetroArch [INFO] ::    015 M1A1bc SRAM 00000000 00106000 00D0E000 00000000 00002000
RetroArch [INFO] ::    016 M1A1bC  ROM 00000000 00C00000 00C00000 00000000 00300000
RetroArch [INFO] ::    017 M1A1bC  ROM 00000000 00400000 00C00000 00000000 00300000
RetroArch [INFO] ::    018 M1A1bC  ROM 00000000 00808000 00C08000 00000000 00300000
RetroArch [INFO] ::    019 M1A1bC  ROM 00000000 00008000 00C08000 00000000 00300000

20-2f:6000-7fff is mapped in the core, but not in the published maps. sfc/memory/memory.cpp needs to split the map if start->end isn't an aligned power of two. I'd do it myself, but it's past midnight and I can't deal with the required bitbang magic this late.

Note that there's a single mapping for 00-3f:2140-2183, which should only become two mappings. Creating a mapping for every four bytes would be irritating. Possibly useful: There's a mapping merger here. License can be ignored for that function, copy freely; I wrote it myself.

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

No branches or pull requests

1 participant