mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-10 23:15:08 +01:00
Improve NES cart detection
This commit is contained in:
parent
6561b8d5d9
commit
d6a4101a96
@ -409,14 +409,14 @@ boolean getMapping() {
|
||||
println_Msg(F("Searching database..."));
|
||||
display_Update();
|
||||
|
||||
// Read first 16 bytes of prg rom
|
||||
for (int x = 0; x < 16; x++) {
|
||||
// Read first 512 bytes of prg rom
|
||||
for (int x = 0; x < 512; x++) {
|
||||
sdBuffer[x] = read_prg_byte(0x8000 + x);
|
||||
}
|
||||
|
||||
// Calculate CRC32
|
||||
uint32_t oldcrc32 = 0xFFFFFFFF;
|
||||
for (int c = 0; c < 16; c++) {
|
||||
for (int c = 0; c < 512; c++) {
|
||||
oldcrc32 = updateCRC(sdBuffer[c], oldcrc32);
|
||||
}
|
||||
char crcStr[9];
|
||||
|
@ -49,7 +49,7 @@ Savetypes:
|
||||
6 = 16K Eeprom
|
||||
|
||||
## nes.txt
|
||||
This file stores the iNES Header, the CRC32 of the first 16 bytes after the iNES header and the CRC32 of the complete ROM minus the iNES header.
|
||||
This file stores the iNES Header, the CRC32 of the first 512 bytes after the iNES header and the CRC32 of the complete ROM minus the iNES header.
|
||||
|
||||
Example:
|
||||
89 Dennou Kyuusei Uranai (Japan).nes
|
||||
|
Loading…
Reference in New Issue
Block a user