diff options
| author | 2010-07-02 06:01:44 +0000 | |
|---|---|---|
| committer | 2010-07-02 06:01:44 +0000 | |
| commit | a0ce1569b68d3d198b7eeb2c2d626b22cdf671b0 (patch) | |
| tree | 86fbf39cce6789d2c76aedbcfc5aba432aae9ea5 /src | |
| parent | 030c1ee79f95cce67b54180f52bca543d58beacb (diff) | |
More slowdown relief.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mame/drivers/f-32.c | 12 | ||||
| -rw-r--r-- | src/mame/drivers/limenko.c | 16 |
2 files changed, 16 insertions, 12 deletions
diff --git a/src/mame/drivers/f-32.c b/src/mame/drivers/f-32.c index 421c38e5054..99d7dc8e121 100644 --- a/src/mame/drivers/f-32.c +++ b/src/mame/drivers/f-32.c @@ -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"); } diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c index 4cfe1c45272..bdd8f2cb600 100644 --- a/src/mame/drivers/limenko.c +++ b/src/mame/drivers/limenko.c @@ -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]; |
