mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
cleanup (nw)
This commit is contained in:
parent
b48fd3f181
commit
3f9cbe01c5
@ -19,8 +19,8 @@ enum
|
||||
PDP1_IO_COMPLETE /* hack, do not use directly, use pdp1_pulse_iot_done instead */
|
||||
};
|
||||
|
||||
#define pdp1_pulse_start_clear(cpudevice) (cpudevice)->state().set_state_int(PDP1_START_CLEAR, (UINT64)0)
|
||||
#define pdp1_pulse_iot_done(cpudevice) (cpudevice)->state().set_state_int(PDP1_IO_COMPLETE, (UINT64)0)
|
||||
#define pdp1_pulse_start_clear(cpudevice) (cpudevice)->set_state_int(PDP1_START_CLEAR, (UINT64)0)
|
||||
#define pdp1_pulse_iot_done(cpudevice) (cpudevice)->set_state_int(PDP1_IO_COMPLETE, (UINT64)0)
|
||||
|
||||
typedef void (*pdp1_extern_iot_func)(device_t *device, int op2, int nac, int mb, int *io, int ac);
|
||||
typedef void (*pdp1_read_binary_word_func)(device_t *device);
|
||||
|
@ -1688,10 +1688,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::scudhamm_scanline)
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
machine().device("maincpu")->execute().set_input_line(3, HOLD_LINE);
|
||||
m_maincpu->set_input_line(3, HOLD_LINE);
|
||||
|
||||
if(scanline == 120) // timer irq (clears a flag, presumably sprite DMA end)
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( scudhamm, cischeat_state )
|
||||
@ -1738,10 +1738,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::armchamp2_scanline)
|
||||
int scanline = param;
|
||||
|
||||
if(scanline == 240) // vblank-out irq
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
|
||||
if(scanline == 120) // timer irq (TODO: timing)
|
||||
machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE);
|
||||
m_maincpu->set_input_line(4, HOLD_LINE);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( armchmp2, scudhamm )
|
||||
|
@ -41,45 +41,45 @@ public:
|
||||
int m_optic_pattern;
|
||||
int m_percent_mux;
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_a_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_a_read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_a_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_a_read_a %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_a_read_b)
|
||||
{
|
||||
int ret = ioport("IN1")->read();
|
||||
logerror("%04x - ppi8255_intf_a_(used)read_b %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_a_(used)read_b %02x\n", m_maincpu->pcbase(), ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_a_read_c)
|
||||
{
|
||||
int ret = ioport("IN5")->read();
|
||||
logerror("%04x - ppi8255_intf_a_(used)read_c %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_a_(used)read_c %02x\n", m_maincpu->pcbase(), ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_b_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_b_read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_b_read_b) { int ret = 0x00; logerror("%04x - ppi8255_intf_b_read_b %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_b_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_b_read_c %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_b_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_b_read_a %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_b_read_b) { int ret = 0x00; logerror("%04x - ppi8255_intf_b_read_b %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_b_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_b_read_c %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_c_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_c_(used)read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_c_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_c_(used)read_a %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_c_read_b)
|
||||
{
|
||||
int ret = ioport("IN2")->read();
|
||||
logerror("%04x - ppi8255_intf_c_(used)read_b %02x (COINS+TEST)\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_c_(used)read_b %02x (COINS+TEST)\n", m_maincpu->pcbase(), ret);
|
||||
return ret;
|
||||
} // changing to 00 gives coin tamper
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_c_read_c)
|
||||
{
|
||||
int ret = ioport("IN6")->read();
|
||||
logerror("%04x - ppi8255_intf_c_(used)read_c %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_c_(used)read_c %02x\n", m_maincpu->pcbase(), ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_d_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_d_read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_d_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_d_read_a %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_d_read_b)
|
||||
{
|
||||
int ret = ioport("IN7")->read();
|
||||
logerror("%04x - ppi8255_intf_d_(used)read_b %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_d_(used)read_b %02x\n", m_maincpu->pcbase(), ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -94,14 +94,14 @@ public:
|
||||
// | 0x20 = reel 2 fault
|
||||
// | 0x10 = reel 1 fault
|
||||
|
||||
logerror("%04x - ppi8255_intf_d_(used)read_c %02x (Reel Optics)\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_d_(used)read_c %02x (Reel Optics)\n", m_maincpu->pcbase(), ret);
|
||||
|
||||
return ret;
|
||||
|
||||
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_e_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_e_read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_e_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_e_read_a %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_e_read_b)
|
||||
{ // changing gives no % key error in sphinx
|
||||
|
||||
@ -110,46 +110,46 @@ public:
|
||||
if (m_percent_mux==1)
|
||||
{
|
||||
ret = ioport("PERKEY")->read();
|
||||
logerror("%04x - ppi8255_intf_e_(used)read_b (PER KEY) %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_e_(used)read_b (PER KEY) %02x\n", m_maincpu->pcbase(), ret);
|
||||
}
|
||||
else if (m_percent_mux==0x80)
|
||||
{
|
||||
ret = ioport("BUTTONS")->read();
|
||||
logerror("%04x - ppi8255_intf_e_(used)read_b (BUTTONS?) %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_e_(used)read_b (BUTTONS?) %02x\n", m_maincpu->pcbase(), ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = 0x00;
|
||||
logerror("%04x - ppi8255_intf_e_(used)read_b (UNK MUX %02x) %02x\n", machine().device("maincpu")->safe_pcbase(), m_percent_mux, ret);
|
||||
logerror("%04x - ppi8255_intf_e_(used)read_b (UNK MUX %02x) %02x\n", m_maincpu->pcbase(), m_percent_mux, ret);
|
||||
}
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_e_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_e_read_c %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_e_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_e_read_c %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_f_read_a)
|
||||
{
|
||||
int ret = ioport("IN4")->read();
|
||||
logerror("%04x - ppi8255_intf_f_(used)read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_f_(used)read_a %02x\n", m_maincpu->pcbase(), ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_f_read_b) { int ret = 0x00; logerror("%04x - ppi8255_intf_f_read_b %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_f_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_f_read_c %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_f_read_b) { int ret = 0x00; logerror("%04x - ppi8255_intf_f_read_b %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_f_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_f_read_c %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_g_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_g_read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_g_read_b) { int ret = 0x00; logerror("%04x - ppi8255_intf_g_read_b %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_g_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_g_read_c %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_g_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_g_read_a %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_g_read_b) { int ret = 0x00; logerror("%04x - ppi8255_intf_g_read_b %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_g_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_g_read_c %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_h_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_h_read_a %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_h_read_a) { int ret = 0x00; logerror("%04x - ppi8255_intf_h_read_a %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_h_read_b)
|
||||
{
|
||||
int ret = ioport("IN5")->read();
|
||||
logerror("%04x - ppi8255_intf_h_(used)read_b %02x\n", machine().device("maincpu")->safe_pcbase(), ret);
|
||||
logerror("%04x - ppi8255_intf_h_(used)read_b %02x\n", m_maincpu->pcbase(), ret);
|
||||
return ret;
|
||||
}
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_h_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_h_read_c %02x\n", machine().device("maincpu")->safe_pcbase(), ret); return ret; }
|
||||
DECLARE_READ8_MEMBER(ppi8255_intf_h_read_c) { int ret = 0x00; logerror("%04x - ppi8255_intf_h_read_c %02x\n", m_maincpu->pcbase(), ret); return ret; }
|
||||
|
||||
void update_lamps(void)
|
||||
{
|
||||
@ -167,7 +167,7 @@ public:
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_a_write_a_strobedat0)
|
||||
{
|
||||
// logerror("%04x - ppi8255_intf_a_(used)write_a %02x (STROBEDAT?)\n", machine().device("maincpu")->safe_pcbase(), data);
|
||||
// logerror("%04x - ppi8255_intf_a_(used)write_a %02x (STROBEDAT?)\n", m_maincpu->pcbase(), data);
|
||||
if (strobe_amount)
|
||||
{
|
||||
m_lamps[strobe_addr] = (m_lamps[strobe_addr] &0xff00) | (data & 0x00ff);
|
||||
@ -177,7 +177,7 @@ public:
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_a_write_b_strobedat1)
|
||||
{
|
||||
// logerror("%04x - ppi8255_intf_a_(used)write_b %02x (STROBEDAT?)\n", machine().device("maincpu")->safe_pcbase(), data);
|
||||
// logerror("%04x - ppi8255_intf_a_(used)write_b %02x (STROBEDAT?)\n", m_maincpu->pcbase(), data);
|
||||
if (strobe_amount)
|
||||
{
|
||||
m_lamps[strobe_addr] = (m_lamps[strobe_addr] &0x00ff) | (data << 8);
|
||||
@ -188,7 +188,7 @@ public:
|
||||
{
|
||||
if (data>=0xf0)
|
||||
{
|
||||
// logerror("%04x - ppi8255_intf_a_(used)write_c %02x (STROBE?)\n", machine().device("maincpu")->safe_pcbase(), data);
|
||||
// logerror("%04x - ppi8255_intf_a_(used)write_c %02x (STROBE?)\n", m_maincpu->pcbase(), data);
|
||||
strobe_addr = data & 0xf;
|
||||
|
||||
// hack, it writes values for the lamps, then writes 0x00 afterwards, probably giving the bulbs power, then removing the power
|
||||
@ -197,20 +197,20 @@ public:
|
||||
|
||||
update_lamps();
|
||||
}
|
||||
else logerror("%04x - ppi8255_intf_a_(used)write_c %02x (UNUSUAL?)\n", machine().device("maincpu")->safe_pcbase(), data);
|
||||
else logerror("%04x - ppi8255_intf_a_(used)write_c %02x (UNUSUAL?)\n", m_maincpu->pcbase(), data);
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_b_write_a) { logerror("%04x - ppi8255_intf_b_(used)write_a %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_b_write_b) { logerror("%04x - ppi8255_intf_b_(used)write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_b_write_c) { logerror("%04x - ppi8255_intf_b_(used)write_c %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_b_write_a) { logerror("%04x - ppi8255_intf_b_(used)write_a %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_b_write_b) { logerror("%04x - ppi8255_intf_b_(used)write_b %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_b_write_c) { logerror("%04x - ppi8255_intf_b_(used)write_c %02x\n", m_maincpu->pcbase(), data); }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_c_write_a) { logerror("%04x - ppi8255_intf_c_(used)write_a %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_c_write_b) { logerror("%04x - ppi8255_intf_c_(used)write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_c_write_c) { logerror("%04x - ppi8255_intf_c_(used)write_c %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_c_write_a) { logerror("%04x - ppi8255_intf_c_(used)write_a %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_c_write_b) { logerror("%04x - ppi8255_intf_c_(used)write_b %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_c_write_c) { logerror("%04x - ppi8255_intf_c_(used)write_c %02x\n", m_maincpu->pcbase(), data); }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_d_write_a_reel01)
|
||||
{
|
||||
// logerror("%04x - ppi8255_intf_d_(used)write_a %02x\n", machine().device("maincpu")->safe_pcbase(), data);
|
||||
// logerror("%04x - ppi8255_intf_d_(used)write_a %02x\n", m_maincpu->pcbase(), data);
|
||||
stepper_update(0, data&0x0f);
|
||||
stepper_update(1, (data>>4)&0x0f);
|
||||
|
||||
@ -225,7 +225,7 @@ public:
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_d_write_b_reel23)
|
||||
{
|
||||
// logerror("%04x - ppi8255_intf_d_(used)write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data);
|
||||
// logerror("%04x - ppi8255_intf_d_(used)write_b %02x\n", m_maincpu->pcbase(), data);
|
||||
|
||||
stepper_update(2, data&0x0f);
|
||||
stepper_update(3, (data>>4)&0x0f);
|
||||
@ -239,28 +239,28 @@ public:
|
||||
awp_draw_reel(3);
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_d_write_c) { logerror("%04x - ppi8255_intf_d_(used)write_c %02x\n", machine().device("maincpu")->safe_pcbase(), data);}
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_d_write_c) { logerror("%04x - ppi8255_intf_d_(used)write_c %02x\n", m_maincpu->pcbase(), data);}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_a_alpha_display);
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_b) { logerror("%04x - ppi8255_intf_e_write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_b) { logerror("%04x - ppi8255_intf_e_write_b %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_e_write_c)
|
||||
{
|
||||
m_percent_mux = data;
|
||||
|
||||
logerror("%04x - ppi8255_intf_e_write_c %02x (INPUT MUX?)\n", machine().device("maincpu")->safe_pcbase(), data);
|
||||
logerror("%04x - ppi8255_intf_e_write_c %02x (INPUT MUX?)\n", m_maincpu->pcbase(), data);
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_a) { logerror("%04x - ppi8255_intf_f_write_a %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_b) { logerror("%04x - ppi8255_intf_f_write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_c) { logerror("%04x - ppi8255_intf_f_write_c %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_a) { logerror("%04x - ppi8255_intf_f_write_a %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_b) { logerror("%04x - ppi8255_intf_f_write_b %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_f_write_c) { logerror("%04x - ppi8255_intf_f_write_c %02x\n", m_maincpu->pcbase(), data); }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_g_write_a) { logerror("%04x - ppi8255_intf_g_write_a %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_g_write_b) { logerror("%04x - ppi8255_intf_g_write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_g_write_c) { logerror("%04x - ppi8255_intf_g_write_c %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_g_write_a) { logerror("%04x - ppi8255_intf_g_write_a %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_g_write_b) { logerror("%04x - ppi8255_intf_g_write_b %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_g_write_c) { logerror("%04x - ppi8255_intf_g_write_c %02x\n", m_maincpu->pcbase(), data); }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_h_write_a) { logerror("%04x - ppi8255_intf_h_(used)write_a %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_h_write_b) { logerror("%04x - ppi8255_intf_h_(used)write_b %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_h_write_c) { logerror("%04x - ppi8255_intf_h_(used)write_c %02x\n", machine().device("maincpu")->safe_pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_h_write_a) { logerror("%04x - ppi8255_intf_h_(used)write_a %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_h_write_b) { logerror("%04x - ppi8255_intf_h_(used)write_b %02x\n", m_maincpu->pcbase(), data); }
|
||||
DECLARE_WRITE8_MEMBER(ppi8255_intf_h_write_c) { logerror("%04x - ppi8255_intf_h_(used)write_c %02x\n", m_maincpu->pcbase(), data); }
|
||||
|
||||
|
||||
DECLARE_DRIVER_INIT(ecoinf3);
|
||||
@ -398,8 +398,8 @@ void ecoinf3_state::update_display()
|
||||
// is the 2 digit bank display part of this, or multiplexed elsewhere
|
||||
WRITE8_MEMBER(ecoinf3_state::ppi8255_intf_e_write_a_alpha_display)
|
||||
{
|
||||
if ((data>=0x20) && (data<0x5b)) logerror("%04x - ppi8255_intf_e_write_a %02x (alpha) '%c'\n", machine().device("maincpu")->safe_pcbase(), data, data);
|
||||
else logerror("%04x - ppi8255_intf_e_write_a %02x (alpha)\n", machine().device("maincpu")->safe_pcbase(), data);
|
||||
if ((data>=0x20) && (data<0x5b)) logerror("%04x - ppi8255_intf_e_write_a %02x (alpha) '%c'\n", m_maincpu->pcbase(), data, data);
|
||||
else logerror("%04x - ppi8255_intf_e_write_a %02x (alpha)\n", m_maincpu->pcbase(), data);
|
||||
|
||||
static UINT8 send_buffer = 0;
|
||||
static int count = 0;
|
||||
|
@ -1184,8 +1184,6 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_START_MEMBER(equites_state,equites)
|
||||
{
|
||||
m_msm = machine().device<msm5232_device>("msm");
|
||||
|
||||
save_item(NAME(m_fg_char_bank));
|
||||
save_item(NAME(m_bgcolor));
|
||||
save_item(NAME(m_splndrbt_bg_scrollx));
|
||||
|
@ -307,11 +307,11 @@ READ32_MEMBER(gaelco3d_state::eeprom_data32_r)
|
||||
{
|
||||
UINT8 data = gaelco_serial_data_r(machine().device("serial"),space,0);
|
||||
if (LOG)
|
||||
logerror("%06X:read(%02X) = %08X & %08X\n", machine().device("maincpu")->safe_pc(), offset, data, mem_mask);
|
||||
logerror("%06X:read(%02X) = %08X & %08X\n", m_maincpu->pc(), offset, data, mem_mask);
|
||||
return data | 0xffffff00;
|
||||
}
|
||||
else
|
||||
logerror("%06X:read(%02X) = mask %08X\n", machine().device("maincpu")->safe_pc(), offset, mem_mask);
|
||||
logerror("%06X:read(%02X) = mask %08X\n", m_maincpu->pc(), offset, mem_mask);
|
||||
|
||||
return 0xffffffff;
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ static const c6280_interface c6280_config =
|
||||
|
||||
WRITE_LINE_MEMBER(ggconnie_state::pce_irq_changed)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(0, state);
|
||||
m_maincpu->set_input_line(0, state);
|
||||
}
|
||||
|
||||
|
||||
|
@ -488,7 +488,7 @@ READ8_MEMBER( maygay1b_state::m1_firq_trg_r )
|
||||
{
|
||||
static int i = 0xff;
|
||||
i ^= 0xff;
|
||||
space.machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE);
|
||||
LOG(("6809 firq\n"));
|
||||
return i;
|
||||
}
|
||||
|
@ -1378,7 +1378,7 @@ static void voodoo_stall(device_t *device, int stall)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LOG_DMA) logerror("%08X:Stalling CPU on voodoo\n", device->machine().device("maincpu")->safe_pc());
|
||||
if (LOG_DMA) logerror("%08X:Stalling CPU on voodoo\n", state->m_maincpu->pc());
|
||||
state->m_maincpu->spin_until_trigger(45678);
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ WRITE8_MEMBER(uapce_state::jamma_if_control_latch_w)
|
||||
|
||||
if ( diff & 0x40 )
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
/* D5 : Connected to a TIP31 which may control the coin meter:
|
||||
|
@ -11,6 +11,7 @@ public:
|
||||
m_ram(*this, "ram"),
|
||||
m_roadram(*this, "roadram"),
|
||||
m_f1gpstr2_ioready(*this, "ioready"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
m_oki1(*this, "oki1"),
|
||||
m_oki2(*this, "oki2"){ }
|
||||
@ -99,6 +100,7 @@ public:
|
||||
void cischeat_draw_sprites(bitmap_ind16 &bitmap , const rectangle &cliprect, int priority1, int priority2);
|
||||
void bigrun_draw_sprites(bitmap_ind16 &bitmap , const rectangle &cliprect, int priority1, int priority2);
|
||||
void cischeat_untangle_sprites(const char *region);
|
||||
optional_device<cpu_device> m_maincpu; // some are called cpu1
|
||||
optional_device<cpu_device> m_soundcpu;
|
||||
required_device<okim6295_device> m_oki1;
|
||||
required_device<okim6295_device> m_oki2;
|
||||
|
@ -16,6 +16,7 @@ public:
|
||||
m_spriteram_2(*this, "spriteram_2"),
|
||||
m_mcu_ram(*this, "mcu_ram"),
|
||||
m_mcu(*this, "mcu"),
|
||||
m_msm(*this, "msm"),
|
||||
m_dac_1(*this, "dac1"),
|
||||
m_dac_2(*this, "dac2"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
@ -60,7 +61,7 @@ public:
|
||||
|
||||
/* devices */
|
||||
optional_device<cpu_device> m_mcu;
|
||||
msm5232_device *m_msm;
|
||||
required_device<msm5232_device> m_msm;
|
||||
required_device<dac_device> m_dac_1;
|
||||
required_device<dac_device> m_dac_2;
|
||||
DECLARE_WRITE8_MEMBER(equites_c0f8_w);
|
||||
|
@ -15,13 +15,16 @@ class pce_common_state : public driver_device
|
||||
{
|
||||
public:
|
||||
pce_common_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag) { }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(pce_joystick_w);
|
||||
DECLARE_READ8_MEMBER(pce_joystick_r);
|
||||
|
||||
DECLARE_DRIVER_INIT(pce_common);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
|
||||
virtual UINT8 joy_read();
|
||||
private:
|
||||
UINT8 m_io_port_options; /*driver-specific options for the PCE*/
|
||||
|
@ -56,7 +56,7 @@ WRITE8_MEMBER(scramble_state::scramble_protection_w)
|
||||
|
||||
READ8_MEMBER(scramble_state::scramble_protection_r)
|
||||
{
|
||||
switch (machine().device("maincpu")->safe_pc())
|
||||
switch (m_maincpu->pc())
|
||||
{
|
||||
case 0x00a8: return 0xf0;
|
||||
case 0x00be: return 0xb0;
|
||||
|
@ -1412,7 +1412,7 @@ if ( machine().input().code_pressed(KEYCODE_Z) || machine().input().code_pressed
|
||||
if (msk != 0) m_active_layers &= msk;
|
||||
#if 1
|
||||
{
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
||||
|
||||
popmessage("Cmd: %04X Pos:%04X Lim:%04X Inp:%04X",
|
||||
m_scudhamm_motor_command,
|
||||
|
@ -717,7 +717,7 @@ void a2600_state::mode3E_RAM_switch(UINT16 offset, UINT8 data)
|
||||
|
||||
void a2600_state::modeFV_switch(UINT16 offset, UINT8 data)
|
||||
{
|
||||
if (!m_FVlocked && ( machine().device("maincpu")->safe_pc() & 0x1F00 ) == 0x1F00 )
|
||||
if (!m_FVlocked && ( m_maincpu->pc() & 0x1F00 ) == 0x1F00 )
|
||||
{
|
||||
m_FVlocked = 1;
|
||||
m_current_bank = m_current_bank ^ 0x01;
|
||||
@ -735,7 +735,7 @@ void a2600_state::modeJVP_switch(UINT16 offset, UINT8 data)
|
||||
m_current_bank ^= 1;
|
||||
break;
|
||||
default:
|
||||
printf("%04X: write to unknown mapper address %02X\n", machine().device("maincpu")->safe_pc(), 0xfa0 + offset );
|
||||
printf("%04X: write to unknown mapper address %02X\n", m_maincpu->pc(), 0xfa0 + offset );
|
||||
break;
|
||||
}
|
||||
m_bank_base[1] = m_cart + 0x1000 * m_current_bank;
|
||||
@ -876,7 +876,7 @@ DIRECT_UPDATE_MEMBER(a2600_state::modeF6_opbase)
|
||||
{
|
||||
if ( ! direct.space().debugger_access() )
|
||||
{
|
||||
modeF6_switch_w(machine().device("maincpu")->memory().space(AS_PROGRAM), ( address & 0x1FFF ) - 0x1FF6, 0 );
|
||||
modeF6_switch_w(m_maincpu->space(AS_PROGRAM), ( address & 0x1FFF ) - 0x1FF6, 0 );
|
||||
}
|
||||
}
|
||||
return address;
|
||||
@ -892,11 +892,11 @@ READ8_MEMBER(a2600_state::modeSS_r)
|
||||
return data;
|
||||
}
|
||||
|
||||
//logerror("%04X: read from modeSS area offset = %04X\n", machine().device("maincpu")->safe_pc(), offset);
|
||||
//logerror("%04X: read from modeSS area offset = %04X\n", m_maincpu->pc(), offset);
|
||||
/* Check for control register "write" */
|
||||
if ( offset == 0xFF8 )
|
||||
{
|
||||
//logerror("%04X: write to modeSS control register data = %02X\n", machine().device("maincpu")->safe_pc(), m_modeSS_byte);
|
||||
//logerror("%04X: write to modeSS control register data = %02X\n", m_maincpu->pc(), m_modeSS_byte);
|
||||
m_modeSS_write_enabled = m_modeSS_byte & 0x02;
|
||||
m_modeSS_write_delay = m_modeSS_byte >> 5;
|
||||
switch ( m_modeSS_byte & 0x1C )
|
||||
@ -951,7 +951,7 @@ READ8_MEMBER(a2600_state::modeSS_r)
|
||||
{
|
||||
/* Cassette port read */
|
||||
double tap_val = machine().device<cassette_image_device>(CASSETTE_TAG)->input();
|
||||
//logerror("%04X: Cassette port read, tap_val = %f\n", machine().device("maincpu")->safe_pc(), tap_val);
|
||||
//logerror("%04X: Cassette port read, tap_val = %f\n", m_maincpu->pc(), tap_val);
|
||||
if ( tap_val < 0 )
|
||||
{
|
||||
data = 0x00;
|
||||
@ -974,11 +974,11 @@ READ8_MEMBER(a2600_state::modeSS_r)
|
||||
m_modeSS_diff_adjust += 1;
|
||||
}
|
||||
|
||||
int diff = machine().device<cpu_device>("maincpu")->total_cycles() - m_modeSS_byte_started;
|
||||
//logerror("%04X: offset = %04X, %d\n", machine().device("maincpu")->safe_pc(), offset, diff);
|
||||
int diff = m_maincpu->total_cycles() - m_modeSS_byte_started;
|
||||
//logerror("%04X: offset = %04X, %d\n", m_maincpu->pc(), offset, diff);
|
||||
if ( diff - m_modeSS_diff_adjust == 5 )
|
||||
{
|
||||
//logerror("%04X: RAM write offset = %04X, data = %02X\n", machine().device("maincpu")->safe_pc(), offset, m_modeSS_byte );
|
||||
//logerror("%04X: RAM write offset = %04X, data = %02X\n", m_maincpu->pc(), offset, m_modeSS_byte );
|
||||
if ( offset & 0x800 )
|
||||
{
|
||||
if ( m_modeSS_high_ram_enabled )
|
||||
@ -996,7 +996,7 @@ READ8_MEMBER(a2600_state::modeSS_r)
|
||||
else if ( offset < 0x0100 )
|
||||
{
|
||||
m_modeSS_byte = offset;
|
||||
m_modeSS_byte_started = machine().device<cpu_device>("maincpu")->total_cycles();
|
||||
m_modeSS_byte_started = m_maincpu->total_cycles();
|
||||
m_modeSS_diff_adjust = 0;
|
||||
}
|
||||
m_modeSS_last_address = offset;
|
||||
@ -1004,7 +1004,7 @@ READ8_MEMBER(a2600_state::modeSS_r)
|
||||
else if ( offset < 0x0100 )
|
||||
{
|
||||
m_modeSS_byte = offset;
|
||||
m_modeSS_byte_started = machine().device<cpu_device>("maincpu")->total_cycles();
|
||||
m_modeSS_byte_started = m_maincpu->total_cycles();
|
||||
m_modeSS_last_address = offset;
|
||||
m_modeSS_diff_adjust = 0;
|
||||
}
|
||||
@ -1072,7 +1072,7 @@ READ8_MEMBER(a2600_state::modeDPC_r)
|
||||
UINT8 data_fetcher = offset & 0x07;
|
||||
UINT8 data = 0xFF;
|
||||
|
||||
logerror("%04X: Read from DPC offset $%02X\n", machine().device("maincpu")->safe_pc(), offset);
|
||||
logerror("%04X: Read from DPC offset $%02X\n", m_maincpu->pc(), offset);
|
||||
if ( offset < 0x08 )
|
||||
{
|
||||
switch( offset & 0x06 )
|
||||
@ -1179,13 +1179,13 @@ WRITE8_MEMBER(a2600_state::modeDPC_w)
|
||||
m_dpc.movamt = data;
|
||||
break;
|
||||
case 0x28: /* Not used */
|
||||
logerror("%04X: Write to unused DPC register $%02X, data $%02X\n", machine().device("maincpu")->safe_pc(), offset, data);
|
||||
logerror("%04X: Write to unused DPC register $%02X, data $%02X\n", m_maincpu->pc(), offset, data);
|
||||
break;
|
||||
case 0x30: /* Random number generator reset */
|
||||
m_dpc.shift_reg = 0;
|
||||
break;
|
||||
case 0x38: /* Not used */
|
||||
logerror("%04X: Write to unused DPC register $%02X, data $%02X\n", machine().device("maincpu")->safe_pc(), offset, data);
|
||||
logerror("%04X: Write to unused DPC register $%02X, data $%02X\n", m_maincpu->pc(), offset, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1208,16 +1208,16 @@ DIRECT_UPDATE_MEMBER(a2600_state::modeFE_opbase_handler)
|
||||
/* Still cheating a bit here by looking bit 13 of the address..., but the high byte of the
|
||||
cpu should be the last byte that was on the data bus and so should determine the bank
|
||||
we should switch in. */
|
||||
m_bank_base[1] = memregion("user1")->base() + 0x1000 * ( ( machine().device("maincpu")->safe_pc() & 0x2000 ) ? 0 : 1 );
|
||||
m_bank_base[1] = memregion("user1")->base() + 0x1000 * ( ( m_maincpu->pc() & 0x2000 ) ? 0 : 1 );
|
||||
membank("bank1")->set_base(m_bank_base[1] );
|
||||
/* and restore old opbase handler */
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).set_direct_update_handler(m_FE_old_opbase_handler);
|
||||
m_maincpu->space(AS_PROGRAM).set_direct_update_handler(m_FE_old_opbase_handler);
|
||||
return address;
|
||||
}
|
||||
|
||||
void a2600_state::modeFE_switch(UINT16 offset, UINT8 data)
|
||||
{
|
||||
address_space& space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space& space = m_maincpu->space(AS_PROGRAM);
|
||||
/* Retrieve last byte read by the cpu (for this mapping scheme this
|
||||
should be the last byte that was on the data bus
|
||||
*/
|
||||
@ -1321,7 +1321,7 @@ void a2600_state::install_banks(int count, unsigned init)
|
||||
"bank4",
|
||||
};
|
||||
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_bank(
|
||||
m_maincpu->space(AS_PROGRAM).install_read_bank(
|
||||
0x1000 + (i + 0) * 0x1000 / count - 0,
|
||||
0x1000 + (i + 1) * 0x1000 / count - 1, handler[i]);
|
||||
|
||||
@ -1368,9 +1368,9 @@ READ8_MEMBER(a2600_state::a2600_get_databus_contents)
|
||||
{
|
||||
UINT16 last_address, prev_address;
|
||||
UINT8 last_byte, prev_byte;
|
||||
address_space& prog_space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space& prog_space = m_maincpu->space(AS_PROGRAM);
|
||||
|
||||
last_address = machine().device("maincpu")->safe_pc() - 1;
|
||||
last_address = m_maincpu->pc() - 1;
|
||||
if ( ! ( last_address & 0x1080 ) )
|
||||
{
|
||||
return offset;
|
||||
@ -1546,7 +1546,7 @@ unsigned a2600_state::long detect_2600controllers()
|
||||
|
||||
void a2600_state::machine_reset()
|
||||
{
|
||||
address_space& space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space& space = m_maincpu->space(AS_PROGRAM);
|
||||
int chip = 0xFF;
|
||||
static const unsigned char snowwhite[] = { 0x10, 0xd0, 0xff, 0xff }; // Snow White Proto
|
||||
|
||||
@ -1879,7 +1879,7 @@ void a2600_state::machine_reset()
|
||||
}
|
||||
|
||||
/* Banks may have changed, reset the cpu so it uses the correct reset vector */
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
|
||||
|
@ -405,7 +405,7 @@ INPUT_PORTS_END
|
||||
*/
|
||||
INTERRUPT_GEN_MEMBER(apexc_state::apexc_interrupt)
|
||||
{
|
||||
address_space& space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space& space = m_maincpu->space(AS_PROGRAM);
|
||||
UINT32 edit_keys;
|
||||
int control_keys;
|
||||
|
||||
@ -614,7 +614,7 @@ UINT32 apexc_state::screen_update_apexc(screen_device &screen, bitmap_ind16 &bit
|
||||
|
||||
apexc_draw_led(bitmap, 0, 0, 1);
|
||||
|
||||
apexc_draw_led(bitmap, 0, 8, machine().device("maincpu")->state().state_int(APEXC_STATE));
|
||||
apexc_draw_led(bitmap, 0, 8, m_maincpu->state_int(APEXC_STATE));
|
||||
|
||||
for (i=0; i<32; i++)
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ inline void ATTR_PRINTF(3,4) ip20_state::verboselog(int n_level, const char *s_f
|
||||
va_start( v, s_fmt );
|
||||
vsprintf( buf, s_fmt, v );
|
||||
va_end( v );
|
||||
logerror( "%08x: %s", machine().device("maincpu")->safe_pc(), buf );
|
||||
logerror( "%08x: %s", m_maincpu->pc(), buf );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ inline void ATTR_PRINTF(3,4) ip22_state::verboselog(int n_level, const char *s_f
|
||||
va_start( v, s_fmt );
|
||||
vsprintf( buf, s_fmt, v );
|
||||
va_end( v );
|
||||
logerror("%08x: %s", machine().device("maincpu")->safe_pc(), buf);
|
||||
logerror("%08x: %s", m_maincpu->pc(), buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1400,7 +1400,7 @@ WRITE8_MEMBER(nc_state::nc200_uart_control_w)
|
||||
}
|
||||
|
||||
/* bit 5 is used in disk interface */
|
||||
LOG_DEBUG(("bit 5: PC: %04x %02x\n", machine().device("maincpu")->safe_pc(), data & (1 << 5)));
|
||||
LOG_DEBUG(("bit 5: PC: %04x %02x\n", m_maincpu->pc(), data & (1 << 5)));
|
||||
}
|
||||
|
||||
|
||||
@ -1419,7 +1419,7 @@ WRITE8_MEMBER(nc_state::nc200_uart_control_w)
|
||||
WRITE8_MEMBER(nc_state::nc200_memory_card_wait_state_w)
|
||||
{
|
||||
upd765a_device *fdc = machine().device<upd765a_device>("upd765");
|
||||
LOG_DEBUG(("nc200 memory card wait state: PC: %04x %02x\n", machine().device("maincpu")->safe_pc(), data));
|
||||
LOG_DEBUG(("nc200 memory card wait state: PC: %04x %02x\n", m_maincpu->pc(), data));
|
||||
#if 0
|
||||
floppy_drive_set_motor_state(0, 1);
|
||||
floppy_drive_set_ready_state(0, 1, 1);
|
||||
@ -1432,7 +1432,7 @@ WRITE8_MEMBER(nc_state::nc200_memory_card_wait_state_w)
|
||||
/* bit 0 seems to be the same as nc100 */
|
||||
WRITE8_MEMBER(nc_state::nc200_poweroff_control_w)
|
||||
{
|
||||
LOG_DEBUG(("nc200 power off: PC: %04x %02x\n", machine().device("maincpu")->safe_pc(), data));
|
||||
LOG_DEBUG(("nc200 power off: PC: %04x %02x\n", m_maincpu->pc(), data));
|
||||
|
||||
nc200_video_set_backlight(machine(), ((data ^ (1 << 2)) >> 2) & 0x01);
|
||||
}
|
||||
|
@ -929,8 +929,8 @@ TIMER_CALLBACK_MEMBER(pdp1_state::reader_callback)
|
||||
m_tape_reader.rcl = 0;
|
||||
if (m_tape_reader.rcp)
|
||||
{
|
||||
machine().device("maincpu")->state().set_state_int(PDP1_IO, m_tape_reader.rb); /* transfer reader buffer to IO */
|
||||
pdp1_pulse_iot_done(machine().device("maincpu"));
|
||||
m_maincpu->set_state_int(PDP1_IO, m_tape_reader.rb); /* transfer reader buffer to IO */
|
||||
pdp1_pulse_iot_done(m_maincpu);
|
||||
}
|
||||
else
|
||||
m_io_status |= io_st_ptr;
|
||||
@ -1082,7 +1082,7 @@ TIMER_CALLBACK_MEMBER(pdp1_state::puncher_callback)
|
||||
m_io_status |= io_st_ptp;
|
||||
if (nac)
|
||||
{
|
||||
pdp1_pulse_iot_done(machine().device("maincpu"));
|
||||
pdp1_pulse_iot_done(m_maincpu);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1291,7 +1291,7 @@ TIMER_CALLBACK_MEMBER(pdp1_state::tyo_callback)
|
||||
m_io_status |= io_st_tyo;
|
||||
if (nac)
|
||||
{
|
||||
pdp1_pulse_iot_done(machine().device("maincpu"));
|
||||
pdp1_pulse_iot_done(m_maincpu);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1365,7 +1365,7 @@ static void iot_tyi(device_t *device, int op2, int nac, int mb, int *io, int ac)
|
||||
{
|
||||
state->m_io_status &= ~io_st_tyi;
|
||||
if (USE_SBS)
|
||||
device->machine().device("maincpu")->execute().set_input_line_and_vector(0, CLEAR_LINE, 0); /* interrupt it, baby */
|
||||
state->m_maincpu->set_input_line_and_vector(0, CLEAR_LINE, 0); /* interrupt it, baby */
|
||||
}
|
||||
}
|
||||
|
||||
@ -1409,7 +1409,7 @@ static void iot_tyi(device_t *device, int op2, int nac, int mb, int *io, int ac)
|
||||
*/
|
||||
TIMER_CALLBACK_MEMBER(pdp1_state::dpy_callback)
|
||||
{
|
||||
pdp1_pulse_iot_done(machine().device("maincpu"));
|
||||
pdp1_pulse_iot_done(m_maincpu);
|
||||
}
|
||||
|
||||
|
||||
@ -1436,7 +1436,7 @@ static void iot_dpy(device_t *device, int op2, int nac, int mb, int *io, int ac)
|
||||
{
|
||||
state->m_io_status |= io_st_pen;
|
||||
|
||||
device->machine().device("maincpu")->state().set_state_int(PDP1_PF3, 1);
|
||||
state->m_maincpu->set_state_int(PDP1_PF3, 1);
|
||||
}
|
||||
|
||||
if (nac)
|
||||
@ -1581,12 +1581,12 @@ static void iot_dcc(device_t *device, int op2, int nac, int mb, int *io, int ac)
|
||||
{
|
||||
if ((state->m_parallel_drum.wfb >= 1) && (state->m_parallel_drum.wfb <= 22))
|
||||
{
|
||||
drum_write(state, state->m_parallel_drum.wfb-1, dc, (signed)device->machine().device("maincpu")->memory().space(AS_PROGRAM).read_dword(state->m_parallel_drum.wcl<<2));
|
||||
drum_write(state, state->m_parallel_drum.wfb-1, dc, (signed)state->m_maincpu->space(AS_PROGRAM).read_dword(state->m_parallel_drum.wcl<<2));
|
||||
}
|
||||
|
||||
if ((state->m_parallel_drum.rfb >= 1) && (state->m_parallel_drum.rfb <= 22))
|
||||
{
|
||||
device->machine().device("maincpu")->memory().space(AS_PROGRAM).write_dword(state->m_parallel_drum.wcl<<2, drum_read(state, state->m_parallel_drum.rfb-1, dc));
|
||||
state->m_maincpu->space(AS_PROGRAM).write_dword(state->m_parallel_drum.wcl<<2, drum_read(state, state->m_parallel_drum.rfb-1, dc));
|
||||
}
|
||||
|
||||
state->m_parallel_drum.wc = (state->m_parallel_drum.wc+1) & 07777;
|
||||
@ -1595,9 +1595,9 @@ static void iot_dcc(device_t *device, int op2, int nac, int mb, int *io, int ac)
|
||||
if (state->m_parallel_drum.wc)
|
||||
delay = delay + PARALLEL_DRUM_WORD_TIME;
|
||||
} while (state->m_parallel_drum.wc);
|
||||
device->machine().device("maincpu")->execute().adjust_icount(-device->machine().device<cpu_device>("maincpu")->attotime_to_cycles(delay));
|
||||
state->m_maincpu->adjust_icount(-state->m_maincpu->attotime_to_cycles(delay));
|
||||
/* if no error, skip */
|
||||
device->machine().device("maincpu")->state().set_state_int(PDP1_PC, device->machine().device("maincpu")->state().state_int(PDP1_PC)+1);
|
||||
state->m_maincpu->set_state_int(PDP1_PC, state->m_maincpu->state_int(PDP1_PC)+1);
|
||||
}
|
||||
|
||||
static void iot_dra(device_t *device, int op2, int nac, int mb, int *io, int ac)
|
||||
@ -1805,7 +1805,7 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
|
||||
int ta_transitions;
|
||||
|
||||
|
||||
device.state().set_state_int(PDP1_SS, machine().root_device().ioport("SENSE")->read());
|
||||
m_maincpu->set_state_int(PDP1_SS, machine().root_device().ioport("SENSE")->read());
|
||||
|
||||
/* read new state of control keys */
|
||||
control_keys = ioport("CSW")->read();
|
||||
@ -1817,68 +1817,68 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
|
||||
|
||||
if (control_transitions & pdp1_extend)
|
||||
{
|
||||
device.state().set_state_int(PDP1_EXTEND_SW, ! device.state().state_int(PDP1_EXTEND_SW));
|
||||
m_maincpu->set_state_int(PDP1_EXTEND_SW, ! m_maincpu->state_int(PDP1_EXTEND_SW));
|
||||
}
|
||||
if (control_transitions & pdp1_start_nobrk)
|
||||
{
|
||||
pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
|
||||
device.state().set_state_int(PDP1_EXD, device.state().state_int(PDP1_EXTEND_SW));
|
||||
device.state().set_state_int(PDP1_SBM, (UINT64)0);
|
||||
device.state().set_state_int(PDP1_OV, (UINT64)0);
|
||||
device.state().set_state_int(PDP1_PC, device.state().state_int(PDP1_TA));
|
||||
device.state().set_state_int(PDP1_RUN, 1);
|
||||
pdp1_pulse_start_clear(m_maincpu); /* pulse Start Clear line */
|
||||
m_maincpu->set_state_int(PDP1_EXD, m_maincpu->state_int(PDP1_EXTEND_SW));
|
||||
m_maincpu->set_state_int(PDP1_SBM, (UINT64)0);
|
||||
m_maincpu->set_state_int(PDP1_OV, (UINT64)0);
|
||||
m_maincpu->set_state_int(PDP1_PC, m_maincpu->state_int(PDP1_TA));
|
||||
m_maincpu->set_state_int(PDP1_RUN, 1);
|
||||
}
|
||||
if (control_transitions & pdp1_start_brk)
|
||||
{
|
||||
pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
|
||||
device.state().set_state_int(PDP1_EXD, device.state().state_int(PDP1_EXTEND_SW));
|
||||
device.state().set_state_int(PDP1_SBM, 1);
|
||||
device.state().set_state_int(PDP1_OV, (UINT64)0);
|
||||
device.state().set_state_int(PDP1_PC, device.state().state_int(PDP1_TA));
|
||||
device.state().set_state_int(PDP1_RUN, 1);
|
||||
pdp1_pulse_start_clear(m_maincpu); /* pulse Start Clear line */
|
||||
m_maincpu->set_state_int(PDP1_EXD, m_maincpu->state_int(PDP1_EXTEND_SW));
|
||||
m_maincpu->set_state_int(PDP1_SBM, 1);
|
||||
m_maincpu->set_state_int(PDP1_OV, (UINT64)0);
|
||||
m_maincpu->set_state_int(PDP1_PC, m_maincpu->state_int(PDP1_TA));
|
||||
m_maincpu->set_state_int(PDP1_RUN, 1);
|
||||
}
|
||||
if (control_transitions & pdp1_stop)
|
||||
{
|
||||
device.state().set_state_int(PDP1_RUN, (UINT64)0);
|
||||
device.state().set_state_int(PDP1_RIM, (UINT64)0); /* bug : we stop after reading an even-numbered word
|
||||
m_maincpu->set_state_int(PDP1_RUN, (UINT64)0);
|
||||
m_maincpu->set_state_int(PDP1_RIM, (UINT64)0); /* bug : we stop after reading an even-numbered word
|
||||
(i.e. data), whereas a real pdp-1 stops after reading
|
||||
an odd-numbered word (i.e. dio instruciton) */
|
||||
}
|
||||
if (control_transitions & pdp1_continue)
|
||||
{
|
||||
device.state().set_state_int(PDP1_RUN, 1);
|
||||
m_maincpu->set_state_int(PDP1_RUN, 1);
|
||||
}
|
||||
if (control_transitions & pdp1_examine)
|
||||
{
|
||||
pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
|
||||
device.state().set_state_int(PDP1_PC, device.state().state_int(PDP1_TA));
|
||||
device.state().set_state_int(PDP1_MA, device.state().state_int(PDP1_PC));
|
||||
device.state().set_state_int(PDP1_IR, LAC); /* this instruction is actually executed */
|
||||
pdp1_pulse_start_clear(m_maincpu); /* pulse Start Clear line */
|
||||
m_maincpu->set_state_int(PDP1_PC, m_maincpu->state_int(PDP1_TA));
|
||||
m_maincpu->set_state_int(PDP1_MA, m_maincpu->state_int(PDP1_PC));
|
||||
m_maincpu->set_state_int(PDP1_IR, LAC); /* this instruction is actually executed */
|
||||
|
||||
device.state().set_state_int(PDP1_MB, (signed)device.memory().space(AS_PROGRAM).read_dword(PDP1_MA<<2));
|
||||
device.state().set_state_int(PDP1_AC, device.state().state_int(PDP1_MB));
|
||||
m_maincpu->set_state_int(PDP1_MB, (signed)m_maincpu->space(AS_PROGRAM).read_dword(PDP1_MA<<2));
|
||||
m_maincpu->set_state_int(PDP1_AC, m_maincpu->state_int(PDP1_MB));
|
||||
}
|
||||
if (control_transitions & pdp1_deposit)
|
||||
{
|
||||
pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
|
||||
device.state().set_state_int(PDP1_PC, device.state().state_int(PDP1_TA));
|
||||
device.state().set_state_int(PDP1_MA, device.state().state_int(PDP1_PC));
|
||||
device.state().set_state_int(PDP1_AC, device.state().state_int(PDP1_TW));
|
||||
device.state().set_state_int(PDP1_IR, DAC); /* this instruction is actually executed */
|
||||
pdp1_pulse_start_clear(m_maincpu); /* pulse Start Clear line */
|
||||
m_maincpu->set_state_int(PDP1_PC, m_maincpu->state_int(PDP1_TA));
|
||||
m_maincpu->set_state_int(PDP1_MA, m_maincpu->state_int(PDP1_PC));
|
||||
m_maincpu->set_state_int(PDP1_AC, m_maincpu->state_int(PDP1_TW));
|
||||
m_maincpu->set_state_int(PDP1_IR, DAC); /* this instruction is actually executed */
|
||||
|
||||
device.state().set_state_int(PDP1_MB, device.state().state_int(PDP1_AC));
|
||||
device.memory().space(AS_PROGRAM).write_dword(device.state().state_int(PDP1_MA)<<2, device.state().state_int(PDP1_MB));
|
||||
m_maincpu->set_state_int(PDP1_MB, m_maincpu->state_int(PDP1_AC));
|
||||
m_maincpu->space(AS_PROGRAM).write_dword(m_maincpu->state_int(PDP1_MA)<<2, m_maincpu->state_int(PDP1_MB));
|
||||
}
|
||||
if (control_transitions & pdp1_read_in)
|
||||
{ /* set cpu to read instructions from perforated tape */
|
||||
pdp1_pulse_start_clear(&device); /* pulse Start Clear line */
|
||||
device.state().set_state_int(PDP1_PC, ( device.state().state_int(PDP1_TA) & 0170000)
|
||||
| (device.state().state_int(PDP1_PC) & 0007777)); /* transfer ETA to EPC */
|
||||
pdp1_pulse_start_clear(m_maincpu); /* pulse Start Clear line */
|
||||
m_maincpu->set_state_int(PDP1_PC, ( m_maincpu->state_int(PDP1_TA) & 0170000)
|
||||
| (m_maincpu->state_int(PDP1_PC) & 0007777)); /* transfer ETA to EPC */
|
||||
/*machine.device("maincpu")->state().set_state_int(PDP1_MA, machine.device("maincpu")->state().state_int(PDP1_PC));*/
|
||||
device.state().set_state_int(PDP1_EXD, device.state().state_int(PDP1_EXTEND_SW));
|
||||
device.state().set_state_int(PDP1_OV, (UINT64)0); /* right??? */
|
||||
device.state().set_state_int(PDP1_RUN, (UINT64)0);
|
||||
device.state().set_state_int(PDP1_RIM, 1);
|
||||
m_maincpu->set_state_int(PDP1_EXD, m_maincpu->state_int(PDP1_EXTEND_SW));
|
||||
m_maincpu->set_state_int(PDP1_OV, (UINT64)0); /* right??? */
|
||||
m_maincpu->set_state_int(PDP1_RUN, (UINT64)0);
|
||||
m_maincpu->set_state_int(PDP1_RIM, 1);
|
||||
}
|
||||
if (control_transitions & pdp1_reader)
|
||||
{
|
||||
@ -1888,11 +1888,11 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
|
||||
}
|
||||
if (control_transitions & pdp1_single_step)
|
||||
{
|
||||
device.state().set_state_int(PDP1_SNGL_STEP, ! device.state().state_int(PDP1_SNGL_STEP));
|
||||
m_maincpu->set_state_int(PDP1_SNGL_STEP, ! m_maincpu->state_int(PDP1_SNGL_STEP));
|
||||
}
|
||||
if (control_transitions & pdp1_single_inst)
|
||||
{
|
||||
device.state().set_state_int(PDP1_SNGL_INST, ! device.state().state_int(PDP1_SNGL_INST));
|
||||
m_maincpu->set_state_int(PDP1_SNGL_INST, ! m_maincpu->state_int(PDP1_SNGL_INST));
|
||||
}
|
||||
|
||||
/* remember new state of control keys */
|
||||
@ -1906,7 +1906,7 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
|
||||
tw_transitions = tw_keys & (~ m_old_tw_keys);
|
||||
|
||||
if (tw_transitions)
|
||||
device.state().set_state_int(PDP1_TW, device.state().state_int(PDP1_TW) ^ tw_transitions);
|
||||
m_maincpu->set_state_int(PDP1_TW, m_maincpu->state_int(PDP1_TW) ^ tw_transitions);
|
||||
|
||||
/* remember new state of test word keys */
|
||||
m_old_tw_keys = tw_keys;
|
||||
@ -1919,7 +1919,7 @@ INTERRUPT_GEN_MEMBER(pdp1_state::pdp1_interrupt)
|
||||
ta_transitions = ta_keys & (~ m_old_ta_keys);
|
||||
|
||||
if (ta_transitions)
|
||||
device.state().set_state_int(PDP1_TA, device.state().state_int(PDP1_TA) ^ ta_transitions);
|
||||
m_maincpu->set_state_int(PDP1_TA, m_maincpu->state_int(PDP1_TA) ^ ta_transitions);
|
||||
|
||||
/* remember new state of test word keys */
|
||||
m_old_ta_keys = ta_keys;
|
||||
|
@ -141,7 +141,7 @@ void psion_state::io_rw(address_space &space, UINT16 offset)
|
||||
/* switch off, CPU goes into standby mode */
|
||||
m_enable_nmi = 0;
|
||||
m_stby_pwr = 1;
|
||||
space.machine().device<cpu_device>("maincpu")->suspend(SUSPEND_REASON_HALT, 1);
|
||||
m_maincpu->suspend(SUSPEND_REASON_HALT, 1);
|
||||
break;
|
||||
case 0x100:
|
||||
m_pulse = 1;
|
||||
@ -216,11 +216,9 @@ READ8_MEMBER( psion_state::io_r )
|
||||
|
||||
INPUT_CHANGED_MEMBER(psion_state::psion_on)
|
||||
{
|
||||
cpu_device *cpu = machine().device<cpu_device>("maincpu");
|
||||
|
||||
/* reset the CPU for resume from standby */
|
||||
if (cpu->suspended(SUSPEND_REASON_HALT))
|
||||
cpu->reset();
|
||||
if (m_maincpu->suspended(SUSPEND_REASON_HALT))
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START(psioncm_mem, AS_PROGRAM, 8, psion_state)
|
||||
|
@ -425,19 +425,17 @@ DIRECT_UPDATE_MEMBER(psx1_state::psx_setopbase)
|
||||
{
|
||||
if( address == 0x80030000 )
|
||||
{
|
||||
cpu_device *cpu = machine().device<cpu_device>("maincpu");
|
||||
m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(psx1_state::psx_default), this));
|
||||
|
||||
cpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(psx1_state::psx_default), this));
|
||||
|
||||
if( load_psxexe( cpu, m_exe_buffer, m_exe_size ) ||
|
||||
load_cpe( cpu, m_exe_buffer, m_exe_size ) ||
|
||||
load_psf( cpu, m_exe_buffer, m_exe_size ) )
|
||||
if( load_psxexe( m_maincpu, m_exe_buffer, m_exe_size ) ||
|
||||
load_cpe( m_maincpu, m_exe_buffer, m_exe_size ) ||
|
||||
load_psf( m_maincpu, m_exe_buffer, m_exe_size ) )
|
||||
{
|
||||
/* DEBUGGER_BREAK; */
|
||||
|
||||
address = cpu->state_int( PSXCPU_PC );
|
||||
cpu->set_state_int( PSXCPU_DELAYR, PSXCPU_DELAYR_PC );
|
||||
cpu->set_state_int( PSXCPU_DELAYV, address );
|
||||
address = m_maincpu->state_int( PSXCPU_PC );
|
||||
m_maincpu->set_state_int( PSXCPU_DELAYR, PSXCPU_DELAYR_PC );
|
||||
m_maincpu->set_state_int( PSXCPU_DELAYV, address );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -373,7 +373,7 @@ void pyl601_state::machine_reset()
|
||||
membank("bank5")->set_base(memregion("maincpu")->base() + 0xf000);
|
||||
membank("bank6")->set_base(ram + 0xf000);
|
||||
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
void pyl601_state::video_start()
|
||||
|
@ -919,7 +919,7 @@ WRITE8_MEMBER(x68k_state::ppi_port_c_w)
|
||||
if((m_ppi_prev & 0x10) == 0x00 && (data & 0x10) == 0x10)
|
||||
{
|
||||
m_mdctrl.seq1++;
|
||||
m_mdctrl.io_timeout1->adjust(machine().device<cpu_device>("maincpu")->cycles_to_attotime(8192));
|
||||
m_mdctrl.io_timeout1->adjust(m_maincpu->cycles_to_attotime(8192));
|
||||
}
|
||||
|
||||
m_joy.joy2_enable = data & 0x20;
|
||||
@ -927,7 +927,7 @@ WRITE8_MEMBER(x68k_state::ppi_port_c_w)
|
||||
if((m_ppi_prev & 0x20) == 0x00 && (data & 0x20) == 0x20)
|
||||
{
|
||||
m_mdctrl.seq2++;
|
||||
m_mdctrl.io_timeout2->adjust(machine().device<cpu_device>("maincpu")->cycles_to_attotime(8192));
|
||||
m_mdctrl.io_timeout2->adjust(m_maincpu->cycles_to_attotime(8192));
|
||||
}
|
||||
m_ppi_prev = data;
|
||||
|
||||
@ -1632,7 +1632,7 @@ READ16_MEMBER(x68k_state::x68k_rom0_r)
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
machine().scheduler().timer_set(machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), 0xbffffc+offset);
|
||||
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), 0xbffffc+offset);
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
@ -1649,7 +1649,7 @@ WRITE16_MEMBER(x68k_state::x68k_rom0_w)
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
machine().scheduler().timer_set(machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), 0xbffffc+offset);
|
||||
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), 0xbffffc+offset);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1665,7 +1665,7 @@ READ16_MEMBER(x68k_state::x68k_emptyram_r)
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
machine().scheduler().timer_set(machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), offset);
|
||||
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), offset);
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
@ -1682,7 +1682,7 @@ WRITE16_MEMBER(x68k_state::x68k_emptyram_w)
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
machine().scheduler().timer_set(machine().device<cpu_device>("maincpu")->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), offset);
|
||||
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(4), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), offset);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1696,7 +1696,7 @@ READ16_MEMBER(x68k_state::x68k_exp_r)
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
machine().scheduler().timer_set(machine().device<cpu_device>("maincpu")->cycles_to_attotime(16), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), 0xeafa00+offset);
|
||||
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(16), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), 0xeafa00+offset);
|
||||
// machine.device("maincpu")->execute().set_input_line_and_vector(2,ASSERT_LINE,state->m_current_vector[2]);
|
||||
}
|
||||
return 0xffff;
|
||||
@ -1712,7 +1712,7 @@ WRITE16_MEMBER(x68k_state::x68k_exp_w)
|
||||
offset *= 2;
|
||||
if(ACCESSING_BITS_0_7)
|
||||
offset++;
|
||||
machine().scheduler().timer_set(machine().device<cpu_device>("maincpu")->cycles_to_attotime(16), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), 0xeafa00+offset);
|
||||
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(16), timer_expired_delegate(FUNC(x68k_state::x68k_bus_error),this), 0xeafa00+offset);
|
||||
// machine.device("maincpu")->execute().set_input_line_and_vector(2,ASSERT_LINE,state->m_current_vector[2]);
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ TIMER_CALLBACK_MEMBER(dc_cons_state::atapi_xfer_end )
|
||||
atapi_regs[ATAPI_REG_COUNTLOW] = atapi_xferlen & 0xff;
|
||||
atapi_regs[ATAPI_REG_COUNTHIGH] = (atapi_xferlen>>8)&0xff;
|
||||
|
||||
atapi_timer->adjust(machine().device<cpu_device>("maincpu")->cycles_to_attotime((ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048))));
|
||||
atapi_timer->adjust(m_maincpu->cycles_to_attotime((ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048))));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -685,7 +685,7 @@ WRITE64_MEMBER(dc_cons_state::dc_mess_g1_ctrl_w )
|
||||
}
|
||||
|
||||
atapi_xferbase = g1bus_regs[SB_GDSTAR];
|
||||
atapi_timer->adjust(machine().device<cpu_device>("maincpu")->cycles_to_attotime((ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048))));
|
||||
atapi_timer->adjust(m_maincpu->cycles_to_attotime((ATAPI_CYCLES_PER_SECTOR * (atapi_xferlen/2048))));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ static void mac_install_memory(running_machine &machine, offs_t memory_begin, of
|
||||
offs_t memory_size, void *memory_data, int is_rom, const char *bank)
|
||||
{
|
||||
mac_state *state = machine.driver_data<mac_state>();
|
||||
address_space& space = machine.device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space& space = state->m_maincpu->space(AS_PROGRAM);
|
||||
offs_t memory_mask;
|
||||
|
||||
memory_size = MIN(memory_size, (memory_end + 1 - memory_begin));
|
||||
@ -1590,7 +1590,7 @@ READ16_MEMBER ( mac_state::mac_via2_r )
|
||||
data = m_via2->read(space, offset);
|
||||
|
||||
if (LOG_VIA)
|
||||
logerror("mac_via2_r: offset=0x%02x = %02x (PC=%x)\n", offset*2, data, space.machine().device("maincpu")->safe_pc());
|
||||
logerror("mac_via2_r: offset=0x%02x = %02x (PC=%x)\n", offset*2, data, m_maincpu->pc());
|
||||
|
||||
return (data & 0xff) | (data << 8);
|
||||
}
|
||||
@ -1601,7 +1601,7 @@ WRITE16_MEMBER ( mac_state::mac_via2_w )
|
||||
offset &= 0x0f;
|
||||
|
||||
if (LOG_VIA)
|
||||
logerror("mac_via2_w: offset=%x data=0x%08x mask=%x (PC=%x)\n", offset, data, mem_mask, space.machine().device("maincpu")->safe_pc());
|
||||
logerror("mac_via2_w: offset=%x data=0x%08x mask=%x (PC=%x)\n", offset, data, mem_mask, m_maincpu->pc());
|
||||
|
||||
if (ACCESSING_BITS_0_7)
|
||||
m_via2->write(space, offset, data & 0xff);
|
||||
@ -1893,9 +1893,9 @@ void mac_state::machine_reset()
|
||||
}
|
||||
|
||||
m_scsi_interrupt = 0;
|
||||
if ((machine().device<cpu_device>("maincpu")->debug()) && (m_model < MODEL_MAC_POWERMAC_6100))
|
||||
if ((m_maincpu->debug()) && (m_model < MODEL_MAC_POWERMAC_6100))
|
||||
{
|
||||
machine().device<cpu_device>("maincpu")->debug()->set_dasm_override(mac_dasm_override);
|
||||
m_maincpu->debug()->set_dasm_override(mac_dasm_override);
|
||||
}
|
||||
|
||||
m_drive_select = 0;
|
||||
|
@ -398,7 +398,7 @@ WRITE8_MEMBER(microtan_state::microtan_bffx_w)
|
||||
break;
|
||||
case 1: /* BFF1: write delayed NMI */
|
||||
LOG(("microtan_bff1_w: %d <- %02x (delayed NMI)\n", offset, data));
|
||||
machine().scheduler().timer_set(machine().device<cpu_device>("maincpu")->cycles_to_attotime(8), timer_expired_delegate(FUNC(microtan_state::microtan_pulse_nmi),this));
|
||||
machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(8), timer_expired_delegate(FUNC(microtan_state::microtan_pulse_nmi),this));
|
||||
break;
|
||||
case 2: /* BFF2: write keypad column write (what is this meant for?) */
|
||||
LOG(("microtan_bff2_w: %d <- %02x (keypad column)\n", offset, data));
|
||||
|
Loading…
Reference in New Issue
Block a user