summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/harddriv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/harddriv.c')
-rw-r--r--src/mame/drivers/harddriv.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/mame/drivers/harddriv.c b/src/mame/drivers/harddriv.c
index 8d44db61b2a..49a8dc6d8a6 100644
--- a/src/mame/drivers/harddriv.c
+++ b/src/mame/drivers/harddriv.c
@@ -3632,21 +3632,6 @@ ROM_END
*
*************************************/
-/* COMMON INIT: find all the CPUs */
-static void find_cpus(running_machine *machine)
-{
- harddriv_state *state = (harddriv_state *)machine->driver_data;
- state->maincpu = devtag_get_device(machine, "maincpu");
- state->gsp = devtag_get_device(machine, "gsp");
- state->msp = devtag_get_device(machine, "msp");
- state->adsp = devtag_get_device(machine, "adsp");
- state->soundcpu = devtag_get_device(machine, "soundcpu");
- state->sounddsp = devtag_get_device(machine, "sounddsp");
- state->jsacpu = devtag_get_device(machine, "jsa");
- state->dsp32 = devtag_get_device(machine, "dsp32");
-}
-
-
static const UINT16 default_eeprom[] =
{
1,
@@ -3660,9 +3645,6 @@ static void init_driver(running_machine *machine)
{
harddriv_state *state = (harddriv_state *)machine->driver_data;
- /* assume we're first to be called */
- find_cpus(machine);
-
/* note that we're not multisync and set the default EEPROM data */
state->gsp_multisync = FALSE;
state->atarigen.eeprom_default = default_eeprom;
@@ -3674,9 +3656,6 @@ static void init_multisync(running_machine *machine, int compact_inputs)
{
harddriv_state *state = (harddriv_state *)machine->driver_data;
- /* assume we're first to be called */
- find_cpus(machine);
-
/* note that we're multisync and set the default EEPROM data */
state->gsp_multisync = TRUE;
state->atarigen.eeprom_default = default_eeprom;
@@ -3736,10 +3715,10 @@ static void init_ds3(running_machine *machine)
/* if we have a sound DSP, boot it */
if (state->soundcpu != NULL && cpu_get_type(state->soundcpu) == CPU_ADSP2105)
- adsp2105_load_boot_data(state->soundcpu->region->base.u8 + 0x10000, state->soundcpu->region->base.u32);
+ adsp2105_load_boot_data(state->soundcpu->region()->base.u8 + 0x10000, state->soundcpu->region()->base.u32);
if (state->sounddsp != NULL && cpu_get_type(state->sounddsp) == CPU_ADSP2105)
- adsp2105_load_boot_data(state->sounddsp->region->base.u8 + 0x10000, state->sounddsp->region->base.u32);
+ adsp2105_load_boot_data(state->sounddsp->region()->base.u8 + 0x10000, state->sounddsp->region()->base.u32);
/*
@@ -3994,10 +3973,7 @@ static READ32_HANDLER( rddsp32_speedup_r )
int cycles_to_burn = 17 * 4 * (0x2bc - r1 - 2);
if (cycles_to_burn > 20 * 4)
{
- int icount_remaining = *cpu_get_icount_ptr(space->cpu);
- if (cycles_to_burn > icount_remaining)
- cycles_to_burn = icount_remaining;
- cpu_adjust_icount(space->cpu, -cycles_to_burn);
+ cpu_eat_cycles(space->cpu, cycles_to_burn);
memory_write_word(space, r14 - 0x14, r1 + cycles_to_burn / 17);
}
state->msp_speedup_count[0]++;