mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
trs80, sys80, lnw80: Add "reset" (i.e. NMI) button
This commit is contained in:
parent
bca8f60c47
commit
2221a1c112
@ -77,6 +77,7 @@ To Do / Status:
|
||||
#include "emu.h"
|
||||
#include "includes/trs80.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/input_merger.h"
|
||||
#include "formats/td0_dsk.h"
|
||||
|
||||
class lnw80_state : public trs80_state
|
||||
@ -242,6 +243,9 @@ static INPUT_PORTS_START( lnw80 )
|
||||
PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL)
|
||||
PORT_BIT(0xee, 0x00, IPT_UNUSED)
|
||||
|
||||
PORT_START("RESET")
|
||||
PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(PAUSE)) PORT_WRITE_LINE_DEVICE_MEMBER("nmigate", input_merger_device, in_w<0>)
|
||||
|
||||
PORT_START("CONFIG")
|
||||
PORT_CONFNAME( 0x80, 0x00, "Floppy Disc Drives")
|
||||
PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
|
||||
@ -582,6 +586,10 @@ void lnw80_state::lnw80(machine_config &config)
|
||||
Z80(config, m_maincpu, 16_MHz_XTAL / 9);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &lnw80_state::lnw80_mem);
|
||||
m_maincpu->set_addrmap(AS_IO, &lnw80_state::lnw80_io);
|
||||
m_maincpu->halt_cb().set("nmigate", FUNC(input_merger_device::in_w<1>));
|
||||
|
||||
input_merger_device &nmigate(INPUT_MERGER_ANY_HIGH(config, "nmigate"));
|
||||
nmigate.output_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); // TODO: also causes SYSRES on expansion bus
|
||||
|
||||
/* video hardware */
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
|
@ -154,6 +154,7 @@ ht1080z works
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/trs80.h"
|
||||
#include "machine/input_merger.h"
|
||||
#include "sound/ay8910.h"
|
||||
|
||||
|
||||
@ -319,6 +320,9 @@ static INPUT_PORTS_START( trs80 )
|
||||
PORT_START("LINE7")
|
||||
PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT(0xfe, 0x00, IPT_UNUSED)
|
||||
|
||||
PORT_START("RESET") // special button
|
||||
PORT_BIT(0x01, 0x00, IPT_OTHER) PORT_NAME("Reset") PORT_CODE(KEYCODE_DEL) PORT_WRITE_LINE_DEVICE_MEMBER("nmigate", input_merger_device, in_w<0>)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START(trs80l2)
|
||||
@ -458,6 +462,10 @@ void trs80_state::model1(machine_config &config) // model I, level II
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &trs80_state::m1_mem);
|
||||
m_maincpu->set_addrmap(AS_IO, &trs80_state::m1_io);
|
||||
m_maincpu->set_periodic_int(FUNC(trs80_state::rtc_interrupt), attotime::from_hz(40));
|
||||
m_maincpu->halt_cb().set("nmigate", FUNC(input_merger_device::in_w<1>));
|
||||
|
||||
input_merger_device &nmigate(INPUT_MERGER_ANY_HIGH(config, "nmigate"));
|
||||
nmigate.output_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); // TODO: also causes SYSRES on expansion bus
|
||||
|
||||
/* devices */
|
||||
m_cassette->set_formats(trs80l2_cassette_formats);
|
||||
@ -505,6 +513,8 @@ void trs80_state::sys80(machine_config &config)
|
||||
{
|
||||
model1(config);
|
||||
m_maincpu->set_addrmap(AS_IO, &trs80_state::sys80_io);
|
||||
m_maincpu->halt_cb().set_nop(); // TODO: asserts HLTA on expansion bus instead
|
||||
|
||||
subdevice<screen_device>("screen")->set_screen_update(FUNC(trs80_state::screen_update_sys80));
|
||||
|
||||
config.device_remove("brg");
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
, m_uart(*this, "uart")
|
||||
, m_uart_clock(*this, "uart_clock")
|
||||
, m_fdc(*this, "fdc")
|
||||
, m_floppy(*this, "flop%u", 0U)
|
||||
, m_floppy(*this, "floppy%u", 0U)
|
||||
, m_speaker(*this, "speaker")
|
||||
, m_cassette(*this, "cassette")
|
||||
, m_io_baud(*this, "BAUD")
|
||||
@ -98,7 +98,7 @@ protected:
|
||||
u16 m_timeout = 600;
|
||||
void trs80_io(address_map &map);
|
||||
floppy_image_device *m_fdd;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<z80_device> m_maincpu;
|
||||
required_memory_region m_region_maincpu;
|
||||
required_region_ptr<u8> m_p_chargen;
|
||||
optional_shared_ptr<u8> m_p_videoram;
|
||||
|
Loading…
Reference in New Issue
Block a user