mirror of
https://github.com/holub/mame
synced 2025-05-29 00:53:09 +03:00
Kill cpu_get_sp().
This commit is contained in:
parent
48d8e3d3cf
commit
af9e6f531f
@ -290,7 +290,6 @@ enum
|
|||||||
#define cpu_get_reg(cpu, _reg) device_state(cpu)->state_value(_reg)
|
#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_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_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)
|
#define cpu_set_reg(cpu, _reg, val) device_state(cpu)->state_set_value(_reg, val)
|
||||||
|
|
||||||
|
@ -443,13 +443,15 @@ ROM_END
|
|||||||
|
|
||||||
static READ32_HANDLER( irq_speedup_r_groundfx )
|
static READ32_HANDLER( irq_speedup_r_groundfx )
|
||||||
{
|
{
|
||||||
|
cpu_device *cpu = downcast<cpu_device *>(space->cpu);
|
||||||
int ptr;
|
int ptr;
|
||||||
if ((cpu_get_sp(space->cpu)&2)==0) ptr=groundfx_ram[(cpu_get_sp(space->cpu)&0x1ffff)/4];
|
offs_t sp = cpu->sp();
|
||||||
else ptr=(((groundfx_ram[(cpu_get_sp(space->cpu)&0x1ffff)/4])&0x1ffff)<<16) |
|
if ((sp&2)==0) ptr=groundfx_ram[(sp&0x1ffff)/4];
|
||||||
(groundfx_ram[((cpu_get_sp(space->cpu)&0x1ffff)/4)+1]>>16);
|
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)
|
if (cpu->pc()==0x1ece && ptr==0x1b9a)
|
||||||
cpu_spinuntil_int(space->cpu);
|
cpu->spin_until_interrupt();
|
||||||
|
|
||||||
return groundfx_ram[0xb574/4];
|
return groundfx_ram[0xb574/4];
|
||||||
}
|
}
|
||||||
|
@ -2430,7 +2430,7 @@ static WRITE32_HANDLER( alpinesa_prot_w )
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int i;
|
int i;
|
||||||
unsigned sptr = cpu_get_sp(space->cpu);
|
unsigned sptr = downcast<cpu_device *>(space->cpu)->sp();
|
||||||
mAlpineSurferProtData = 0;
|
mAlpineSurferProtData = 0;
|
||||||
for(i=0;i<4;i++)
|
for(i=0;i<4;i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user