summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/gaelco3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/gaelco3d.cpp')
-rw-r--r--src/mame/drivers/gaelco3d.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mame/drivers/gaelco3d.cpp b/src/mame/drivers/gaelco3d.cpp
index c8a0f243453..b8bb7535756 100644
--- a/src/mame/drivers/gaelco3d.cpp
+++ b/src/mame/drivers/gaelco3d.cpp
@@ -190,13 +190,16 @@ void gaelco3d_state::machine_start()
}
-void gaelco3d_state::machine_reset_common()
+MACHINE_RESET_MEMBER(gaelco3d_state,common)
{
+ uint16_t *src;
+ int i;
+
m_framenum = 0;
/* boot the ADSP chip */
- uint16_t *src = (uint16_t *)memregion("user1")->base();
- for (int i = 0; i < (src[3] & 0xff) * 8; i++)
+ src = (uint16_t *)memregion("user1")->base();
+ for (i = 0; i < (src[3] & 0xff) * 8; i++)
{
uint32_t opcode = ((src[i*4+0] & 0xff) << 16) | ((src[i*4+1] & 0xff) << 8) | (src[i*4+2] & 0xff);
m_adsp_ram_base[i] = opcode;
@@ -211,7 +214,7 @@ void gaelco3d_state::machine_reset_common()
/* keep the TMS32031 halted until the code is ready to go */
m_tms->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
- for (int i = 0; i < SOUND_CHANNELS; i++)
+ for (i = 0; i < SOUND_CHANNELS; i++)
{
char buffer[10];
sprintf(buffer, "dac%d", i + 1);
@@ -222,15 +225,15 @@ void gaelco3d_state::machine_reset_common()
void gaelco3d_state::machine_reset()
{
- machine_reset_common();
+ MACHINE_RESET_CALL_MEMBER( common );
m_tms_offset_xor = 0;
m_soundlatch->acknowledge_w(machine().dummy_space(), 0, 0);
}
-void gaelco3d_state::machine_reset_gaelco3d2()
+MACHINE_RESET_MEMBER(gaelco3d_state,gaelco3d2)
{
- machine_reset_common();
+ MACHINE_RESET_CALL_MEMBER( common );
m_tms_offset_xor = BYTE_XOR_BE(0);
m_fp_clock = 27;
m_fp_state = 0;
@@ -1009,7 +1012,7 @@ MACHINE_CONFIG_START(gaelco3d_state::gaelco3d2)
MCFG_DEVICE_MODIFY("tms")
MCFG_DEVICE_CLOCK(50000000)
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_gaelco3d2, this));
+ MCFG_MACHINE_RESET_OVERRIDE(gaelco3d_state,gaelco3d2)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(gaelco3d_state::footbpow)