UNIF: Fix potential crash when accessing non-existing rom banks
- As stated, prevent a potential crash on some certain roms using split rom banks. This is done by counting the number of prg/chr banks loaded and using this as limit count during mapper bank switching. - Update related boards.
This commit is contained in:
@@ -41,7 +41,7 @@ static SFORMAT StateRegs[] =
|
||||
static void Sync(void) {
|
||||
uint8 mirroring = m350 ? ((latche >> 7) & 1) : ((latche >> 5) & 1);
|
||||
uint8 mode = m350 ? ((latche >> 5) & 0x03) : ((latche >> 6) & 0x03);
|
||||
uint8 chip = m350 ? ((mode & 2) ? ((latche >> 5) & 1) : 0) : 0;
|
||||
uint8 chip = m350 ? ((latche & 0x40) ? ((latche & 0x20) >> 5) : 0) : 0;
|
||||
|
||||
setchr8(0);
|
||||
setprg8(0x6000, 1);
|
||||
|
||||
Reference in New Issue
Block a user