removed some unnecessary 6821 readca1_handler/readca2_handler/readcb1_handler hookups [smf]

This commit is contained in:
smf- 2022-05-17 13:28:41 +01:00
parent 0d57bab2e4
commit 1158318356
31 changed files with 70 additions and 368 deletions

View File

@ -99,8 +99,7 @@ void bbc_cumana68k_device::device_add_mconfig(machine_config &config)
m_pia_sasi->readpa_handler().set(m_sasi, FUNC(nscsi_callback_device::read));
m_pia_sasi->writepa_handler().set(m_sasi, FUNC(nscsi_callback_device::write));
m_pia_sasi->writepb_handler().set(FUNC(bbc_cumana68k_device::pia_sasi_pb_w));
m_pia_sasi->readca1_handler().set(m_sasi, FUNC(nscsi_callback_device::req_r));
m_pia_sasi->readcb1_handler().set_constant(1); // tied to +5V
m_pia_sasi->cb1_w(1); // tied to +5V
m_pia_sasi->ca2_handler().set(m_sasi, FUNC(nscsi_callback_device::ack_w));
m_pia_sasi->cb2_handler().set(m_sasi, FUNC(nscsi_callback_device::rst_w));
m_pia_sasi->irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>));

View File

@ -36,7 +36,6 @@ protected:
private:
void pia_b_w(uint8_t data);
uint8_t pia_cb1_r();
DECLARE_WRITE_LINE_MEMBER(pia_irq_b);
TIMER_CALLBACK_MEMBER(mpt_timer_callback);
DECLARE_WRITE_LINE_MEMBER(pia_irqa_w);
@ -83,7 +82,7 @@ void ss50_mpt_device::device_add_mconfig(machine_config &config)
{
PIA6821(config, m_pia, 0);
m_pia->writepb_handler().set(FUNC(ss50_mpt_device::pia_b_w));
m_pia->readcb1_handler().set(FUNC(ss50_mpt_device::pia_cb1_r));
m_pia->cb1_w(0);
m_pia->irqa_handler().set(FUNC(ss50_mpt_device::pia_irqa_w));
m_pia->irqb_handler().set(FUNC(ss50_mpt_device::pia_irqb_w));
}
@ -171,11 +170,6 @@ void ss50_mpt_device::pia_b_w(uint8_t data)
m_mpt_timer->enable(true);
}
uint8_t ss50_mpt_device::pia_cb1_r()
{
return m_mpt_timer_state;
}
TIMER_CALLBACK_MEMBER(ss50_mpt_device::mpt_timer_callback)
{
m_mpt_timer_state = !m_mpt_timer_state;

View File

@ -54,7 +54,7 @@ pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, d
m_cb2_handler(*this),
m_irqa_handler(*this),
m_irqb_handler(*this), m_in_a(0),
m_in_ca1(0), m_in_ca2(0), m_out_a(0), m_a_input_overrides_output_mask(0), m_out_ca2(0), m_ddr_a(0),
m_in_ca1(true), m_in_ca2(true), m_out_a(0), m_a_input_overrides_output_mask(0), m_out_ca2(0), m_ddr_a(0),
m_ctl_a(0), m_irq_a1(false), m_irq_a2(false),
m_irq_a_state(0), m_in_b(0),
m_in_cb1(0), m_in_cb2(0), m_out_b(0), m_out_cb2(0), m_last_out_cb2_z(0), m_ddr_b(0),
@ -100,19 +100,11 @@ void pia6821_device::device_start()
{
m_in_a = 0xff;
m_in_b = 0;
m_in_ca1 = true;
m_in_ca2 = true;
m_in_cb1 = 0;
m_in_cb2 = 0;
m_in_a_pushed = false;
m_out_a_needs_pulled = false;
m_in_ca1_pushed = false;
m_in_ca2_pushed = false;
m_out_ca2_needs_pulled = false;
m_in_b_pushed = false;
m_out_b_needs_pulled = false;
m_in_cb1_pushed = false;
m_in_cb2_pushed = false;
m_out_cb2_needs_pulled = false;
m_logged_port_a_not_connected = false;
m_logged_port_b_not_connected = false;

View File

@ -334,11 +334,6 @@ void exorterm155_device::pia_disp_pb_w(u8 data)
m_rs232_conn_dtr_handler(BIT(data, 7));
}
READ_LINE_MEMBER(exorterm155_device::pia_disp_ca2_r)
{
return m_ring;
}
//**************************************************************************
// VIDEO EMULATION
//**************************************************************************
@ -582,7 +577,7 @@ WRITE_LINE_MEMBER(exorterm155_device::rs232_conn_dsr_w)
WRITE_LINE_MEMBER(exorterm155_device::rs232_conn_ri_w)
{
m_ring = state;
m_pia_disp->ca2_w(state);
}
WRITE_LINE_MEMBER(exorterm155_device::rs232_conn_cts_w)
@ -757,7 +752,6 @@ void exorterm155_device::device_start()
save_item(NAME(m_sys_timer_count));
save_item(NAME(m_dsr));
save_item(NAME(m_ring));
save_item(NAME(m_kbd_start_holdoff));
// Keyboard
@ -774,7 +768,6 @@ void exorterm155_device::device_start()
save_item(NAME(m_kbd_last_modifiers));
m_dsr = 1;
m_ring = 0;
}
void exorterm155_device::device_reset()
@ -877,7 +870,7 @@ void exorterm155_device::device_add_mconfig(machine_config &config)
m_pia_disp->writepa_handler().set(FUNC(exorterm155_device::pia_disp_pa_w));
m_pia_disp->readpb_handler().set(FUNC(exorterm155_device::pia_disp_pb_r));
m_pia_disp->writepb_handler().set(FUNC(exorterm155_device::pia_disp_pb_w));
m_pia_disp->readca2_handler().set(FUNC(exorterm155_device::pia_disp_ca2_r));
m_pia_disp->ca2_w(0);
m_pia_disp->irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<5>));
m_pia_disp->irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<6>));

View File

@ -92,7 +92,6 @@ private:
DECLARE_WRITE_LINE_MEMBER(write_f13_clock);
u8 m_dsr;
u8 m_ring;
devcb_write_line m_rs232_conn_txd_handler;
devcb_write_line m_rs232_conn_dtr_handler;
@ -117,7 +116,6 @@ private:
u8 pia_disp_pb_r();
void pia_disp_pa_w(u8 data);
void pia_disp_pb_w(u8 data);
DECLARE_READ_LINE_MEMBER(pia_disp_ca2_r);
u8 m_kbd_start_holdoff;

View File

