mirror of
https://github.com/holub/mame
synced 2025-05-30 17:41:47 +03:00
removed some state() calls
This commit is contained in:
parent
608e957056
commit
630d1c2291
@ -96,7 +96,7 @@ uint32_t md_rom_svp_device::pm_io(int reg, int write, uint32_t d)
|
||||
if (m_emu_status & SSP_PMC_HAVE_ADDR)
|
||||
m_emu_status &= ~SSP_PMC_HAVE_ADDR;
|
||||
|
||||
if (reg == 4 || (m_svp->state().state_int(SSP_ST) & 0x60))
|
||||
if (reg == 4 || (m_svp->state_int(SSP_ST) & 0x60))
|
||||
{
|
||||
#define CADDR ((((mode<<16)&0x7f0000)|addr)<<1)
|
||||
uint16_t *dram = (uint16_t *)m_dram;
|
||||
|
@ -56,7 +56,7 @@ protected:
|
||||
virtual DECLARE_WRITE16_MEMBER(write_al);
|
||||
|
||||
private:
|
||||
required_device<device_t> m_svp;
|
||||
required_device<cpu_device> m_svp;
|
||||
required_ioport m_test_ipt;
|
||||
|
||||
uint32_t pm_io(int reg, int write, uint32_t d);
|
||||
|
@ -645,7 +645,7 @@ INTERRUPT_GEN_MEMBER(cntsteer_state::subcpu_vblank_irq)
|
||||
// That's my best guess so far about how Slave is supposed to stop execution on Master CPU, the lack of any realistic write
|
||||
// between these operations brings us to this.
|
||||
// Game currently returns error on MIX CPU RAM because halt-ing BACK CPU doesn't happen when it should of course ...
|
||||
// uint8_t dp_r = (uint8_t)device.state().state_int(M6809_DP);
|
||||
// uint8_t dp_r = (uint8_t)m_subcpu->state_int(M6809_DP);
|
||||
// m_maincpu->set_input_line(INPUT_LINE_HALT, dp_r ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
|
||||
}
|
||||
|
@ -236,6 +236,9 @@ public:
|
||||
void nimbus_iocpu_io(address_map &map);
|
||||
void nimbus_iocpu_mem(address_map &map);
|
||||
void nimbus_mem(address_map &map);
|
||||
void decode_subbios(device_t *device, offs_t pc, uint8_t raw_flag);
|
||||
void decode_dos21(device_t *device, offs_t pc);
|
||||
|
||||
private:
|
||||
void debug_command(int ref, const std::vector<std::string> ¶ms);
|
||||
void video_debug(int ref, const std::vector<std::string> ¶ms);
|
||||
|
@ -1976,7 +1976,7 @@ READ8_MEMBER(mpu4_state::characteriser_r)
|
||||
logerror("%s No Characteriser Table\n", machine().describe_context());
|
||||
|
||||
/* a cheat ... many early games use a standard check */
|
||||
int addr = space.device().state().state_int(M6809_X);
|
||||
int addr = m_maincpu->state_int(M6809_X);
|
||||
if ((addr>=0x800) && (addr<=0xfff)) return 0x00; // prevent recursion, only care about ram/rom areas for this cheat.
|
||||
|
||||
uint8_t ret = space.read_byte(addr);
|
||||
|
@ -229,7 +229,7 @@ READ32_MEMBER(pgm_arm_type2_state::ddp2_speedup_r )
|
||||
if (pc==0x080109b4)
|
||||
{
|
||||
/* if we've hit the loop where this is read and both values are 0 then the only way out is an interrupt */
|
||||
int r4 = (space.device().state().state_int(ARM7_R4));
|
||||
int r4 = (m_prot->state_int(ARM7_R4));
|
||||
r4 += 0xe;
|
||||
|
||||
if (r4==0x18002f9e)
|
||||
|
@ -177,8 +177,6 @@ struct t_nimbus_brush
|
||||
|
||||
|
||||
static int instruction_hook(device_t &device, offs_t curpc);
|
||||
static void decode_subbios(device_t *device,offs_t pc, uint8_t raw_flag);
|
||||
static void decode_dos21(device_t *device,offs_t pc);
|
||||
static void decode_dssi_generic(device_t *device,uint16_t ds, uint16_t si, uint8_t raw_flag);
|
||||
static void decode_dssi_f_fill_area(device_t *device,uint16_t ds, uint16_t si, uint8_t raw_flag);
|
||||
static void decode_dssi_f_plot_character_string(device_t *device,uint16_t ds, uint16_t si, uint8_t raw_flag);
|
||||
@ -274,13 +272,13 @@ static int instruction_hook(device_t &device, offs_t curpc)
|
||||
if(DEBUG_SET_STATE(DECODE_BIOS) && (addr_ptr[1]==0xF0))
|
||||
{
|
||||
if(DEBUG_SET_STATE(DECODE_BIOS_RAW))
|
||||
decode_subbios(&device,curpc,1);
|
||||
state->decode_subbios(&device,curpc,1);
|
||||
else
|
||||
decode_subbios(&device,curpc,0);
|
||||
state->decode_subbios(&device,curpc,0);
|
||||
}
|
||||
|
||||
if(DEBUG_SET_STATE(DECODE_DOS21) && (addr_ptr[1]==0x21))
|
||||
decode_dos21(&device,curpc);
|
||||
state->decode_dos21(&device,curpc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -290,7 +288,7 @@ static int instruction_hook(device_t &device, offs_t curpc)
|
||||
#define set_drv(drv_name) sprintf(drv_str,drv_name)
|
||||
#define set_func(func_name) sprintf(func_str,func_name)
|
||||
|
||||
static void decode_subbios(device_t *device,offs_t pc, uint8_t raw_flag)
|
||||
void rmnimbus_state::decode_subbios(device_t *device,offs_t pc, uint8_t raw_flag)
|
||||
{
|
||||
char type_str[80];
|
||||
char drv_str[80];
|
||||
@ -298,13 +296,11 @@ static void decode_subbios(device_t *device,offs_t pc, uint8_t raw_flag)
|
||||
|
||||
void (*dump_dssi)(device_t *,uint16_t, uint16_t ,uint8_t) = nullptr;
|
||||
|
||||
device_t *cpu = device->machine().device(MAINCPU_TAG);
|
||||
|
||||
uint16_t ax = cpu->state().state_int(I8086_AX);
|
||||
uint16_t bx = cpu->state().state_int(I8086_BX);
|
||||
uint16_t cx = cpu->state().state_int(I8086_CX);
|
||||
uint16_t ds = cpu->state().state_int(I8086_DS);
|
||||
uint16_t si = cpu->state().state_int(I8086_SI);
|
||||
uint16_t ax = m_maincpu->state_int(I8086_AX);
|
||||
uint16_t bx = m_maincpu->state_int(I8086_BX);
|
||||
uint16_t cx = m_maincpu->state_int(I8086_CX);
|
||||
uint16_t ds = m_maincpu->state_int(I8086_DS);
|
||||
uint16_t si = m_maincpu->state_int(I8086_SI);
|
||||
|
||||
// *** TEMP Don't show f_enquire_display_line calls !
|
||||
if((cx==6) && (ax==43))
|
||||
@ -313,8 +309,8 @@ static void decode_subbios(device_t *device,offs_t pc, uint8_t raw_flag)
|
||||
|
||||
if(!raw_flag)
|
||||
{
|
||||
device->logerror("=======================================================================\n");
|
||||
device->logerror("Sub-bios call at %08X, AX=%04X, BX=%04X, CX=%04X, DS:SI=%04X:%04X\n",pc,ax,bx,cx,ds,si);
|
||||
logerror("=======================================================================\n");
|
||||
logerror("Sub-bios call at %08X, AX=%04X, BX=%04X, CX=%04X, DS:SI=%04X:%04X\n",pc,ax,bx,cx,ds,si);
|
||||
}
|
||||
|
||||
set_type("invalid");
|
||||
@ -622,11 +618,11 @@ static void decode_subbios(device_t *device,offs_t pc, uint8_t raw_flag)
|
||||
}
|
||||
else
|
||||
{
|
||||
device->logerror("Type=%s, Driver=%s, Function=%s\n",type_str,drv_str,func_str);
|
||||
logerror("Type=%s, Driver=%s, Function=%s\n",type_str,drv_str,func_str);
|
||||
|
||||
if(dump_dssi!=nullptr)
|
||||
dump_dssi(device,ds,si,raw_flag);
|
||||
device->logerror("=======================================================================\n");
|
||||
logerror("=======================================================================\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -794,29 +790,27 @@ static void decode_dssi_f_rw_sectors(device_t *device,uint16_t ds, uint16_t si,
|
||||
device->logerror("\n");
|
||||
}
|
||||
|
||||
static void decode_dos21(device_t *device,offs_t pc)
|
||||
void rmnimbus_state::decode_dos21(device_t *device,offs_t pc)
|
||||
{
|
||||
device_t *cpu = device->machine().device(MAINCPU_TAG);
|
||||
uint16_t ax = m_maincpu->state_int(I8086_AX);
|
||||
uint16_t bx = m_maincpu->state_int(I8086_BX);
|
||||
uint16_t cx = m_maincpu->state_int(I8086_CX);
|
||||
uint16_t dx = m_maincpu->state_int(I8086_DX);
|
||||
uint16_t cs = m_maincpu->state_int(I8086_CS);
|
||||
uint16_t ds = m_maincpu->state_int(I8086_DS);
|
||||
uint16_t es = m_maincpu->state_int(I8086_ES);
|
||||
uint16_t ss = m_maincpu->state_int(I8086_SS);
|
||||
|
||||
uint16_t ax = cpu->state().state_int(I8086_AX);
|
||||
uint16_t bx = cpu->state().state_int(I8086_BX);
|
||||
uint16_t cx = cpu->state().state_int(I8086_CX);
|
||||
uint16_t dx = cpu->state().state_int(I8086_DX);
|
||||
uint16_t cs = cpu->state().state_int(I8086_CS);
|
||||
uint16_t ds = cpu->state().state_int(I8086_DS);
|
||||
uint16_t es = cpu->state().state_int(I8086_ES);
|
||||
uint16_t ss = cpu->state().state_int(I8086_SS);
|
||||
uint16_t si = m_maincpu->state_int(I8086_SI);
|
||||
uint16_t di = m_maincpu->state_int(I8086_DI);
|
||||
uint16_t bp = m_maincpu->state_int(I8086_BP);
|
||||
|
||||
uint16_t si = cpu->state().state_int(I8086_SI);
|
||||
uint16_t di = cpu->state().state_int(I8086_DI);
|
||||
uint16_t bp = cpu->state().state_int(I8086_BP);
|
||||
|
||||
device->logerror("=======================================================================\n");
|
||||
device->logerror("DOS Int 0x21 call at %05X\n",pc);
|
||||
device->logerror("AX=%04X, BX=%04X, CX=%04X, DX=%04X\n",ax,bx,cx,dx);
|
||||
device->logerror("CS=%04X, DS=%04X, ES=%04X, SS=%04X\n",cs,ds,es,ss);
|
||||
device->logerror("SI=%04X, DI=%04X, BP=%04X\n",si,di,bp);
|
||||
device->logerror("=======================================================================\n");
|
||||
logerror("=======================================================================\n");
|
||||
logerror("DOS Int 0x21 call at %05X\n",pc);
|
||||
logerror("AX=%04X, BX=%04X, CX=%04X, DX=%04X\n",ax,bx,cx,dx);
|
||||
logerror("CS=%04X, DS=%04X, ES=%04X, SS=%04X\n",cs,ds,es,ss);
|
||||
logerror("SI=%04X, DI=%04X, BP=%04X\n",si,di,bp);
|
||||
logerror("=======================================================================\n");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user