Skip to content

NES: Rainbow mapper accuracy fixes - #307

Open
BrokeStudio wants to merge 7 commits into
nesdev-org:masterfrom
BrokeStudio:rnbw-mapper-updates-3
Open

BrokeStudio wants to merge 7 commits into
nesdev-org:masterfrom
BrokeStudio:rnbw-mapper-updates-3

Conversation

@BrokeStudio

Copy link
Copy Markdown

This PR updates the Rainbow mapper to better match its documentation and hardware behavior.

Changes:

  • Fix Window Split detection, coordinate handling, and window source selection.
  • Fix scanline IRQ offset counting, jitter counter behavior, and IRQ status reporting.
  • Remove OAM address and mapping resets during rendering.
  • Restrict FPGA-RAM pattern reads to the first 4 KiB, including debugger reads.
  • Correct CHR banking mode limits, window bank masking, and attribute/background extended mode bits.
  • Remove reads from write-only registers $412A–$412D and $412F.
  • Return open bus when reading $4011 with IPCM output disabled.
  • Fix several mapper debugger entries.
  • Correct Wi-Fi register/IRQ behavior and initialize the send status as ready.

- fixed jitter counter logic
- CHR reads (and debug reads) now target only first 4K of mapper RAM
- removed reads from registers $412A-$412D, $412F
- CHR modes 4, 5, 6, 7 are all 512B banking mode (4)
- Windows Mode bank can only be 0, 1, 2 or 3 to address first 4K of mapper RAM
- fixed register $412F: Attribute/Background extended mode
- fixed debugger value ($4175, Scroll Y)
- fixed debugger value ($4107/17, PRG-RAM Bank 1)
- fixed $4011 output if IPCM is disabled
- fixed Windows Split Mode: Y scroll capped to 239 and new value only updated during VBlank
- fixed Wi-Fi IRQ condition
- fixed register $4161 returned value (IRQ must be enable)
- Removed OAM address reset at frame start
- Removed OAM mappings clear before sprite evaluation
- Count the third identical nametable read as IRQ offset 1
- Initialize the PPU read counter to 1 when detecting scanline start
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