diff options
author | 2013-05-15 21:57:33 +0000 | |
---|---|---|
committer | 2013-05-15 21:57:33 +0000 | |
commit | 6f7dd684beecab2b83fe7555f41676bc75f8bab3 (patch) | |
tree | 728398c9c22705c3cef2bf0e7a560a5c4c99d74e /src/mess/machine | |
parent | febb0e53f1a6fd9f43080e88ce7b871202a66d48 (diff) |
pic8259.c: Switched to devcb2. (nw)
Diffstat (limited to 'src/mess/machine')
-rw-r--r-- | src/mess/machine/apollo.c | 17 | ||||
-rw-r--r-- | src/mess/machine/at.c | 16 | ||||
-rw-r--r-- | src/mess/machine/b2m.c | 7 | ||||
-rw-r--r-- | src/mess/machine/bebox.c | 14 | ||||
-rw-r--r-- | src/mess/machine/compis.c | 14 | ||||
-rw-r--r-- | src/mess/machine/genpc.c | 10 | ||||
-rw-r--r-- | src/mess/machine/irisha.c | 7 | ||||
-rw-r--r-- | src/mess/machine/mbc55x.c | 7 | ||||
-rw-r--r-- | src/mess/machine/pc.c | 22 | ||||
-rw-r--r-- | src/mess/machine/pk8020.c | 7 | ||||
-rw-r--r-- | src/mess/machine/s100_wunderbus.c | 9 | ||||
-rw-r--r-- | src/mess/machine/southbridge.c | 17 |
12 files changed, 11 insertions, 136 deletions
diff --git a/src/mess/machine/apollo.c b/src/mess/machine/apollo.c index 668d339c7e9..704be74a5c7 100644 --- a/src/mess/machine/apollo.c +++ b/src/mess/machine/apollo.c @@ -689,9 +689,10 @@ IRQ_CALLBACK_MEMBER(apollo_state::apollo_pic_acknowledge) * pic8259 configuration *************************************************************/ -static WRITE_LINE_DEVICE_HANDLER( apollo_pic8259_master_set_int_line ) { +WRITE_LINE_MEMBER( apollo_state::apollo_pic8259_master_set_int_line ) { static int interrupt_line = -1; if (state != interrupt_line) { + device_t *device = pic8259_master; DLOG1(("apollo_pic8259_master_set_int_line: %x", state)); } interrupt_line = state; @@ -704,23 +705,19 @@ static WRITE_LINE_DEVICE_HANDLER( apollo_pic8259_master_set_int_line ) { apollo_set_cache_status_register(0x10, state ? 0x10 : 0x00); } - device->machine().device(MAINCPU)->execute().set_input_line_and_vector(M68K_IRQ_6,state ? ASSERT_LINE : CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); + machine().device(MAINCPU)->execute().set_input_line_and_vector(M68K_IRQ_6,state ? ASSERT_LINE : CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR); } -static WRITE_LINE_DEVICE_HANDLER( apollo_pic8259_slave_set_int_line ) { +WRITE_LINE_MEMBER( apollo_state::apollo_pic8259_slave_set_int_line ) { static int interrupt_line = -1; if (state != interrupt_line) { + device_t *device = pic8259_slave; DLOG1(("apollo_pic8259_slave_set_int_line: %x", state)); interrupt_line = state; apollo_pic_set_irq_line(device, 3, state); } } -static const struct pic8259_interface apollo_pic8259_master_config = { - DEVCB_LINE(apollo_pic8259_master_set_int_line) }; - -static const struct pic8259_interface apollo_pic8259_slave_config = { - DEVCB_LINE(apollo_pic8259_slave_set_int_line) }; //########################################################################## // machine/apollo_ptm.c - APOLLO DS3500 Programmable Timer 6840 @@ -1370,8 +1367,8 @@ MACHINE_CONFIG_FRAGMENT( apollo ) MCFG_I8237_ADD( APOLLO_DMA1_TAG, XTAL_14_31818MHz/3, apollo_dma8237_1_config ) MCFG_I8237_ADD( APOLLO_DMA2_TAG, XTAL_14_31818MHz/3, apollo_dma8237_2_config ) - MCFG_PIC8259_ADD( APOLLO_PIC1_TAG, apollo_pic8259_master_config ) - MCFG_PIC8259_ADD( APOLLO_PIC2_TAG, apollo_pic8259_slave_config ) + MCFG_PIC8259_ADD( APOLLO_PIC1_TAG, WRITELINE(apollo_state,apollo_pic8259_master_set_int_line), NULL, NULL ) // TODO: Doublecheck config + MCFG_PIC8259_ADD( APOLLO_PIC2_TAG, WRITELINE(apollo_state,apollo_pic8259_slave_set_int_line), NULL, NULL ) // TODO: Doublecheck config MCFG_PTM6840_ADD(APOLLO_PTM_TAG, apollo_ptm_config) MCFG_MC146818_ADD( APOLLO_RTC_TAG, MC146818_UTC ) MCFG_DUART68681_ADD( APOLLO_SIO_TAG, XTAL_3_6864MHz, apollo_sio_config ) diff --git a/src/mess/machine/at.c b/src/mess/machine/at.c index b2305d4d7a0..32b05596ad9 100644 --- a/src/mess/machine/at.c +++ b/src/mess/machine/at.c @@ -21,22 +21,6 @@ READ8_MEMBER( at_state::get_slave_ack ) return 0x00; } -const struct pic8259_interface at_pic8259_master_config = -{ - DEVCB_CPU_INPUT_LINE("maincpu", 0), - DEVCB_LINE_VCC, - DEVCB_DRIVER_MEMBER(at_state, get_slave_ack) -}; - -const struct pic8259_interface at_pic8259_slave_config = -{ - DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir2_w), - DEVCB_LINE_GND, - DEVCB_NULL -}; - - - /************************************************************************* * * PC Speaker related diff --git a/src/mess/machine/b2m.c b/src/mess/machine/b2m.c index 420261e7f3e..a960ba20d86 100644 --- a/src/mess/machine/b2m.c +++ b/src/mess/machine/b2m.c @@ -350,13 +350,6 @@ IRQ_CALLBACK_MEMBER(b2m_state::b2m_irq_callback) return m_pic->acknowledge(); } -const struct pic8259_interface b2m_pic8259_config = -{ - DEVCB_DRIVER_LINE_MEMBER(b2m_state,b2m_pic_set_int_line), - DEVCB_LINE_VCC, - DEVCB_NULL -}; - INTERRUPT_GEN_MEMBER(b2m_state::b2m_vblank_interrupt) { m_vblank_state++; diff --git a/src/mess/machine/bebox.c b/src/mess/machine/bebox.c index 65dca06ee89..d49f5c911ff 100644 --- a/src/mess/machine/bebox.c +++ b/src/mess/machine/bebox.c @@ -506,20 +506,6 @@ READ8_MEMBER(bebox_state::get_slave_ack) return 0x00; } -const struct pic8259_interface bebox_pic8259_master_config = -{ - DEVCB_DRIVER_LINE_MEMBER(bebox_state,bebox_pic8259_master_set_int_line), - DEVCB_LINE_VCC, - DEVCB_DRIVER_MEMBER(bebox_state,get_slave_ack) -}; - -const struct pic8259_interface bebox_pic8259_slave_config = -{ - DEVCB_DRIVER_LINE_MEMBER(bebox_state,bebox_pic8259_slave_set_int_line), - DEVCB_LINE_GND, - DEVCB_NULL -}; - /************************************* * diff --git a/src/mess/machine/compis.c b/src/mess/machine/compis.c index c5e6d705b79..60c519f4fbf 100644 --- a/src/mess/machine/compis.c +++ b/src/mess/machine/compis.c @@ -1274,20 +1274,6 @@ READ8_MEMBER( compis_state::get_slave_ack ) return 0; } -const struct pic8259_interface compis_pic8259_master_config = -{ - DEVCB_DRIVER_LINE_MEMBER(compis_state, compis_pic8259_master_set_int_line), - DEVCB_LINE_VCC, - DEVCB_DRIVER_MEMBER(compis_state, get_slave_ack) -}; - -const struct pic8259_interface compis_pic8259_slave_config = -{ - DEVCB_DRIVER_LINE_MEMBER(compis_state, compis_pic8259_slave_set_int_line), - DEVCB_LINE_GND, - DEVCB_NULL -}; - IRQ_CALLBACK_MEMBER(compis_state::compis_irq_callback) { diff --git a/src/mess/machine/genpc.c b/src/mess/machine/genpc.c index 529e6545ffe..f64545e45ac 100644 --- a/src/mess/machine/genpc.c +++ b/src/mess/machine/genpc.c @@ -191,14 +191,6 @@ WRITE_LINE_MEMBER(ibm5160_mb_device::pc_cpu_line) m_maincpu->set_input_line(INPUT_LINE_IRQ0, state); } -const struct pic8259_interface pc_pic8259_config = -{ - DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_cpu_line), - DEVCB_LINE_VCC, - DEVCB_NULL -}; - - WRITE_LINE_MEMBER(ibm5160_mb_device::pc_speaker_set_spkrdata) { m_pc_spkrdata = state ? 1 : 0; @@ -481,7 +473,7 @@ static MACHINE_CONFIG_FRAGMENT( ibm5160_mb_config ) MCFG_I8237_ADD( "dma8237", XTAL_14_31818MHz/3, pc_dma8237_config ) - MCFG_PIC8259_ADD( "pic8259", pc_pic8259_config ) + MCFG_PIC8259_ADD( "pic8259", DEVWRITELINE(DEVICE_SELF_OWNER, ibm5160_mb_device, pc_cpu_line), VCC, NULL ) MCFG_I8255A_ADD( "ppi8255", pc_ppi8255_interface ) diff --git a/src/mess/machine/irisha.c b/src/mess/machine/irisha.c index b690638ac27..d2b5341e14f 100644 --- a/src/mess/machine/irisha.c +++ b/src/mess/machine/irisha.c @@ -127,13 +127,6 @@ WRITE_LINE_MEMBER(irisha_state::irisha_pic_set_int_line) m_maincpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE); } -const struct pic8259_interface irisha_pic8259_config = -{ - DEVCB_DRIVER_LINE_MEMBER(irisha_state,irisha_pic_set_int_line), - DEVCB_LINE_VCC, - DEVCB_NULL -}; - const struct pit8253_config irisha_pit8253_intf = { { diff --git a/src/mess/machine/mbc55x.c b/src/mess/machine/mbc55x.c index 08cbd0730c7..3afcc6c5009 100644 --- a/src/mess/machine/mbc55x.c +++ b/src/mess/machine/mbc55x.c @@ -109,13 +109,6 @@ WRITE8_MEMBER( mbc55x_state::mbc55x_usart_w ) /* PIC 8259 Configuration */ -const struct pic8259_interface mbc55x_pic8259_config = -{ - DEVCB_CPU_INPUT_LINE(MAINCPU_TAG, INPUT_LINE_IRQ0), - DEVCB_LINE_VCC, - DEVCB_NULL -}; - READ8_MEMBER(mbc55x_state::mbcpic8259_r) { return m_pic->read(space, offset>>1); diff --git a/src/mess/machine/pc.c b/src/mess/machine/pc.c index cc318fd6524..cbbe5891bec 100644 --- a/src/mess/machine/pc.c +++ b/src/mess/machine/pc.c @@ -279,20 +279,6 @@ I8237_INTERFACE( ibm5150_dma8237_config ) /************************************************************* * - * pic8259 configuration - * - *************************************************************/ - -const struct pic8259_interface ibm5150_pic8259_config = -{ - DEVCB_CPU_INPUT_LINE("maincpu", 0), - DEVCB_LINE_VCC, - DEVCB_NULL -}; - - -/************************************************************* - * * PCJR pic8259 configuration * * Part of the PCJR CRT POST test at address F0452/F0454 writes @@ -325,14 +311,6 @@ WRITE_LINE_MEMBER(pc_state::pcjr_pic8259_set_int_line) } } -const struct pic8259_interface pcjr_pic8259_config = -{ - DEVCB_DRIVER_LINE_MEMBER(pc_state,pcjr_pic8259_set_int_line), - DEVCB_LINE_VCC, - DEVCB_NULL -}; - - /************************************************************************* * * PC Speaker related diff --git a/src/mess/machine/pk8020.c b/src/mess/machine/pk8020.c index fc99e312a26..17aee1160f4 100644 --- a/src/mess/machine/pk8020.c +++ b/src/mess/machine/pk8020.c @@ -946,13 +946,6 @@ WRITE_LINE_MEMBER(pk8020_state::pk8020_pic_set_int_line) m_maincpu->set_input_line(0, state ? HOLD_LINE : CLEAR_LINE); } -const struct pic8259_interface pk8020_pic8259_config = -{ - DEVCB_DRIVER_LINE_MEMBER(pk8020_state,pk8020_pic_set_int_line), - DEVCB_LINE_VCC, - DEVCB_NULL -}; - IRQ_CALLBACK_MEMBER(pk8020_state::pk8020_irq_callback) { return m_pic8259->acknowledge(); diff --git a/src/mess/machine/s100_wunderbus.c b/src/mess/machine/s100_wunderbus.c index 5e989ae4c9d..b2768ca69e1 100644 --- a/src/mess/machine/s100_wunderbus.c +++ b/src/mess/machine/s100_wunderbus.c @@ -54,13 +54,6 @@ WRITE_LINE_MEMBER( s100_wunderbus_device::pic_int_w ) m_bus->int_w(state); } -static struct pic8259_interface pic_intf = -{ - DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, s100_wunderbus_device, pic_int_w), - DEVCB_LINE_VCC, - DEVCB_NULL -}; - //------------------------------------------------- // ins8250_interface ace1_intf @@ -148,7 +141,7 @@ static UPD1990A_INTERFACE( rtc_intf ) //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( s100_wunderbus ) - MCFG_PIC8259_ADD(I8259A_TAG, pic_intf) + MCFG_PIC8259_ADD(I8259A_TAG, DEVWRITELINE(DEVICE_SELF_OWNER, s100_wunderbus_device, pic_int_w), VCC, NULL) MCFG_INS8250_ADD(INS8250_1_TAG, ace1_intf, XTAL_18_432MHz/10) MCFG_INS8250_ADD(INS8250_2_TAG, ace2_intf, XTAL_18_432MHz/10) MCFG_INS8250_ADD(INS8250_3_TAG, ace3_intf, XTAL_18_432MHz/10) diff --git a/src/mess/machine/southbridge.c b/src/mess/machine/southbridge.c index e700b5f6e95..e7fab3ef3fe 100644 --- a/src/mess/machine/southbridge.c +++ b/src/mess/machine/southbridge.c @@ -9,19 +9,6 @@ #include "machine/southbridge.h" #include "machine/pc_keyboards.h" -const struct pic8259_interface at_pic8259_master_config = -{ - DEVCB_CPU_INPUT_LINE(":maincpu", 0), - DEVCB_LINE_VCC, - DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, southbridge_device, get_slave_ack) -}; - -const struct pic8259_interface at_pic8259_slave_config = -{ - DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir2_w), - DEVCB_LINE_GND, - DEVCB_NULL -}; const struct pit8253_config at_pit8254_config = { @@ -127,8 +114,8 @@ static MACHINE_CONFIG_FRAGMENT( southbridge ) MCFG_I8237_ADD( "dma8237_1", XTAL_14_31818MHz/3, at_dma8237_1_config ) MCFG_I8237_ADD( "dma8237_2", XTAL_14_31818MHz/3, at_dma8237_2_config ) - MCFG_PIC8259_ADD( "pic8259_master", at_pic8259_master_config ) - MCFG_PIC8259_ADD( "pic8259_slave", at_pic8259_slave_config ) + MCFG_PIC8259_ADD( "pic8259_master", INPUTLINE(":maincpu", 0), VCC, DEVREAD8(DEVICE_SELF_OWNER, southbridge_device, get_slave_ack) ) + MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir2_w), GND, NULL ) MCFG_AT_KEYBOARD_CONTROLLER_ADD("keybc", XTAL_12MHz, keyboard_controller_intf) MCFG_PC_KBDC_ADD("pc_kbdc", pc_kbdc_intf) |