mirror of
https://github.com/holub/mame
synced 2025-07-09 03:38:23 +03:00
abc1600: Implement reset button. [Curt Coder]
This commit is contained in:
parent
387e268e7f
commit
dc03ce8fbc
@ -470,6 +470,16 @@ void abc77_device::txd_w(int state)
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// reset_w -
|
||||
//-------------------------------------------------
|
||||
|
||||
void abc77_device::reset_w(int state)
|
||||
{
|
||||
// connected to NE556 pin 8
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// p1_r -
|
||||
//-------------------------------------------------
|
||||
|
@ -49,6 +49,7 @@ protected:
|
||||
|
||||
// abc_keyboard_interface overrides
|
||||
virtual void txd_w(int state) override;
|
||||
virtual void reset_w(int state) override;
|
||||
|
||||
private:
|
||||
TIMER_CALLBACK_MEMBER(serial_clock);
|
||||
|
@ -533,6 +533,16 @@ void abc99_device::txd_w(int state)
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// reset_w -
|
||||
//-------------------------------------------------
|
||||
|
||||
void abc99_device::reset_w(int state)
|
||||
{
|
||||
m_mousecpu->set_input_line(INPUT_LINE_RESET, state);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// key_x_w -
|
||||
//-------------------------------------------------
|
||||
|
@ -50,6 +50,7 @@ protected:
|
||||
|
||||
// abc_keyboard_interface overrides
|
||||
virtual void txd_w(int state) override;
|
||||
virtual void reset_w(int state) override;
|
||||
|
||||
private:
|
||||
enum
|
||||
|
@ -48,7 +48,8 @@ abc_keyboard_port_device::abc_keyboard_port_device(const machine_config &mconfig
|
||||
device_single_card_slot_interface<abc_keyboard_interface>(mconfig, *this),
|
||||
m_out_rx_handler(*this),
|
||||
m_out_trxc_handler(*this),
|
||||
m_out_keydown_handler(*this), m_card(nullptr)
|
||||
m_out_keydown_handler(*this),
|
||||
m_card(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@ -68,6 +69,20 @@ void abc_keyboard_port_device::device_start()
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void abc_keyboard_port_device::device_reset()
|
||||
{
|
||||
if (m_card)
|
||||
{
|
||||
m_card->reset_w(ASSERT_LINE);
|
||||
m_card->reset_w(CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// write_rx -
|
||||
//-------------------------------------------------
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
devcb_write_line m_out_rx_handler;
|
||||
devcb_write_line m_out_trxc_handler;
|
||||
@ -62,6 +63,7 @@ class abc_keyboard_interface : public device_interface
|
||||
{
|
||||
public:
|
||||
virtual void txd_w(int state) { }
|
||||
virtual void reset_w(int state) { }
|
||||
|
||||
protected:
|
||||
// construction/destruction
|
||||
|
@ -41,13 +41,15 @@
|
||||
- keyboard test fails
|
||||
- mouse test fails
|
||||
- loadsys1 core dump (/etc/mkfs -b 1024 -v 69000 /dev/sa40)
|
||||
- short/long reset (RSTBUT)
|
||||
- crashes after reset
|
||||
- CIO
|
||||
- optimize timers!
|
||||
- port C, open drain output bit PC1 (RTC/NVRAM data)
|
||||
- connect RS-232 printer port
|
||||
- Z80 SCC/DART interrupt chain
|
||||
- [:2a:chb] - TX FIFO is full, discarding data
|
||||
[:] SCC write 000003
|
||||
[:2a:chb] void z80scc_channel::data_write(uint8_t): Data Register Write: 17 ' '
|
||||
|
||||
*/
|
||||
|
||||
@ -534,12 +536,30 @@ void abc1600_state::mac_mem(address_map &map)
|
||||
// INPUT PORTS
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// INPUT_CHANGED_MEMBER( reset )
|
||||
//-------------------------------------------------
|
||||
|
||||
INPUT_CHANGED_MEMBER( abc1600_state::reset )
|
||||
{
|
||||
if (!oldval && newval)
|
||||
{
|
||||
machine_reset();
|
||||
}
|
||||
|
||||
m_mac->rstbut_w(newval);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// INPUT_PORTS( abc1600 )
|
||||
//-------------------------------------------------
|
||||
|
||||
static INPUT_PORTS_START( abc1600 )
|
||||
// inputs defined in machine/abc99.cpp
|
||||
// keyboard inputs defined in machine/abc99.cpp
|
||||
|
||||
PORT_START("RESET")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Reset") PORT_CHANGED_MEMBER(DEVICE_SELF, abc1600_state, reset, 0)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -873,6 +893,13 @@ void abc1600_state::machine_reset()
|
||||
|
||||
// clear NMI
|
||||
m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE);
|
||||
|
||||
// reset devices
|
||||
m_mac->reset();
|
||||
m_maincpu->reset();
|
||||
m_cio->reset();
|
||||
m_scc->reset();
|
||||
m_kb->reset();
|
||||
}
|
||||
|
||||
|
||||
|
@ -80,11 +80,14 @@ public:
|
||||
m_bus0i(*this, BUS0I_TAG),
|
||||
m_bus0x(*this, BUS0X_TAG),
|
||||
m_bus1(*this, BUS1_TAG),
|
||||
m_bus2(*this, BUS2_TAG)
|
||||
m_bus2(*this, BUS2_TAG),
|
||||
m_kb(*this, ABC_KEYBOARD_PORT_TAG)
|
||||
{ }
|
||||
|
||||
void abc1600(machine_config &config);
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER( reset );
|
||||
|
||||
private:
|
||||
required_device<m68008_device> m_maincpu;
|
||||
required_device<abc1600_mac_device> m_mac;
|
||||
@ -105,6 +108,7 @@ private:
|
||||
required_device<abcbus_slot_device> m_bus0x;
|
||||
required_device<abcbus_slot_device> m_bus1;
|
||||
required_device<abcbus_slot_device> m_bus2;
|
||||
required_device<abc_keyboard_port_device> m_kb;
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
@ -113,6 +113,7 @@ abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char
|
||||
m_watchdog(*this, "watchdog"),
|
||||
m_read_tren(*this),
|
||||
m_write_tren(*this),
|
||||
m_rstbut(0),
|
||||
m_boote(0),
|
||||
m_magic(0),
|
||||
m_task(0),
|
||||
@ -133,6 +134,7 @@ void abc1600_mac_device::device_start()
|
||||
m_write_tren.resolve_all_safe();
|
||||
|
||||
// state saving
|
||||
save_item(NAME(m_rstbut));
|
||||
save_item(NAME(m_boote));
|
||||
save_item(NAME(m_magic));
|
||||
save_item(NAME(m_task));
|
||||
@ -330,7 +332,7 @@ uint8_t abc1600_mac_device::cause_r()
|
||||
|
||||
*/
|
||||
|
||||
uint8_t data = 0;
|
||||
uint8_t data = m_rstbut;
|
||||
|
||||
if (!m_partst)
|
||||
{
|
||||
|
@ -43,6 +43,8 @@ public:
|
||||
auto in_tren2_cb() { return m_read_tren[2].bind(); }
|
||||
auto out_tren2_cb() { return m_write_tren[2].bind(); }
|
||||
|
||||
void rstbut_w(int state) { m_rstbut = state; }
|
||||
|
||||
uint8_t read(offs_t offset);
|
||||
void write(offs_t offset, uint8_t data);
|
||||
|
||||
@ -120,6 +122,7 @@ private:
|
||||
devcb_read8::array<3> m_read_tren;
|
||||
devcb_write8::array<3> m_write_tren;
|
||||
|
||||
bool m_rstbut = 0;
|
||||
bool m_boote = 0;
|
||||
bool m_magic = 0;
|
||||
int m_task = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user