Here's my fix for reading VRC2B Famicom Carts (Mapper 23) on HW5. The symptoms were reading incorrect CHR data on VRC2B carts resulting in consistently bad dumps with the wrong CRC32. If you think there is a better way to fix the issue, please feel free to reject. I know that this fixes the specific issue for myself with minimal risk of impacting other mapper types.
Example log with a bad dump of Contra (J):
Saving to NES/ROM/Contra/481/...
[*******************]
CRC32... 6F0B8DB7 -> Not found
Instead of bank switching on a single bank and reading 1024 bytes at a time, this update switches 8 banks at a time and reads 8 KiB per iteration. The hypothesis is that the timing between bank switching and reading 1024 bytes at a time is insufficient for the mapper while reading in batches of 8 KiB allows for enough time for the data to be switched and accessible.
This change fixes the ability to dump the following VRC2B Famicom cartridges:
B27B8CF4 -> Contra (Japan).nes
49123146 -> Getsu Fuuma Den (Japan).nes
AC9895CC -> Dragon Scroll - Yomigaerishi Maryuu (Japan).nes
Also verified a VRC4E Famicom Cartridge:
C1FBF659 -> Akumajou Special - Boku Dracula-kun (Japan).nes
Here's my fix for reading VRC2B Famicom Carts (Mapper 23) on HW5. The symptoms were reading incorrect CHR data on VRC2B carts resulting in consistently bad dumps with the wrong CRC32. If you think there is a better way to fix the issue, please feel free to reject. I know that this fixes the specific issue for myself with minimal risk of impacting other mapper types.
Example log with a bad dump of Contra (J):
Instead of bank switching on a single bank and reading 1024 bytes at a time, this update switches 8 banks at a time and reads 8 KiB per iteration. The hypothesis is that the timing between bank switching and reading 1024 bytes at a time is insufficient for the mapper while reading in batches of 8 KiB allows for enough time for the data to be switched and accessible.
This change fixes the ability to dump the following VRC2B Famicom cartridges:
B27B8CF4 -> Contra (Japan).nes 49123146 -> Getsu Fuuma Den (Japan).nes AC9895CC -> Dragon Scroll - Yomigaerishi Maryuu (Japan).nes
Also verified a VRC4E Famicom Cartridge:
C1FBF659 -> Akumajou Special - Boku Dracula-kun (Japan).nes