@ -86,7 +86,6 @@ void m68sfdc_device::device_start()
save_item(NAME(m_head_load));
save_item(NAME(m_crc));
save_item(NAME(m_last_crc));
save_item(NAME(m_pia_ca1));
save_item(NAME(m_pia_cb2));
save_item(NAME(m_reset));
save_item(NAME(m_enable_drive_write));
@ -114,7 +113,6 @@ void m68sfdc_device::device_reset()
m_head_load = 0;
m_crc = 0;
m_last_crc = 0;
m_pia_ca1 = 0;
m_pia_cb2 = 0;
m_reset = 1;
m_enable_drive_write = 0;
@ -170,7 +168,6 @@ void m68sfdc_device::device_timer(emu_timer &timer, device_timer_id id, int para
{
live_sync();
m_pia->ca1_w(0);
m_pia_ca1 = 0;
break;
}
case TM_GEN:
@ -386,11 +383,6 @@ void m68sfdc_device::pia_pa_w(u8 data)
}
}
int m68sfdc_device::pia_ca1_r()
{
return m_pia_ca1;
}
void m68sfdc_device::pia_ca2_w(int state)
{
if (m_floppy)
@ -493,7 +485,6 @@ void m68sfdc_device::pia_cb2_w(int state)
{
// Trigger the timeout timer on a high to low transition of CB2
m_pia->ca1_w(1);
m_pia_ca1 = 1;
m_timer_timeout->reset(attotime::from_msec(800));
}
m_pia_cb2 = state;
@ -854,7 +845,7 @@ void m68sfdc_device::device_add_mconfig(machine_config &config)
PIA6821(config, m_pia, 0);
m_pia->readpa_handler().set(FUNC(m68sfdc_device::pia_pa_r));
m_pia->writepa_handler().set(FUNC(m68sfdc_device::pia_pa_w));
m_pia->readca1_handler().set(FUNC(m68sfdc_device::pia_ca1_r));
m_pia->ca1_w(0);
m_pia->ca2_handler().set(FUNC(m68sfdc_device::pia_ca2_w));
m_pia->readpb_handler().set(FUNC(m68sfdc_device::pia_pb_r));
m_pia->writepb_handler().set(FUNC(m68sfdc_device::pia_pb_w));

View File

@ -43,7 +43,6 @@ private:
uint8_t flip_bits(uint8_t data);
uint8_t pia_pa_r();
void pia_pa_w(u8 data);
int pia_ca1_r();
void pia_ca2_w(int state);
uint8_t pia_pb_r();
void pia_pb_w(u8 data);
@ -60,7 +59,6 @@ private:
u8 m_head_load;
u8 m_crc;
u8 m_last_crc;
u8 m_pia_ca1;
u8 m_pia_cb2;
u8 m_reset;
u8 m_enable_drive_write;

View File

@ -271,12 +271,6 @@ void swtpc8212_device::pia1_pa_w(uint8_t data)
m_printer_data = data;
}
int swtpc8212_device::pia1_ca1_r()
{
// External parallel printer busy input.
return 0;
}
void swtpc8212_device::pia1_ca2_w(int state)
{
// External parallel printer data ready.
@ -538,7 +532,7 @@ void swtpc8212_device::device_add_mconfig(machine_config &config)
// CB2 - Handshake output?
PIA6821(config, m_pia1);
m_pia1->writepa_handler().set(FUNC(swtpc8212_device::pia1_pa_w));
m_pia1->readca1_handler().set(FUNC(swtpc8212_device::pia1_ca1_r));
m_pia1->ca1_w(0); // External parallel printer busy input.
m_pia1->ca2_handler().set(FUNC(swtpc8212_device::pia1_ca2_w));
m_pia1->readpb_handler().set_ioport("DIP_SWITCHES");

View File

@ -82,7 +82,6 @@ private:
void pia0_ca2_w(int state);
void pia1_pa_w(uint8_t data);
int pia1_ca1_r();
void pia1_ca2_w(int state);
uint8_t m_keyboard_data;

View File

@ -373,7 +373,7 @@ void alfaskop4110_state::alfaskop4110(machine_config &config)
m_screen->set_screen_update("crtc", FUNC(mc6845_device::screen_update));
PIA6821(config, m_mic_pia, 0); // Main board PIA
m_mic_pia->readcb1_handler().set([this](offs_t offset) -> uint8_t { LOGMIC("<-MIC PIA: CB1 read\n"); return 0;});
m_mic_pia->cb1_w(0);
m_mic_pia->cb2_handler().set([this](offs_t offset, uint8_t data) { LOGMIC("->MIC PIA: CB2 write %d\n", data); });
/*
@ -431,18 +431,18 @@ void alfaskop4110_state::alfaskop4110(machine_config &config)
return 0;
});
m_mic_pia->readpb_handler().set([this](offs_t offset) -> uint8_t { LOGMIC("<-MIC PIA: Port B read\n"); return 0;});
m_mic_pia->readca1_handler().set([this](offs_t offset) -> uint8_t { LOGMIC("<-MIC PIA: CA1 read\n"); return 0;});
m_mic_pia->readca2_handler().set([this](offs_t offset) -> uint8_t { LOGMIC("<-MIC PIA: CA2 read\n"); return 0;});
m_mic_pia->ca1_w(0);
m_mic_pia->ca2_w(0);
PIA6821(config, m_dia_pia, 0); // Display PIA, controls how the CRTC accesses memory etc
m_dia_pia->readcb1_handler().set([this](offs_t offset) -> uint8_t { LOGDIA("DIA PIA: CB1_r\n"); return 0;});
m_dia_pia->cb1_w(0);
m_dia_pia->cb2_handler().set([this](offs_t offset, uint8_t data) { LOGDIA("DIA PIA: CB2_w %d\n", data); });
m_dia_pia->writepa_handler().set([this](offs_t offset, uint8_t data) { LOGDIA("DIA PIA: PA_w %02x\n", data); });
m_dia_pia->writepb_handler().set([this](offs_t offset, uint8_t data) { LOGDIA("DIA PIA: PB_w %02x\n", data); });
m_dia_pia->readpa_handler().set([this](offs_t offset) -> uint8_t { LOGDIA("DIA PIA: PA_r\n"); return 0;});
m_dia_pia->readpb_handler().set([this](offs_t offset) -> uint8_t { LOGDIA("DIA PIA: PB_r\n"); return 0;});
m_dia_pia->readca1_handler().set([this](offs_t offset) -> uint8_t { LOGDIA("DIA PIA: CA1_r\n"); return 0;});
m_dia_pia->readca2_handler().set([this](offs_t offset) -> uint8_t { LOGDIA("DIA PIA: CA2_r\n"); return 0;});
m_dia_pia->ca1_w(0);
m_dia_pia->ca2_w(0);
ACIA6850(config, m_kbd_acia, 0);
//CLOCK(config, "acia_clock", ACIA_CLOCK).signal_handler().set(FUNC(alfaskop4110_state::write_acia_clock));

View File

@ -183,7 +183,6 @@ private:
DECLARE_WRITE_LINE_MEMBER( pia_u4_pcb_w );
uint8_t pia_u17_pa_r();
DECLARE_READ_LINE_MEMBER( pia_u17_pca_r );
void pia_u17_pb_w(uint8_t data);
DECLARE_WRITE_LINE_MEMBER( pia_u17_pcb_w );
@ -434,15 +433,6 @@ uint8_t arachnid_state::pia_u17_pa_r()
return data;
}
READ_LINE_MEMBER( arachnid_state::pia_u17_pca_r )
{
// CA1 - 1000 HZ Input
uint8_t data = 1;
return data;
}
void arachnid_state::pia_u4_pa_w(uint8_t data)
{
// PA0 thru PA7 Pulses to Switch Matrix Part I
@ -521,7 +511,7 @@ void arachnid_state::arachnid(machine_config &config)
PIA6821(config, m_pia_u17, 0);
m_pia_u17->readpa_handler().set(FUNC(arachnid_state::pia_u17_pa_r));
m_pia_u17->readca1_handler().set(FUNC(arachnid_state::pia_u17_pca_r));
m_pia_u17->ca1_w(1); // CA1 - 1000 HZ Input
m_pia_u17->writepb_handler().set(FUNC(arachnid_state::pia_u17_pb_w));
m_pia_u17->cb2_handler().set(FUNC(arachnid_state::pia_u17_pcb_w));

View File

@ -94,9 +94,7 @@ private:
uint8_t m_u11a = 0U;
uint8_t m_u11b = 0U;
bool m_u10_ca2 = false;
bool m_u10_cb1 = false;
bool m_u10_cb2 = false;
bool m_u11_ca1 = false;
bool m_u11_cb2 = false;
uint8_t m_segment[6]{};
uint8_t m_lamp_decode = 0U;
@ -132,11 +130,8 @@ private:
uint8_t nibble_nvram_r(offs_t offset);
void nibble_nvram_w(offs_t offset, uint8_t data);
DECLARE_READ_LINE_MEMBER(u10_ca1_r);
DECLARE_READ_LINE_MEMBER(u10_cb1_r);
DECLARE_WRITE_LINE_MEMBER(u10_ca2_w);
DECLARE_WRITE_LINE_MEMBER(u10_cb2_w);
DECLARE_READ_LINE_MEMBER(u11_ca1_r);
DECLARE_READ_LINE_MEMBER(u11_cb1_r);
DECLARE_WRITE_LINE_MEMBER(u11_cb2_w);
TIMER_DEVICE_CALLBACK_MEMBER(timer_z_freq);
@ -561,10 +556,6 @@ READ_LINE_MEMBER( by17_state::u10_ca1_r )
{
return m_io_test->read() & 0x01;
}
READ_LINE_MEMBER( by17_state::u10_cb1_r )
{
return m_u10_cb1;
}
WRITE_LINE_MEMBER( by17_state::u10_ca2_w )
{
@ -595,17 +586,6 @@ WRITE_LINE_MEMBER( by17_state::u10_cb2_w )
m_u10_cb2 = state;
}
READ_LINE_MEMBER( by17_state::u11_ca1_r )
{
return m_u11_ca1;
}
READ_LINE_MEMBER( by17_state::u11_cb1_r )
{
/* Pin 32 on MPU J5 AID connector tied low */
return 0;
}
WRITE_LINE_MEMBER( by17_state::u11_cb2_w )
{
m_u11_cb2 = state;
@ -825,8 +805,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_z_freq )
m_zero_crossing_active_timer->adjust(attotime::from_usec(700));
m_u10_cb1 = true;
m_pia_u10->cb1_w(m_u10_cb1);
m_pia_u10->cb1_w(true);
/*** Zero Crossing - power to all Lamp SCRs is cut off and reset ***/
@ -837,8 +816,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_z_pulse )
{
/*** Line Power to DC Zero Crossing has ended ***/
m_u10_cb1 = false;
m_pia_u10->cb1_w(m_u10_cb1);
m_pia_u10->cb1_w(false);
}
// 555 timer for display refresh
@ -853,14 +831,12 @@ TIMER_DEVICE_CALLBACK_MEMBER( by17_state::u11_timer )
m_display_refresh_timer->adjust(attotime::from_usec(2850));
m_u11_ca1 = true;
m_pia_u11->ca1_w(m_u11_ca1);
m_pia_u11->ca1_w(true);
}
TIMER_DEVICE_CALLBACK_MEMBER( by17_state::timer_d_pulse )
{
m_u11_ca1 = false;
m_pia_u11->ca1_w(m_u11_ca1);
m_pia_u11->ca1_w(false);
}
@ -992,9 +968,7 @@ void by17_state::machine_start()
save_item(NAME(m_u11a));
save_item(NAME(m_u11b));
save_item(NAME(m_u10_ca2));
save_item(NAME(m_u10_cb1));
save_item(NAME(m_u10_cb2));
save_item(NAME(m_u11_ca1));
save_item(NAME(m_u11_cb2));
save_item(NAME(m_segment));
save_item(NAME(m_lamp_decode));
@ -1038,7 +1012,7 @@ void by17_state::by17(machine_config &config)
m_pia_u10->readpb_handler().set(FUNC(by17_state::u10_b_r));
m_pia_u10->writepb_handler().set(FUNC(by17_state::u10_b_w));
m_pia_u10->readca1_handler().set(FUNC(by17_state::u10_ca1_r));
m_pia_u10->readcb1_handler().set(FUNC(by17_state::u10_cb1_r));
m_pia_u10->cb1_w(false);
m_pia_u10->ca2_handler().set(FUNC(by17_state::u10_ca2_w));
m_pia_u10->cb2_handler().set(FUNC(by17_state::u10_cb2_w));
m_pia_u10->irqa_handler().set_inputline(m_maincpu, M6800_IRQ_LINE);
@ -1050,8 +1024,8 @@ void by17_state::by17(machine_config &config)
m_pia_u11->readpa_handler().set(FUNC(by17_state::u11_a_r));
m_pia_u11->writepa_handler().set(FUNC(by17_state::u11_a_w));
m_pia_u11->writepb_handler().set(FUNC(by17_state::u11_b_w));
m_pia_u11->readca1_handler().set(FUNC(by17_state::u11_ca1_r));
m_pia_u11->readcb1_handler().set(FUNC(by17_state::u11_cb1_r));
m_pia_u11->ca1_w(false);
m_pia_u11->cb1_w(0); /* Pin 32 on MPU J5 AID connector tied low */
m_pia_u11->ca2_handler().set_output("led0");
m_pia_u11->cb2_handler().set(FUNC(by17_state::u11_cb2_w));
m_pia_u11->irqa_handler().set_inputline(m_maincpu, M6800_IRQ_LINE);

