Repository navigation
Conversation
|
Claude finished @rene's task —— View job Code Review
Overall the PR is clean and well-structured. A few issues worth addressing:
|
520779f to
ee6b0f2
Compare
FCEUX emulator has been collecting mislabelled iNES headers for years in src/ines-correct.h: 273 distinct entries once its duplicates are dropped, each correcting the mapper, the nametable arrangement or both. Bring them over. Those entries never touch the ROM sizes, so any field of a fixup can now be FIXUP_KEEP, meaning the header's own value stands. The mirroring field takes two cases the iNES header cannot express on its own: one-screen, and FIXUP_NOT_FOUR_SCREEN, for boards whose dumps often claim four-screen VRAM they cannot have; it only acts when the header does claim it, and falls back to horizontal like FCEUX. The one entry that strips CHR ROM from a board that has none (11-in-1 Ball Games) sets chr_size to 0. FCEUX keys its table by the CRC-32 of the PRG ROM followed by the CHR ROM. For a clean dump, with no trainer and nothing past the CHR ROM, that is the CRC-32 of the image without its header, which is the key this table already uses, so the keys are carried over as they are. 58 of them were checked against real dumps. Where FCEUX lists a CRC twice, its first entry wins, as it does there, so Deadly Towers stays on mapper 34 and not 241. A four-screen correction sets only the four-screen bit, as a four-screen header would, so a dump already headed that way (Rad Racer II) loads exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
|
Claude finished @rene's task —— View job Implementing Review Fixes
Notes on review itemsAdded /** Board correction that also overrides the CHR ROM size */
#define FIXUP_BOARD_CHR(crc, mapper, chr_size, mirroring, title) \
{(crc), (mapper), FIXUP_KEEP, (chr_size), (mirroring), (title)}/* before */
{0xa912b064, 51, FIXUP_KEEP, 0, FIXUP_NOT_FOUR_SCREEN,
"11-in-1 Ball Games (has CHR ROM when it shouldn't)"},
/* after */
FIXUP_BOARD_CHR(0xa912b064, 51, 0, FIXUP_NOT_FOUR_SCREEN,
"11-in-1 Ball Games (has CHR ROM when it shouldn't)"),Narrowing casts (review items 2 & 3) — Not applicable to the actual code. The
The commit is ready locally but the push was rejected (403). Please grant the Actions bot write access to the branch, or apply the diff manually: +/** Board correction that also overrides the CHR ROM size */
+#define FIXUP_BOARD_CHR(crc, mapper, chr_size, mirroring, title) \
+ {(crc), (mapper), FIXUP_KEEP, (chr_size), (mirroring), (title)}
+
/** Known bad headers, and what the cartridge behind them actually is */
- {0xa912b064, 51, FIXUP_KEEP, 0, FIXUP_NOT_FOUR_SCREEN,
- "11-in-1 Ball Games (has CHR ROM when it shouldn't)"},
+ FIXUP_BOARD_CHR(0xa912b064, 51, 0, FIXUP_NOT_FOUR_SCREEN,
+ "11-in-1 Ball Games (has CHR ROM when it shouldn't)"), |

Description
FCEUX emulator has been collecting mislabelled iNES headers for years in src/ines-correct.h: 273 distinct entries once its duplicates are dropped, each correcting the mapper, the nametable arrangement or both. Bring them over.
Those entries never touch the ROM sizes, so any field of a fixup can now be FIXUP_KEEP, meaning the header's own value stands. The mirroring field takes two cases the iNES header cannot express on its own: one-screen, and FIXUP_NOT_FOUR_SCREEN, for boards whose dumps often claim four-screen VRAM they cannot have; it only acts when the header does claim it, and falls back to horizontal like FCEUX. The one entry that strips CHR ROM from a board that has none (11-in-1 Ball Games) sets chr_size to 0.
FCEUX keys its table by the CRC-32 of the PRG ROM followed by the CHR ROM. For a clean dump, with no trainer and nothing past the CHR ROM, that is the CRC-32 of the image without its header, which is the key this table already uses, so the keys are carried over as they are. 58 of them were checked against real dumps. Where FCEUX lists a CRC twice, its first entry wins, as it does there, so Deadly Towers stays on mapper 34 and not 241.
A four-screen correction sets only the four-screen bit, as a four-screen header would, so a dump already headed that way (Rad Racer II) loads exactly as before.