mirror of
https://github.com/holub/mame
synced 2025-05-21 21:29:15 +03:00
Reverts questionable timer changes. [not worth mentioning]
This commit is contained in:
parent
9574ef8483
commit
f3f35e2af2
@ -327,7 +327,6 @@ UINT32 *jaguar_gpu_clut;
|
|||||||
UINT32 *jaguar_dsp_ram;
|
UINT32 *jaguar_dsp_ram;
|
||||||
UINT32 *jaguar_wave_rom;
|
UINT32 *jaguar_wave_rom;
|
||||||
UINT8 cojag_is_r3000;
|
UINT8 cojag_is_r3000;
|
||||||
emu_timer *gpu_sync_timer;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -582,11 +581,11 @@ static UINT32 *gpu_jump_address;
|
|||||||
static UINT8 gpu_command_pending;
|
static UINT8 gpu_command_pending;
|
||||||
static UINT32 gpu_spin_pc;
|
static UINT32 gpu_spin_pc;
|
||||||
|
|
||||||
static TIMER_CALLBACK( gpu_sync_timer_callback )
|
static TIMER_CALLBACK( gpu_sync_timer )
|
||||||
{
|
{
|
||||||
/* if a command is still pending, and we haven't maxed out our timer, set a new one */
|
/* if a command is still pending, and we haven't maxed out our timer, set a new one */
|
||||||
if (gpu_command_pending && param < 1000)
|
if (gpu_command_pending && param < 1000)
|
||||||
timer_adjust_oneshot(gpu_sync_timer, ATTOTIME_IN_USEC(50), ++param);
|
timer_set(machine, ATTOTIME_IN_USEC(50), NULL, ++param, gpu_sync_timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -600,7 +599,7 @@ static WRITE32_HANDLER( gpu_jump_w )
|
|||||||
jaguar_gpu_resume(space->machine);
|
jaguar_gpu_resume(space->machine);
|
||||||
|
|
||||||
/* start the sync timer going, and note that there is a command pending */
|
/* start the sync timer going, and note that there is a command pending */
|
||||||
timer_adjust_oneshot(gpu_sync_timer, attotime_zero, 0);
|
timer_call_after_resynch(space->machine, NULL, 0, gpu_sync_timer);
|
||||||
gpu_command_pending = 1;
|
gpu_command_pending = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1534,9 +1533,6 @@ static void cojag_common_init(running_machine *machine, UINT16 gpu_jump_offs, UI
|
|||||||
|
|
||||||
/* init the sound system and install DSP speedups */
|
/* init the sound system and install DSP speedups */
|
||||||
cojag_sound_init(machine);
|
cojag_sound_init(machine);
|
||||||
|
|
||||||
/* init the timer */
|
|
||||||
gpu_sync_timer = timer_alloc(machine, gpu_sync_timer_callback, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,12 +35,11 @@ public:
|
|||||||
/* misc */
|
/* misc */
|
||||||
int input_sel1;
|
int input_sel1;
|
||||||
int input_sel2;
|
int input_sel2;
|
||||||
int rombank0, rombank1;
|
|
||||||
|
int rombank0,rombank1;
|
||||||
|
|
||||||
UINT32 dac_adr, dac_bank, dac_adr_s, dac_adr_e, dac_busy;
|
UINT32 dac_adr, dac_bank, dac_adr_s, dac_adr_e, dac_busy;
|
||||||
|
|
||||||
emu_timer *dac_timer;
|
|
||||||
|
|
||||||
/* devices */
|
/* devices */
|
||||||
running_device *maincpu;
|
running_device *maincpu;
|
||||||
running_device *dac;
|
running_device *dac;
|
||||||
@ -161,7 +160,7 @@ static TIMER_CALLBACK( dac_callback )
|
|||||||
dac_data_w(state->dac, DACROM[(state->dac_bank * 0x10000 + state->dac_adr++) & 0x1ffff]);
|
dac_data_w(state->dac, DACROM[(state->dac_bank * 0x10000 + state->dac_adr++) & 0x1ffff]);
|
||||||
|
|
||||||
if (((state->dac_adr & 0xff00 ) >> 8) != state->dac_adr_e)
|
if (((state->dac_adr & 0xff00 ) >> 8) != state->dac_adr_e)
|
||||||
timer_adjust_oneshot(state->dac_timer, attotime_mul(ATTOTIME_IN_HZ(MCLK), 1024), 0);
|
timer_set(machine, attotime_mul(ATTOTIME_IN_HZ(MCLK), 1024), NULL, 0, dac_callback);
|
||||||
else
|
else
|
||||||
state->dac_busy = 0;
|
state->dac_busy = 0;
|
||||||
}
|
}
|
||||||
@ -179,7 +178,7 @@ static WRITE8_HANDLER( mjsister_dac_adr_e_w )
|
|||||||
state->dac_adr = state->dac_adr_s << 8;
|
state->dac_adr = state->dac_adr_s << 8;
|
||||||
|
|
||||||
if (state->dac_busy == 0)
|
if (state->dac_busy == 0)
|
||||||
timer_adjust_oneshot(state->dac_timer, attotime_zero, 0);
|
timer_call_after_resynch(space->machine, NULL, 0, dac_callback);
|
||||||
|
|
||||||
state->dac_busy = 1;
|
state->dac_busy = 1;
|
||||||
}
|
}
|
||||||
@ -469,8 +468,6 @@ static MACHINE_START( mjsister )
|
|||||||
state_save_register_global(machine, state->dac_adr_s);
|
state_save_register_global(machine, state->dac_adr_s);
|
||||||
state_save_register_global(machine, state->dac_adr_e);
|
state_save_register_global(machine, state->dac_adr_e);
|
||||||
state_save_register_postload(machine, mjsister_redraw, 0);
|
state_save_register_postload(machine, mjsister_redraw, 0);
|
||||||
|
|
||||||
state->dac_timer = timer_alloc(machine, dac_callback, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static MACHINE_RESET( mjsister )
|
static MACHINE_RESET( mjsister )
|
||||||
|
@ -102,7 +102,6 @@ static TIMER_CALLBACK( namcoio_run )
|
|||||||
|
|
||||||
static INTERRUPT_GEN( toypop_main_interrupt )
|
static INTERRUPT_GEN( toypop_main_interrupt )
|
||||||
{
|
{
|
||||||
toypop_state *state = device->machine->driver_data<toypop_state>();
|
|
||||||
running_device *namcoio_0 = device->machine->device("58xx");
|
running_device *namcoio_0 = device->machine->device("58xx");
|
||||||
running_device *namcoio_1 = device->machine->device("56xx_1");
|
running_device *namcoio_1 = device->machine->device("56xx_1");
|
||||||
running_device *namcoio_2 = device->machine->device("56xx_2");
|
running_device *namcoio_2 = device->machine->device("56xx_2");
|
||||||
@ -111,13 +110,14 @@ static INTERRUPT_GEN( toypop_main_interrupt )
|
|||||||
// so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
|
// so don't replace with cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE);
|
||||||
|
|
||||||
if (!namcoio_read_reset_line(namcoio_0)) /* give the cpu a tiny bit of time to write the command before processing it */
|
if (!namcoio_read_reset_line(namcoio_0)) /* give the cpu a tiny bit of time to write the command before processing it */
|
||||||
timer_adjust_oneshot(state->io_timer_0, ATTOTIME_IN_USEC(50), 0);
|
timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 0, namcoio_run);
|
||||||
|
|
||||||
if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */
|
if (!namcoio_read_reset_line(namcoio_1)) /* give the cpu a tiny bit of time to write the command before processing it */
|
||||||
timer_adjust_oneshot(state->io_timer_1, ATTOTIME_IN_USEC(50), 1);
|
timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 1, namcoio_run);
|
||||||
|
|
||||||
if (!namcoio_read_reset_line(namcoio_2)) /* give the cpu a tiny bit of time to write the command before processing it */
|
if (!namcoio_read_reset_line(namcoio_2)) /* give the cpu a tiny bit of time to write the command before processing it */
|
||||||
timer_adjust_oneshot(state->io_timer_2, ATTOTIME_IN_USEC(50), 2);
|
timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, 2, namcoio_run);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static WRITE8_HANDLER( toypop_sound_clear_w )
|
static WRITE8_HANDLER( toypop_sound_clear_w )
|
||||||
@ -150,21 +150,11 @@ static TIMER_CALLBACK( disable_interrupts )
|
|||||||
state->interrupt_enable_68k = 0;
|
state->interrupt_enable_68k = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static MACHINE_START( toypop )
|
|
||||||
{
|
|
||||||
toypop_state *state = machine->driver_data<toypop_state>();
|
|
||||||
state->io_timer_0 = timer_alloc(machine, namcoio_run, 0);
|
|
||||||
state->io_timer_1 = timer_alloc(machine, namcoio_run, 0);
|
|
||||||
state->io_timer_2 = timer_alloc(machine, namcoio_run, 0);
|
|
||||||
state->irq_disable_timer = timer_alloc(machine, disable_interrupts, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static MACHINE_RESET( toypop )
|
static MACHINE_RESET( toypop )
|
||||||
{
|
{
|
||||||
/* we must do this on a timer in order to have it take effect */
|
/* we must do this on a timer in order to have it take effect */
|
||||||
/* otherwise, the reset process will override our changes */
|
/* otherwise, the reset process will override our changes */
|
||||||
toypop_state *state = machine->driver_data<toypop_state>();
|
timer_call_after_resynch(machine, NULL, 0, disable_interrupts);
|
||||||
timer_adjust_oneshot(state->irq_disable_timer, attotime_zero, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INTERRUPT_GEN( toypop_m68000_interrupt )
|
static INTERRUPT_GEN( toypop_m68000_interrupt )
|
||||||
@ -568,9 +558,8 @@ static MACHINE_CONFIG_START( liblrabl, toypop_state )
|
|||||||
MDRV_CPU_PROGRAM_MAP(m68k_map)
|
MDRV_CPU_PROGRAM_MAP(m68k_map)
|
||||||
MDRV_CPU_VBLANK_INT("screen", toypop_m68000_interrupt)
|
MDRV_CPU_VBLANK_INT("screen", toypop_m68000_interrupt)
|
||||||
|
|
||||||
MDRV_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
|
MDRV_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
|
||||||
/* synchronization of the CPUs */
|
/* synchronization of the CPUs */
|
||||||
MDRV_MACHINE_START(toypop)
|
|
||||||
MDRV_MACHINE_RESET(toypop)
|
MDRV_MACHINE_RESET(toypop)
|
||||||
|
|
||||||
MDRV_NAMCO58XX_ADD("58xx", intf0)
|
MDRV_NAMCO58XX_ADD("58xx", intf0)
|
||||||
|
@ -13,11 +13,6 @@ public:
|
|||||||
int bitmapflip;
|
int bitmapflip;
|
||||||
int palettebank;
|
int palettebank;
|
||||||
int interrupt_enable_68k;
|
int interrupt_enable_68k;
|
||||||
|
|
||||||
emu_timer *io_timer_0;
|
|
||||||
emu_timer *io_timer_1;
|
|
||||||
emu_timer *io_timer_2;
|
|
||||||
emu_timer *irq_disable_timer;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user