Skip to main content

Module game_corrections

Module game_corrections 

Source
Expand description

Per-game emulation corrections that depart from hardware ON PURPOSE.

The core emulates the hardware, including the hardware’s own glitches. A correction here exists only where the maintainer decided that a specific game’s authentic glitch should not be drawn by default, and each one is a crate::HardwareOptions setting: on by default for the listed dumps only, switchable off by the host, and recorded in movies and in the netplay configuration digest, so a replay or a peer runs the same picture.

§coherent_midline_copy (v3.6.2, T-RADRACER-COHERENT-COPY)

Rad Racer writes $2006 in the middle of several scanlines from sprite-0-timed loops whose timing varies by a few dots from frame to frame. When the delayed t -> v copy of such a write lands inside an 8-dot background fetch group, that group’s tile is fetched from two addresses (the nametable “Hybrid Addresses” splice, or a pattern row from the new fine Y), and about one frame in eleven draws an 8-pixel wrong tile in the sand right of the road (line 139) and at the horizon (line 114). A 2012 nesdev report describes a “very noticable glitch” on the right at that line on a real NES, so the glitch is the hardware’s. The correction holds such a copy to the next fetch-group boundary (rustynes_ppu::Ppu’s coherent_midline_copy), which draws every tile from one address. Decided by the maintainer on 2026-11-06; see the ADR 0030 withdrawal note.

The dumps are matched by the CRC32 of the ROM’s PRG and CHR data (after the 16-byte header and any 512-byte trainer, and no further than the sizes the header declares), the key the vendored game database (rustynes-gamedb’s rom_crc32) uses for the same three entries. Hashing everything after the header instead would miss a dump that carries a trainer or trailing bytes, which the cartridge parser accepts (review round 8 on #640). Only the USA dump was available to measure; the other two CRCs are the database’s, and their games are the same program.

Constants§

COHERENT_MIDLINE_COPY_DUMPS
The headerless CRC32s of the dumps that get the coherent mid-line copy correction by default, with the game database’s names.

Functions§

coherent_midline_copy_by_default
Whether rom (a whole iNES / NES 2.0 image, header included) is one of COHERENT_MIDLINE_COPY_DUMPS.