Kill cpu_get_sp().

This commit is contained in:
Aaron Giles 2010-07-02 13:29:03 +00:00
parent 48d8e3d3cf
commit af9e6f531f
3 changed files with 8 additions and 7 deletions

View File

@ -290,7 +290,6 @@ enum
#define cpu_get_reg(cpu, _reg) device_state(cpu)->state_value(_reg)
#define cpu_get_previouspc(cpu) ((offs_t)device_state(cpu)->state_value(STATE_GENPCBASE))
#define cpu_get_pc(cpu) ((offs_t)device_state(cpu)->state_value(STATE_GENPC))
#define cpu_get_sp(cpu) ((offs_t)device_state(cpu)->state_value(STATE_GENSP))
#define cpu_set_reg(cpu, _reg, val) device_state(cpu)->state_set_value(_reg, val)

View File

@ -443,13 +443,15 @@ ROM_END
static READ32_HANDLER( irq_speedup_r_groundfx )
{
cpu_device *cpu = downcast<cpu_device *>(space->cpu);
int ptr;
if ((cpu_get_sp(space->cpu)&2)==0) ptr=groundfx_ram[(cpu_get_sp(space->cpu)&0x1ffff)/4];
else ptr=(((groundfx_ram[(cpu_get_sp(space->cpu)&0x1ffff)/4])&0x1ffff)<<16) |
(groundfx_ram[((cpu_get_sp(space->cpu)&0x1ffff)/4)+1]>>16);
offs_t sp = cpu->sp();
if ((sp&2)==0) ptr=groundfx_ram[(sp&0x1ffff)/4];
else ptr=(((groundfx_ram[(sp&0x1ffff)/4])&0x1ffff)<<16) |
(groundfx_ram[((sp&0x1ffff)/4)+1]>>16);
if (cpu_get_pc(space->cpu)==0x1ece && ptr==0x1b9a)
cpu_spinuntil_int(space->cpu);
if (cpu->pc()==0x1ece && ptr==0x1b9a)
cpu->spin_until_interrupt();
return groundfx_ram[0xb574/4];
}

View File

@ -2430,7 +2430,7 @@ static WRITE32_HANDLER( alpinesa_prot_w )
}
#else
int i;
unsigned sptr = cpu_get_sp(space->cpu);
unsigned sptr = downcast<cpu_device *>(space->cpu)->sp();
mAlpineSurferProtData = 0;
for(i=0;i<4;i++)
{