View File

@ -216,11 +216,8 @@ protected:
uint8_t nibble_nvram_r(offs_t offset);
void nibble_nvram_w(offs_t offset, uint8_t data);
DECLARE_READ_LINE_MEMBER(u10_ca1_r);
DECLARE_READ_LINE_MEMBER(u10_cb1_r);
DECLARE_WRITE_LINE_MEMBER(u10_ca2_w);
DECLARE_WRITE_LINE_MEMBER(u10_cb2_w);
DECLARE_READ_LINE_MEMBER(u11_ca1_r);
DECLARE_READ_LINE_MEMBER(u11_cb1_r);
DECLARE_WRITE_LINE_MEMBER(u11_cb2_w);
virtual void machine_start() override;
virtual void machine_reset() override;
@ -241,9 +238,7 @@ protected:
private:
bool m_u10_ca2 = false;
bool m_u10_cb1 = false;
bool m_u10_cb2 = false;
bool m_u11_ca1 = false;
bool m_u11_cb2 = false;
bool m_7d = false;
uint8_t m_segment[6]{};
@ -1095,10 +1090,6 @@ READ_LINE_MEMBER( by35_state::u10_ca1_r )
{
return m_io_test->read() & 0x01;
}
READ_LINE_MEMBER( by35_state::u10_cb1_r )
{
return m_u10_cb1;
}
WRITE_LINE_MEMBER( by35_state::u10_ca2_w )
{
@ -1129,17 +1120,6 @@ WRITE_LINE_MEMBER( by35_state::u10_cb2_w )
m_u10_cb2 = state;
}
READ_LINE_MEMBER( by35_state::u11_ca1_r )
{
return m_u11_ca1;
}
READ_LINE_MEMBER( by35_state::u11_cb1_r )
{
/* Pin 32 on MPU J5 AID connector tied low */
return 0;
}
WRITE_LINE_MEMBER( by35_state::u11_cb2_w )
{
// Handle sound
@ -1383,8 +1363,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_z_freq )
m_zero_crossing_active_timer->adjust(attotime::from_usec(700));
m_u10_cb1 = true;
m_pia_u10->cb1_w(m_u10_cb1);
m_pia_u10->cb1_w(true);
/*** Zero Crossing - power to all Lamp SCRs is cut off and reset ***/
@ -1394,8 +1373,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_z_pulse )
{
/*** Line Power to DC Zero Crossing has ended ***/
m_u10_cb1 = false;
m_pia_u10->cb1_w(m_u10_cb1);
m_pia_u10->cb1_w(false);
}
// 555 timer for display refresh
@ -1410,14 +1388,12 @@ TIMER_DEVICE_CALLBACK_MEMBER( by35_state::u11_timer )
m_display_refresh_timer->adjust(attotime::from_usec(2850));
m_u11_ca1 = true;
m_pia_u11->ca1_w(m_u11_ca1);
m_pia_u11->ca1_w(true);
}
TIMER_DEVICE_CALLBACK_MEMBER( by35_state::timer_d_pulse )
{
m_u11_ca1 = false;
m_pia_u11->ca1_w(m_u11_ca1);
m_pia_u11->ca1_w(false);
}
by35_state::solenoid_feature_data const by35_state::s_solenoid_features_default =
@ -1492,9 +1468,7 @@ void by35_state::machine_start()
save_item(NAME(m_u11a));
save_item(NAME(m_u11b));
save_item(NAME(m_u10_ca2));
save_item(NAME(m_u10_cb1));
save_item(NAME(m_u10_cb2));
save_item(NAME(m_u11_ca1));
save_item(NAME(m_u11_cb2));
save_item(NAME(m_7d));
save_item(NAME(m_segment));
@ -1536,7 +1510,7 @@ void by35_state::by35(machine_config &config)
m_pia_u10->readpb_handler().set(FUNC(by35_state::u10_b_r));
m_pia_u10->writepb_handler().set(FUNC(by35_state::u10_b_w));
m_pia_u10->readca1_handler().set(FUNC(by35_state::u10_ca1_r));
m_pia_u10->readcb1_handler().set(FUNC(by35_state::u10_cb1_r));
m_pia_u10->cb1_w(false);
m_pia_u10->ca2_handler().set(FUNC(by35_state::u10_ca2_w));
m_pia_u10->cb2_handler().set(FUNC(by35_state::u10_cb2_w));
m_pia_u10->irqa_handler().set_inputline(m_maincpu, M6800_IRQ_LINE);
@ -1548,8 +1522,8 @@ void by35_state::by35(machine_config &config)
m_pia_u11->readpa_handler().set(FUNC(by35_state::u11_a_r));
m_pia_u11->writepa_handler().set(FUNC(by35_state::u11_a_w));
m_pia_u11->writepb_handler().set(FUNC(by35_state::u11_b_w));
m_pia_u11->readca1_handler().set(FUNC(by35_state::u11_ca1_r));
m_pia_u11->readcb1_handler().set(FUNC(by35_state::u11_cb1_r));
m_pia_u11->ca1_w(false);
m_pia_u11->cb1_w(0); /* Pin 32 on MPU J5 AID connector tied low */
m_pia_u11->ca2_handler().set_output("led0");
m_pia_u11->cb2_handler().set(FUNC(by35_state::u11_cb2_w));
m_pia_u11->irqa_handler().set_inputline(m_maincpu, M6800_IRQ_LINE);

