mirror of
https://github.com/holub/mame
synced 2025-10-07 17:27:06 +03:00
changed machine().device("maincpu") with m_maincpu in mess tree part (nw)
This commit is contained in:
parent
a77e9c9f62
commit
10d146a6be
@ -130,7 +130,7 @@ INPUT_PORTS_END
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(nixieclock_state::timer_callback)
|
||||
{
|
||||
i4004_set_test(machine().device("maincpu"),m_timer);
|
||||
i4004_set_test(m_maincpu,m_timer);
|
||||
m_timer^=1;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,8 @@ public:
|
||||
m_riot_ram(*this, "riot_ram"),
|
||||
m_banking_mode(0xff),
|
||||
m_joy1(*this, CONTROL1_TAG),
|
||||
m_joy2(*this, CONTROL2_TAG) { }
|
||||
m_joy2(*this, CONTROL2_TAG) ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
dpc_t m_dpc;
|
||||
memory_region* m_extra_RAM;
|
||||
@ -167,6 +168,7 @@ protected:
|
||||
int detect_32K_mode3F();
|
||||
int detect_super_chip();
|
||||
unsigned long detect_2600controllers();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -17,7 +17,8 @@ class a51xx_state : public driver_device
|
||||
{
|
||||
public:
|
||||
a51xx_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") { }
|
||||
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
@ -25,6 +26,7 @@ public:
|
||||
DECLARE_VIDEO_START(a5130);
|
||||
UINT32 screen_update_a5120(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_a5130(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -24,7 +24,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_via(*this, "via"),
|
||||
m_videoram(*this, "videoram")
|
||||
{ }
|
||||
,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_device<via6522_device> m_via;
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
@ -35,6 +36,7 @@ public:
|
||||
|
||||
UINT8 m_keydata;
|
||||
virtual void machine_reset();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -576,7 +576,7 @@ TIMER_CALLBACK_MEMBER(a7000_state::IOMD_timer0_callback)
|
||||
m_IRQ_status_A|=0x20;
|
||||
if(m_IRQ_mask_A&0x20)
|
||||
{
|
||||
generic_pulse_irq_line(machine().device("maincpu")->execute(), ARM7_IRQ_LINE,1);
|
||||
generic_pulse_irq_line(m_maincpu, ARM7_IRQ_LINE,1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -585,7 +585,7 @@ TIMER_CALLBACK_MEMBER(a7000_state::IOMD_timer1_callback)
|
||||
m_IRQ_status_A|=0x40;
|
||||
if(m_IRQ_mask_A&0x40)
|
||||
{
|
||||
generic_pulse_irq_line(machine().device("maincpu")->execute(), ARM7_IRQ_LINE,1);
|
||||
generic_pulse_irq_line(m_maincpu, ARM7_IRQ_LINE,1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -594,7 +594,7 @@ TIMER_CALLBACK_MEMBER(a7000_state::flyback_timer_callback)
|
||||
m_IRQ_status_A|=0x08;
|
||||
if(m_IRQ_mask_A&0x08)
|
||||
{
|
||||
generic_pulse_irq_line(machine().device("maincpu")->execute(), ARM7_IRQ_LINE,1);
|
||||
generic_pulse_irq_line(m_maincpu, ARM7_IRQ_LINE,1);
|
||||
}
|
||||
|
||||
m_flyback_timer->adjust(machine().primary_screen->time_until_pos(m_vidc20_vert_reg[VDER]));
|
||||
|
@ -16,11 +16,13 @@ class a7150_state : public driver_device
|
||||
{
|
||||
public:
|
||||
a7150_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") { }
|
||||
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_a7150(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -106,7 +106,7 @@ QUICKLOAD_LOAD(altair)
|
||||
void altair_state::machine_reset()
|
||||
{
|
||||
// Set startup addess done by turn-key
|
||||
machine().device("maincpu")->state().set_state_int(I8085_PC, 0xFD00);
|
||||
m_maincpu->set_state_int(I8085_PC, 0xFD00);
|
||||
|
||||
m_term_data = 0;
|
||||
}
|
||||
|
@ -38,7 +38,8 @@ class amico2k_state : public driver_device
|
||||
{
|
||||
public:
|
||||
amico2k_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") { }
|
||||
|
||||
void machine_start();
|
||||
|
||||
@ -53,6 +54,7 @@ public:
|
||||
// timers
|
||||
emu_timer *m_led_refresh_timer;
|
||||
TIMER_CALLBACK_MEMBER(led_refresh);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -754,7 +754,7 @@ IRQ_CALLBACK_MEMBER(apc_state::irq_callback)
|
||||
|
||||
void apc_state::machine_start()
|
||||
{
|
||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(apc_state::irq_callback),this));
|
||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(apc_state::irq_callback),this));
|
||||
|
||||
m_fdc->set_rate(500000);
|
||||
m_fdc->setup_intrq_cb(upd765a_device::line_cb(FUNC(apc_state::fdc_irq), this));
|
||||
@ -887,7 +887,7 @@ WRITE_LINE_MEMBER(apc_state::apc_master_set_int_line)
|
||||
{
|
||||
//printf("%02x\n",interrupt);
|
||||
// printf("irq %d\n",state);
|
||||
machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
READ8_MEMBER(apc_state::get_slave_ack)
|
||||
|
@ -14,7 +14,8 @@ class apexc_state : public driver_device
|
||||
{
|
||||
public:
|
||||
apexc_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") { }
|
||||
|
||||
UINT32 m_panel_data_reg; /* value of a data register on the control panel which can
|
||||
be edited - the existence of this register is a personnal
|
||||
@ -41,6 +42,7 @@ public:
|
||||
void apexc_teletyper_init();
|
||||
void apexc_teletyper_linefeed();
|
||||
void apexc_teletyper_putchar(int character);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
void apexc_state::machine_start()
|
||||
|
@ -109,7 +109,7 @@ void applix_state::machine_reset()
|
||||
{
|
||||
UINT8* RAM = memregion("maincpu")->base();
|
||||
memcpy(m_base, RAM+0x500000, 16);
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,7 +100,7 @@ ADDRESS_MAP_END
|
||||
INPUT_CHANGED_MEMBER(astrocde_mess_state::set_write_protect) // run when RAM expansion write protect switch is changed
|
||||
{
|
||||
int ram_expansion_installed = 0, write_protect_on = 0, expansion_ram_start = 0, expansion_ram_end = 0, shadow_ram_end = 0;
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
||||
UINT8 *expram = machine().device<ram_device>("ram_tag")->pointer();
|
||||
|
||||
get_ram_expansion_settings(ram_expansion_installed, write_protect_on, expansion_ram_start, expansion_ram_end, shadow_ram_end); // passing by reference
|
||||
@ -320,7 +320,7 @@ DRIVER_INIT_MEMBER(astrocde_state,astrocde)
|
||||
MACHINE_RESET_MEMBER(astrocde_mess_state, astrocde)
|
||||
{
|
||||
int ram_expansion_installed = 0, write_protect_on = 0, expansion_ram_start = 0, expansion_ram_end = 0, shadow_ram_end = 0;
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
||||
UINT8 *expram = machine().device<ram_device>("ram_tag")->pointer();
|
||||
space.unmap_readwrite(0x5000, 0xffff); // unmap any previously installed expansion RAM
|
||||
|
||||
|
@ -23,7 +23,8 @@ class b16_state : public driver_device
|
||||
public:
|
||||
b16_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_vram(*this, "vram"){ }
|
||||
m_vram(*this, "vram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
UINT8 *m_char_rom;
|
||||
required_shared_ptr<UINT16> m_vram;
|
||||
@ -43,6 +44,7 @@ public:
|
||||
i8237_device *m_dma8237;
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
#define mc6845_h_char_total (m_crtc_vreg[0])
|
||||
|
@ -184,7 +184,7 @@ static Z80PIO_INTERFACE( babbage_z80pio1_intf )
|
||||
|
||||
READ8_MEMBER( babbage_state::pio2_a_r )
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE); // release interrupt
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE); // release interrupt
|
||||
return m_key;
|
||||
}
|
||||
|
||||
|
@ -102,8 +102,8 @@ void basic52_state::machine_reset()
|
||||
|
||||
WRITE8_MEMBER( basic52_state::kbd_put )
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(MCS51_RX_LINE, ASSERT_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(MCS51_RX_LINE, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(MCS51_RX_LINE, CLEAR_LINE);
|
||||
m_term_data = data;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ INPUT_PORTS_END
|
||||
|
||||
WRITE_LINE_MEMBER(bbcbc_state::tms_interrupt)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static TMS9928A_INTERFACE(tms9129_interface)
|
||||
|
@ -121,7 +121,7 @@ void besta_state::machine_reset()
|
||||
memset(m_mpcc_regs, sizeof(m_mpcc_regs), 0); // should initialize to defined values
|
||||
m_mpcc_regs[8] = 0x80; // always ready to transmit
|
||||
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
static GENERIC_TERMINAL_INTERFACE( terminal_intf )
|
||||
|
@ -64,7 +64,8 @@ public:
|
||||
m_keyboard(*this, KEYBOARD_TAG),
|
||||
m_cass(*this, CASSETTE_TAG),
|
||||
m_p_videoram(*this, "videoram"),
|
||||
m_p_attribram(*this, "attribram") { }
|
||||
m_p_attribram(*this, "attribram") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(binbug_ctrl_w);
|
||||
DECLARE_READ8_MEMBER(binbug_serial_r);
|
||||
@ -77,6 +78,7 @@ public:
|
||||
required_device<cassette_image_device> m_cass;
|
||||
required_shared_ptr<const UINT8> m_p_videoram;
|
||||
required_shared_ptr<const UINT8> m_p_attribram;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
WRITE8_MEMBER( binbug_state::binbug_ctrl_w )
|
||||
|
@ -595,7 +595,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(bml3_state::keyboard_callback)
|
||||
{
|
||||
m_keyb_press = scancode;
|
||||
m_keyb_press_flag = 1;
|
||||
machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
|
||||
m_maincpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -608,7 +608,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(bml3_state::keyboard_callback)
|
||||
#if 0
|
||||
INTERRUPT_GEN_MEMBER(bml3_state::bml3_irq)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(M6809_IRQ_LINE, HOLD_LINE);
|
||||
m_maincpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -182,7 +182,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(busicom_state::timer_callback)
|
||||
m_timer ^=1;
|
||||
if (m_timer==1) m_drum_index++;
|
||||
if (m_drum_index==13) m_drum_index=0;
|
||||
i4004_set_test(machine().device("maincpu"),m_timer);
|
||||
i4004_set_test(m_maincpu,m_timer);
|
||||
|
||||
}
|
||||
|
||||
|
@ -16,9 +16,11 @@ class c900_state : public driver_device
|
||||
{
|
||||
public:
|
||||
c900_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") { }
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static ADDRESS_MAP_START(c900_mem, AS_PROGRAM, 16, c900_state)
|
||||
|
@ -353,7 +353,7 @@ MACHINE_RESET_MEMBER(camplynx_state,lynx128k)
|
||||
|
||||
WRITE8_MEMBER( camplynx_state::lynx128k_irq )
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(0, data);
|
||||
m_maincpu->set_input_line(0, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,7 +160,8 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_bios_rom(*this, "bios_rom"),
|
||||
m_vregs(*this, "vregs")
|
||||
{ }
|
||||
,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_shared_ptr<UINT32> m_bios_rom;
|
||||
required_shared_ptr<UINT32> m_vregs;
|
||||
@ -184,6 +185,7 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(sh7021_w);
|
||||
DECLARE_READ8_MEMBER(casloopy_bitmap_r);
|
||||
DECLARE_WRITE8_MEMBER(casloopy_bitmap_w);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -439,7 +441,7 @@ void casloopy_state::machine_start()
|
||||
|
||||
void casloopy_state::machine_reset()
|
||||
{
|
||||
//machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); //halt the CPU until we find enough data to proceed
|
||||
//m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); //halt the CPU until we find enough data to proceed
|
||||
|
||||
}
|
||||
|
||||
|
@ -812,12 +812,12 @@ TIMER_CALLBACK_MEMBER(cat_state::counter_6ms_callback)
|
||||
// is there some way to 'strobe' the duart to tell it that its input ports just changed?
|
||||
m_duart_inp ^= 0x04;
|
||||
m_6ms_counter++;
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_IRQ_1, ASSERT_LINE); // hack until duart ints work; as of march 2013 they do not work correctly here (they fire at the wrong rate)
|
||||
m_maincpu->set_input_line(M68K_IRQ_1, ASSERT_LINE); // hack until duart ints work; as of march 2013 they do not work correctly here (they fire at the wrong rate)
|
||||
}
|
||||
|
||||
IRQ_CALLBACK_MEMBER(cat_state::cat_int_ack)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_IRQ_1,CLEAR_LINE);
|
||||
m_maincpu->set_input_line(M68K_IRQ_1,CLEAR_LINE);
|
||||
return M68K_INT_ACK_AUTOVECTOR;
|
||||
}
|
||||
|
||||
@ -833,7 +833,7 @@ MACHINE_START_MEMBER(cat_state,cat)
|
||||
|
||||
MACHINE_RESET_MEMBER(cat_state,cat)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(cat_state::cat_int_ack),this));
|
||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(cat_state::cat_int_ack),this));
|
||||
m_duart_inp = 0;
|
||||
m_6ms_counter = 0;
|
||||
m_floppy_control = 0;
|
||||
@ -873,7 +873,7 @@ UINT32 cat_state::screen_update_cat(screen_device &screen, bitmap_ind16 &bitmap,
|
||||
|
||||
TIMER_CALLBACK_MEMBER(cat_state::swyft_reset)
|
||||
{
|
||||
memset(machine().device("maincpu")->memory().space(AS_PROGRAM).get_read_ptr(0xe2341), 0xff, 1);
|
||||
memset(m_maincpu->space(AS_PROGRAM).get_read_ptr(0xe2341), 0xff, 1);
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(cat_state,swyft)
|
||||
@ -921,7 +921,7 @@ static void duart_irq_handler(device_t *device, int state, UINT8 vector)
|
||||
#ifdef DEBUG_DUART_IRQ_HANDLER
|
||||
fprintf(stderr, "Duart IRQ handler called: state: %02X, vector: %06X\n", state, vector);
|
||||
#endif
|
||||
//device->machine().device("maincpu")->execute().set_input_line_and_vector(M68K_IRQ_1, state, vector);
|
||||
//device->m_maincpu->set_input_line_and_vector(M68K_IRQ_1, state, vector);
|
||||
}
|
||||
|
||||
static void duart_tx(device_t *device, int channel, UINT8 data)
|
||||
|
@ -39,7 +39,8 @@ public:
|
||||
m_ko9(*this, "KO9"),
|
||||
m_ko10(*this, "KO10"),
|
||||
m_ko11(*this, "KO11"),
|
||||
m_ko12(*this, "KO12") { }
|
||||
m_ko12(*this, "KO12") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(cfx9850_kol_w);
|
||||
DECLARE_WRITE8_MEMBER(cfx9850_koh_w);
|
||||
@ -64,6 +65,7 @@ protected:
|
||||
required_ioport m_ko10;
|
||||
required_ioport m_ko11;
|
||||
required_ioport m_ko12;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -38,7 +38,8 @@ public:
|
||||
chaos_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_p_ram(*this, "p_ram") { }
|
||||
m_p_ram(*this, "p_ram") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
DECLARE_READ8_MEMBER(port1e_r);
|
||||
DECLARE_WRITE8_MEMBER(port1f_w);
|
||||
@ -50,6 +51,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
required_device<generic_terminal_device> m_terminal;
|
||||
required_shared_ptr<UINT8> m_p_ram;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -22,7 +22,8 @@ public:
|
||||
chessmst_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_speaker(*this, SPEAKER_TAG)
|
||||
{ }
|
||||
,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
|
||||
@ -37,6 +38,7 @@ public:
|
||||
DECLARE_READ8_MEMBER( pio2_port_a_r );
|
||||
DECLARE_WRITE8_MEMBER( pio2_port_b_w );
|
||||
DECLARE_INPUT_CHANGED_MEMBER(chessmst_sensor);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -17,7 +17,8 @@ class chesstrv_state : public driver_device
|
||||
{
|
||||
public:
|
||||
chesstrv_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") { }
|
||||
|
||||
virtual void machine_start();
|
||||
|
||||
@ -35,6 +36,7 @@ public:
|
||||
UINT8 *m_ram;
|
||||
UINT8 m_matrix;
|
||||
//TIMER_DEVICE_CALLBACK_MEMBER(borisdpl_timer_interrupt);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
WRITE8_MEMBER( chesstrv_state::ram_addr_w )
|
||||
@ -197,7 +199,7 @@ INPUT_PORTS_END
|
||||
/*
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(chesstrv_state::borisdpl_timer_interrupt)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(F8_INPUT_LINE_INT_REQ, HOLD_LINE, 0x20);
|
||||
m_maincpu->set_input_line_and_vector(F8_INPUT_LINE_INT_REQ, HOLD_LINE, 0x20);
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -46,7 +46,8 @@ public:
|
||||
m_col6(*this,"COL6"),
|
||||
m_col7(*this,"COL7"),
|
||||
m_special(*this,"SPECIAL")
|
||||
{
|
||||
,
|
||||
m_maincpu(*this, "maincpu") {
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_clcd_tilemap_tile_info)
|
||||
@ -247,6 +248,7 @@ private:
|
||||
required_ioport m_col6;
|
||||
required_ioport m_col7;
|
||||
required_ioport m_special;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static ADDRESS_MAP_START( clcd_mem, AS_PROGRAM, 8, clcd_state )
|
||||
|
@ -40,7 +40,8 @@ class cm1800_state : public driver_device
|
||||
public:
|
||||
cm1800_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_terminal(*this, TERMINAL_TAG) { }
|
||||
m_terminal(*this, TERMINAL_TAG) ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
DECLARE_READ8_MEMBER( term_status_r );
|
||||
DECLARE_READ8_MEMBER( term_r );
|
||||
@ -49,6 +50,7 @@ public:
|
||||
|
||||
required_device<generic_terminal_device> m_terminal;
|
||||
virtual void machine_reset();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
READ8_MEMBER( cm1800_state::term_status_r )
|
||||
|
@ -15,12 +15,14 @@ class codata_state : public driver_device
|
||||
public:
|
||||
codata_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_p_base(*this, "p_base"){ }
|
||||
m_p_base(*this, "p_base"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_p_base;
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_codata(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -43,7 +45,7 @@ void codata_state::machine_reset()
|
||||
{
|
||||
UINT8* RAM = memregion("user1")->base();
|
||||
memcpy(m_p_base, RAM, 16);
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
void codata_state::video_start()
|
||||
|
@ -25,11 +25,13 @@ class cortex_state : public driver_device
|
||||
{
|
||||
public:
|
||||
cortex_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") { }
|
||||
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_cortex(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static ADDRESS_MAP_START( cortex_mem, AS_PROGRAM, 8, cortex_state )
|
||||
|
@ -16,7 +16,8 @@ class cp1_state : public driver_device
|
||||
{
|
||||
public:
|
||||
cp1_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_READ8_MEMBER(getp1);
|
||||
DECLARE_READ8_MEMBER(getp2);
|
||||
@ -26,6 +27,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(putp1);
|
||||
DECLARE_WRITE8_MEMBER(putp2);
|
||||
DECLARE_WRITE8_MEMBER(putbus);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
READ8_MEMBER(cp1_state::getp1)
|
||||
|
@ -22,7 +22,7 @@ inline void craft_state::verboselog(int n_level, const char *s_fmt, ...)
|
||||
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->safe_pc(), buf );
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -26,7 +26,8 @@ public:
|
||||
csc_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_speech(*this, "speech")
|
||||
{ }
|
||||
,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_device<s14001a_device> m_speech;
|
||||
|
||||
@ -47,6 +48,7 @@ public:
|
||||
|
||||
UINT8 m_selector;
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(irq_timer);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -176,7 +178,7 @@ READ_LINE_MEMBER( csc_state::pia1_cb1_r )
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(csc_state::irq_timer)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE);
|
||||
m_maincpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
/* Address maps */
|
||||
|
@ -101,7 +101,7 @@ WRITE32_MEMBER( cxhumax_state::cx_gxa_w )
|
||||
|
||||
if((m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)])
|
||||
|| (m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]))
|
||||
machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
|
||||
break;
|
||||
default:
|
||||
@ -321,7 +321,7 @@ TIMER_CALLBACK_MEMBER(cxhumax_state::timer_tick)
|
||||
|
||||
/* Interrupt if Timer interrupt is not masked in ITC_INTENABLE_REG */
|
||||
if (m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)] & INT_TIMER_BIT)
|
||||
machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
attotime period = attotime::from_hz(XTAL_54MHz)*m_timer_regs.timer[param].timebase;
|
||||
@ -417,7 +417,7 @@ WRITE32_MEMBER( cxhumax_state::cx_uart2_w )
|
||||
|
||||
/* If INT is enabled at INT Ctrl raise it */
|
||||
if(m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]&INT_UART2_BIT) {
|
||||
machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -547,9 +547,9 @@ WRITE32_MEMBER( cxhumax_state::cx_intctrl_w )
|
||||
/* check if */
|
||||
if((m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)])
|
||||
|| (m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]))
|
||||
machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
else
|
||||
machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(ARM7_IRQ_LINE, CLEAR_LINE);
|
||||
|
||||
}
|
||||
|
||||
@ -733,7 +733,7 @@ WRITE32_MEMBER( cxhumax_state::cx_i2c1_w )
|
||||
m_intctrl_regs[INTREG(INTGROUP1, INTSTATSET)] |= 1<<7;
|
||||
if (m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)] & (1<<7)) {
|
||||
verboselog( machine(), 9, "(I2C1) Int\n" );
|
||||
machine().device("maincpu")->execute().set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(ARM7_IRQ_LINE, ASSERT_LINE);
|
||||
}
|
||||
break;
|
||||
case I2C_STAT_REG:
|
||||
|
@ -58,14 +58,14 @@ DRIVER_INIT_MEMBER(dc_cons_state,dc)
|
||||
|
||||
DRIVER_INIT_MEMBER(dc_cons_state,dcus)
|
||||
{
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0xc2303b0, 0xc2303b7, read64_delegate(FUNC(dc_cons_state::dcus_idle_skip_r),this));
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2303b0, 0xc2303b7, read64_delegate(FUNC(dc_cons_state::dcus_idle_skip_r),this));
|
||||
|
||||
DRIVER_INIT_CALL(dc);
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(dc_cons_state,dcjp)
|
||||
{
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_read_handler(0xc2302f8, 0xc2302ff, read64_delegate(FUNC(dc_cons_state::dcjp_idle_skip_r),this));
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2302f8, 0xc2302ff, read64_delegate(FUNC(dc_cons_state::dcjp_idle_skip_r),this));
|
||||
|
||||
DRIVER_INIT_CALL(dc);
|
||||
}
|
||||
|
@ -13,10 +13,12 @@ class dct11em_state : public driver_device
|
||||
{
|
||||
public:
|
||||
dct11em_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") { }
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_dct11em(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static ADDRESS_MAP_START( dct11em_mem, AS_PROGRAM, 16, dct11em_state )
|
||||
|
@ -235,7 +235,8 @@ class dectalk_state : public driver_device
|
||||
public:
|
||||
dectalk_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_terminal(*this, TERMINAL_TAG) { }
|
||||
m_terminal(*this, TERMINAL_TAG) ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
UINT8 m_data[8]; // hack to prevent gcc bitching about struct pointers. not used.
|
||||
UINT8 m_x2214_sram[256]; // NVRAM chip's temp sram space
|
||||
@ -283,6 +284,7 @@ public:
|
||||
void dectalk_x2212_recall( );
|
||||
void dectalk_semaphore_w ( UINT16 data );
|
||||
UINT16 dectalk_outfifo_r ( );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -385,10 +387,10 @@ void dectalk_state::dectalk_semaphore_w ( UINT16 data )
|
||||
#ifdef VERBOSE
|
||||
logerror("speech int fired!\n");
|
||||
#endif
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(M68K_IRQ_5, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
|
||||
m_maincpu->set_input_line_and_vector(M68K_IRQ_5, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
|
||||
}
|
||||
else
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(M68K_IRQ_5, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
|
||||
m_maincpu->set_input_line_and_vector(M68K_IRQ_5, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
|
||||
}
|
||||
|
||||
// read the output fifo and set the interrupt line active on the dsp
|
||||
@ -430,7 +432,7 @@ static void dectalk_reset(device_t *device)
|
||||
void dectalk_state::machine_reset()
|
||||
{
|
||||
/* hook the RESET line, which resets a slew of other components */
|
||||
m68k_set_reset_callback(machine().device("maincpu"), dectalk_reset);
|
||||
m68k_set_reset_callback(m_maincpu, dectalk_reset);
|
||||
}
|
||||
|
||||
/* Begin 68k i/o handlers */
|
||||
@ -545,7 +547,7 @@ WRITE16_MEMBER(dectalk_state::m68k_spcflags_w)// 68k write to the speech flags (
|
||||
#ifdef SPC_LOG_68K
|
||||
logerror(" speech int fired!\n");
|
||||
#endif
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(M68K_IRQ_5, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); // set int because semaphore was set
|
||||
m_maincpu->set_input_line_and_vector(M68K_IRQ_5, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); // set int because semaphore was set
|
||||
}
|
||||
}
|
||||
else // data&0x40 == 0
|
||||
@ -553,7 +555,7 @@ WRITE16_MEMBER(dectalk_state::m68k_spcflags_w)// 68k write to the speech flags (
|
||||
#ifdef SPC_LOG_68K
|
||||
logerror(" | 0x40 = 0: speech int disabled\n");
|
||||
#endif
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(M68K_IRQ_5, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); // clear int because int is now disabled
|
||||
m_maincpu->set_input_line_and_vector(M68K_IRQ_5, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); // clear int because int is now disabled
|
||||
}
|
||||
}
|
||||
|
||||
@ -585,7 +587,7 @@ WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
|
||||
#ifdef TLC_LOG
|
||||
logerror(" TLC int fired!\n");
|
||||
#endif
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(M68K_IRQ_4, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); // set int because tone detect was set
|
||||
m_maincpu->set_input_line_and_vector(M68K_IRQ_4, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); // set int because tone detect was set
|
||||
}
|
||||
}
|
||||
else // data&0x40 == 0
|
||||
@ -594,7 +596,7 @@ WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
|
||||
logerror(" | 0x40 = 0: tone detect int disabled\n");
|
||||
#endif
|
||||
if (((data&0x4000)!=0x4000) || (m_tlc_ringdetect == 0)) // check to be sure we don't disable int if both ints fired at once
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(M68K_IRQ_4, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); // clear int because int is now disabled
|
||||
m_maincpu->set_input_line_and_vector(M68K_IRQ_4, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); // clear int because int is now disabled
|
||||
}
|
||||
if ((data&0x100) == 0x100) // bit 8: answer phone relay enable
|
||||
{
|
||||
@ -618,7 +620,7 @@ WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
|
||||
#ifdef TLC_LOG
|
||||
logerror(" TLC int fired!\n");
|
||||
#endif
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(M68K_IRQ_4, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); // set int because tone detect was set
|
||||
m_maincpu->set_input_line_and_vector(M68K_IRQ_4, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR); // set int because tone detect was set
|
||||
}
|
||||
}
|
||||
else // data&0x4000 == 0
|
||||
@ -627,7 +629,7 @@ WRITE16_MEMBER(dectalk_state::m68k_tlcflags_w)// dtmf flags write
|
||||
logerror(" | 0x4000 = 0: ring detect int disabled\n");
|
||||
#endif
|
||||
if (((data&0x40)!=0x40) || (m_tlc_tonedetect == 0)) // check to be sure we don't disable int if both ints fired at once
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(M68K_IRQ_4, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); // clear int because int is now disabled
|
||||
m_maincpu->set_input_line_and_vector(M68K_IRQ_4, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); // clear int because int is now disabled
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ void dim68k_state::machine_reset()
|
||||
|
||||
memcpy((UINT8*)m_ram.target(), ROM, 0x2000);
|
||||
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
void dim68k_state::video_start()
|
||||
|
@ -14,11 +14,13 @@ class dms5000_state : public driver_device
|
||||
{
|
||||
public:
|
||||
dms5000_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") { }
|
||||
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_dms5000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ void dual68_state::machine_reset()
|
||||
|
||||
memcpy((UINT8*)m_p_ram.target(),user1,0x2000);
|
||||
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( dual68_state::kbd_put )
|
||||
|
@ -29,7 +29,8 @@ public:
|
||||
ec65_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_via_0(*this, VIA6522_0_TAG),
|
||||
m_p_videoram(*this, "videoram"){ }
|
||||
m_p_videoram(*this, "videoram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
DECLARE_READ8_MEMBER(ec65_via_read_a);
|
||||
DECLARE_READ8_MEMBER(ec65_read_ca1 );
|
||||
@ -43,6 +44,7 @@ public:
|
||||
required_shared_ptr<UINT8> m_p_videoram;
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static ADDRESS_MAP_START(ec65_mem, AS_PROGRAM, 8, ec65_state)
|
||||
|
@ -106,7 +106,7 @@ WRITE8_MEMBER(ep_state::enterprise_dave_reg_write)
|
||||
case 0x11:
|
||||
case 0x12:
|
||||
case 0x13:
|
||||
enterprise_update_memory_page(machine().device("maincpu")->memory().space(AS_PROGRAM), offset - 0x0f, data);
|
||||
enterprise_update_memory_page(m_maincpu->space(AS_PROGRAM), offset - 0x0f, data);
|
||||
break;
|
||||
|
||||
case 0x15:
|
||||
@ -168,7 +168,7 @@ static const dave_interface enterprise_dave_interface =
|
||||
|
||||
void ep_state::machine_reset()
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line_vector(0, 0xff);
|
||||
m_maincpu->set_input_line_vector(0, 0xff);
|
||||
}
|
||||
|
||||
|
||||
|
@ -136,7 +136,8 @@ class ex800_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ex800_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") { }
|
||||
|
||||
int m_irq_state;
|
||||
DECLARE_READ8_MEMBER(ex800_porta_r);
|
||||
@ -155,6 +156,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(ex800_gate7a_w);
|
||||
virtual void machine_start();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(online_switch);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -197,7 +199,7 @@ INPUT_CHANGED_MEMBER(ex800_state::online_switch)
|
||||
{
|
||||
if (newval)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(UPD7810_INTF1, m_irq_state);
|
||||
m_maincpu->set_input_line(UPD7810_INTF1, m_irq_state);
|
||||
m_irq_state = (m_irq_state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE;
|
||||
}
|
||||
}
|
||||
|
@ -1008,7 +1008,7 @@ void fidelz80_state::machine_reset()
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(fidelz80_state::nmi_timer)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -390,7 +390,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(fk1_state::keyboard_callback)
|
||||
if (machine().root_device().ioport("LINE0")->read())
|
||||
{
|
||||
m_int_vector = 6;
|
||||
machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -414,7 +414,7 @@ IRQ_CALLBACK_MEMBER(fk1_state::fk1_irq_callback)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(fk1_state::vsync_callback)
|
||||
{
|
||||
m_int_vector = 3;
|
||||
machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -429,7 +429,7 @@ void fk1_state::machine_reset()
|
||||
membank("bank3")->set_base(ram + 0x8000);
|
||||
membank("bank4")->set_base(ram + 0xc000);
|
||||
|
||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(fk1_state::fk1_irq_callback),this));
|
||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(fk1_state::fk1_irq_callback),this));
|
||||
}
|
||||
|
||||
UINT32 fk1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
|
@ -1295,7 +1295,7 @@ TIMER_CALLBACK_MEMBER(fm7_state::fm7_keyboard_poll)
|
||||
if(machine().root_device().ioport("key3")->read() & 0x40000)
|
||||
{
|
||||
m_break_flag = 1;
|
||||
machine().device("maincpu")->execute().set_input_line(M6809_FIRQ_LINE,ASSERT_LINE);
|
||||
m_maincpu->set_input_line(M6809_FIRQ_LINE,ASSERT_LINE);
|
||||
}
|
||||
else
|
||||
m_break_flag = 0;
|
||||
@ -1339,7 +1339,7 @@ TIMER_CALLBACK_MEMBER(fm7_state::fm7_keyboard_poll)
|
||||
IRQ_CALLBACK_MEMBER(fm7_state::fm7_irq_ack)
|
||||
{
|
||||
if(irqline == M6809_FIRQ_LINE)
|
||||
machine().device("maincpu")->execute().set_input_line(irqline,CLEAR_LINE);
|
||||
m_maincpu->set_input_line(irqline,CLEAR_LINE);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1831,7 +1831,7 @@ DRIVER_INIT_MEMBER(fm7_state,fm7)
|
||||
m_subtimer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fm7_state::fm7_subtimer_irq),this));
|
||||
m_keyboard_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fm7_state::fm7_keyboard_poll),this));
|
||||
m_fm77av_vsync_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fm7_state::fm77av_vsync),this));
|
||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(fm7_state::fm7_irq_ack),this));
|
||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(fm7_state::fm7_irq_ack),this));
|
||||
machine().device("sub")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(fm7_state::fm7_sub_irq_ack),this));
|
||||
}
|
||||
|
||||
@ -1955,7 +1955,7 @@ void fm7_state::machine_reset()
|
||||
}
|
||||
if(m_type == SYS_FM77AV || m_type == SYS_FM77AV40EX || m_type == SYS_FM11)
|
||||
{
|
||||
fm7_mmr_refresh(machine().device("maincpu")->memory().space(AS_PROGRAM));
|
||||
fm7_mmr_refresh(m_maincpu->space(AS_PROGRAM));
|
||||
}
|
||||
if(m_type == SYS_FM11)
|
||||
{
|
||||
|
@ -329,7 +329,7 @@ WRITE8_MEMBER(towns_state::towns_system_w)
|
||||
switch(offset)
|
||||
{
|
||||
case 0x00: // bit 7 = NMI vector protect, bit 6 = power off, bit 0 = software reset, bit 3 = A20 line?
|
||||
// space.machine().device("maincpu")->execute().set_input_line(INPUT_LINE_A20,(data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
|
||||
// space.m_maincpu->set_input_line(INPUT_LINE_A20,(data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
|
||||
logerror("SYS: port 0x20 write %02x\n",data);
|
||||
break;
|
||||
case 0x02:
|
||||
@ -2103,7 +2103,7 @@ static void towns_pcm_irq(device_t* device, int channel)
|
||||
|
||||
WRITE_LINE_MEMBER(towns_state::towns_pic_irq)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
|
||||
// logerror("PIC#1: set IRQ line to %i\n",interrupt);
|
||||
}
|
||||
|
||||
@ -2604,8 +2604,8 @@ void towns_state::driver_start()
|
||||
// CD-ROM init
|
||||
m_towns_cd.read_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(towns_state::towns_cdrom_read_byte),this), (void*)machine().device("dma_1"));
|
||||
|
||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(towns_state::towns_irq_callback),this));
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x100000,machine().device<ram_device>(RAM_TAG)->size()-1,0xffffffff,0,NULL);
|
||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(towns_state::towns_irq_callback),this));
|
||||
m_maincpu->space(AS_PROGRAM).install_ram(0x100000,machine().device<ram_device>(RAM_TAG)->size()-1,0xffffffff,0,NULL);
|
||||
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ WRITE8_MEMBER( fp1100_state::main_to_sub_w )
|
||||
READ8_MEMBER( fp1100_state::sub_to_main_r )
|
||||
{
|
||||
machine().scheduler().synchronize(); // force resync
|
||||
// machine().device("maincpu")->execute().set_input_line_and_vector(0, CLEAR_LINE, 0xf0);
|
||||
// m_maincpu->set_input_line_and_vector(0, CLEAR_LINE, 0xf0);
|
||||
return m_main_latch;
|
||||
}
|
||||
|
||||
@ -241,7 +241,7 @@ READ8_MEMBER( fp1100_state::main_to_sub_r )
|
||||
WRITE8_MEMBER( fp1100_state::sub_to_main_w )
|
||||
{
|
||||
machine().scheduler().synchronize(); // force resync
|
||||
// machine().device("maincpu")->execute().set_input_line_and_vector(0, ASSERT_LINE, 0xf0);
|
||||
// m_maincpu->set_input_line_and_vector(0, ASSERT_LINE, 0xf0);
|
||||
m_main_latch = data;
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ ADDRESS_MAP_END
|
||||
WRITE8_MEMBER( fp1100_state::portc_w )
|
||||
{
|
||||
if((!(m_upd7801.portc & 8)) && data & 8)
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE,0xf8); // TODO
|
||||
m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0xf8); // TODO
|
||||
|
||||
m_upd7801.portc = data;
|
||||
}
|
||||
@ -400,7 +400,7 @@ static MC6845_INTERFACE( mc6845_intf )
|
||||
INTERRUPT_GEN_MEMBER(fp1100_state::fp1100_vblank_irq)
|
||||
{
|
||||
if(irq_mask & 0x10)
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(0, HOLD_LINE, 0xf0);
|
||||
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xf0);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( fp1100, fp1100_state )
|
||||
|
@ -27,7 +27,8 @@ public:
|
||||
fp6000_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_gvram(*this, "gvram"),
|
||||
m_vram(*this, "vram"){ }
|
||||
m_vram(*this, "vram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
UINT8 *m_char_rom;
|
||||
required_shared_ptr<UINT16> m_gvram;
|
||||
@ -52,6 +53,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_fp6000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
void fp6000_state::video_start()
|
||||
|
@ -42,8 +42,10 @@ class genpc_state : public driver_device
|
||||
{
|
||||
public:
|
||||
genpc_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") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static ADDRESS_MAP_START( pc8_map, AS_PROGRAM, 8, genpc_state )
|
||||
|
@ -44,7 +44,8 @@ class gizmondo_state : public driver_device
|
||||
{
|
||||
public:
|
||||
gizmondo_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") { }
|
||||
|
||||
UINT32 m_port[9];
|
||||
device_t *m_s3c2440;
|
||||
@ -53,6 +54,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(port_changed);
|
||||
inline void ATTR_PRINTF(3,4) verboselog( int n_level, const char *s_fmt, ...);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -148,7 +150,7 @@ void gizmondo_state::machine_start()
|
||||
|
||||
void gizmondo_state::machine_reset()
|
||||
{
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -277,12 +277,12 @@ WRITE32_MEMBER( glasgow_state::write_beeper32 )
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(glasgow_state::update_nmi)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(7, HOLD_LINE);
|
||||
m_maincpu->set_input_line(7, HOLD_LINE);
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(glasgow_state::update_nmi32)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(6, HOLD_LINE);
|
||||
m_maincpu->set_input_line(6, HOLD_LINE);
|
||||
}
|
||||
|
||||
void glasgow_state::machine_start()
|
||||
|
@ -207,7 +207,7 @@ UINT32 gmaster_state::screen_update_gmaster(screen_device &screen, bitmap_ind16
|
||||
|
||||
INTERRUPT_GEN_MEMBER(gmaster_state::gmaster_interrupt)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(UPD7810_INTFE1, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(UPD7810_INTFE1, ASSERT_LINE);
|
||||
}
|
||||
|
||||
static const UPD7810_CONFIG config = {
|
||||
|
@ -87,7 +87,7 @@ READ8_MEMBER( h19_state::h19_80_r )
|
||||
READ8_MEMBER( h19_state::h19_a0_r )
|
||||
{
|
||||
// keyboard status
|
||||
machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, CLEAR_LINE);
|
||||
return 0x7f; // says that a key is ready and no modifier keys are pressed
|
||||
}
|
||||
|
||||
@ -337,7 +337,7 @@ static MC6845_UPDATE_ROW( h19_update_row )
|
||||
|
||||
WRITE_LINE_MEMBER(h19_state::h19_ace_irq)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
|
||||
m_maincpu->set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE));
|
||||
}
|
||||
|
||||
static const ins8250_interface h19_ace_interface =
|
||||
@ -387,7 +387,7 @@ GFXDECODE_END
|
||||
WRITE8_MEMBER( h19_state::h19_kbd_put )
|
||||
{
|
||||
m_term_data = data;
|
||||
machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
static ASCII_KEYBOARD_INTERFACE( keyboard_intf )
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(h8_state::h8_irq_pulse)
|
||||
{
|
||||
if (m_irq_ctl & 1)
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf);
|
||||
m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf);
|
||||
}
|
||||
|
||||
READ8_MEMBER( h8_state::h8_f0_r )
|
||||
@ -104,7 +104,7 @@ WRITE8_MEMBER( h8_state::h8_f0_w )
|
||||
output_set_value("mon_led",(data & 0x20) ? 0 : 1);
|
||||
m_beep->set_state((data & 0x80) ? 0 : 1);
|
||||
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
m_irq_ctl &= 0xf0;
|
||||
if (data & 0x40) m_irq_ctl |= 1;
|
||||
if (~data & 0x10) m_irq_ctl |= 2;
|
||||
@ -196,7 +196,7 @@ But, all of this can only occur if bit 5 of port F0 is low. */
|
||||
c=m_ff_b^1; // from /Q of 2nd flipflop
|
||||
m_ff_b=a; // from Q of 1st flipflop
|
||||
if (c)
|
||||
machine().device("maincpu")->execute().set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xd7);
|
||||
m_maincpu->set_input_line_and_vector(INPUT_LINE_IRQ0, ASSERT_LINE, 0xd7);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -64,12 +64,12 @@ INPUT_PORTS_END
|
||||
|
||||
void horizon_state::machine_reset()
|
||||
{
|
||||
machine().device("maincpu")->state().set_state_int(Z80_PC, 0xe800);
|
||||
m_maincpu->set_state_int(Z80_PC, 0xe800);
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(horizon_state,horizon_sd)
|
||||
{
|
||||
machine().device("maincpu")->state().set_state_int(Z80_PC, 0xe900);
|
||||
m_maincpu->set_state_int(Z80_PC, 0xe900);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( horizon_state::kbd_put )
|
||||
|
@ -26,10 +26,12 @@ class hp16500_state : public driver_device
|
||||
{
|
||||
public:
|
||||
hp16500_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") { }
|
||||
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_hp16500(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -24,7 +24,8 @@ class hp49gp_state : public driver_device
|
||||
public:
|
||||
hp49gp_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_steppingstone(*this, "steppingstone"){ }
|
||||
m_steppingstone(*this, "steppingstone"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
UINT32 m_port[9];
|
||||
device_t *m_s3c2410;
|
||||
@ -39,6 +40,7 @@ public:
|
||||
void lcd_spi_init( );
|
||||
void lcd_spi_line_w( int line, int data);
|
||||
int lcd_spi_line_r( int line);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
@ -248,7 +250,7 @@ void hp49gp_state::machine_start()
|
||||
|
||||
void hp49gp_state::machine_reset()
|
||||
{
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -75,7 +75,7 @@ void ht68k_state::machine_reset()
|
||||
|
||||
memcpy((UINT8*)m_p_ram.target(),user1,0x8000);
|
||||
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
static void duart_irq_handler(device_t *device, int state, UINT8 vector)
|
||||
|
@ -14,11 +14,13 @@ class hx20_state : public driver_device
|
||||
{
|
||||
public:
|
||||
hx20_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") { }
|
||||
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_ehx20(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -281,8 +281,10 @@ class ibmpc_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ibmpc_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") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static ADDRESS_MAP_START( pc8_map, AS_PROGRAM, 8, ibmpc_state )
|
||||
|
@ -18,13 +18,15 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_hgdc(*this, "upd7220")
|
||||
,
|
||||
m_video_ram(*this, "video_ram"){ }
|
||||
m_video_ram(*this, "video_ram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_device<upd7220_device> m_hgdc;
|
||||
|
||||
required_shared_ptr<UINT8> m_video_ram;
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
|
||||
|
@ -19,9 +19,11 @@ class indiana_state : public driver_device
|
||||
{
|
||||
public:
|
||||
indiana_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_DRIVER_INIT(indiana);
|
||||
virtual void machine_reset();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -50,8 +50,9 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_wd33c93(*this, "scsi:wd33c93"),
|
||||
m_scc(*this, "scc"),
|
||||
m_eeprom(*this, "eeprom")
|
||||
{ }
|
||||
m_eeprom(*this, "eeprom"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
|
||||
HPC_t m_HPC;
|
||||
RTC_t m_RTC;
|
||||
@ -68,6 +69,7 @@ public:
|
||||
required_device<scc8530_t> m_scc;
|
||||
required_device<eeprom_device> m_eeprom;
|
||||
inline void ATTR_PRINTF(3,4) verboselog(int n_level, const char *s_fmt, ... );
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -96,7 +96,7 @@ INPUT_PORTS_END
|
||||
|
||||
void ipc_state::machine_reset()
|
||||
{
|
||||
machine().device("maincpu")->state().set_state_int(I8085_PC, 0xE800);
|
||||
m_maincpu->set_state_int(I8085_PC, 0xE800);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ipc_state::kbd_put )
|
||||
|
@ -57,7 +57,7 @@ READ8_MEMBER(itt3030_state::unk2_r)
|
||||
|
||||
UINT32 itt3030_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
||||
|
||||
for(int y = 0; y < 24; y++ )
|
||||
{
|
||||
|
@ -42,7 +42,8 @@ public:
|
||||
m_line5(*this, "LINE5"),
|
||||
m_line6(*this, "LINE6"),
|
||||
m_line7(*this, "LINE7"),
|
||||
m_line8(*this, "LINE8") { }
|
||||
m_line8(*this, "LINE8") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_ram;
|
||||
required_shared_ptr<UINT8> m_pcg;
|
||||
@ -79,6 +80,7 @@ protected:
|
||||
required_ioport m_line6;
|
||||
required_ioport m_line7;
|
||||
required_ioport m_line8;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -259,7 +259,7 @@ void juicebox_state::machine_start()
|
||||
|
||||
void juicebox_state::machine_reset()
|
||||
{
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
smc_reset();
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,8 @@ public:
|
||||
junior_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_riot(*this, "riot")
|
||||
{ }
|
||||
,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_device<riot6532_device> m_riot;
|
||||
DECLARE_READ8_MEMBER(junior_riot_a_r);
|
||||
@ -49,6 +50,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(junior_reset);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(junior_update_leds);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -179,7 +181,7 @@ WRITE8_MEMBER( junior_state::junior_riot_b_w )
|
||||
|
||||
WRITE_LINE_MEMBER( junior_state::junior_riot_irq )
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, state ? HOLD_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(M6502_IRQ_LINE, state ? HOLD_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,7 +48,8 @@ class k1003_state : public driver_device
|
||||
{
|
||||
public:
|
||||
k1003_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_READ8_MEMBER(port2_r);
|
||||
DECLARE_READ8_MEMBER(key_r);
|
||||
@ -59,6 +60,7 @@ public:
|
||||
UINT8 m_disp_2;
|
||||
UINT8 bit_to_dec(UINT8 val);
|
||||
virtual void machine_reset();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -35,11 +35,13 @@ class konin_state : public driver_device
|
||||
{
|
||||
public:
|
||||
konin_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") { }
|
||||
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_konin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static ADDRESS_MAP_START( konin_mem, AS_PROGRAM, 8, konin_state )
|
||||
|
@ -137,8 +137,9 @@ ROM_END
|
||||
|
||||
static QUICKLOAD_LOAD( lynx )
|
||||
{
|
||||
device_t *cpu = image.device().machine().device("maincpu");
|
||||
address_space &space = image.device().machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
lynx_state *state = image.device().machine().driver_data<lynx_state>();
|
||||
device_t *cpu = state->m_maincpu;
|
||||
address_space &space = state->m_maincpu->space(AS_PROGRAM);
|
||||
UINT8 *data = NULL;
|
||||
UINT8 *rom = image.device().machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 header[10]; // 80 08 dw Start dw Len B S 9 3
|
||||
|
@ -389,8 +389,8 @@ void m20_state::install_memory()
|
||||
|
||||
m_memsize = m_ram->size();
|
||||
UINT8 *memptr = m_ram->pointer();
|
||||
address_space& pspace = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space& dspace = machine().device("maincpu")->memory().space(AS_DATA);
|
||||
address_space& pspace = m_maincpu->space(AS_PROGRAM);
|
||||
address_space& dspace = m_maincpu->space(AS_DATA);
|
||||
|
||||
/* install mainboard memory (aka DRAM0) */
|
||||
|
||||
|
@ -17,7 +17,8 @@ public:
|
||||
m79152pc_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_p_videoram(*this, "p_videoram"),
|
||||
m_p_attributes(*this, "p_attributes"){ }
|
||||
m_p_attributes(*this, "p_attributes"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
UINT8 *m_p_chargen;
|
||||
required_shared_ptr<UINT8> m_p_videoram;
|
||||
@ -25,6 +26,7 @@ public:
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_m79152pc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static ADDRESS_MAP_START(m79152pc_mem, AS_PROGRAM, 8, m79152pc_state)
|
||||
|
@ -445,8 +445,8 @@ WRITE8_MEMBER(mac_state::oss_w)
|
||||
|
||||
READ32_MEMBER(mac_state::buserror_r)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,8 @@ public:
|
||||
m_floppy0(*this, FLOPPY_0),
|
||||
m_floppy1(*this, FLOPPY_1),
|
||||
m_vram(*this, "vram")
|
||||
{ }
|
||||
,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
virtual void machine_start();
|
||||
|
||||
@ -63,6 +64,7 @@ public:
|
||||
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_mbc200(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -235,7 +235,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mc10_state::alice32_scanline)
|
||||
|
||||
DRIVER_INIT_MEMBER(mc10_state,mc10)
|
||||
{
|
||||
address_space &prg = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
address_space &prg = m_maincpu->space(AS_PROGRAM);
|
||||
|
||||
/* initialize keyboard strobe */
|
||||
m_keyboard_strobe = 0x00;
|
||||
|
@ -350,15 +350,15 @@ MACHINE_START_MEMBER(md_cons_state, ms_megadriv)
|
||||
vdp_get_word_from_68k_mem = vdp_get_word_from_68k_mem_console;
|
||||
|
||||
// for now m_cartslot is only in MD and not 32x and SegaCD
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(FUNC(base_md_cart_slot_device::read),(base_md_cart_slot_device*)m_slotcart), write16_delegate(FUNC(base_md_cart_slot_device::write),(base_md_cart_slot_device*)m_slotcart));
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a13),(base_md_cart_slot_device*)m_slotcart), write16_delegate(FUNC(base_md_cart_slot_device::write_a13),(base_md_cart_slot_device*)m_slotcart));
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_slotcart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_slotcart));
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_slotcart));
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(FUNC(base_md_cart_slot_device::read),(base_md_cart_slot_device*)m_slotcart), write16_delegate(FUNC(base_md_cart_slot_device::write),(base_md_cart_slot_device*)m_slotcart));
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a13),(base_md_cart_slot_device*)m_slotcart), write16_delegate(FUNC(base_md_cart_slot_device::write_a13),(base_md_cart_slot_device*)m_slotcart));
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_slotcart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_slotcart));
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_slotcart));
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(md_cons_state,ms_megadriv )
|
||||
{
|
||||
machine().device("maincpu")->reset();
|
||||
m_maincpu->reset();
|
||||
MACHINE_RESET_CALL_MEMBER( megadriv );
|
||||
}
|
||||
|
||||
@ -1072,10 +1072,10 @@ MACHINE_START_MEMBER(pico_state,pico)
|
||||
m_io_penx = ioport("PENX");
|
||||
m_io_peny = ioport("PENY");
|
||||
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(FUNC(base_md_cart_slot_device::read),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write),(base_md_cart_slot_device*)m_picocart));
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a13),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a13),(base_md_cart_slot_device*)m_picocart));
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_picocart));
|
||||
machine().device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_picocart));
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(FUNC(base_md_cart_slot_device::read),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write),(base_md_cart_slot_device*)m_picocart));
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a13),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a13),(base_md_cart_slot_device*)m_picocart));
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(FUNC(base_md_cart_slot_device::read_a15),(base_md_cart_slot_device*)m_picocart), write16_delegate(FUNC(base_md_cart_slot_device::write_a15),(base_md_cart_slot_device*)m_picocart));
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(FUNC(base_md_cart_slot_device::write_tmss_bank),(base_md_cart_slot_device*)m_picocart));
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( pico, pico_state )
|
||||
|
@ -163,13 +163,13 @@ INPUT_PORTS_END
|
||||
|
||||
TIMER_CALLBACK_MEMBER(mekd2_state::mekd2_trace)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( mekd2_state::mekd2_nmi_w )
|
||||
{
|
||||
if (state)
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
|
||||
else
|
||||
machine().scheduler().timer_set(attotime::from_usec(18), timer_expired_delegate(FUNC(mekd2_state::mekd2_trace),this));
|
||||
}
|
||||
|
@ -17,7 +17,8 @@ class merlin_state : public driver_device
|
||||
public:
|
||||
merlin_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_speaker(*this, "speaker") { }
|
||||
m_speaker(*this, "speaker") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
virtual void machine_start();
|
||||
|
||||
@ -30,6 +31,7 @@ public:
|
||||
protected:
|
||||
UINT16 m_o;
|
||||
UINT16 m_r;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -17,7 +17,8 @@ class microdec_state : public driver_device
|
||||
public:
|
||||
microdec_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_terminal(*this, TERMINAL_TAG) { }
|
||||
m_terminal(*this, TERMINAL_TAG) ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
DECLARE_READ8_MEMBER(terminal_status_r);
|
||||
DECLARE_READ8_MEMBER(terminal_r);
|
||||
@ -29,6 +30,7 @@ public:
|
||||
|
||||
virtual void machine_start();
|
||||
void fdc_irq(bool state);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -49,7 +49,8 @@ class mk1_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mk1_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_READ8_MEMBER(mk1_f8_r);
|
||||
DECLARE_WRITE8_MEMBER(mk1_f8_w);
|
||||
@ -57,6 +58,7 @@ public:
|
||||
UINT8 m_led[4];
|
||||
virtual void machine_start();
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mk1_update_leds);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -16,11 +16,13 @@ class mk14_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mk14_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_READ8_MEMBER(keyboard_r);
|
||||
DECLARE_WRITE8_MEMBER(display_w);
|
||||
virtual void machine_reset();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -178,7 +178,7 @@ WRITE8_MEMBER( mk2_state::mk2_write_b )
|
||||
|
||||
m_led[4]|=data;
|
||||
|
||||
machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE );
|
||||
m_maincpu->set_input_line(M6502_IRQ_LINE, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE );
|
||||
}
|
||||
|
||||
static MOS6530_INTERFACE( mk2_mos6530_interface )
|
||||
|
@ -25,11 +25,13 @@ class mk85_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mk85_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") { }
|
||||
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_mk85(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -22,11 +22,13 @@ class mk90_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mk90_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") { }
|
||||
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_mk90(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -153,7 +153,8 @@ class mmd1_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mmd1_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(mmd1_port0_w);
|
||||
DECLARE_WRITE8_MEMBER(mmd1_port1_w);
|
||||
@ -171,6 +172,7 @@ public:
|
||||
DECLARE_DRIVER_INIT(mmd2);
|
||||
DECLARE_MACHINE_RESET(mmd1);
|
||||
DECLARE_MACHINE_RESET(mmd2);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -807,12 +807,12 @@ READ8_MEMBER(polgar_state::read_keys_board_academy)
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(polgar_state::cause_nmi)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI,PULSE_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(polgar_state::cause_M6502_irq)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(M65C02_IRQ_LINE, HOLD_LINE);
|
||||
m_maincpu->set_input_line(M65C02_IRQ_LINE, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -948,7 +948,7 @@ WRITE16_MEMBER(polgar_state::write_unknown2)
|
||||
|
||||
READ32_MEMBER(polgar_state::read_unknown3_32)
|
||||
{
|
||||
logerror("Read from unknown3 offset: %x %08x\n",offset,(unsigned int) machine().device("maincpu")->state().state_int(M68K_PC));
|
||||
logerror("Read from unknown3 offset: %x %08x\n",offset,(unsigned int) m_maincpu->state_int(M68K_PC));
|
||||
return 0xffffffff;
|
||||
//return unknown2_data|unknown2_data<<24;
|
||||
|
||||
@ -975,19 +975,19 @@ WRITE32_MEMBER(polgar_state::write_1000000)
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(polgar_state::timer_update_irq6)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(6, HOLD_LINE);
|
||||
m_maincpu->set_input_line(6, HOLD_LINE);
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(polgar_state::timer_update_irq2)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(2, HOLD_LINE);
|
||||
m_maincpu->set_input_line(2, HOLD_LINE);
|
||||
}
|
||||
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(polgar_state::timer_update_irq_academy)
|
||||
{
|
||||
if (academyallowNMI) {
|
||||
machine().device("maincpu")->execute().set_input_line(6, HOLD_LINE);
|
||||
m_maincpu->set_input_line(6, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,8 @@ public:
|
||||
mod8_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_teleprinter(*this, TELEPRINTER_TAG)
|
||||
{ }
|
||||
,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_device<teleprinter_device> m_teleprinter;
|
||||
DECLARE_WRITE8_MEMBER(out_w);
|
||||
@ -37,6 +38,7 @@ public:
|
||||
int m_tty_cnt;
|
||||
virtual void machine_reset();
|
||||
IRQ_CALLBACK_MEMBER(mod8_irq_callback);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
WRITE8_MEMBER( mod8_state::out_w )
|
||||
@ -90,13 +92,13 @@ IRQ_CALLBACK_MEMBER(mod8_state::mod8_irq_callback)
|
||||
|
||||
void mod8_state::machine_reset()
|
||||
{
|
||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(mod8_state::mod8_irq_callback),this));
|
||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(mod8_state::mod8_irq_callback),this));
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( mod8_state::kbd_put )
|
||||
{
|
||||
m_tty_key_data = data ^ 0xff;
|
||||
machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
static GENERIC_TELEPRINTER_INTERFACE( teleprinter_intf )
|
||||
|
@ -125,7 +125,7 @@ IRQ_CALLBACK_MEMBER(multi16_state::multi16_irq_callback)
|
||||
WRITE_LINE_MEMBER( multi16_state::multi16_set_int_line )
|
||||
{
|
||||
//printf("%02x\n",interrupt);
|
||||
machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
static const struct pic8259_interface multi16_pic8259_config =
|
||||
@ -137,7 +137,7 @@ static const struct pic8259_interface multi16_pic8259_config =
|
||||
|
||||
void multi16_state::machine_start()
|
||||
{
|
||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(multi16_state::multi16_irq_callback),this));
|
||||
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(multi16_state::multi16_irq_callback),this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,7 +19,8 @@ public:
|
||||
m_hgdc(*this, "upd7220"),
|
||||
m_fdc(*this, "upd765")
|
||||
,
|
||||
m_video_ram(*this, "video_ram"){ }
|
||||
m_video_ram(*this, "video_ram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
required_device<upd7220_device> m_hgdc;
|
||||
required_device<upd765a_device> m_fdc;
|
||||
@ -30,6 +31,7 @@ public:
|
||||
required_shared_ptr<UINT8> m_video_ram;
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
|
||||
|
@ -507,7 +507,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(nc_state::dummy_timer_callback)
|
||||
case NC_TYPE_1xx:
|
||||
{
|
||||
LOG(("nmi triggered\n"));
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -456,7 +456,7 @@ static const nes_interface nes_apu_interface =
|
||||
|
||||
void nes_state::ppu_nmi(int *ppu_regs)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,7 +132,8 @@ public:
|
||||
m_mainram( *this, "mainram" ),
|
||||
m_k1ge( *this, "k1ge" ),
|
||||
m_io_controls( *this, "Controls" ),
|
||||
m_io_power( *this, "Power" ) {
|
||||
m_io_power( *this, "Power" ) ,
|
||||
m_maincpu(*this, "maincpu") {
|
||||
m_flash_chip[0].present = 0;
|
||||
m_flash_chip[0].state = F_READ;
|
||||
m_flash_chip[0].data = NULL;
|
||||
@ -200,6 +201,7 @@ protected:
|
||||
virtual void nvram_default();
|
||||
virtual void nvram_read(emu_file &file);
|
||||
virtual void nvram_write(emu_file &file);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -63,7 +63,8 @@ public:
|
||||
m_scroll(0),
|
||||
m_p_videoram(*this, "p_videoram"),
|
||||
m_io_modifiers(*this, "MODIFIERS")
|
||||
{ }
|
||||
,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
|
||||
DECLARE_READ8_MEMBER(okean240_kbd_status_r);
|
||||
DECLARE_READ8_MEMBER(okean240a_kbd_status_r);
|
||||
@ -88,6 +89,7 @@ public:
|
||||
protected:
|
||||
optional_ioport m_io_modifiers;
|
||||
ioport_port *m_io_port[11];
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
// okean240 requires bit 4 to change
|
||||
|
@ -39,11 +39,13 @@ class p112_state : public driver_device
|
||||
{
|
||||
public:
|
||||
p112_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") { }
|
||||
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_p112(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -204,7 +204,7 @@ INPUT_PORTS_END
|
||||
|
||||
INTERRUPT_GEN_MEMBER(p2000t_state::p2000_interrupt)
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
READ8_MEMBER( p2000t_state::videoram_r )
|
||||
|
@ -228,7 +228,7 @@ static GENERIC_TERMINAL_INTERFACE( terminal_intf )
|
||||
|
||||
WRITE_LINE_MEMBER( p8k_state::p8k_daisy_interrupt )
|
||||
{
|
||||
machine().device("maincpu")->execute().set_input_line(0, state);
|
||||
m_maincpu->set_input_line(0, state);
|
||||
}
|
||||
|
||||
/* Z80 DMA */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user