aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsanni <[email protected]>2023-01-11 09:23:33 +0100
committerGitHub <[email protected]>2023-01-11 09:23:33 +0100
commit1583689c7fdf82bddd51c0d5be2af12920a031a4 (patch)
tree2cdd8dc0646ed635297a35bc6b5b57e1b60b17d9
parent99df2d4bf5fb508240381dcdbb752548ef909b9a (diff)
parentc77ad6da2e5f896ea831464549082a684981afb7 (diff)
downloadcartreader-1583689c7fdf82bddd51c0d5be2af12920a031a4.tar.gz
cartreader-1583689c7fdf82bddd51c0d5be2af12920a031a4.zip
Merge pull request #678 from PsyK0p4T/master
Update PCE.ino
-rw-r--r--Cart_Reader/PCE.ino12
1 files changed, 7 insertions, 5 deletions
diff --git a/Cart_Reader/PCE.ino b/Cart_Reader/PCE.ino
index a20c9d0..edf3dad 100644
--- a/Cart_Reader/PCE.ino
+++ b/Cart_Reader/PCE.ino
@@ -404,13 +404,16 @@ uint32_t detect_rom_size_PCE(void) {
rom_size = 1024;
}
- //If rom size is more than or equal to 512KB, detect Street fighter II'
+ //If rom size is more than or equal to 512KB, detect special cards
if (rom_size >= 512) {
- //Look for "NEC HE "
- if (read_byte_PCE(0x7FFF9) == 'N' && read_byte_PCE(0x7FFFA) == 'E' && read_byte_PCE(0x7FFFB) == 'C'
- && read_byte_PCE(0x7FFFC) == ' ' && read_byte_PCE(0x7FFFD) == 'H' && read_byte_PCE(0x7FFFE) == 'E') {
+ //Street Fighter II' - Champion Edition (Japan)
+ if (read_byte_PCE(0x7FFF9) == 'N' && read_byte_PCE(0x7FFFA) == 'E' && read_byte_PCE(0x7FFFB) == 'C' && read_byte_PCE(0x7FFFC) == ' ' && read_byte_PCE(0x7FFFD) == 'H' && read_byte_PCE(0x7FFFE) == 'E') {
rom_size = 2560;
}
+ //Populous (Japan)
+ if (read_byte_PCE(0x1F26) == 'P' && read_byte_PCE(0x1F27) == 'O' && read_byte_PCE(0x1F28) == 'P' && read_byte_PCE(0x1F29) == 'U' && read_byte_PCE(0x1F2A) == 'L' && read_byte_PCE(0x1F2B) == 'O' && read_byte_PCE(0x1F2C) == 'U' && read_byte_PCE(0x1F2D) == 'S') {
+ rom_size = 512;
+ }
}
return rom_size;
@@ -496,7 +499,6 @@ void crc_search(char *file_p, char *folder_p, uint32_t rom_size __attribute__((u
}
}
-
if (flag == CHKSUM_SKIP) {
print_Msg(F("Saved to "));
print_Msg(folder_p);