View File

@ -890,44 +890,29 @@ TIMER_DEVICE_CALLBACK_MEMBER( calomega_state::timer_2 )
// logerror("Timer_2 event : state=%d\n", m_timer);
}
READ_LINE_MEMBER(calomega_state::timer_r)
{
// logerror("timer_1 read : state=%d\n", m_timer);
return m_timer;
}
WRITE_LINE_MEMBER(calomega_state::vblank0_w)
{
m_vblank = state;
m_pia[0]->read(0);
m_pia[0]->read(0);
m_pia[1]->cb1_w(state);
// m_pia[1]->read(3); // CRB
// logerror("V_BLANK_0 event : state=%d\n", m_vblank);
// logerror("V_BLANK_0 event : state=%d\n", state);
}
WRITE_LINE_MEMBER(calomega_state::vblank1_w)
{
m_vblank = state;
m_pia[0]->read(2);
m_pia[0]->cb1_w(state);
// logerror("V_BLANK_1 event (sale ): state=%d\n", m_vblank);
// logerror("V_BLANK_1 event (sale ): state=%d\n", state);
}
WRITE_LINE_MEMBER(calomega_state::vblank2_w)
{
m_vblank = state;
m_pia[1]->read(0);
m_pia[1]->read(0);
m_pia[1]->cb1_w(state);
// logerror("V_BLANK_2 event : state=%d\n", m_vblank);
}
READ_LINE_MEMBER(calomega_state::vblank_r)
{
// logerror("V_BLANK read : state=%d\n", m_vblank);
return m_vblank;
// logerror("V_BLANK_2 event : state=%d\n", state);
}
WRITE_LINE_MEMBER(calomega_state::pia1_cb2_w)
@ -948,10 +933,6 @@ void calomega_state::dummy_pia_w(uint8_t data)
m_pia_data = data;
}
READ_LINE_MEMBER(calomega_state::dummy_pia_line_r)
{
return false;
}
WRITE_LINE_MEMBER(calomega_state::dummy_pia_line_w)
{
}
@ -4614,8 +4595,8 @@ void calomega_state::sys903(machine_config &config)
m_pia[0]->readpb_handler().set(FUNC(calomega_state::dummy_pia_r)); // Debug: some dipsw maybe???
m_pia[0]->writepa_handler().set(FUNC(calomega_state::dummy_pia_w)); // Debug: to assign lamps/counters/solenids/hopper????
m_pia[0]->writepb_handler().set(FUNC(calomega_state::lamps_903a_w));
m_pia[0]->readca1_handler().set(FUNC(calomega_state::timer_r)); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[0]->readcb1_handler().set(FUNC(calomega_state::timer_r)); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[0]->ca1_w(0); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[0]->cb1_w(0); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[0]->irqa_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU)
m_pia[0]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU)
@ -4626,7 +4607,7 @@ void calomega_state::sys903(machine_config &config)
m_pia[1]->writepb_handler().set(FUNC(calomega_state::s903_mux_w)); // Mux. Scan Lines.(Upper nibble) - Hopper b0-b1 (Lower Nibble).
m_pia[1]->ca2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // M4 pulsed out
m_pia[1]->cb2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // M5 pulsed out
m_pia[1]->readcb1_handler().set(FUNC(calomega_state::vblank_r)); // V_BLANK Interrupt Ack. (CPU -> PIA)
m_pia[1]->cb1_w(0); // V_BLANK Interrupt Ack. (CPU -> PIA)
m_pia[1]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // V_BLANK Interrupt Event. (PIA -> CPU)
// video hardware
@ -4687,8 +4668,8 @@ void calomega_state::sys903kb(machine_config &config)
m_pia[0]->readpb_handler().set(FUNC(calomega_state::dummy_pia_r)); // Debug: some dipsw maybe???
m_pia[0]->writepa_handler().set(FUNC(calomega_state::dummy_pia_w)); // Debug: to assign lamps/counters/solenids/hopper????
m_pia[0]->writepb_handler().set(FUNC(calomega_state::lamps_903a_w));
m_pia[0]->readca1_handler().set(FUNC(calomega_state::timer_r)); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[0]->readcb1_handler().set(FUNC(calomega_state::timer_r)); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[0]->ca1_w(0); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[0]->cb1_w(0); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[0]->irqa_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU)
m_pia[0]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU)
@ -4699,7 +4680,7 @@ void calomega_state::sys903kb(machine_config &config)
m_pia[1]->writepb_handler().set(FUNC(calomega_state::s903_mux_w)); // Mux. Scan Lines.(Upper nibble) - Hopper b0-b1 (Lower Nibble).
m_pia[1]->ca2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // M4 pulsed out
m_pia[1]->cb2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // M5 pulsed out
m_pia[1]->readcb1_handler().set(FUNC(calomega_state::vblank_r)); // V_BLANK Interrupt Ack. (CPU -> PIA)
m_pia[1]->cb1_w(0); // V_BLANK Interrupt Ack. (CPU -> PIA)
m_pia[1]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // V_BLANK Interrupt Event. (PIA -> CPU)
// video hardware
@ -4822,8 +4803,8 @@ void calomega_state::sys906(machine_config &config)
PIA6821(config.replace(), m_pia[1], 0);
m_pia[1]->readpa_handler().set(FUNC(calomega_state::pia1_ain_r)); // Mux. Button read.
m_pia[1]->readpb_handler().set(FUNC(calomega_state::pia1_bin_r));
m_pia[1]->readca1_handler().set(FUNC(calomega_state::timer_r)); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[1]->readcb1_handler().set(FUNC(calomega_state::vblank_r)); // V_BLANK Interrupt Ack. (CPU -> PIA)
m_pia[1]->ca1_w(0); // Timer Interrupt Ack. (CPU -> PIA)
m_pia[1]->cb1_w(0); // V_BLANK Interrupt Ack. (CPU -> PIA)
m_pia[1]->writepa_handler().set(FUNC(calomega_state::pia1_aout_w)); // Mux. Scan lines
m_pia[1]->writepb_handler().set(FUNC(calomega_state::pia1_bout_w)); // Lamps 1 to 8
m_pia[1]->cb2_handler().set(FUNC(calomega_state::pia1_cb2_w)); // V_BLANK interrupt line input (from Vertical Synch)

View File

