mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Fix namcos2 multisession crash Hi mamedev, If you run a namcos2 game multi-session (say marvland), it may crash due to an inappropriate use of auto_malloc. Fix attached. ~aa
This commit is contained in:
parent
1f7c87ec68
commit
62754695d7
1 changed files with 4 additions and 5 deletions
|
@ -94,10 +94,13 @@ ResetAllSubCPUs( int state )
|
|||
}
|
||||
}
|
||||
|
||||
MACHINE_RESET( namcos2 ){
|
||||
MACHINE_RESET( namcos2 )
|
||||
{
|
||||
int loop;
|
||||
mFinalLapProtCount = 0;
|
||||
|
||||
namcos2_eeprom = auto_malloc(namcos2_eeprom_size);
|
||||
|
||||
/* Initialise the bank select in the sound CPU */
|
||||
namcos2_sound_bankselect_w(0,0); /* Page in bank 0 */
|
||||
|
||||
|
@ -121,10 +124,6 @@ MACHINE_RESET( namcos2 ){
|
|||
|
||||
NVRAM_HANDLER( namcos2 )
|
||||
{
|
||||
if( !namcos2_eeprom )
|
||||
{
|
||||
namcos2_eeprom = auto_malloc(namcos2_eeprom_size);
|
||||
}
|
||||
if( read_or_write )
|
||||
{
|
||||
mame_fwrite( file, namcos2_eeprom, namcos2_eeprom_size );
|
||||
|
|
Loading…
Reference in a new issue