mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-04 00:03:13 +02:00
Adjust the handling of >4MB ISX files
This commit is contained in:
@@ -549,7 +549,10 @@ int GB_load_isx(GB_gameboy_t *gb, const char *path)
|
|||||||
bank = byte;
|
bank = byte;
|
||||||
if (byte >= 0x80) {
|
if (byte >= 0x80) {
|
||||||
READ(byte);
|
READ(byte);
|
||||||
bank |= byte << 8;
|
/* TODO: This is just a guess, the docs don't elaborator on how banks > 0xFF are saved,
|
||||||
|
other than the fact that banks >= 80 requires two bytes to store them, and I haven't
|
||||||
|
encountered an ISX file for a ROM larger than 4MBs yet. */
|
||||||
|
bank += byte << 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
READ(address);
|
READ(address);
|
||||||
@@ -603,7 +606,6 @@ int GB_load_isx(GB_gameboy_t *gb, const char *path)
|
|||||||
uint8_t flag;
|
uint8_t flag;
|
||||||
uint16_t bank;
|
uint16_t bank;
|
||||||
uint16_t address;
|
uint16_t address;
|
||||||
uint8_t byte;
|
|
||||||
READ(count);
|
READ(count);
|
||||||
count = LE16(count);
|
count = LE16(count);
|
||||||
while (count--) {
|
while (count--) {
|
||||||
|
Reference in New Issue
Block a user