summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2013-02-02 22:24:47 +0000
committer Curt Coder <curtcoder@mail.com>2013-02-02 22:24:47 +0000
commit6ab6bf735ac6fab13b249ccd2bd9de22d70d1b47 (patch)
treea6a836bb0db7e9836e45b592d82b2643ec5b3abb /src/mess/machine
parente67051001fbfcfb84abf0b6d32479898ea54db46 (diff)
(MESS) Used modern accessors for i8259. (nw)
Diffstat (limited to 'src/mess/machine')
-rw-r--r--src/mess/machine/at.c6
-rw-r--r--src/mess/machine/b2m.c2
-rw-r--r--src/mess/machine/compis.c8
-rw-r--r--src/mess/machine/genpc.c20
-rw-r--r--src/mess/machine/irisha.c2
-rw-r--r--src/mess/machine/mbc55x.c8
-rw-r--r--src/mess/machine/pc.c6
-rw-r--r--src/mess/machine/pk8020.c2
-rw-r--r--src/mess/machine/s100_wunderbus.c20
-rw-r--r--src/mess/machine/southbridge.c34
10 files changed, 54 insertions, 54 deletions
diff --git a/src/mess/machine/at.c b/src/mess/machine/at.c
index b6a15c06da1..8b7c35113cf 100644
--- a/src/mess/machine/at.c
+++ b/src/mess/machine/at.c
@@ -16,7 +16,7 @@
READ8_MEMBER( at_state::get_slave_ack )
{
if (offset==2) // IRQ = 2
- return pic8259_acknowledge(m_pic8259_slave);
+ return m_pic8259_slave->inta_r();
return 0x00;
}
@@ -30,7 +30,7 @@ const struct pic8259_interface at_pic8259_master_config =
const struct pic8259_interface at_pic8259_slave_config =
{
- DEVCB_DEVICE_LINE("pic8259_master", pic8259_ir2_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir2_w),
DEVCB_LINE_GND,
DEVCB_NULL
};
@@ -352,7 +352,7 @@ DRIVER_INIT_MEMBER(at_state,atvga)
IRQ_CALLBACK_MEMBER(at_state::at_irq_callback)
{
- return pic8259_acknowledge(m_pic8259_master);
+ return m_pic8259_master->inta_r();
}
MACHINE_START_MEMBER(at_state,at)
diff --git a/src/mess/machine/b2m.c b/src/mess/machine/b2m.c
index 94f4c8f438f..5d6186a17fd 100644
--- a/src/mess/machine/b2m.c
+++ b/src/mess/machine/b2m.c
@@ -154,7 +154,7 @@ const struct pit8253_config b2m_pit8253_intf =
{
0,
DEVCB_NULL,
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir1_w)
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir1_w)
},
{
2000000,
diff --git a/src/mess/machine/compis.c b/src/mess/machine/compis.c
index 88de15f4bdc..11c97005895 100644
--- a/src/mess/machine/compis.c
+++ b/src/mess/machine/compis.c
@@ -178,8 +178,8 @@ void compis_state::fdc_irq(bool state)
{
if (m_8259m)
{
- pic8259_ir0_w(m_8259m, 1);
- pic8259_ir0_w(m_8259m, 0);
+ m_8259m->ir0_w(1);
+ m_8259m->ir0_w(0);
}
}
}
@@ -1272,7 +1272,7 @@ WRITE_LINE_MEMBER( compis_state::compis_pic8259_slave_set_int_line )
READ8_MEMBER( compis_state::get_slave_ack )
{
if (offset==2) { // IRQ = 2
- return pic8259_acknowledge(m_8259s);
+ return m_8259s->inta_r();
}
return 0;
}
@@ -1294,7 +1294,7 @@ const struct pic8259_interface compis_pic8259_slave_config =
IRQ_CALLBACK_MEMBER(compis_state::compis_irq_callback)
{
- return pic8259_acknowledge(m_8259m);
+ return m_8259m->inta_r();
}
diff --git a/src/mess/machine/genpc.c b/src/mess/machine/genpc.c
index 619be1255f1..3344980c432 100644
--- a/src/mess/machine/genpc.c
+++ b/src/mess/machine/genpc.c
@@ -237,7 +237,7 @@ const struct pit8253_config pc_pit8253_config =
{
XTAL_14_31818MHz/12, /* heartbeat IRQ */
DEVCB_NULL,
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir0_w)
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir0_w)
}, {
XTAL_14_31818MHz/12, /* dram refresh */
DEVCB_NULL,
@@ -413,7 +413,7 @@ WRITE8_MEMBER( ibm5160_mb_device::pc_ppi_portb_w )
/* If PB7 is set clear the shift register and reset the IRQ line */
if ( m_ppi_keyboard_clear )
{
- pic8259_ir1_w(m_pic8259, 0);
+ m_pic8259->ir1_w(0);
m_ppi_shift_register = 0;
m_ppi_shift_enable = 1;
}
@@ -433,12 +433,12 @@ I8255A_INTERFACE( pc_ppi8255_interface )
static const isa8bus_interface isabus_intf =
{
// interrupts
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir2_w),
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir3_w),
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir4_w),
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir5_w),
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir6_w),
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir7_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir2_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir3_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir4_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir5_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir6_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir7_w),
// dma request
DEVCB_DEVICE_LINE_MEMBER("dma8237", am9517a_device, dreq1_w),
@@ -654,7 +654,7 @@ void ibm5160_mb_device::device_start()
IRQ_CALLBACK_MEMBER(ibm5160_mb_device::pc_irq_callback)
{
- return pic8259_acknowledge(m_pic8259);
+ return m_pic8259->inta_r();
}
@@ -874,7 +874,7 @@ WRITE8_MEMBER( ibm5150_mb_device::pc_ppi_portb_w )
/* If PB7 is set clear the shift register and reset the IRQ line */
if ( m_ppi_keyboard_clear )
{
- pic8259_ir1_w(m_pic8259, 0);
+ m_pic8259->ir1_w(0);
m_ppi_shift_register = 0;
m_ppi_shift_enable = 1;
}
diff --git a/src/mess/machine/irisha.c b/src/mess/machine/irisha.c
index be3911df253..964b37d19b0 100644
--- a/src/mess/machine/irisha.c
+++ b/src/mess/machine/irisha.c
@@ -135,7 +135,7 @@ const struct pit8253_config irisha_pit8253_intf =
{
XTAL_16MHz / 9,
DEVCB_LINE_VCC,
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir0_w)
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir0_w)
},
{
XTAL_16MHz / 9 / 8 / 8,
diff --git a/src/mess/machine/mbc55x.c b/src/mess/machine/mbc55x.c
index 05376e01cc0..1a0314ca3d6 100644
--- a/src/mess/machine/mbc55x.c
+++ b/src/mess/machine/mbc55x.c
@@ -128,7 +128,7 @@ WRITE8_MEMBER(mbc55x_state::mbcpic8259_w)
IRQ_CALLBACK_MEMBER(mbc55x_state::mbc55x_irq_callback)
{
- return pic8259_acknowledge(m_pic);
+ return m_pic->inta_r();
}
/* PIT8253 Configuration */
@@ -139,12 +139,12 @@ const struct pit8253_config mbc55x_pit8253_config =
{
PIT_C0_CLOCK,
DEVCB_NULL,
- DEVCB_DEVICE_LINE(PIC8259_TAG, pic8259_ir0_w)
+ DEVCB_DEVICE_LINE_MEMBER(PIC8259_TAG, pic8259_device, ir0_w)
},
{
PIT_C1_CLOCK,
DEVCB_NULL,
- DEVCB_DEVICE_LINE(PIC8259_TAG, pic8259_ir1_w)
+ DEVCB_DEVICE_LINE_MEMBER(PIC8259_TAG, pic8259_device, ir1_w)
},
{
PIT_C2_CLOCK,
@@ -298,7 +298,7 @@ const i8251_interface mbc55x_i8251a_interface =
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
- DEVCB_DEVICE_LINE(PIC8259_TAG, pic8259_ir3_w),
+ DEVCB_DEVICE_LINE_MEMBER(PIC8259_TAG, pic8259_device, ir3_w),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
diff --git a/src/mess/machine/pc.c b/src/mess/machine/pc.c
index e8b792698dc..bbebbcd848b 100644
--- a/src/mess/machine/pc.c
+++ b/src/mess/machine/pc.c
@@ -397,7 +397,7 @@ const struct pit8253_config ibm5150_pit8253_config =
{
XTAL_14_31818MHz/12, /* heartbeat IRQ */
DEVCB_NULL,
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir0_w)
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir0_w)
}, {
XTAL_14_31818MHz/12, /* dram refresh */
DEVCB_NULL,
@@ -423,7 +423,7 @@ const struct pit8253_config pcjr_pit8253_config =
{
XTAL_14_31818MHz/12, /* heartbeat IRQ */
DEVCB_NULL,
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir0_w)
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir0_w)
}, {
XTAL_14_31818MHz/12, /* dram refresh */
DEVCB_NULL,
@@ -444,7 +444,7 @@ const struct pit8253_config mc1502_pit8253_config =
{
XTAL_16MHz/12, /* heartbeat IRQ */
DEVCB_NULL,
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir0_w)
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir0_w)
}, {
XTAL_16MHz/12, /* serial port */
DEVCB_NULL,
diff --git a/src/mess/machine/pk8020.c b/src/mess/machine/pk8020.c
index c5e784fe2ca..f633f312f00 100644
--- a/src/mess/machine/pk8020.c
+++ b/src/mess/machine/pk8020.c
@@ -967,7 +967,7 @@ const struct pit8253_config pk8020_pit8253_intf =
{
(XTAL_20MHz / 8) / 164,
DEVCB_NULL,
- DEVCB_DEVICE_LINE("pic8259", pic8259_ir5_w)
+ DEVCB_DEVICE_LINE_MEMBER("pic8259", pic8259_device, ir5_w)
}
}
};
diff --git a/src/mess/machine/s100_wunderbus.c b/src/mess/machine/s100_wunderbus.c
index 93452f92278..9b29585e83a 100644
--- a/src/mess/machine/s100_wunderbus.c
+++ b/src/mess/machine/s100_wunderbus.c
@@ -86,7 +86,7 @@ static ins8250_interface ace1_intf =
{
DEVCB_NULL,
DEVCB_NULL,
- DEVCB_DEVICE_LINE(I8259A_TAG, pic8259_ir3_w),
+ DEVCB_DEVICE_LINE_MEMBER(I8259A_TAG, pic8259_device, ir3_w),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
@@ -101,7 +101,7 @@ static ins8250_interface ace2_intf =
{
DEVCB_NULL,
DEVCB_NULL,
- DEVCB_DEVICE_LINE(I8259A_TAG, pic8259_ir4_w),
+ DEVCB_DEVICE_LINE_MEMBER(I8259A_TAG, pic8259_device, ir4_w),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
@@ -116,7 +116,7 @@ static ins8250_interface ace3_intf =
{
DEVCB_NULL,
DEVCB_NULL,
- DEVCB_DEVICE_LINE(I8259A_TAG, pic8259_ir5_w),
+ DEVCB_DEVICE_LINE_MEMBER(I8259A_TAG, pic8259_device, ir5_w),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
@@ -132,7 +132,7 @@ WRITE_LINE_MEMBER( s100_wunderbus_device::rtc_tp_w )
if (state)
{
m_rtc_tp = state;
- pic8259_ir7_w(m_pic, m_rtc_tp);
+ m_pic->ir7_w(m_rtc_tp);
}
}
@@ -301,7 +301,7 @@ void s100_wunderbus_device::device_reset()
void s100_wunderbus_device::s100_vi0_w(int state)
{
- pic8259_ir0_w(m_pic, state);
+ m_pic->ir0_w(state);
}
@@ -311,7 +311,7 @@ void s100_wunderbus_device::s100_vi0_w(int state)
void s100_wunderbus_device::s100_vi1_w(int state)
{
- pic8259_ir1_w(m_pic, state);
+ m_pic->ir1_w(state);
}
@@ -321,7 +321,7 @@ void s100_wunderbus_device::s100_vi1_w(int state)
void s100_wunderbus_device::s100_vi2_w(int state)
{
- pic8259_ir2_w(m_pic, state);
+ m_pic->ir2_w(state);
}
@@ -400,7 +400,7 @@ UINT8 s100_wunderbus_device::s100_sinp_r(address_space &space, offs_t offset)
// reset clock interrupt
m_rtc_tp = 0;
- pic8259_ir7_w(m_pic, m_rtc_tp);
+ m_pic->ir7_w(m_rtc_tp);
break;
case 3: // Parallel data IN
@@ -408,7 +408,7 @@ UINT8 s100_wunderbus_device::s100_sinp_r(address_space &space, offs_t offset)
case 4: // 8259 0 register
case 5: // 8259 1 register
- data = pic8259_r(m_pic, space, offset & 0x01);
+ data = m_pic->read(space, offset & 0x01);
break;
case 6: // not used
@@ -517,7 +517,7 @@ void s100_wunderbus_device::s100_sout_w(address_space &space, offs_t offset, UIN
case 4: // 8259 0 register
case 5: // 8259 1 register
- pic8259_w(m_pic, space, offset & 0x01, data);
+ m_pic->write(space, offset & 0x01, data);
break;
case 6: // Par. port cntrl.
diff --git a/src/mess/machine/southbridge.c b/src/mess/machine/southbridge.c
index 8a429a781f5..bccd53e7686 100644
--- a/src/mess/machine/southbridge.c
+++ b/src/mess/machine/southbridge.c
@@ -19,7 +19,7 @@ const struct pic8259_interface at_pic8259_master_config =
const struct pic8259_interface at_pic8259_slave_config =
{
- DEVCB_DEVICE_LINE("pic8259_master", pic8259_ir2_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir2_w),
DEVCB_LINE_GND,
DEVCB_NULL
};
@@ -75,7 +75,7 @@ static const at_keyboard_controller_interface keyboard_controller_intf =
{
DEVCB_CPU_INPUT_LINE(":maincpu", INPUT_LINE_RESET),
DEVCB_CPU_INPUT_LINE(":maincpu", INPUT_LINE_A20),
- DEVCB_DEVICE_LINE("pic8259_master", pic8259_ir1_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir1_w),
DEVCB_NULL,
DEVCB_DEVICE_LINE_MEMBER("pc_kbdc", pc_kbdc_device, clock_write_from_mb),
DEVCB_DEVICE_LINE_MEMBER("pc_kbdc", pc_kbdc_device, data_write_from_mb)
@@ -90,18 +90,18 @@ static const pc_kbdc_interface pc_kbdc_intf =
static const isa16bus_interface isabus_intf =
{
// interrupts
- DEVCB_DEVICE_LINE("pic8259_slave", pic8259_ir2_w), // in place of irq 2 on at irq 9 is used
- DEVCB_DEVICE_LINE("pic8259_master", pic8259_ir3_w),
- DEVCB_DEVICE_LINE("pic8259_master", pic8259_ir4_w),
- DEVCB_DEVICE_LINE("pic8259_master", pic8259_ir5_w),
- DEVCB_DEVICE_LINE("pic8259_master", pic8259_ir6_w),
- DEVCB_DEVICE_LINE("pic8259_master", pic8259_ir7_w),
-
- DEVCB_DEVICE_LINE("pic8259_slave", pic8259_ir3_w),
- DEVCB_DEVICE_LINE("pic8259_slave", pic8259_ir4_w),
- DEVCB_DEVICE_LINE("pic8259_slave", pic8259_ir5_w),
- DEVCB_DEVICE_LINE("pic8259_slave", pic8259_ir6_w),
- DEVCB_DEVICE_LINE("pic8259_slave", pic8259_ir7_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_slave", pic8259_device, ir2_w), // in place of irq 2 on at irq 9 is used
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir3_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir4_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir5_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir6_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_master", pic8259_device, ir7_w),
+
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_slave", pic8259_device, ir3_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_slave", pic8259_device, ir4_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_slave", pic8259_device, ir5_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_slave", pic8259_device, ir6_w),
+ DEVCB_DEVICE_LINE_MEMBER("pic8259_slave", pic8259_device, ir7_w),
// dma request
DEVCB_DEVICE_LINE("dma8237_1", i8237_dreq0_w),
@@ -183,7 +183,7 @@ southbridge_device::southbridge_device(const machine_config &mconfig, device_typ
IRQ_CALLBACK_MEMBER(southbridge_device::at_irq_callback)
{
- return pic8259_acknowledge(m_pic8259_master);
+ return m_pic8259_master->inta_r();
}
//-------------------------------------------------
@@ -232,7 +232,7 @@ void southbridge_device::device_reset()
READ8_MEMBER( southbridge_device::get_slave_ack )
{
if (offset==2) // IRQ = 2
- return pic8259_acknowledge(m_pic8259_slave);
+ return m_pic8259_slave->inta_r();
return 0x00;
}
@@ -266,7 +266,7 @@ void southbridge_device::at_speaker_set_input(UINT8 data)
WRITE_LINE_MEMBER( southbridge_device::at_pit8254_out0_changed )
{
if (m_pic8259_master)
- pic8259_ir0_w(m_pic8259_master, state);
+ m_pic8259_master->ir0_w(state);
}