mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
IRQ_CALLBACK modernization part 2, this should give some speed to pc drivers (no whatsnew)
This commit is contained in:
parent
f63dc9ba65
commit
bfb62eeb19
@ -278,12 +278,13 @@ static void apollo_bus_error(running_machine &machine)
|
|||||||
apollo_csr_set_status_register(APOLLO_CSR_SR_CPU_TIMEOUT, APOLLO_CSR_SR_CPU_TIMEOUT);
|
apollo_csr_set_status_register(APOLLO_CSR_SR_CPU_TIMEOUT, APOLLO_CSR_SR_CPU_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IRQ_CALLBACK(apollo_irq_acknowledge) {
|
IRQ_CALLBACK_MEMBER(apollo_state::apollo_irq_acknowledge)
|
||||||
|
{
|
||||||
int result = M68K_INT_ACK_AUTOVECTOR;
|
int result = M68K_INT_ACK_AUTOVECTOR;
|
||||||
|
|
||||||
device->machine().device(MAINCPU)->execute().set_input_line(irqline, CLEAR_LINE);
|
machine().device(MAINCPU)->execute().set_input_line(irqline, CLEAR_LINE);
|
||||||
|
|
||||||
DLOG2(("apollo_irq_acknowledge: interrupt level=%d", irqline));
|
MLOG2(("apollo_irq_acknowledge: interrupt level=%d", irqline));
|
||||||
|
|
||||||
if (irqline == 6) {
|
if (irqline == 6) {
|
||||||
result = apollo_pic_acknowledge(device, irqline);
|
result = apollo_pic_acknowledge(device, irqline);
|
||||||
@ -1080,7 +1081,7 @@ DRIVER_INIT_MEMBER(apollo_state,dn3500)
|
|||||||
{
|
{
|
||||||
// MLOG1(("driver_init_dn3500"));
|
// MLOG1(("driver_init_dn3500"));
|
||||||
|
|
||||||
machine().device(MAINCPU)->execute().set_irq_acknowledge_callback(apollo_irq_acknowledge);
|
machine().device(MAINCPU)->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(apollo_state::apollo_irq_acknowledge),this));
|
||||||
|
|
||||||
/* hook the RESET line, which resets a slew of other components */
|
/* hook the RESET line, which resets a slew of other components */
|
||||||
m68k_set_reset_callback(machine().device(MAINCPU), apollo_reset_instr_callback);
|
m68k_set_reset_callback(machine().device(MAINCPU), apollo_reset_instr_callback);
|
||||||
|
@ -66,7 +66,6 @@ extern const char layout_neogeo[];
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static IRQ_CALLBACK(neocd_int_callback);
|
|
||||||
|
|
||||||
/* Stubs for various functions called by the FBA code, replace with MAME specifics later */
|
/* Stubs for various functions called by the FBA code, replace with MAME specifics later */
|
||||||
|
|
||||||
@ -178,6 +177,7 @@ public:
|
|||||||
DECLARE_DRIVER_INIT(neocdz);
|
DECLARE_DRIVER_INIT(neocdz);
|
||||||
DECLARE_DRIVER_INIT(neocdzj);
|
DECLARE_DRIVER_INIT(neocdzj);
|
||||||
|
|
||||||
|
IRQ_CALLBACK_MEMBER(neocd_int_callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1117,7 +1117,7 @@ MACHINE_START_MEMBER(ng_aes_state,neocd)
|
|||||||
save_pointer(NAME(m_memcard_data), 0x2000);
|
save_pointer(NAME(m_memcard_data), 0x2000);
|
||||||
|
|
||||||
// for custom vectors
|
// for custom vectors
|
||||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(neocd_int_callback);
|
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(ng_aes_state::neocd_int_callback),this));
|
||||||
|
|
||||||
neogeo_set_main_cpu_vector_table_source(machine(), 0); // default to the BIOS vectors
|
neogeo_set_main_cpu_vector_table_source(machine(), 0); // default to the BIOS vectors
|
||||||
|
|
||||||
@ -1539,15 +1539,13 @@ MACHINE_CONFIG_END
|
|||||||
|
|
||||||
/* NeoCD uses custom vectors on IRQ4 to handle various events from the CDC */
|
/* NeoCD uses custom vectors on IRQ4 to handle various events from the CDC */
|
||||||
|
|
||||||
static IRQ_CALLBACK(neocd_int_callback)
|
IRQ_CALLBACK_MEMBER(ng_aes_state::neocd_int_callback)
|
||||||
{
|
{
|
||||||
ng_aes_state *state = device->machine().driver_data<ng_aes_state>();
|
|
||||||
|
|
||||||
if (irqline==4)
|
if (irqline==4)
|
||||||
{
|
{
|
||||||
if (state->get_nNeoCDIRQVectorAck()) {
|
if (get_nNeoCDIRQVectorAck()) {
|
||||||
state->set_nNeoCDIRQVectorAck(0);
|
set_nNeoCDIRQVectorAck(0);
|
||||||
return state->get_nNeoCDIRQVector();
|
return get_nNeoCDIRQVector();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +73,7 @@ public:
|
|||||||
INTERRUPT_GEN_MEMBER(pasogo_interrupt);
|
INTERRUPT_GEN_MEMBER(pasogo_interrupt);
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(vg230_timer);
|
TIMER_DEVICE_CALLBACK_MEMBER(vg230_timer);
|
||||||
DECLARE_WRITE_LINE_MEMBER(pasogo_pic8259_set_int_line);
|
DECLARE_WRITE_LINE_MEMBER(pasogo_pic8259_set_int_line);
|
||||||
|
IRQ_CALLBACK_MEMBER(pasogo_irq_callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -456,14 +457,14 @@ INTERRUPT_GEN_MEMBER(pasogo_state::pasogo_interrupt)
|
|||||||
// machine.device("maincpu")->execute().set_input_line(UPD7810_INTFE1, PULSE_LINE);
|
// machine.device("maincpu")->execute().set_input_line(UPD7810_INTFE1, PULSE_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IRQ_CALLBACK(pasogo_irq_callback)
|
IRQ_CALLBACK_MEMBER(pasogo_state::pasogo_irq_callback)
|
||||||
{
|
{
|
||||||
return pic8259_acknowledge( device->machine().device("pic8259"));
|
return pic8259_acknowledge( machine().device("pic8259"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void pasogo_state::machine_reset()
|
void pasogo_state::machine_reset()
|
||||||
{
|
{
|
||||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(pasogo_irq_callback);
|
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pasogo_state::pasogo_irq_callback),this));
|
||||||
}
|
}
|
||||||
|
|
||||||
//static const unsigned i86_address_mask = 0x000fffff;
|
//static const unsigned i86_address_mask = 0x000fffff;
|
||||||
|
@ -62,6 +62,7 @@ public:
|
|||||||
UINT32 screen_update_vt100(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_vt100(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
INTERRUPT_GEN_MEMBER(vt100_vertical_interrupt);
|
INTERRUPT_GEN_MEMBER(vt100_vertical_interrupt);
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(keyboard_callback);
|
TIMER_DEVICE_CALLBACK_MEMBER(keyboard_callback);
|
||||||
|
IRQ_CALLBACK_MEMBER(vt100_irq_callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -335,11 +336,10 @@ UINT32 vt100_state::screen_update_vt100(screen_device &screen, bitmap_ind16 &bit
|
|||||||
// A4 - receiver
|
// A4 - receiver
|
||||||
// A5 - vertical fequency
|
// A5 - vertical fequency
|
||||||
// all other set to 1
|
// all other set to 1
|
||||||
static IRQ_CALLBACK(vt100_irq_callback)
|
IRQ_CALLBACK_MEMBER(vt100_state::vt100_irq_callback)
|
||||||
{
|
{
|
||||||
vt100_state *state = device->machine().driver_data<vt100_state>();
|
UINT8 ret = 0xc7 | (m_keyboard_int << 3) | (m_receiver_int << 4) | (m_vertical_int << 5);
|
||||||
UINT8 ret = 0xc7 | (state->m_keyboard_int << 3) | (state->m_receiver_int << 4) | (state->m_vertical_int << 5);
|
m_receiver_int = 0;
|
||||||
state->m_receiver_int = 0;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,7 +363,7 @@ void vt100_state::machine_reset()
|
|||||||
|
|
||||||
m_key_scan = 0;
|
m_key_scan = 0;
|
||||||
|
|
||||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(vt100_irq_callback);
|
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(vt100_state::vt100_irq_callback),this));
|
||||||
}
|
}
|
||||||
|
|
||||||
READ8_MEMBER( vt100_state::vt100_read_video_ram_r )
|
READ8_MEMBER( vt100_state::vt100_read_video_ram_r )
|
||||||
|
@ -1820,33 +1820,31 @@ INTERRUPT_GEN_MEMBER(x68k_state::x68k_vsync_irq)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static IRQ_CALLBACK(x68k_int_ack)
|
IRQ_CALLBACK_MEMBER(x68k_state::x68k_int_ack)
|
||||||
{
|
{
|
||||||
x68k_state *state = device->machine().driver_data<x68k_state>();
|
|
||||||
|
|
||||||
if(irqline == 6) // MFP
|
if(irqline == 6) // MFP
|
||||||
{
|
{
|
||||||
state->m_mfp.current_irq = -1;
|
m_mfp.current_irq = -1;
|
||||||
if(state->m_current_vector[6] != 0x4b && state->m_current_vector[6] != 0x4c)
|
if(m_current_vector[6] != 0x4b && m_current_vector[6] != 0x4c)
|
||||||
state->m_current_vector[6] = state->m_mfpdev->get_vector();
|
m_current_vector[6] = m_mfpdev->get_vector();
|
||||||
else
|
else
|
||||||
device->machine().device("maincpu")->execute().set_input_line_and_vector(irqline,CLEAR_LINE,state->m_current_vector[irqline]);
|
machine().device("maincpu")->execute().set_input_line_and_vector(irqline,CLEAR_LINE,m_current_vector[irqline]);
|
||||||
logerror("SYS: IRQ acknowledged (vector=0x%02x, line = %i)\n",state->m_current_vector[6],irqline);
|
logerror("SYS: IRQ acknowledged (vector=0x%02x, line = %i)\n",m_current_vector[6],irqline);
|
||||||
return state->m_current_vector[6];
|
return m_current_vector[6];
|
||||||
}
|
}
|
||||||
|
|
||||||
device->machine().device("maincpu")->execute().set_input_line_and_vector(irqline,CLEAR_LINE,state->m_current_vector[irqline]);
|
machine().device("maincpu")->execute().set_input_line_and_vector(irqline,CLEAR_LINE,m_current_vector[irqline]);
|
||||||
if(irqline == 1) // IOSC
|
if(irqline == 1) // IOSC
|
||||||
{
|
{
|
||||||
state->m_ioc.irqstatus &= ~0xf0;
|
m_ioc.irqstatus &= ~0xf0;
|
||||||
}
|
}
|
||||||
if(irqline == 5) // SCC
|
if(irqline == 5) // SCC
|
||||||
{
|
{
|
||||||
state->m_mouse.irqactive = 0;
|
m_mouse.irqactive = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
logerror("SYS: IRQ acknowledged (vector=0x%02x, line = %i)\n",state->m_current_vector[irqline],irqline);
|
logerror("SYS: IRQ acknowledged (vector=0x%02x, line = %i)\n",m_current_vector[irqline],irqline);
|
||||||
return state->m_current_vector[irqline];
|
return m_current_vector[irqline];
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE_LINE_MEMBER(x68k_state::x68k_scsi_irq)
|
WRITE_LINE_MEMBER(x68k_state::x68k_scsi_irq)
|
||||||
@ -2587,7 +2585,7 @@ DRIVER_INIT_MEMBER(x68k_state,x68000)
|
|||||||
|
|
||||||
mfp_init();
|
mfp_init();
|
||||||
|
|
||||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(x68k_int_ack);
|
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(x68k_state::x68k_int_ack),this));
|
||||||
|
|
||||||
// init keyboard
|
// init keyboard
|
||||||
m_keyboard.delay = 500; // 3*100+200
|
m_keyboard.delay = 500; // 3*100+200
|
||||||
|
@ -187,6 +187,8 @@ public:
|
|||||||
void fdc_interrupt(bool state);
|
void fdc_interrupt(bool state);
|
||||||
void fdc_dma_drq(bool state);
|
void fdc_dma_drq(bool state);
|
||||||
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
||||||
|
IRQ_CALLBACK_MEMBER(apollo_irq_acknowledge);
|
||||||
|
IRQ_CALLBACK_MEMBER(apollo_pic_acknowledge);
|
||||||
};
|
};
|
||||||
|
|
||||||
MACHINE_CONFIG_EXTERN( apollo );
|
MACHINE_CONFIG_EXTERN( apollo );
|
||||||
@ -250,8 +252,6 @@ DECLARE_READ8_DEVICE_HANDLER( apollo_pic8259_master_r );
|
|||||||
DECLARE_WRITE8_DEVICE_HANDLER(apollo_pic8259_slave_w );
|
DECLARE_WRITE8_DEVICE_HANDLER(apollo_pic8259_slave_w );
|
||||||
DECLARE_READ8_DEVICE_HANDLER( apollo_pic8259_slave_r );
|
DECLARE_READ8_DEVICE_HANDLER( apollo_pic8259_slave_r );
|
||||||
|
|
||||||
IRQ_CALLBACK(apollo_pic_acknowledge);
|
|
||||||
|
|
||||||
/*----------- machine/apollo_ptm.c -----------*/
|
/*----------- machine/apollo_ptm.c -----------*/
|
||||||
|
|
||||||
DECLARE_WRITE8_DEVICE_HANDLER( apollo_ptm_w );
|
DECLARE_WRITE8_DEVICE_HANDLER( apollo_ptm_w );
|
||||||
|
@ -183,6 +183,7 @@ public:
|
|||||||
DECLARE_MACHINE_START(at);
|
DECLARE_MACHINE_START(at);
|
||||||
DECLARE_MACHINE_RESET(at);
|
DECLARE_MACHINE_RESET(at);
|
||||||
void pc_set_dma_channel(int channel, int state);
|
void pc_set_dma_channel(int channel, int state);
|
||||||
|
IRQ_CALLBACK_MEMBER(at_irq_callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ public:
|
|||||||
DECLARE_WRITE_LINE_MEMBER(b2m_pic_set_int_line);
|
DECLARE_WRITE_LINE_MEMBER(b2m_pic_set_int_line);
|
||||||
void b2m_fdc_drq(bool state);
|
void b2m_fdc_drq(bool state);
|
||||||
DECLARE_FLOPPY_FORMATS( b2m_floppy_formats );
|
DECLARE_FLOPPY_FORMATS( b2m_floppy_formats );
|
||||||
|
IRQ_CALLBACK_MEMBER(b2m_irq_callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------- defined in machine/b2m.c -----------*/
|
/*----------- defined in machine/b2m.c -----------*/
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
UINT8 m_ppi_shift_register;
|
UINT8 m_ppi_shift_register;
|
||||||
UINT8 m_ppi_shift_enable;
|
UINT8 m_ppi_shift_enable;
|
||||||
|
|
||||||
static IRQ_CALLBACK(pc_irq_callback);
|
IRQ_CALLBACK_MEMBER(pc_irq_callback);
|
||||||
|
|
||||||
// interface to the keyboard
|
// interface to the keyboard
|
||||||
DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
|
DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w );
|
||||||
|
@ -158,6 +158,7 @@ public:
|
|||||||
virtual void palette_init();
|
virtual void palette_init();
|
||||||
void screen_eof_mbc55x(screen_device &screen, bool state);
|
void screen_eof_mbc55x(screen_device &screen, bool state);
|
||||||
TIMER_CALLBACK_MEMBER(keyscan_callback);
|
TIMER_CALLBACK_MEMBER(keyscan_callback);
|
||||||
|
IRQ_CALLBACK_MEMBER(mbc55x_irq_callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------- defined in drivers/mbc55x.c -----------*/
|
/*----------- defined in drivers/mbc55x.c -----------*/
|
||||||
|
@ -147,6 +147,7 @@ public:
|
|||||||
void pc_eop_w(int channel, bool state);
|
void pc_eop_w(int channel, bool state);
|
||||||
void mc1502_fdc_irq_drq(bool state);
|
void mc1502_fdc_irq_drq(bool state);
|
||||||
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
||||||
|
IRQ_CALLBACK_MEMBER(pc_irq_callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------- defined in machine/pc.c -----------*/
|
/*----------- defined in machine/pc.c -----------*/
|
||||||
|
@ -54,6 +54,7 @@ public:
|
|||||||
DECLARE_WRITE_LINE_MEMBER(pk8020_pit_out0);
|
DECLARE_WRITE_LINE_MEMBER(pk8020_pit_out0);
|
||||||
DECLARE_WRITE_LINE_MEMBER(pk8020_pit_out1);
|
DECLARE_WRITE_LINE_MEMBER(pk8020_pit_out1);
|
||||||
DECLARE_WRITE_LINE_MEMBER(pk8020_pic_set_int_line);
|
DECLARE_WRITE_LINE_MEMBER(pk8020_pic_set_int_line);
|
||||||
|
IRQ_CALLBACK_MEMBER(pk8020_irq_callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -369,6 +369,7 @@ public:
|
|||||||
DECLARE_READ32_MEMBER(x68k_gvram32_r);
|
DECLARE_READ32_MEMBER(x68k_gvram32_r);
|
||||||
DECLARE_WRITE32_MEMBER(x68k_tvram32_w);
|
DECLARE_WRITE32_MEMBER(x68k_tvram32_w);
|
||||||
DECLARE_READ32_MEMBER(x68k_tvram32_r);
|
DECLARE_READ32_MEMBER(x68k_tvram32_r);
|
||||||
|
IRQ_CALLBACK_MEMBER(x68k_int_ack);
|
||||||
private:
|
private:
|
||||||
inline void x68k_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color);
|
inline void x68k_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color);
|
||||||
void x68k_crtc_text_copy(int src, int dest);
|
void x68k_crtc_text_copy(int src, int dest);
|
||||||
|
@ -675,15 +675,16 @@ static void apollo_pic_set_irq_line(device_t *device, int irq, int state) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IRQ_CALLBACK(apollo_pic_acknowledge) {
|
IRQ_CALLBACK_MEMBER(apollo_state::apollo_pic_acknowledge)
|
||||||
UINT32 vector = pic8259_acknowledge(get_pic8259_master(device));
|
{
|
||||||
|
UINT32 vector = pic8259_acknowledge(get_pic8259_master(&device));
|
||||||
if ((vector & 0x0f) == APOLLO_IRQ_PIC_SLAVE) {
|
if ((vector & 0x0f) == APOLLO_IRQ_PIC_SLAVE) {
|
||||||
vector = pic8259_acknowledge(get_pic8259_slave(device));
|
vector = pic8259_acknowledge(get_pic8259_slave(&device));
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't log ptm interrupts
|
// don't log ptm interrupts
|
||||||
if (vector != APOLLO_IRQ_VECTOR+APOLLO_IRQ_PTM) {
|
if (vector != APOLLO_IRQ_VECTOR+APOLLO_IRQ_PTM) {
|
||||||
DLOG1(("apollo_pic_acknowledge: irq=%d vector=%x", vector & 0x0f, vector));
|
MLOG1(("apollo_pic_acknowledge: irq=%d vector=%x", vector & 0x0f, vector));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (apollo_is_dn3000()) {
|
if (apollo_is_dn3000()) {
|
||||||
|
@ -350,15 +350,14 @@ DRIVER_INIT_MEMBER(at_state,atvga)
|
|||||||
init_at_common(machine());
|
init_at_common(machine());
|
||||||
}
|
}
|
||||||
|
|
||||||
static IRQ_CALLBACK(at_irq_callback)
|
IRQ_CALLBACK_MEMBER(at_state::at_irq_callback)
|
||||||
{
|
{
|
||||||
at_state *st = device->machine().driver_data<at_state>();
|
return pic8259_acknowledge(m_pic8259_master);
|
||||||
return pic8259_acknowledge(st->m_pic8259_master);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START_MEMBER(at_state,at)
|
MACHINE_START_MEMBER(at_state,at)
|
||||||
{
|
{
|
||||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback);
|
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(at_state::at_irq_callback),this));
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_RESET_MEMBER(at_state,at)
|
MACHINE_RESET_MEMBER(at_state,at)
|
||||||
|
@ -347,10 +347,9 @@ void b2m_state::machine_start()
|
|||||||
machine().save().register_postload(save_prepost_delegate(FUNC(b2m_postload), this));
|
machine().save().register_postload(save_prepost_delegate(FUNC(b2m_postload), this));
|
||||||
}
|
}
|
||||||
|
|
||||||
static IRQ_CALLBACK(b2m_irq_callback)
|
IRQ_CALLBACK_MEMBER(b2m_state::b2m_irq_callback)
|
||||||
{
|
{
|
||||||
b2m_state *state = device->machine().driver_data<b2m_state>();
|
return pic8259_acknowledge(m_pic);
|
||||||
return pic8259_acknowledge(state->m_pic);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct pic8259_interface b2m_pic8259_config =
|
const struct pic8259_interface b2m_pic8259_config =
|
||||||
@ -372,6 +371,6 @@ void b2m_state::machine_reset()
|
|||||||
m_b2m_side = 0;
|
m_b2m_side = 0;
|
||||||
m_b2m_drive = 0;
|
m_b2m_drive = 0;
|
||||||
|
|
||||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(b2m_irq_callback);
|
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(b2m_state::b2m_irq_callback),this));
|
||||||
b2m_set_bank(machine(), 7);
|
b2m_set_bank(machine(), 7);
|
||||||
}
|
}
|
||||||
|
@ -652,10 +652,9 @@ void ibm5160_mb_device::device_start()
|
|||||||
membank( "bank10" )->set_base( machine().device<ram_device>(RAM_TAG)->pointer() );
|
membank( "bank10" )->set_base( machine().device<ram_device>(RAM_TAG)->pointer() );
|
||||||
}
|
}
|
||||||
|
|
||||||
IRQ_CALLBACK(ibm5160_mb_device::pc_irq_callback)
|
IRQ_CALLBACK_MEMBER(ibm5160_mb_device::pc_irq_callback)
|
||||||
{
|
{
|
||||||
device_t *pic = device->machine().device("mb:pic8259");
|
return pic8259_acknowledge(m_pic8259);
|
||||||
return pic8259_acknowledge( pic );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -665,7 +664,7 @@ IRQ_CALLBACK(ibm5160_mb_device::pc_irq_callback)
|
|||||||
|
|
||||||
void ibm5160_mb_device::device_reset()
|
void ibm5160_mb_device::device_reset()
|
||||||
{
|
{
|
||||||
m_maincpu->set_irq_acknowledge_callback(pc_irq_callback);
|
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(ibm5160_mb_device::pc_irq_callback),this));
|
||||||
|
|
||||||
m_u73_q2 = 0;
|
m_u73_q2 = 0;
|
||||||
m_out1 = 2; // initial state of pit output is undefined
|
m_out1 = 2; // initial state of pit output is undefined
|
||||||
|
@ -208,12 +208,6 @@ void i82371ab_device::pci_write(pci_bus_device *pcibus, int function, int offset
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static IRQ_CALLBACK(at_irq_callback)
|
|
||||||
{
|
|
||||||
device_t *pic = device->machine().device(":pcibus:1:i82371ab:pic8259_master");
|
|
||||||
return pic8259_acknowledge(pic);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// device_start - device-specific startup
|
// device_start - device-specific startup
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -223,8 +217,6 @@ void i82371ab_device::device_start()
|
|||||||
southbridge_device::device_start();
|
southbridge_device::device_start();
|
||||||
/* setup save states */
|
/* setup save states */
|
||||||
save_item(NAME(m_regs));
|
save_item(NAME(m_regs));
|
||||||
|
|
||||||
machine().device(":maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -138,12 +138,6 @@ void i82371sb_device::pci_write(pci_bus_device *pcibus, int function, int offset
|
|||||||
//logerror("i82371sb_pci_write: write to undefined function %d\n", function);
|
//logerror("i82371sb_pci_write: write to undefined function %d\n", function);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IRQ_CALLBACK(at_irq_callback)
|
|
||||||
{
|
|
||||||
device_t *pic = device->machine().device(":pcibus:1:i82371sb:pic8259_master");
|
|
||||||
return pic8259_acknowledge(pic);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// device_start - device-specific startup
|
// device_start - device-specific startup
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -153,8 +147,6 @@ void i82371sb_device::device_start()
|
|||||||
southbridge_device::device_start();
|
southbridge_device::device_start();
|
||||||
/* setup save states */
|
/* setup save states */
|
||||||
save_item(NAME(m_regs));
|
save_item(NAME(m_regs));
|
||||||
|
|
||||||
machine().device(":maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -126,10 +126,9 @@ WRITE8_MEMBER(mbc55x_state::mbcpic8259_w)
|
|||||||
pic8259_w(m_pic, space, offset>>1, data);
|
pic8259_w(m_pic, space, offset>>1, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IRQ_CALLBACK(mbc55x_irq_callback)
|
IRQ_CALLBACK_MEMBER(mbc55x_state::mbc55x_irq_callback)
|
||||||
{
|
{
|
||||||
mbc55x_state *state = device->machine().driver_data<mbc55x_state>();
|
return pic8259_acknowledge(m_pic);
|
||||||
return pic8259_acknowledge( state->m_pic );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PIT8253 Configuration */
|
/* PIT8253 Configuration */
|
||||||
@ -388,7 +387,7 @@ void mbc55x_state::machine_reset()
|
|||||||
{
|
{
|
||||||
set_ram_size(machine());
|
set_ram_size(machine());
|
||||||
keyboard_reset(machine());
|
keyboard_reset(machine());
|
||||||
machine().device(MAINCPU_TAG)->execute().set_irq_acknowledge_callback(mbc55x_irq_callback);
|
machine().device(MAINCPU_TAG)->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(mbc55x_state::mbc55x_irq_callback),this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void mbc55x_state::machine_start()
|
void mbc55x_state::machine_start()
|
||||||
|
@ -1463,10 +1463,9 @@ DRIVER_INIT_MEMBER(pc_state,pc1640)
|
|||||||
mess_init_pc_common(machine(), PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line);
|
mess_init_pc_common(machine(), PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IRQ_CALLBACK(pc_irq_callback)
|
IRQ_CALLBACK_MEMBER(pc_state::pc_irq_callback)
|
||||||
{
|
{
|
||||||
pc_state *st = device->machine().driver_data<pc_state>();
|
return pic8259_acknowledge(m_pic8259);
|
||||||
return pic8259_acknowledge( st->m_pic8259 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1475,7 +1474,7 @@ MACHINE_START_MEMBER(pc_state,pc)
|
|||||||
m_pic8259 = machine().device("pic8259");
|
m_pic8259 = machine().device("pic8259");
|
||||||
m_pit8253 = machine().device("pit8253");
|
m_pit8253 = machine().device("pit8253");
|
||||||
m_maincpu = machine().device<cpu_device>("maincpu" );
|
m_maincpu = machine().device<cpu_device>("maincpu" );
|
||||||
m_maincpu->set_irq_acknowledge_callback(pc_irq_callback);
|
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this));
|
||||||
|
|
||||||
pc_fdc_interface *fdc = machine().device<pc_fdc_interface>("fdc");
|
pc_fdc_interface *fdc = machine().device<pc_fdc_interface>("fdc");
|
||||||
fdc->setup_intrq_cb(pc_fdc_interface::line_cb(FUNC(pc_state::fdc_interrupt), this));
|
fdc->setup_intrq_cb(pc_fdc_interface::line_cb(FUNC(pc_state::fdc_interrupt), this));
|
||||||
@ -1511,7 +1510,7 @@ MACHINE_RESET_MEMBER(pc_state,pc)
|
|||||||
MACHINE_START_MEMBER(pc_state,mc1502)
|
MACHINE_START_MEMBER(pc_state,mc1502)
|
||||||
{
|
{
|
||||||
m_maincpu = machine().device<cpu_device>("maincpu" );
|
m_maincpu = machine().device<cpu_device>("maincpu" );
|
||||||
m_maincpu->set_irq_acknowledge_callback(pc_irq_callback);
|
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this));
|
||||||
|
|
||||||
m_pic8259 = machine().device("pic8259");
|
m_pic8259 = machine().device("pic8259");
|
||||||
m_pit8253 = machine().device("pit8253");
|
m_pit8253 = machine().device("pit8253");
|
||||||
@ -1539,7 +1538,7 @@ MACHINE_START_MEMBER(pc_state,pcjr)
|
|||||||
m_pcjr_watchdog = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_fdc_watchdog),this));
|
m_pcjr_watchdog = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_fdc_watchdog),this));
|
||||||
pcjr_keyb.keyb_signal_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_keyb_signal_callback),this));
|
pcjr_keyb.keyb_signal_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pc_state::pcjr_keyb_signal_callback),this));
|
||||||
m_maincpu = machine().device<cpu_device>("maincpu");
|
m_maincpu = machine().device<cpu_device>("maincpu");
|
||||||
m_maincpu->set_irq_acknowledge_callback(pc_irq_callback);
|
m_maincpu->set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pc_state::pc_irq_callback),this));
|
||||||
|
|
||||||
machine().device<upd765a_device>("upd765")->set_ready_line_connected(false);
|
machine().device<upd765a_device>("upd765")->set_ready_line_connected(false);
|
||||||
|
|
||||||
|
@ -984,15 +984,15 @@ const struct pic8259_interface pk8020_pic8259_config =
|
|||||||
DEVCB_NULL
|
DEVCB_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static IRQ_CALLBACK( pk8020_irq_callback )
|
IRQ_CALLBACK_MEMBER(pk8020_state::pk8020_irq_callback)
|
||||||
{
|
{
|
||||||
return pic8259_acknowledge(device->machine().device("pic8259"));
|
return pic8259_acknowledge(machine().device("pic8259"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void pk8020_state::machine_reset()
|
void pk8020_state::machine_reset()
|
||||||
{
|
{
|
||||||
pk8020_set_bank(machine(),0);
|
pk8020_set_bank(machine(),0);
|
||||||
machine().device("maincpu")->execute().set_irq_acknowledge_callback(pk8020_irq_callback);
|
machine().device("maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(pk8020_state::pk8020_irq_callback),this));
|
||||||
|
|
||||||
m_sound_gate = 0;
|
m_sound_gate = 0;
|
||||||
m_sound_level = 0;
|
m_sound_level = 0;
|
||||||
|
@ -180,14 +180,12 @@ southbridge_device::southbridge_device(const machine_config &mconfig, device_typ
|
|||||||
* Init functions
|
* Init functions
|
||||||
*
|
*
|
||||||
**********************************************************/
|
**********************************************************/
|
||||||
/*
|
|
||||||
IRQ_CALLBACK(southbridge_device::at_irq_callback)
|
IRQ_CALLBACK_MEMBER(southbridge_device::at_irq_callback)
|
||||||
{
|
{
|
||||||
device_t *pic = device->machine().device(":pcibus:1:i82371ab:pic8259_master");
|
return pic8259_acknowledge(m_pic8259_master);
|
||||||
//return pic8259_acknowledge(m_pic8259_master);
|
|
||||||
return pic8259_acknowledge(pic);
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// device_start - device-specific startup
|
// device_start - device-specific startup
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -209,7 +207,7 @@ void southbridge_device::device_start()
|
|||||||
|
|
||||||
|
|
||||||
m_at_offset1 = 0xff;
|
m_at_offset1 = 0xff;
|
||||||
//machine().device(":maincpu")->execute().set_irq_acknowledge_callback(at_irq_callback);
|
machine().device(":maincpu")->execute().set_irq_acknowledge_callback(device_irq_acknowledge_delegate(FUNC(southbridge_device::at_irq_callback),this));
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -72,7 +72,7 @@ protected:
|
|||||||
virtual void device_reset();
|
virtual void device_reset();
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//static IRQ_CALLBACK(at_irq_callback);
|
IRQ_CALLBACK_MEMBER(at_irq_callback);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<pic8259_device> m_pic8259_master;
|
required_device<pic8259_device> m_pic8259_master;
|
||||||
required_device<pic8259_device> m_pic8259_slave;
|
required_device<pic8259_device> m_pic8259_slave;
|
||||||
|
Loading…
Reference in New Issue
Block a user