Skip to content

MelonDS system bus 16 and 32 bit reads do not work #3121

@SuuperW

Description

@SuuperW

Summary

MelonDS has functions to read and write 8, 16, and 32 bit values from the ARM7 and ARM9 system buses. However, BizHawk only uses the 8 bit versions of these functions. This is a problem because some memory addresses cannot be read from or written to with the 8 bit versions, but can with 16 or 32 bit versions.
This is a problem that I had previously fixed with commit 99141e8, but has regressed since MelonDS has been Waterboxed.

Repro

  1. Start BizHawk debug build, so that you can see the console for MelonDS output
  2. Open any ROM in the MelonDS core
  3. Run a Lua script that contains this line: memory.read_u16_le(0x01000000, "ARM7 System Bus")

Output

The console window will display two lines beginning with "unknown arm7 read8", indicating that BizHawk called NDS::ARM7Read8 twice instead of NDS::ARM7Read16 once.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions