mirror of
https://github.com/holub/mame
synced 2025-05-25 07:15:25 +03:00
More slowdown relief.
This commit is contained in:
parent
030c1ee79f
commit
a0ce1569b6
@ -22,9 +22,11 @@ class mosaicf2_state
|
|||||||
public:
|
public:
|
||||||
static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, mosaicf2_state(machine)); }
|
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 */
|
/* memory pointers */
|
||||||
|
cpu_device * maincpu;
|
||||||
UINT32 * videoram;
|
UINT32 * videoram;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -61,9 +63,11 @@ ADDRESS_MAP_END
|
|||||||
static READ32_HANDLER( f32_input_port_1_r )
|
static READ32_HANDLER( f32_input_port_1_r )
|
||||||
{
|
{
|
||||||
/* burn a bunch of cycles because this is polled frequently during busy loops */
|
/* 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) )
|
mosaicf2_state *state = (mosaicf2_state *)space->machine->driver_data;
|
||||||
cpu_eat_cycles(space->cpu, 100);
|
offs_t pc = state->maincpu->pc();
|
||||||
//else printf("PC %08x\n", cpu_get_pc(space->cpu) );
|
if ((pc == 0x000379de) || (pc == 0x000379cc) )
|
||||||
|
state->maincpu->eat_cycles(100);
|
||||||
|
//else printf("PC %08x\n", pc );
|
||||||
return input_port_read(space->machine, "SYSTEM_P2");
|
return input_port_read(space->machine, "SYSTEM_P2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,9 +967,9 @@ ROM_END
|
|||||||
|
|
||||||
static READ32_HANDLER( dynabomb_speedup_r )
|
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];
|
return mainram[0xe2784/4];
|
||||||
@ -977,9 +977,9 @@ static READ32_HANDLER( dynabomb_speedup_r )
|
|||||||
|
|
||||||
static READ32_HANDLER( legendoh_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];
|
return mainram[0x32ab0/4];
|
||||||
@ -987,9 +987,9 @@ static READ32_HANDLER( legendoh_speedup_r )
|
|||||||
|
|
||||||
static READ32_HANDLER( sb2003_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];
|
return mainram[0x135800/4];
|
||||||
@ -997,9 +997,9 @@ static READ32_HANDLER( sb2003_speedup_r )
|
|||||||
|
|
||||||
static READ32_HANDLER( spotty_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];
|
return mainram[0x6626c/4];
|
||||||
|
Loading…
Reference in New Issue
Block a user