@ -335,7 +335,6 @@ public:
DECLARE_WRITE_LINE_MEMBER( cmi02_ptm_irq );
DECLARE_WRITE_LINE_MEMBER( cmi02_ptm_o2 );
DECLARE_WRITE_LINE_MEMBER( cmi02_pia2_irqa_w );
DECLARE_READ_LINE_MEMBER( cmi02_pia2_ca1_r );
DECLARE_WRITE_LINE_MEMBER( cmi02_pia2_cb2_w );
uint8_t cmi07_r();
@ -1583,12 +1582,6 @@ WRITE_LINE_MEMBER( cmi_state::cmi02_pia2_irqa_w )
set_interrupt(CPU_2, IRQ_ADINT_LEVEL, state ? ASSERT_LINE : CLEAR_LINE);
}
READ_LINE_MEMBER( cmi_state::cmi02_pia2_ca1_r )
{
LOG("%s: cmi02_pia2_ca1_r: %d\n", machine().describe_context(), 0);
return 0;
}
WRITE_LINE_MEMBER( cmi_state::cmi02_pia2_cb2_w )
{
LOG("%s: cmi02_pia2_cb2_w: %d\n", machine().describe_context(), state);
@ -2197,7 +2190,7 @@ void cmi_state::cmi2x(machine_config &config)
PIA6821(config, m_cmi02_pia[1]); // pia_cmi02_2_config
m_cmi02_pia[1]->irqa_handler().set(FUNC(cmi_state::cmi02_pia2_irqa_w));
m_cmi02_pia[1]->readca1_handler().set(FUNC(cmi_state::cmi02_pia2_ca1_r));
m_cmi02_pia[1]->ca1_w(0);
m_cmi02_pia[1]->cb2_handler().set(FUNC(cmi_state::cmi02_pia2_cb2_w));
PTM6840(config, m_cmi02_ptm, SYSTEM_CAS_CLOCK);

View File

@ -174,8 +174,6 @@ private:
void pia1_kbA_w(uint8_t data);
uint8_t pia1_kbB_r();
void pia1_kbB_w(uint8_t data);
DECLARE_READ_LINE_MEMBER( pia1_ca1_r );
DECLARE_READ_LINE_MEMBER( pia1_cb1_r );
DECLARE_WRITE_LINE_MEMBER( pia1_ca2_w);
DECLARE_WRITE_LINE_MEMBER( pia1_cb2_w);
TIMER_DEVICE_CALLBACK_MEMBER(rtc_w);
@ -393,17 +391,6 @@ uint8_t e100_state::pia1_kbB_r()
return m_pia1_B;
}
READ_LINE_MEMBER(e100_state::pia1_ca1_r)
{
// TODO: Make this a slot device for time meassurements
return ASSERT_LINE; // Default is handshake for serial port TODO: Fix RS 232 handshake as default
}
READ_LINE_MEMBER(e100_state::pia1_cb1_r)
{
return m_rs232->rxd_r();
}
WRITE_LINE_MEMBER(e100_state::pia1_ca2_w)
{
// TODO: Make this a slot device to trigger time meassurements
@ -563,8 +550,7 @@ void e100_state::e100(machine_config &config)
m_pia1->readpa_handler().set(FUNC(e100_state::pia1_kbA_r));
m_pia1->writepb_handler().set(FUNC(e100_state::pia1_kbB_w));
m_pia1->readpb_handler().set(FUNC(e100_state::pia1_kbB_r));
m_pia1->readca1_handler().set(FUNC(e100_state::pia1_ca1_r));
m_pia1->readcb1_handler().set(FUNC(e100_state::pia1_cb1_r));
m_pia1->ca1_w(ASSERT_LINE); // TODO: Make this a slot device for time meassurements. Default is handshake for serial port TODO: Fix RS 232 handshake as default
m_pia1->ca2_handler().set(FUNC(e100_state::pia1_ca2_w));
m_pia1->cb2_handler().set(FUNC(e100_state::pia1_cb2_w));
@ -574,6 +560,7 @@ void e100_state::e100(machine_config &config)
/* Serial port support */
RS232_PORT(config, m_rs232, default_rs232_devices, nullptr);
m_rs232->rxd_handler().set(m_pia1, FUNC(pia6821_device::cb1_w));
SPEAKER(config, "mono").front_center();
/* Cassette support - E100 uses 300 baud Kansas City Standard with 1200/2400 Hz modulation */

View File

@ -75,7 +75,6 @@ protected:
virtual void machine_start() override;
private:
DECLARE_READ_LINE_MEMBER( cb1_r );
DECLARE_READ_LINE_MEMBER( distance_r );
DECLARE_READ_LINE_MEMBER( fuel_sensor_r );
uint8_t keyboard_r();
@ -149,6 +148,7 @@ INPUT_PORTS_END
void eacc_state::machine_reset()
{
m_cb2 = 0;
m_pia->cb1_w(1);
}
void eacc_state::machine_start()
@ -165,7 +165,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(eacc_state::cb1_timer)
{
m_cb1 ^= 1; // 15hz
if (m_cb2)
m_maincpu->set_input_line(M6802_IRQ_LINE, ASSERT_LINE);
m_pia->cb1_w(m_cb1);
}
TIMER_DEVICE_CALLBACK_MEMBER(eacc_state::nmi_timer)
@ -177,11 +177,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(eacc_state::nmi_timer)
}
}
READ_LINE_MEMBER( eacc_state::cb1_r )
{
return (m_cb2) ? m_cb1 : 1;
}
READ_LINE_MEMBER( eacc_state::distance_r )
{
return machine().rand() & 1; // needs random pulses to simulate movement
@ -195,6 +190,7 @@ READ_LINE_MEMBER( eacc_state::fuel_sensor_r )
WRITE_LINE_MEMBER( eacc_state::cb2_w )
{
m_cb2 = state;
m_pia->cb1_w((m_cb2) ? m_cb1 : 1);
}
uint8_t eacc_state::keyboard_r()
@ -264,7 +260,6 @@ void eacc_state::eacc(machine_config &config)
PIA6821(config, m_pia, 0);
m_pia->readpb_handler().set(FUNC(eacc_state::keyboard_r));
m_pia->readca1_handler().set(FUNC(eacc_state::distance_r));
m_pia->readcb1_handler().set(FUNC(eacc_state::cb1_r));
m_pia->readca2_handler().set(FUNC(eacc_state::fuel_sensor_r));
m_pia->writepa_handler().set(FUNC(eacc_state::segment_w));
m_pia->writepb_handler().set(FUNC(eacc_state::digit_w));

View File

@ -95,9 +95,6 @@ protected:
uint8_t kbd_get();
void kbd_put(u8 data);
DECLARE_READ_LINE_MEMBER(pia1_ca1_r);
DECLARE_READ_LINE_MEMBER(pia1_ca2_r);
DECLARE_READ_LINE_MEMBER(pia1_cb1_r);
DECLARE_WRITE_LINE_MEMBER(pia1_cb2_w);
void eurocom2_map(address_map &map);
@ -110,7 +107,7 @@ protected:
emu_timer *m_sst = nullptr;
floppy_image_device *m_floppy = nullptr;
bool m_sst_state = false, m_kbd_ready = false;
bool m_sst_state = false;
bitmap_ind16 m_tmpbmp;
uint8_t m_vico[2]{};
@ -142,8 +139,6 @@ private:
DECLARE_WRITE_LINE_MEMBER(waveterm_kbh_w);
void pia3_pb_w(uint8_t data);
DECLARE_READ_LINE_MEMBER(pia3_ca1_r);
DECLARE_READ_LINE_MEMBER(pia3_ca2_r);
DECLARE_WRITE_LINE_MEMBER(pia3_cb2_w);
uint8_t waveterm_adc();
@ -225,20 +220,6 @@ void eurocom2_state::vico_w(offs_t offset, uint8_t data)
}
READ_LINE_MEMBER(eurocom2_state::pia1_ca2_r)
{
LOGDBG("PIA1 CA2 == %d (SST Q14)\n", m_sst_state);
return m_sst_state;
}
READ_LINE_MEMBER(eurocom2_state::pia1_cb1_r)
{
LOGDBG("PIA1 CB1 == %d (SST Q6)\n", m_sst_state);
return m_sst_state;
}
WRITE_LINE_MEMBER(eurocom2_state::pia1_cb2_w)
{
LOG("PIA1 CB2 <- %d (SST reset)\n", state);
@ -249,12 +230,7 @@ void eurocom2_state::device_timer(emu_timer &timer, device_timer_id id, int para
{
m_sst_state = !m_sst_state;
m_pia1->ca2_w(m_sst_state);
}
READ_LINE_MEMBER(eurocom2_state::pia1_ca1_r)
{
return m_kbd_ready;
m_pia1->cb1_w(m_sst_state);
}
/* bit 7 may be connected to something else -- see section 6.2 of Eurocom manual */
@ -265,7 +241,6 @@ uint8_t eurocom2_state::kbd_get()
void eurocom2_state::kbd_put(u8 data)
{
m_kbd_ready = true;
m_kbd_data = data;
m_pia1->ca1_w(false);
m_pia1->ca1_w(true);
@ -407,7 +382,7 @@ INPUT_PORTS_END
void eurocom2_state::machine_reset()
{
m_kbd_ready = false;
m_pia1->ca1_w(false);
m_floppy = nullptr;
if (ioport("S1")->read() & 0x80)
@ -452,9 +427,8 @@ void eurocom2_state::eurocom2(machine_config &config)
keyboard.set_keyboard_callback(FUNC(eurocom2_state::kbd_put));
PIA6821(config, m_pia1, 0);
m_pia1->readca1_handler().set(FUNC(eurocom2_state::pia1_ca1_r)); // keyboard strobe
m_pia1->readca2_handler().set(FUNC(eurocom2_state::pia1_ca2_r)); // SST output Q14
m_pia1->readcb1_handler().set(FUNC(eurocom2_state::pia1_cb1_r)); // SST output Q6
m_pia1->ca2_w(m_sst_state); // SST output Q14
m_pia1->cb1_w(m_sst_state); // SST output Q6
m_pia1->cb2_handler().set(FUNC(eurocom2_state::pia1_cb2_w)); // SST reset input
m_pia1->readpa_handler().set(FUNC(eurocom2_state::kbd_get));
// m_pia1->readpb_handler().set(FUNC(eurocom2_state::kbd_get));
@ -493,8 +467,6 @@ void waveterm_state::waveterm(machine_config &config)
// m_pia3->readpa_handler().set(FUNC(waveterm_state::pia3_pa_r));
// m_pia3->writepa_handler().set(FUNC(waveterm_state::pia3_pa_w));
m_pia3->writepb_handler().set(FUNC(waveterm_state::pia3_pb_w));
// m_pia3->readca1_handler().set(FUNC(waveterm_state::pia3_ca1_r));
// m_pia3->readca2_handler().set(FUNC(waveterm_state::pia3_ca2_r));
m_pia3->readcb1_handler().set_ioport("FP");
// m_pia3->cb2_handler().set(FUNC(waveterm_state::pia3_cb2_w));

View File

@ -232,7 +232,6 @@ private:
u8 m_stop_enabled;
void pia_lpt_pa_w(u8 data);
int pia_lpt_ca1_r();
void pia_lpt_ca2_w(int state);
uint8_t pia_lpt_pb_r();
uint8_t m_printer_data;
@ -549,12 +548,6 @@ void exorciser_state::pia_lpt_pa_w(u8 data)
m_printer_data = data;
}
int exorciser_state::pia_lpt_ca1_r()
{
// External parallel printer busy input.
return 0;
}
void exorciser_state::pia_lpt_ca2_w(int state)
{
// External parallel printer data ready.
@ -706,7 +699,7 @@ void exorciser_state::exorciser(machine_config &config)
// MEX68PI Parallel printer port
PIA6821(config, m_pia_lpt, 0);
m_pia_lpt->writepa_handler().set(FUNC(exorciser_state::pia_lpt_pa_w));
m_pia_lpt->readca1_handler().set(FUNC(exorciser_state::pia_lpt_ca1_r));
m_pia_lpt->ca1_w(0); // External parallel printer busy input.
m_pia_lpt->ca2_handler().set(FUNC(exorciser_state::pia_lpt_ca2_w));
m_pia_lpt->readpb_handler().set(FUNC(exorciser_state::pia_lpt_pb_r));

View File

@ -183,8 +183,6 @@ private:
void led_segment_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(led_update);
void page_w(uint8_t data);
void trace_timer_w(uint8_t data);
uint8_t trace_timer_r();
required_device<m6802_cpu_device> m_maincpu;
required_device<ram_device> m_ram;
@ -198,7 +196,6 @@ private:
uint8_t m_rom_page;
uint8_t m_ram_page;
uint8_t m_trace;
uint8_t m_segment;
uint8_t m_digit;
@ -251,9 +248,6 @@ private:
MC6845_UPDATE_ROW(update_row);
uint8_t r2_pia_pa_r();
uint8_t r2_pia_pb_r();
DECLARE_WRITE_LINE_MEMBER(r2_hsync_changed);
DECLARE_WRITE_LINE_MEMBER(r2_vsync_changed);
DECLARE_READ_LINE_MEMBER(r2_pia_cb1_r);
optional_device<mc6845_device> m_mc6845;
optional_device<palette_device> m_palette;
optional_device<screen_device> m_screen;
@ -265,7 +259,6 @@ private:
optional_ioport m_r2_display_format;
void kbd_put(uint8_t data);
uint8_t m_term_data;
bool m_r2_vsync;
};
@ -464,23 +457,6 @@ void mekd3_state::page_w(uint8_t data)
m_ram_bank->set_entry(m_ram_page);
}
/***********************************************************
Trace timer
************************************************************/
void mekd3_state::trace_timer_w(uint8_t data)
{
m_trace = data;
m_kpd_pia->ca1_w(data);
}
uint8_t mekd3_state::trace_timer_r()
{
return m_trace;
}
/***********************************************************
Keypad
@ -810,22 +786,6 @@ uint8_t mekd3_state::r2_pia_pb_r()
return (display_format << 6) | mode;
}
WRITE_LINE_MEMBER(mekd3_state::r2_hsync_changed)
{
m_r2_pia->cb2_w(state);
}
WRITE_LINE_MEMBER(mekd3_state::r2_vsync_changed)
{
m_r2_vsync = state;
m_r2_pia->cb1_w(state);
}
READ_LINE_MEMBER(mekd3_state::r2_pia_cb1_r)
{
return m_r2_vsync;
}
MC6845_UPDATE_ROW(mekd3_state::update_row)
{
const pen_t *pen = m_palette->pens();
@ -906,7 +866,6 @@ void mekd3_state::machine_start()
save_item(NAME(m_rom_page));
save_item(NAME(m_ram_page));
save_item(NAME(m_trace));
save_item(NAME(m_segment));
save_item(NAME(m_digit));
save_item(NAME(m_cts));
@ -918,7 +877,6 @@ void mekd3_state::machine_start()
save_item(NAME(m_cass_txbit));
save_item(NAME(m_cass_last_txbit));
save_item(NAME(m_term_data));
save_item(NAME(m_r2_vsync));
}
void mekd3_state::machine_reset()
@ -950,8 +908,7 @@ void mekd3_state::machine_reset()
// MEK68R2
m_r2_pia->ca1_w(ASSERT_LINE);
m_r2_pia->ca2_w(ASSERT_LINE);
m_r2_vsync = 0;
m_r2_pia->cb1_w(m_r2_vsync);
m_r2_pia->cb1_w(0);
m_r2_pia->cb2_w(0);
}
@ -998,14 +955,14 @@ void mekd3_state::mekd3(machine_config &config)
m_kpd_pia->readcb1_handler().set(FUNC(mekd3_state::keypad_cb1_r));
m_kpd_pia->writepa_handler().set(FUNC(mekd3_state::led_segment_w));
m_kpd_pia->writepb_handler().set(FUNC(mekd3_state::led_digit_w));
m_kpd_pia->readca1_handler().set(FUNC(mekd3_state::trace_timer_r));
m_kpd_pia->ca1_w(0);
m_kpd_pia->irqa_handler().set(m_mainnmi, FUNC(input_merger_device::in_w<0>));
m_kpd_pia->irqb_handler().set(m_mainnmi, FUNC(input_merger_device::in_w<1>));
// CP1, CP2, /CTG, /CTC are available at SK1, and not used here.
MC6846(config, m_mc6846, XTAL_MEKD3 / 4); // Same as the cpu clock
m_mc6846->out_port().set(FUNC(mekd3_state::page_w));
m_mc6846->cto().set(FUNC(mekd3_state::trace_timer_w));
m_mc6846->cto().set(m_kpd_pia, FUNC(pia6821_device::ca1_w)); // trace timer
m_mc6846->irq().set(m_mainirq, FUNC(input_merger_device::in_w<0>));
// MEK68IO
@ -1072,8 +1029,8 @@ void mekd3_state::mekd3(machine_config &config)
m_mc6845->set_show_border_area(false);
m_mc6845->set_char_width(8);
m_mc6845->set_update_row_callback(FUNC(mekd3_state::update_row));
m_mc6845->out_hsync_callback().set(FUNC(mekd3_state::r2_hsync_changed));
m_mc6845->out_vsync_callback().set(FUNC(mekd3_state::r2_vsync_changed));
m_mc6845->out_hsync_callback().set(m_r2_pia, FUNC(pia6821_device::cb2_w));
m_mc6845->out_vsync_callback().set(m_r2_pia, FUNC(pia6821_device::cb1_w));
// PA is the keyboard data and a mode flag.
// CA1 is keyboard strobe.
@ -1083,7 +1040,6 @@ void mekd3_state::mekd3(machine_config &config)
PIA6821(config, m_r2_pia, 0);
m_r2_pia->readpa_handler().set(FUNC(mekd3_state::r2_pia_pa_r));
m_r2_pia->readpb_handler().set(FUNC(mekd3_state::r2_pia_pb_r));
m_r2_pia->readcb1_handler().set(FUNC(mekd3_state::r2_pia_cb1_r));
m_r2_pia->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<6>));
m_r2_pia->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<7>));

View File

@ -315,7 +315,6 @@ private:
void stop_pia_w(offs_t offset, uint8_t data);
void stop_pia_pa_w(uint8_t data);
void stop_pia_pb_w(uint8_t data);
DECLARE_READ_LINE_MEMBER(stop_pia_ca2_r);
uint16_t m_stop_address;
DECLARE_WRITE_LINE_MEMBER(rs232_route_cts);
@ -374,9 +373,6 @@ private:
MC6845_UPDATE_ROW(update_row);
uint8_t r2_pia_pa_r();
uint8_t r2_pia_pb_r();
DECLARE_WRITE_LINE_MEMBER(r2_hsync_changed);
DECLARE_WRITE_LINE_MEMBER(r2_vsync_changed);
DECLARE_READ_LINE_MEMBER(r2_pia_cb1_r);
optional_device<mc6845_device> m_mc6845;
optional_device<palette_device> m_palette;
optional_device<screen_device> m_screen;
@ -388,7 +384,6 @@ private:
optional_ioport m_r2_display_format;
void kbd_put(uint8_t data);
uint8_t m_term_data;
bool m_r2_vsync;
};
@ -607,12 +602,6 @@ void mekd4_state::stop_pia_pb_w(uint8_t data)
m_stop_address = (m_stop_address & 0xff00) | data;
}
// Connected to 'abort' TP2. Can be toggled low to and abort user code.
READ_LINE_MEMBER(mekd4_state::stop_pia_ca2_r)
{
return 1;
}
/***********************************************************
RAM and ROM paging
@ -846,22 +835,6 @@ uint8_t mekd4_state::r2_pia_pb_r()
return (display_format << 6) | mode;
}
WRITE_LINE_MEMBER(mekd4_state::r2_hsync_changed)
{
m_r2_pia->cb2_w(state);
}
WRITE_LINE_MEMBER(mekd4_state::r2_vsync_changed)
{
m_r2_vsync = state;
m_r2_pia->cb1_w(state);
}
READ_LINE_MEMBER(mekd4_state::r2_pia_cb1_r)
{
return m_r2_vsync;
}
MC6845_UPDATE_ROW(mekd4_state::update_row)
{
const pen_t *pen = m_palette->pens();
@ -935,7 +908,6 @@ void mekd4_state::machine_start()
save_item(NAME(m_cts));
save_item(NAME(m_dcd));
save_item(NAME(m_term_data));
save_item(NAME(m_r2_vsync));
}
void mekd4_state::machine_reset()
@ -963,8 +935,7 @@ void mekd4_state::machine_reset()
// MEK68R2
m_r2_pia->ca1_w(ASSERT_LINE);
m_r2_pia->ca2_w(ASSERT_LINE);
m_r2_vsync = 0;
m_r2_pia->cb1_w(m_r2_vsync);
m_r2_pia->cb1_w(0);
m_r2_pia->cb2_w(0);
}
@ -1031,7 +1002,7 @@ void mekd4_state::mekd4(machine_config &config)
PIA6821(config, m_stop_pia, 0);
m_stop_pia->writepa_handler().set(FUNC(mekd4_state::stop_pia_pa_w));
m_stop_pia->writepb_handler().set(FUNC(mekd4_state::stop_pia_pb_w));
m_stop_pia->readca2_handler().set(FUNC(mekd4_state::stop_pia_ca2_r));
m_stop_pia->ca2_w(1); // Connected to 'abort' TP2. Can be toggled low to and abort user code.
m_stop_pia->readcb1_handler().set(FUNC(mekd4_state::stop_pia_cb1_r));
m_stop_pia->cb2_handler().set(FUNC(mekd4_state::stop_pia_cb2_w));
m_stop_pia->irqa_handler().set("mainnmi", FUNC(input_merger_device::in_w<0>));
@ -1065,8 +1036,8 @@ void mekd4_state::mekd4(machine_config &config)
m_mc6845->set_show_border_area(false);
m_mc6845->set_char_width(8);
m_mc6845->set_update_row_callback(FUNC(mekd4_state::update_row));
m_mc6845->out_hsync_callback().set(FUNC(mekd4_state::r2_hsync_changed));
m_mc6845->out_vsync_callback().set(FUNC(mekd4_state::r2_vsync_changed));
m_mc6845->out_hsync_callback().set(m_r2_pia, FUNC(pia6821_device::cb2_w));
m_mc6845->out_vsync_callback().set(m_r2_pia, FUNC(pia6821_device::cb1_w));
// PA is the keyboard data and a mode flag.
// CA1 is keyboard strobe.
@ -1076,7 +1047,6 @@ void mekd4_state::mekd4(machine_config &config)
PIA6821(config, m_r2_pia, 0);
m_r2_pia->readpa_handler().set(FUNC(mekd4_state::r2_pia_pa_r));
m_r2_pia->readpb_handler().set(FUNC(mekd4_state::r2_pia_pb_r));
m_r2_pia->readcb1_handler().set(FUNC(mekd4_state::r2_pia_cb1_r));
m_r2_pia->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<2>));
m_r2_pia->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<3>));

View File

@ -89,7 +89,6 @@ private:
void pegasus_controls_w(u8 data);
void pegasus_keyboard_w(u8 data);
void pegasus_pcg_w(offs_t offset, u8 data);
DECLARE_READ_LINE_MEMBER(pegasus_keyboard_irq);
DECLARE_READ_LINE_MEMBER(pegasus_cassette_r);
DECLARE_WRITE_LINE_MEMBER(pegasus_cassette_w);
DECLARE_WRITE_LINE_MEMBER(pegasus_firq_clr);
@ -106,7 +105,6 @@ private:
void pegasusm_mem(address_map &map);
u8 m_kbd_row = 0U;
bool m_kbd_irq = false;
u8 m_control_bits = 0U;
std::unique_ptr<u8[]> m_pcg;
void pegasus_decrypt_rom(u8 *ROM);
@ -140,7 +138,7 @@ u8 pegasus_state::pegasus_keyboard_r()
for (unsigned i = 0; i < 8; i++)
if (!BIT(m_kbd_row, i)) data &= m_io_keyboard[i]->read();
m_kbd_irq = (data == 0xff) ? 1 : 0;
m_pia_s->cb1_w((data == 0xff) ? 1 : 0);
if (BIT(m_control_bits, 3))
data <<= 4;
return data;
@ -163,11 +161,6 @@ void pegasus_state::pegasus_controls_w(u8 data)
m_control_bits = data;
}
READ_LINE_MEMBER( pegasus_state::pegasus_keyboard_irq )
{
return m_kbd_irq;
}
READ_LINE_MEMBER( pegasus_state::pegasus_cassette_r )
{
return m_cass->input();
@ -475,14 +468,13 @@ void pegasus_state::machine_start()
m_pcg = make_unique_clear<u8[]>(0x0800);
save_pointer(NAME(m_pcg), 0x0800);
save_item(NAME(m_kbd_row));
save_item(NAME(m_kbd_irq));
save_item(NAME(m_control_bits));
}
void pegasus_state::machine_reset()
{
m_kbd_row = 0;
m_kbd_irq = 1;
m_pia_s->cb1_w(1);
m_control_bits = 0;
}
@ -519,7 +511,6 @@ void pegasus_state::pegasus(machine_config &config)
PIA6821(config, m_pia_s, 0);
m_pia_s->readpb_handler().set(FUNC(pegasus_state::pegasus_keyboard_r));
m_pia_s->readca1_handler().set(FUNC(pegasus_state::pegasus_cassette_r));
m_pia_s->readcb1_handler().set(FUNC(pegasus_state::pegasus_keyboard_irq));
m_pia_s->writepa_handler().set(FUNC(pegasus_state::pegasus_keyboard_w));
m_pia_s->writepb_handler().set(FUNC(pegasus_state::pegasus_controls_w));
m_pia_s->ca2_handler().set(FUNC(pegasus_state::pegasus_cassette_w));

View File

@ -1674,7 +1674,6 @@ void pet_state::base_pet_devices(machine_config &config, const char *default_dri
PIA6821(config, m_pia1, 0);
m_pia1->readpa_handler().set(FUNC(pet_state::pia1_pa_r));
m_pia1->readpb_handler().set(FUNC(pet_state::pia1_pb_r));
m_pia1->readca1_handler().set(PET_DATASSETTE_PORT_TAG, FUNC(pet_datassette_port_device::read));
m_pia1->writepa_handler().set(FUNC(pet_state::pia1_pa_w));
m_pia1->ca2_handler().set(FUNC(pet_state::pia1_ca2_w));
m_pia1->cb2_handler().set(PET_DATASSETTE_PORT_TAG, FUNC(pet_datassette_port_device::motor_w));
@ -1694,7 +1693,7 @@ void pet_state::base_pet_devices(machine_config &config, const char *default_dri
m_ieee->srq_callback().set(m_pia2, FUNC(pia6821_device::cb1_w));
m_ieee->atn_callback().set(m_pia2, FUNC(pia6821_device::ca1_w));
PET_DATASSETTE_PORT(config, PET_DATASSETTE_PORT_TAG, cbm_datassette_devices, "c2n").read_handler().set(M6520_1_TAG, FUNC(pia6821_device::ca1_w));
PET_DATASSETTE_PORT(config, PET_DATASSETTE_PORT_TAG, cbm_datassette_devices, "c2n").read_handler().set(m_pia1, FUNC(pia6821_device::ca1_w));
PET_DATASSETTE_PORT(config, PET_DATASSETTE_PORT2_TAG, cbm_datassette_devices, nullptr).read_handler().set(M6522_TAG, FUNC(via6522_device::write_cb1));
PET_EXPANSION_SLOT(config, m_exp, XTAL(16'000'000)/16, pet_expansion_cards, nullptr);

View File

@ -170,7 +170,6 @@ private:
void sound_w(u8 data);
u8 switch_r();
void switch_w(u8 data);
DECLARE_READ_LINE_MEMBER(pia21_ca1_r);
DECLARE_WRITE_LINE_MEMBER(pia21_ca2_w);
DECLARE_WRITE_LINE_MEMBER(pia21_cb2_w) { } // enable solenoids
DECLARE_WRITE_LINE_MEMBER(pia24_cb2_w) { m_io_outputs[16] = state; } // dummy to stop error log filling up
@ -424,12 +423,6 @@ void s8_state::sound_w(u8 data)
m_sound_data = data;
}
READ_LINE_MEMBER( s8_state::pia21_ca1_r )
{
// sound busy
return 1;
}
WRITE_LINE_MEMBER( s8_state::pia21_ca2_w )
{
// sound ns
@ -606,7 +599,7 @@ void s8_state::s8(machine_config &config)
PIA6821(config, m_pia21, 0);
m_pia21->readpa_handler().set(FUNC(s8_state::sound_r));
m_pia21->set_port_a_input_overrides_output_mask(0xff);
m_pia21->readca1_handler().set(FUNC(s8_state::pia21_ca1_r));
m_pia21->ca1_w(1); // sound busy
m_pia21->writepa_handler().set(FUNC(s8_state::sound_w));
m_pia21->writepb_handler().set(FUNC(s8_state::sol2_w));
m_pia21->ca2_handler().set(FUNC(s8_state::pia21_ca2_w));

View File

@ -81,7 +81,6 @@ private:
void sol3_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[i] = BIT(data, i); }; // solenoids 0-7
u8 switch_r();
void switch_w(u8 data);
DECLARE_READ_LINE_MEMBER(pia21_ca1_r);
DECLARE_WRITE_LINE_MEMBER(pia21_cb2_w) { } // enable solenoids
DECLARE_WRITE_LINE_MEMBER(pia24_cb2_w) { } // dummy to stop error log filling up
DECLARE_WRITE_LINE_MEMBER(pia28_ca2_w) { m_comma34 = state; } // comma3&4
@ -232,12 +231,6 @@ INPUT_CHANGED_MEMBER( s9_state::main_nmi )
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
READ_LINE_MEMBER( s9_state::pia21_ca1_r )
{
// sound busy
return 1;
}
void s9_state::sol2_w(u8 data)
{
if (m_game)
@ -376,7 +369,7 @@ void s9_state::s9(machine_config &config)
/* Devices */
PIA6821(config, m_pia21, 0);
m_pia21->set_port_a_input_overrides_output_mask(0xff);
m_pia21->readca1_handler().set(FUNC(s9_state::pia21_ca1_r));
m_pia21->ca1_w(1); // sound busy
m_pia21->writepa_handler().set("s9sound", FUNC(williams_s9_sound_device::write));
m_pia21->writepb_handler().set(FUNC(s9_state::sol2_w));
m_pia21->ca2_handler().set("s9sound", FUNC(williams_s9_sound_device::strobe));

View File

@ -405,10 +405,10 @@ void sr_state::starrider(machine_config &config)
PIA6821(config, m_main_pia2, 24_MHz_XTAL / 2 / 12); // 6820/21
m_main_pia2->readpa_handler().set_ioport("IN0");
m_main_pia2->readca1_handler().set_constant(0); // grounded
m_main_pia2->ca1_w(0); // grounded
m_main_pia2->ca2_handler().set(FUNC(sr_state::cpu_pia2_ca2_w));
m_main_pia2->readpb_handler().set_ioport("IN1");
m_main_pia2->readcb1_handler().set_constant(0); // grounded
m_main_pia2->cb1_w(0); // grounded
// CB2 is unused
// IRQA and IRQB are unused

View File

@ -433,7 +433,7 @@ void swtpc09_state::swtpc09_base(machine_config &config)
// IO8 at 0xe080 is used internally by the MPID board PIA.
PIA6821(config, m_pia, 0);
m_pia->readpa_handler().set(FUNC(swtpc09_state::pia0_a_r));
m_pia->readca1_handler().set(FUNC(swtpc09_state::pia0_ca1_r));
m_pia->ca1_w(0);
m_pia->irqa_handler().set(FUNC(swtpc09_state::pia0_irq_a));
// IO9 at 0xe090 is used internally by the MPID board 6840 timer.

View File

@ -87,7 +87,6 @@ public:
void cpu09(machine_config &config);
protected:
DECLARE_READ_LINE_MEMBER(ca1_r);
u8 pa_r();
void pa_w(u8 data);
void pb_w(u8 data);
@ -307,12 +306,6 @@ void cpu09_state::pb_w(u8 data)
{
}
// cass in
READ_LINE_MEMBER( cpu09_state::ca1_r )
{
return m_cassold;
}
u8 ivg09_state::pb_ivg_r()
{
u8 ret = m_term_data;
@ -413,7 +406,7 @@ void cpu09_state::cpu09(machine_config &config)
PIA6821(config, m_pia0, 0);
m_pia0->readpa_handler().set(FUNC(cpu09_state::pa_r));
m_pia0->readca1_handler().set(FUNC(cpu09_state::ca1_r));
m_pia0->ca1_w(0);
m_pia0->writepa_handler().set(FUNC(cpu09_state::pa_w));
m_pia0->writepb_handler().set(FUNC(cpu09_state::pb_w));

View File

@ -92,10 +92,6 @@ private:
void dummy_pia_w(uint8_t data);
uint8_t keyb_903_r();
DECLARE_READ_LINE_MEMBER(timer_r);
DECLARE_READ_LINE_MEMBER(vblank_r);
DECLARE_READ_LINE_MEMBER(dummy_pia_line_r);
DECLARE_WRITE_LINE_MEMBER(pia1_cb2_w);
DECLARE_WRITE_LINE_MEMBER(vblank0_w);
DECLARE_WRITE_LINE_MEMBER(vblank1_w);
@ -150,7 +146,7 @@ private:
required_ioport m_grn;
required_ioport m_blu;
uint8_t m_vblank = 0U, m_timer = 0U;
uint8_t m_timer = 0U;
int m_s903_mux_data = 0;
int m_s905_mux_data = 0;
int m_pia_data = 0;

View File

@ -75,7 +75,6 @@ private:
static void floppy_uniflex_formats(format_registration &fr);
uint8_t pia0_a_r();
uint8_t pia0_ca1_r();
DECLARE_WRITE_LINE_MEMBER( pia0_irq_a );
DECLARE_WRITE_LINE_MEMBER(io_irq_w);

View File

@ -76,11 +76,6 @@ uint8_t swtpc09_state::pia0_a_r()
return m_pia_counter;
}
uint8_t swtpc09_state::pia0_ca1_r()
{
return 0;
}
WRITE_LINE_MEMBER( swtpc09_state::pia0_irq_a )
{
if ( m_pia->irq_a_state())