diff options
author | sanni <[email protected]> | 2022-10-31 15:41:29 +0100 |
---|---|---|
committer | sanni <[email protected]> | 2022-10-31 15:41:29 +0100 |
commit | cc17c70e304fb106b0399b333f86fcc68d70dc32 (patch) | |
tree | 472604fdd66f984868077018f1bfc8d8e77c6070 /Cart_Reader/SNES.ino | |
parent | a3feb32e156309bbe80c8f1f08283664cc3c1914 (diff) | |
download | cartreader-cc17c70e304fb106b0399b333f86fcc68d70dc32.tar.gz cartreader-cc17c70e304fb106b0399b333f86fcc68d70dc32.zip |
Fix reading/writing 4MB HiROM
HiROM starts at bank 192 and has 64 banks so byte variable currBank overflows.
Diffstat (limited to 'Cart_Reader/SNES.ino')
-rw-r--r-- | Cart_Reader/SNES.ino | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index eab1339..a9e5ec7 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -602,7 +602,7 @@ void readLoRomBanks(unsigned int start, unsigned int total, FsFile* file) { uint32_t totalProgressBar = (uint32_t)(total - start) * 1024; draw_progressbar(0, totalProgressBar); - for (byte currBank = start; currBank < total; currBank++) { + for (word currBank = start; currBank < total; currBank++) { PORTL = currBank; // Blink led @@ -653,7 +653,7 @@ void readHiRomBanks(unsigned int start, unsigned int total, FsFile* file) { uint32_t totalProgressBar = (uint32_t)(total - start) * 1024; draw_progressbar(0, totalProgressBar); - for (byte currBank = start; currBank < total; currBank++) { + for (word currBank = start; currBank < total; currBank++) { PORTL = currBank; // Blink led |