mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
Fixed NSS reset behaviour, now games shouldn't die anymore when the CPU halts
This commit is contained in:
parent
2da493f56d
commit
59e803a5da
@ -1335,7 +1335,7 @@ static DEVICE_START( snes_sound )
|
|||||||
device->save_pointer(NAME(spc700->ram), SNES_SPCRAM_SIZE);
|
device->save_pointer(NAME(spc700->ram), SNES_SPCRAM_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DEVICE_RESET( snes_sound )
|
void spc700_reset(device_t *device)
|
||||||
{
|
{
|
||||||
snes_sound_state *spc700 = get_safe_token(device);
|
snes_sound_state *spc700 = get_safe_token(device);
|
||||||
int ii;
|
int ii;
|
||||||
@ -1353,6 +1353,12 @@ static DEVICE_RESET( snes_sound )
|
|||||||
dsp_reset(device);
|
dsp_reset(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static DEVICE_RESET( snes_sound )
|
||||||
|
{
|
||||||
|
spc700_reset(device);
|
||||||
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------
|
/*-------------------------------------------------
|
||||||
Device definition
|
Device definition
|
||||||
-------------------------------------------------*/
|
-------------------------------------------------*/
|
||||||
|
@ -32,5 +32,6 @@ WRITE8_DEVICE_HANDLER( spc_port_in );
|
|||||||
|
|
||||||
UINT8 *spc_get_ram(device_t *device);
|
UINT8 *spc_get_ram(device_t *device);
|
||||||
void spc700_set_volume(device_t *device,int volume);
|
void spc700_set_volume(device_t *device,int volume);
|
||||||
|
void spc700_reset(device_t *device);
|
||||||
|
|
||||||
#endif /* __SNES_SPC_H__ */
|
#endif /* __SNES_SPC_H__ */
|
||||||
|
@ -560,8 +560,9 @@ WRITE8_MEMBER(nss_state::port_01_w)
|
|||||||
device_set_input_line(m_soundcpu, INPUT_LINE_HALT, (data & 2) ? CLEAR_LINE : ASSERT_LINE);
|
device_set_input_line(m_soundcpu, INPUT_LINE_HALT, (data & 2) ? CLEAR_LINE : ASSERT_LINE);
|
||||||
device_set_input_line(m_maincpu, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
device_set_input_line(m_maincpu, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||||
device_set_input_line(m_soundcpu, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
device_set_input_line(m_soundcpu, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||||
|
/* also reset the device */
|
||||||
// printf("%02x\n",data);
|
if((data & 1) == 0)
|
||||||
|
spc700_reset(machine().device("spc700"));
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(nss_state::port_02_w)
|
WRITE8_MEMBER(nss_state::port_02_w)
|
||||||
|
Loading…
Reference in New Issue
Block a user