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

[Genesis Plus GX] Z80 RAM memory domain #3290

Closed
DevsArchive opened this issue Jun 24, 2022 · 3 comments
Closed

[Genesis Plus GX] Z80 RAM memory domain #3290

DevsArchive opened this issue Jun 24, 2022 · 3 comments
Labels
Core: Genplus-gx Sega Genesis / Mega Drive core Repro: Fixed/added in 2.9

Comments

@DevsArchive
Copy link

DevsArchive commented Jun 24, 2022

Genesis Plus GX does not swap bytes in Z80 RAM like it does with 68000 memory, and thus should not use MemoryDomainIntPtrSwap16Monitor. A friend was using the hex editor to poke at bytes in Z80 RAM for a game, and they were byteswapped.

@YoshiRulz YoshiRulz added the Core: Genplus-gx Sega Genesis / Mega Drive core label Jun 24, 2022
@ghost
Copy link

ghost commented Jun 25, 2022

Does this happen only in bizhawk or is it directly a genesis plus gx issue? Could it have been done on purpose at some point?

@nattthebear
Copy link
Contributor

Probably a Bizhawk specific issue. I didn't validate the low level details of how the memory was mapped before making all of these domains. It should be easily fixable.

@DevsArchive
Copy link
Author

DevsArchive commented Jun 25, 2022

It's specifically a BizHawk thing with the hex viewer. GPGX swaps 68000 memory bytes to optimize 16-bit accesses with hosts with little endian CPUs, but not Z80, since that's really only accessed in bytes. BizHawk takes into account the 68000 byteswapping, but it lumps Z80 memory into it when it's not supposed to. You can see the issue in the hex viewer if you set it to Z80 RAM and set it to display individual bytes: they'll be swapped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core: Genplus-gx Sega Genesis / Mega Drive core Repro: Fixed/added in 2.9
Projects
None yet
Development

No branches or pull requests

3 participants