summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2018-12-13 16:01:41 -0500
committer GitHub <noreply@github.com>2018-12-13 16:01:41 -0500
commiteedf58b12583d9366e883bf0caa666ff284aec03 (patch)
tree75d8391cc02c32de736994161cf5af2db8e10aee
parent591012d8919ca53a0d3774c404e9b7ddb6094277 (diff)
parent03bd99db1a0fc0b269a86396012b8c58be5a3a83 (diff)
Merge pull request #4393 from prime6809/master
Nascom 2/3: Fixed CTRL key operation and added additional BIOS versions
-rw-r--r--src/mame/drivers/nascom1.cpp43
1 files changed, 27 insertions, 16 deletions
diff --git a/src/mame/drivers/nascom1.cpp b/src/mame/drivers/nascom1.cpp
index c2b2f0f8faf..384448f7879 100644
--- a/src/mame/drivers/nascom1.cpp
+++ b/src/mame/drivers/nascom1.cpp
@@ -7,6 +7,9 @@
Single board computer
***************************************************************************/
+//
+// Fixed keyboard handling so that CTRL now works. 12-2018 PHS.
+//
#include "emu.h"
@@ -83,7 +86,7 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_shared_ptr<uint8_t> m_videoram;
- required_ioport_array<9> m_keyboard;
+ required_ioport_array<8> m_keyboard;
int m_tape_size;
uint8_t *m_tape_image;
@@ -160,7 +163,7 @@ private:
READ8_MEMBER( nascom_state::nascom1_port_00_r )
{
if (m_portstat.stat_count < 9)
- return ((m_keyboard[m_portstat.stat_count])->read() | ~0x7f);
+ return ((m_keyboard[m_portstat.stat_count % 8])->read() | ~0x7f);
return 0xff;
}
@@ -528,9 +531,13 @@ void nascom2_state::nascom2c_mem(address_map &map)
static INPUT_PORTS_START( nascom1 )
PORT_START("KEY.0")
- PORT_BIT(0x6f, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace ClearScreen") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(8)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("New Line") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
-
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@')
+ PORT_BIT(0x48, IP_ACTIVE_LOW, IPT_UNUSED)
+
PORT_START("KEY.1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b')
@@ -594,16 +601,15 @@ static INPUT_PORTS_START( nascom1 )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_START("KEY.8")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace ClearScreen") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(8)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("New Line") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
- PORT_BIT(0x58, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(UCHAR_SHIFT_2) PORT_CHAR('@')
INPUT_PORTS_END
static INPUT_PORTS_START( nascom2 )
PORT_INCLUDE(nascom1)
+ PORT_MODIFY("KEY.0")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Back CS") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(8)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter Escape") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CHAR(27)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_MODIFY("KEY.6")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('[') PORT_CHAR('\\')
@@ -611,10 +617,6 @@ static INPUT_PORTS_START( nascom2 )
PORT_MODIFY("KEY.7")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(']') PORT_CHAR('_')
- PORT_MODIFY("KEY.8")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Back CS") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(8)
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter Escape") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_CHAR(27)
-
// link switch on board
PORT_START("lsw1")
PORT_DIPNAME(0x0f, 0x00, "Restart address")
@@ -777,7 +779,12 @@ ROM_START( nascom2 )
ROM_SYSTEM_BIOS(0, "ns1", "NasSys 1")
ROMX_LOAD("nassys1.rom", 0x0000, 0x0800, CRC(b6300716) SHA1(29da7d462ba3f569f70ed3ecd93b981f81c7adfa), ROM_BIOS(0))
ROM_SYSTEM_BIOS(1, "ns3", "NasSys 3")
- ROMX_LOAD("nassys3.rom", 0x0000, 0x0800, CRC(3da17373) SHA1(5fbda15765f04e4cd08cf95c8d82ce217889f240), ROM_BIOS(1))
+ ROMX_LOAD("nassys3.rom", 0x0000, 0x0800, CRC(6804e675) SHA1(d55dccec2d1da992a39c38b0b6d24e3809073513), ROM_BIOS(1))
+ ROM_SYSTEM_BIOS(2, "ns3a", "NasSys 3 (AVC)")
+ ROMX_LOAD("nassys3a.rom", 0x0000, 0x0800, CRC(39d24a05) SHA1(7bfb574c1f8ce0f460a53b9a6c11c711aabccbb8), ROM_BIOS(2))
+ ROM_SYSTEM_BIOS(3, "ns3n", "NasSys 3 (NET)")
+ ROMX_LOAD("nassys3n.rom", 0x0000, 0x0800, CRC(87ef62bb) SHA1(dab81511925be36044b3e8b0ba26a0c717fe83ae), ROM_BIOS(3))
+
ROM_REGION(0x2000, "basic", 0)
ROM_LOAD("basic.rom", 0x0000, 0x2000, CRC(5cb5197b) SHA1(c41669c2b6d6dea808741a2738426d97bccc9b07))
@@ -789,7 +796,11 @@ ROM_END
ROM_START( nascom2c )
ROM_REGION(0x0800, "maincpu", 0)
- ROM_LOAD("cpmboot.rom", 0x0000, 0x0800, CRC(44b67ffc) SHA1(60c8335f24798f8de7ad48a4cd03e56a60d87b63))
+ ROM_DEFAULT_BIOS("cpm32")
+ ROM_SYSTEM_BIOS(0, "cpm21", "CP/M boot v2.1")
+ ROMX_LOAD("cpmbt21.rom", 0x0000, 0x0800, CRC(44b67ffc) SHA1(60c8335f24798f8de7ad48a4cd03e56a60d87b63), ROM_BIOS(0))
+ ROM_SYSTEM_BIOS(1, "cpm32", "CP/M boot v3.2")
+ ROMX_LOAD("cpmbt32.rom", 0x0000, 0x0800, CRC(724f03ba) SHA1(d0958c231e5b121b6c4c97d03c76c207acf90f5a), ROM_BIOS(1))
ROM_REGION(0x1000, "gfx1", 0)
ROM_LOAD("nascom1.chr", 0x0000, 0x0800, CRC(33e92a04) SHA1(be6e1cc80e7f95a032759f7df19a43c27ff93a52))