From 03ea2d220738033f319a7204be14a0b31cd954f9 Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 27 Apr 2021 23:52:38 +0200 Subject: slc1a: remove driver, turns out it's a mod of poly880 --- scripts/target/mame/mess.lua | 1 - src/mame/drivers/fidel_sc8.cpp | 4 +- src/mame/drivers/lc80.cpp | 1 + src/mame/drivers/poly880.cpp | 43 +++++++-- src/mame/drivers/slc1.cpp | 35 ++++--- src/mame/drivers/slc1a.cpp | 210 ----------------------------------------- src/mame/includes/poly880.h | 2 + src/mame/layout/slc1a.lay | 24 ----- src/mame/mame.lst | 4 +- src/mame/mess.flt | 1 - 10 files changed, 63 insertions(+), 262 deletions(-) delete mode 100644 src/mame/drivers/slc1a.cpp delete mode 100644 src/mame/layout/slc1a.lay diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 419eb928c6c..dd34bf572a0 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -2586,7 +2586,6 @@ files { MAME_DIR .. "src/mame/drivers/sbc6510.cpp", MAME_DIR .. "src/mame/drivers/sitcom.cpp", MAME_DIR .. "src/mame/drivers/slc1.cpp", - MAME_DIR .. "src/mame/drivers/slc1a.cpp", MAME_DIR .. "src/mame/drivers/test_t400.cpp", MAME_DIR .. "src/mame/drivers/uzebox.cpp", MAME_DIR .. "src/mame/drivers/z80dev.cpp", diff --git a/src/mame/drivers/fidel_sc8.cpp b/src/mame/drivers/fidel_sc8.cpp index 7356031d6af..9d8d6f6579b 100644 --- a/src/mame/drivers/fidel_sc8.cpp +++ b/src/mame/drivers/fidel_sc8.cpp @@ -23,10 +23,12 @@ Hardware notes: ******************************************************************************/ #include "emu.h" + #include "cpu/z80/z80.h" #include "machine/sensorboard.h" #include "sound/dac.h" #include "video/pwm.h" + #include "speaker.h" // internal artwork @@ -86,8 +88,6 @@ void scc_state::machine_start() I/O ******************************************************************************/ -// TTL - void scc_state::control_w(offs_t offset, u8 data) { // a0-a2,d7: led data diff --git a/src/mame/drivers/lc80.cpp b/src/mame/drivers/lc80.cpp index dd5b6c3af2c..07607638763 100644 --- a/src/mame/drivers/lc80.cpp +++ b/src/mame/drivers/lc80.cpp @@ -60,6 +60,7 @@ TODO: #include "speaker.h" +// internal artwork #include "lc80.lh" diff --git a/src/mame/drivers/poly880.cpp b/src/mame/drivers/poly880.cpp index df06b44c498..91923342f54 100644 --- a/src/mame/drivers/poly880.cpp +++ b/src/mame/drivers/poly880.cpp @@ -8,8 +8,8 @@ Poly-Computer 880 http://www.kc85-museum.de/books/poly880/index.html -Initially the screen is blank. The CTC causes a NMI, this autoboots the -system, and then the PIO releases the NMI line. +Initially the screen is blank. The CTC causes a NMI, this autoboots the system, +and then the PIO releases the NMI line. Pasting: 0-F : as is @@ -22,12 +22,18 @@ Test Paste: -4000^11^22^33^44^55^66^77^88^99^-4000 Now press up-arrow to confirm the data has been entered. -TODO: - - MCYCL (activate single stepping) - - CYCL (single step) - - layout LEDs (address bus, data bus, command bus, MCYCL) - - RAM expansion +The SC1 version is a modification that turns it into a chesscomputer. +Not to be confused with the prequel to SC2, but more likely a different +version of SLC1 without the "Lern" part. + + +TODO: +- MCYCL (activate single stepping) +- CYCL (single step) +- layout LEDs (address bus, data bus, command bus, MCYCL) +- RAM expansion +- who made poly880s? slc1 is very similar, it's by the same person? ****************************************************************************/ @@ -64,6 +70,13 @@ void poly880_state::poly880_mem(address_map &map) map(0x8000, 0xffff).bankrw("bank1"); } +void poly880_state::poly880s_mem(address_map &map) +{ + map(0x0000, 0x3fff).rom(); + map(0x4000, 0x43ff).mirror(0x3c00).ram(); + map(0x8000, 0xffff).bankrw("bank1"); +} + void poly880_state::poly880_io(address_map &map) { map.global_mask(0xaf); @@ -288,6 +301,12 @@ void poly880_state::poly880(machine_config &config) RAM(config, RAM_TAG).set_default_size("1K"); } +void poly880_state::poly880s(machine_config &config) +{ + poly880(config); + m_maincpu->set_addrmap(AS_PROGRAM, &poly880_state::poly880s_mem); +} + /* ROMs */ ROM_START( poly880 ) @@ -296,7 +315,13 @@ ROM_START( poly880 ) ROM_LOAD( "poly880.i6", 0x1000, 0x0400, CRC(9efddf5b) SHA1(6ffa2f80b2c6f8ec9e22834f739c82f9754272b8) ) ROM_END +ROM_START( poly880s ) + ROM_REGION( 0x10000, Z80_TAG, 0 ) + ROM_LOAD( "sc1.rom", 0x0000, 0x1000, CRC(26965b23) SHA1(01568911446eda9f05ec136df53da147b7c6f2bf) ) +ROM_END + /* System Drivers */ -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1983, poly880, 0, 0, poly880, poly880, poly880_state, empty_init, "VEB Polytechnik", "Poly-Computer 880", MACHINE_SUPPORTS_SAVE ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +COMP( 1983, poly880, 0, 0, poly880, poly880, poly880_state, empty_init, "VEB Polytechnik", "Poly-Computer 880", MACHINE_SUPPORTS_SAVE ) +COMP( 1983, poly880s, poly880, 0, poly880s, poly880, poly880_state, empty_init, "hack", "Poly-Computer 880 (SC1)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/slc1.cpp b/src/mame/drivers/slc1.cpp index 550227845a1..c64f82d4efe 100644 --- a/src/mame/drivers/slc1.cpp +++ b/src/mame/drivers/slc1.cpp @@ -19,7 +19,7 @@ This computer is both a Z80 trainer, and a chess computer. The keyboard There is no chess board attached. You supply your own and you sync the pieces and the computer instructions. The chess engine was copied from - Fidelity's Sensory Chess Challenger 8. + Fidelity's Sensory Chess Challenger 8. Even the TTL I/O is the same. When started, it is in Chess mode. Press 11111 to switch to Trainer mode. @@ -63,6 +63,7 @@ TODO: #include "speaker.h" +// internal artwork #include "slc1.lh" @@ -97,8 +98,8 @@ private: void mem_map(address_map &map); void io_map(address_map &map); - u8 io_r(offs_t offset); - void io_w(offs_t offset, u8 data); + u8 input_r(); + void control_w(offs_t offset, u8 data); u8 m_select = 0; u8 m_segment = 0; @@ -113,11 +114,12 @@ void slc1_state::machine_start() } + /*************************************************************************** I/O ***************************************************************************/ -void slc1_state::io_w(offs_t offset, u8 data) +void slc1_state::control_w(offs_t offset, u8 data) { // d0-d3: 7442 or equivalent m_select = data & 0xf; @@ -137,7 +139,7 @@ void slc1_state::io_w(offs_t offset, u8 data) m_busyled = BIT(data, 4); } -u8 slc1_state::io_r(offs_t offset) +u8 slc1_state::input_r() { u8 data = 0; @@ -149,8 +151,9 @@ u8 slc1_state::io_r(offs_t offset) } + /*************************************************************************** - Address Map + Address Maps ***************************************************************************/ void slc1_state::mem_map(address_map &map) @@ -163,12 +166,13 @@ void slc1_state::mem_map(address_map &map) void slc1_state::io_map(address_map &map) { map.global_mask(0x07); - map(0x00, 0x07).rw(FUNC(slc1_state::io_r), FUNC(slc1_state::io_w)); + map(0x00, 0x07).rw(FUNC(slc1_state::input_r), FUNC(slc1_state::control_w)); } + /************************************************************************** - Keyboard Layout + Input Ports ***************************************************************************/ INPUT_CHANGED_MEMBER(slc1_state::trigger_reset) @@ -200,8 +204,9 @@ static INPUT_PORTS_START( slc1 ) INPUT_PORTS_END + /*************************************************************************** - Machine driver + Machine Config ***************************************************************************/ void slc1_state::slc1(machine_config &config) @@ -222,9 +227,10 @@ void slc1_state::slc1(machine_config &config) } -/*************************************************************************** - Game driver -***************************************************************************/ + +/****************************************************************************** + ROM Definitions +******************************************************************************/ ROM_START(slc1) ROM_REGION(0x1000, "maincpu", 0 ) @@ -237,5 +243,10 @@ ROM_END } // anonymous namespace + +/****************************************************************************** + Drivers +******************************************************************************/ + /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ COMP( 1989, slc1, 0, 0, slc1, slc1, slc1_state, empty_init, "Dieter Scheuschner", "Schach- und Lerncomputer SLC 1", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/slc1a.cpp b/src/mame/drivers/slc1a.cpp deleted file mode 100644 index ee05137f3e3..00000000000 --- a/src/mame/drivers/slc1a.cpp +++ /dev/null @@ -1,210 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/*************************************************************************** - -This appears to be a prototype or alternate version of SLC 1. -The ROM was first assumed to be VEB SC 1, but unfortunately it isn't. - -TODO: -- merge with slc1.cpp? but hardware differs too much -- any way to access the "Lern" part? -- speaker, it's very noisy if hooked up as it is now -- LED(s)? they're not on digit d7 -- 7seg sometimes flashes - -****************************************************************************/ - -#include "emu.h" -#include "cpu/z80/z80.h" -#include "machine/z80pio.h" -#include "sound/dac.h" -#include "speaker.h" - -#include "slc1a.lh" - - -namespace { - -class slc1_state : public driver_device -{ -public: - slc1_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_pio(*this, "z80pio"), - m_dac(*this, "dac"), - m_keypad(*this, "LINE%u", 1), - m_digits(*this, "digit%u", 0U) - { } - - void slc1(machine_config &config); - -protected: - virtual void machine_start() override; - -private: - required_device m_maincpu; - required_device m_pio; - required_device m_dac; - required_ioport_array<8> m_keypad; - - output_finder<4> m_digits; - - void main_io(address_map &map); - void main_map(address_map &map); - - uint8_t m_matrix; - - void matrix_w(uint8_t data); - void pio_port_a_w(uint8_t data); - uint8_t pio_port_b_r(); -}; - -void slc1_state::machine_start() -{ - m_digits.resolve(); - - m_matrix = 0; - save_item(NAME(m_matrix)); -} - -/*************************************************************************** - - Display - -***************************************************************************/ - -void slc1_state::pio_port_a_w(uint8_t data) -{ - // digit segment data - uint8_t digit = bitswap<8>(data,3,4,6,0,1,2,7,5); - - if (m_matrix & 0x04) - m_digits[3] = digit; - if (m_matrix & 0x08) - m_digits[2] = digit; - if (m_matrix & 0x10) - m_digits[1] = digit; - if (m_matrix & 0x20) - m_digits[0] = digit; -} - - -/*************************************************************************** - - Keyboard - -***************************************************************************/ - -void slc1_state::matrix_w(uint8_t data) -{ - // d1: speaker out - //m_dac->write(BIT(data, 1)); - - // keypad/led mux - m_matrix = data; -} - -uint8_t slc1_state::pio_port_b_r() -{ - uint8_t data = 0; - - // read keypad matrix - for (int i = 0; i < 8; i++) - if (BIT(m_matrix, i)) - data |= m_keypad[i]->read(); - - return data; -} - - -void slc1_state::main_map(address_map &map) -{ - map.unmap_value_high(); - map(0x0000, 0x0fff).rom(); - map(0x4000, 0x43ff).ram(); -} - -void slc1_state::main_io(address_map &map) -{ - map.unmap_value_high(); - map.global_mask(0xff); - map(0x80, 0x83).rw(m_pio, FUNC(z80pio_device::read_alt), FUNC(z80pio_device::write_alt)); - map(0xfc, 0xfc).w(FUNC(slc1_state::matrix_w)); -} - - -/* Input ports */ - -static INPUT_PORTS_START( slc1 ) - PORT_START("LINE1") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D4 T") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(KEYCODE_D) - - PORT_START("LINE2") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B2 S") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(KEYCODE_B) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F6 K") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(KEYCODE_F) - - PORT_START("LINE3") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C3 L") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CODE(KEYCODE_C) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_G) - - PORT_START("LINE4") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A1 B") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CODE(KEYCODE_A) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E5 D") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CODE(KEYCODE_E) - - PORT_START("LINE5") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_H) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C") PORT_CODE(KEYCODE_R) - - PORT_START("LINE6") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A") PORT_CODE(KEYCODE_O) - - PORT_START("LINE7") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) - - PORT_START("LINE8") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("St") PORT_CODE(KEYCODE_S) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) -INPUT_PORTS_END - - -/* Machine config */ - -void slc1_state::slc1(machine_config &config) -{ - /* basic machine hardware */ - Z80(config, m_maincpu, 2500000); // U880 Z80 clone - m_maincpu->set_addrmap(AS_PROGRAM, &slc1_state::main_map); - m_maincpu->set_addrmap(AS_IO, &slc1_state::main_io); - - /* video hardware */ - config.set_default_layout(layout_slc1a); - - /* devices */ - Z80PIO(config, m_pio, 2500000); - m_pio->out_pa_callback().set(FUNC(slc1_state::pio_port_a_w)); - m_pio->in_pb_callback().set(FUNC(slc1_state::pio_port_b_r)); - - /* sound hardware */ - SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); -} - - -/* ROM definition */ - -ROM_START( slc1a ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "sc1.rom", 0x0000, 0x1000, CRC(26965b23) SHA1(01568911446eda9f05ec136df53da147b7c6f2bf)) -ROM_END - -} // anonymous namespace - - -/* Driver */ - -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -COMP( 1989, slc1a, slc1, 0, slc1, slc1, slc1_state, empty_init, "Dieter Scheuschner", "Schach- und Lerncomputer SLC 1 (prototype?)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/poly880.h b/src/mame/includes/poly880.h index 7f717469f73..36a91b23fe0 100644 --- a/src/mame/includes/poly880.h +++ b/src/mame/includes/poly880.h @@ -35,6 +35,7 @@ public: { } void poly880(machine_config &config); + void poly880s(machine_config &config); DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); DECLARE_INPUT_CHANGED_MEMBER( trigger_nmi ); @@ -63,6 +64,7 @@ private: bool m_nmi; void poly880_io(address_map &map); void poly880_mem(address_map &map); + void poly880s_mem(address_map &map); }; #endif diff --git a/src/mame/layout/slc1a.lay b/src/mame/layout/slc1a.lay deleted file mode 100644 index 599058e7fea..00000000000 --- a/src/mame/layout/slc1a.lay +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/mame/mame.lst b/src/mame/mame.lst index bb39f635899..d15dcc7b385 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35063,6 +35063,7 @@ poly800mdk // @source:poly880.cpp poly880 // +poly880s // @source:polyplay.cpp polyplay // @@ -38216,9 +38217,6 @@ slapshotj // D71 (c) 1994 Taito Corporation (Ver 2.2 J) @source:slc1.cpp slc1 // -@source:slc1a.cpp -slc1a - @source:sleic.cpp bikerace // bikerace2 // diff --git a/src/mame/mess.flt b/src/mame/mess.flt index a1700920666..8b57414f657 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -929,7 +929,6 @@ sitcom.cpp sk1.cpp sk101bl.cpp slc1.cpp -slc1a.cpp slicer.cpp slsstars.cpp sm1800.cpp -- cgit v1.2.3