fixed crash on game loading for any battery backed roms with mappers from MapInitTab
This commit is contained in:
parent
e2248ca404
commit
112d03d87f
|
@ -302,7 +302,7 @@ static void AllocBuffers()
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
GameMemBlock = (uint8*)FCEU_gmalloc(131072);
|
GameMemBlock = (uint8*)FCEU_gmalloc(GAME_MEM_BLOCK_SIZE);
|
||||||
RAM = (uint8*)FCEU_gmalloc(0x800);
|
RAM = (uint8*)FCEU_gmalloc(0x800);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -42,6 +42,9 @@ extern uint8 MMC50x5130;
|
||||||
extern uint8 MMC5HackSPScroll;
|
extern uint8 MMC5HackSPScroll;
|
||||||
extern uint8 MMC5HackSPPage;
|
extern uint8 MMC5HackSPPage;
|
||||||
|
|
||||||
|
|
||||||
|
#define GAME_MEM_BLOCK_SIZE 131072
|
||||||
|
|
||||||
extern uint8 *RAM; //shared memory modifications
|
extern uint8 *RAM; //shared memory modifications
|
||||||
extern uint8 *GameMemBlock; //shared memory modifications
|
extern uint8 *GameMemBlock; //shared memory modifications
|
||||||
extern int EmulationPaused;
|
extern int EmulationPaused;
|
||||||
|
|
|
@ -1243,7 +1243,7 @@ static void iNESPower(void)
|
||||||
if(head.ROM_type&2)
|
if(head.ROM_type&2)
|
||||||
memset(GameMemBlock+8192,0,sizeof(GameMemBlock)-8192);
|
memset(GameMemBlock+8192,0,sizeof(GameMemBlock)-8192);
|
||||||
else
|
else
|
||||||
memset(GameMemBlock,0,sizeof(GameMemBlock));
|
memset(GameMemBlock,0,GAME_MEM_BLOCK_SIZE);
|
||||||
|
|
||||||
NONE_init();
|
NONE_init();
|
||||||
ResetExState(0,0);
|
ResetExState(0,0);
|
||||||
|
|
Loading…
Reference in New Issue