More slowdown relief.

This commit is contained in:
Aaron Giles 2010-07-02 06:01:44 +00:00
parent 030c1ee79f
commit a0ce1569b6
2 changed files with 16 additions and 12 deletions

View File

@ -22,9 +22,11 @@ class mosaicf2_state
public:
static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, mosaicf2_state(machine)); }
mosaicf2_state(running_machine &machine) { }
mosaicf2_state(running_machine &machine)
: maincpu(machine.device<cpu_device>("maincpu")) { }
/* memory pointers */
cpu_device * maincpu;
UINT32 * videoram;
};
@ -61,9 +63,11 @@ ADDRESS_MAP_END
static READ32_HANDLER( f32_input_port_1_r )
{
/* burn a bunch of cycles because this is polled frequently during busy loops */
if ((cpu_get_pc(space->cpu) == 0x000379de) || (cpu_get_pc(space->cpu) == 0x000379cc) )
cpu_eat_cycles(space->cpu, 100);
//else printf("PC %08x\n", cpu_get_pc(space->cpu) );
mosaicf2_state *state = (mosaicf2_state *)space->machine->driver_data;
offs_t pc = state->maincpu->pc();
if ((pc == 0x000379de) || (pc == 0x000379cc) )
state->maincpu->eat_cycles(100);
//else printf("PC %08x\n", pc );
return input_port_read(space->machine, "SYSTEM_P2");
}

View File

@ -967,9 +967,9 @@ ROM_END
static READ32_HANDLER( dynabomb_speedup_r )
{
if(cpu_get_pc(space->cpu) == 0xc25b8)
if(space->machine->firstcpu->pc() == 0xc25b8)
{
cpu_eat_cycles(space->cpu, 50);
space->machine->firstcpu->eat_cycles(50);
}
return mainram[0xe2784/4];
@ -977,9 +977,9 @@ static READ32_HANDLER( dynabomb_speedup_r )
static READ32_HANDLER( legendoh_speedup_r )
{
if(cpu_get_pc(space->cpu) == 0x23e32)
if(space->machine->firstcpu->pc() == 0x23e32)
{
cpu_eat_cycles(space->cpu, 50);
space->machine->firstcpu->eat_cycles(50);
}
return mainram[0x32ab0/4];
@ -987,9 +987,9 @@ static READ32_HANDLER( legendoh_speedup_r )
static READ32_HANDLER( sb2003_speedup_r )
{
if(cpu_get_pc(space->cpu) == 0x26da4)
if(space->machine->firstcpu->pc() == 0x26da4)
{
cpu_eat_cycles(space->cpu, 50);
space->machine->firstcpu->eat_cycles(50);
}
return mainram[0x135800/4];
@ -997,9 +997,9 @@ static READ32_HANDLER( sb2003_speedup_r )
static READ32_HANDLER( spotty_speedup_r )
{
if(cpu_get_pc(space->cpu) == 0x8560)
if(space->machine->firstcpu->pc() == 0x8560)
{
cpu_eat_cycles(space->cpu, 50);
space->machine->firstcpu->eat_cycles(50);
}
return mainram[0x6626c/4];