From 1c3693c6fa8049933bb5598e9180c426a365ad24 Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 22 Nov 2018 01:39:21 -0500 Subject: [PATCH] ikt5a: Split off to separate driver (nw) --- scripts/target/mame/mess.lua | 1 + src/mame/drivers/ikt5a.cpp | 111 ++++++++++++++++++++++++++++++++++ src/mame/drivers/terminal.cpp | 16 ++--- src/mame/mame.lst | 4 +- src/mame/mess.flt | 1 + 5 files changed, 120 insertions(+), 13 deletions(-) create mode 100644 src/mame/drivers/ikt5a.cpp diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 6657506d21d..45924c9776b 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3764,6 +3764,7 @@ files { MAME_DIR .. "src/mame/drivers/icatel.cpp", MAME_DIR .. "src/mame/drivers/icebox.cpp", MAME_DIR .. "src/mame/drivers/if800.cpp", + MAME_DIR .. "src/mame/drivers/ikt5a.cpp", MAME_DIR .. "src/mame/drivers/imsai.cpp", MAME_DIR .. "src/mame/drivers/indiana.cpp", MAME_DIR .. "src/mame/drivers/is48x.cpp", diff --git a/src/mame/drivers/ikt5a.cpp b/src/mame/drivers/ikt5a.cpp new file mode 100644 index 00000000000..0415f3259a2 --- /dev/null +++ b/src/mame/drivers/ikt5a.cpp @@ -0,0 +1,111 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/******************************************************************************* + + Skeleton driver for IKT-5A terminal. + +*******************************************************************************/ + +#include "emu.h" +//#include "bus/pc_kbd/keyboards.h" +//#include "bus/pc_kbd/pc_kbdc.h" +//#include "bus/rs232/rs232.h" +#include "cpu/mcs51/mcs51.h" +#include "machine/eepromser.h" +#include "screen.h" + +class ikt5a_state : public driver_device +{ +public: + ikt5a_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_eeprom(*this, "eeprom") + , m_chargen(*this, "chargen") + { + } + + void ikt5a(machine_config &config); + +private: + u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + void eeprom_w(u8 data); + u8 p1_r(); + void p1_w(u8 data); + u8 p3_r(); + + void prog_map(address_map &map); + void ext_map(address_map &map); + + required_device m_maincpu; + required_device m_eeprom; + required_region_ptr m_chargen; +}; + +u32 ikt5a_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + return 0; +} + +void ikt5a_state::eeprom_w(u8 data) +{ + m_eeprom->cs_write(BIT(data, 6)); + m_eeprom->di_write(BIT(data, 3)); + m_eeprom->clk_write(BIT(data, 1)); +} + +u8 ikt5a_state::p1_r() +{ + return 0xff; +} + +void ikt5a_state::p1_w(u8 data) +{ +} + +u8 ikt5a_state::p3_r() +{ + return 0xdf | (m_eeprom->do_read() << 5); +} + +void ikt5a_state::prog_map(address_map &map) +{ + map(0x0000, 0x3fff).rom().region("maincpu", 0); +} + +void ikt5a_state::ext_map(address_map &map) +{ + map(0x6400, 0x6400).mirror(0xff).w(FUNC(ikt5a_state::eeprom_w)); + map(0x8000, 0x9fff).ram(); +} + +void ikt5a_state::ikt5a(machine_config &config) +{ + I80C51(config, m_maincpu, 15_MHz_XTAL / 2); // PCB 80C51BH-2 (clock uncertain) + m_maincpu->set_addrmap(AS_PROGRAM, &ikt5a_state::prog_map); + m_maincpu->set_addrmap(AS_IO, &ikt5a_state::ext_map); + m_maincpu->port_in_cb<1>().set(FUNC(ikt5a_state::p1_r)); + m_maincpu->port_out_cb<1>().set(FUNC(ikt5a_state::p1_w)); + m_maincpu->port_in_cb<3>().set(FUNC(ikt5a_state::p3_r)); + + EEPROM_93C06_16BIT(config, m_eeprom); // ST M9306B6 + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(15_MHz_XTAL, 800, 0, 640, 375, 0, 350); // timings guessed + screen.set_screen_update(FUNC(ikt5a_state::screen_update)); + screen.screen_vblank().set_inputline(m_maincpu, MCS51_INT0_LINE); +} + +static INPUT_PORTS_START(ikt5a) +INPUT_PORTS_END + +ROM_START(ikt5a) // 80C51 (+xtal 15.000) // 8k ram // RGB external, uses XT keyboard + ROM_REGION(0x4000, "maincpu", 0) + ROM_LOAD("ver_ih.bin", 0x0000, 0x4000, CRC(5a15b4e8) SHA1(cc0336892279b730f1596f31e129c5a898ecdc8f)) + + ROM_REGION(0x2000, "chargen", 0) + ROM_LOAD("g26.bin", 0x0000, 0x2000, CRC(657668be) SHA1(212a9eb1fb9b9c16f3cc606c6befbd913ddfa395)) +ROM_END + +COMP(1993, ikt5a, 0, 0, ikt5a, ikt5a, ikt5a_state, empty_init, "Creator / Fura Elektronik", "IKT-5A", MACHINE_IS_SKELETON) diff --git a/src/mame/drivers/terminal.cpp b/src/mame/drivers/terminal.cpp index 59aa7014b24..202ce67e470 100644 --- a/src/mame/drivers/terminal.cpp +++ b/src/mame/drivers/terminal.cpp @@ -87,10 +87,10 @@ ROM_END ROM_START( t3210 ) // order unknown // i8031, 8742 // 4+2k ram onboard; 24kb in battery-backed expansion // b&w ROM_REGION( 0x12000, "maincpu", 0 ) - ROM_LOAD( "s22723_r121-c2-2.d11", 0x00000, 0x0800, CRC(f0eda00e) SHA1(6b0d9f5e9d99644c3be16cbf0c0d3b1ea05aabee) ) - ROM_LOAD( "d8742_s22723_r118-c1.d16", 0x00800, 0x0800, CRC(f334a2a3) SHA1(c1cd4d775c2984252e6869a4c8f99d56646b89e9) ) - ROM_LOAD( "s22723_r115-c1-6_ct.d6", 0x01000, 0x8000, CRC(d09fea94) SHA1(52168060093dfe964c0316d9ff335cd59da01d48) ) - ROM_LOAD( "s22723_r115-c2-6_ct.d7", 0x09000, 0x8000, CRC(6e1eaacd) SHA1(cfda25dbbeddc7c75379c4b0dc97addb602d79ef) ) + ROM_LOAD( "s22723_r115-c1-6_ct.d6", 0x00000, 0x8000, CRC(d09fea94) SHA1(52168060093dfe964c0316d9ff335cd59da01d48) ) + ROM_LOAD( "s22723_r115-c2-6_ct.d7", 0x08000, 0x8000, CRC(6e1eaacd) SHA1(cfda25dbbeddc7c75379c4b0dc97addb602d79ef) ) + ROM_LOAD( "s22723_r121-c2-2.d11", 0x10000, 0x0800, CRC(f0eda00e) SHA1(6b0d9f5e9d99644c3be16cbf0c0d3b1ea05aabee) ) + ROM_LOAD( "d8742_s22723_r118-c1.d16", 0x10800, 0x0800, CRC(f334a2a3) SHA1(c1cd4d775c2984252e6869a4c8f99d56646b89e9) ) ROM_LOAD( "prom_s22723_r120-c1.bin", 0x11000, 0x0100, CRC(4460cd50) SHA1(fe36d758d64493cb5f8217fe51bbbe8203424fbe) ) ROM_END @@ -112,13 +112,6 @@ ROM_START( 7951om ) // TTL (no cpu) // 1k x 6bits display ram 64-characters uppe ROM_END -ROM_START( ikt5a ) // order unknown // 80C51 (+xtal 15.000) // 8k ram // RGB external, uses XT keyboard - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "g26.bin", 0x0000, 0x2000, CRC(657668be) SHA1(212a9eb1fb9b9c16f3cc606c6befbd913ddfa395) ) - ROM_LOAD( "ver_ih.bin", 0x2000, 0x4000, CRC(5a15b4e8) SHA1(cc0336892279b730f1596f31e129c5a898ecdc8f) ) -ROM_END - - ROM_START( teleguide ) // order unknown // i8051, i8031 (layout very similar to loewed) // 64k ram + battery-backed nvram // b&w ROM_REGION( 0x38000, "maincpu", 0 ) ROM_LOAD( "cardreader_17044-068_349-1163.bin", 0x00000, 0x10000, CRC(3c980c0d) SHA1(9904ffd283a11defbe3daf2cb9029bcead8b02d0) ) @@ -138,5 +131,4 @@ COMP( 1988, loewe715, 0, 0, terminal, terminal, terminal_state, empty COMP( 1986, t3210, 0, 0, terminal, terminal, terminal_state, empty_init, "Siemens", "Bitel T3210", MACHINE_IS_SKELETON ) COMP( 1986, feap90, 0, 0, terminal, terminal, terminal_state, empty_init, "Siemens", "Multitel Fe Ap 90-1.1", MACHINE_IS_SKELETON ) COMP( 1987, 7951om, 0, 0, terminal, terminal, terminal_state, empty_init, "Mera-Elzab", "7951om", MACHINE_IS_SKELETON ) -COMP( 1993, ikt5a, 0, 0, terminal, terminal, terminal_state, empty_init, "Creator / Fura Elektronik", "IKT-5A", MACHINE_IS_SKELETON ) COMP( 1992, teleguide, 0, 0, terminal, terminal, terminal_state, empty_init, "Loewe / Televerket", "Teleguide", MACHINE_IS_SKELETON ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 10d185d4802..2e3c49a1efc 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -15560,6 +15560,9 @@ stellecu // (c) 1998 farmer // TVG17 (c) 1985 Sun Electronics ikki // TVG17 (c) 1985 Sun Electronics (Japan) +@source:ikt5a.cpp +ikt5a // + @source:imds2.cpp imds2 // Intellec MDS series-II @@ -37123,7 +37126,6 @@ t4490 // Terco 4490 Mill CNC Control (c) 1986 7951om // alcat258 // feap90 // -ikt5a // itt9216 // loewe715 // loewed // diff --git a/src/mame/mess.flt b/src/mame/mess.flt index f3ba7264d02..fefb6c04eab 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -316,6 +316,7 @@ icatel.cpp icebox.cpp ie15.cpp if800.cpp +ikt5a.cpp imds2.cpp imsai.cpp indiana.cpp