From 83d1b46ff578ac366e44e8b088416f7e3357fffe Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 21 Apr 2021 19:34:48 +0200 Subject: [PATCH] New working clones ------------------ Compact Computer 40 Plus (prototype) [hap, Jon Guidry] --- hash/cc40_cart.xml | 18 +-- hash/microvision.xml | 1 + hash/ti74_cart.xml | 13 +- hash/ti95_cart.xml | 13 +- src/devices/bus/odyssey2/homecomp.cpp | 2 +- src/mame/drivers/cc40.cpp | 182 +++++++++++++++++--------- src/mame/drivers/dai3wksi.cpp | 4 +- src/mame/drivers/mephisto_mm2.cpp | 4 +- src/mame/drivers/tasc.cpp | 8 +- src/mame/drivers/ti74.cpp | 68 +++++----- src/mame/layout/cc40.lay | 62 ++++----- src/mame/layout/saitek_risc2500.lay | 10 +- src/mame/layout/ti74.lay | 56 ++++---- src/mame/layout/ti95.lay | 70 +++++----- src/mame/mame.lst | 1 + 15 files changed, 293 insertions(+), 219 deletions(-) diff --git a/hash/cc40_cart.xml b/hash/cc40_cart.xml index e55f33a6d52..c0723e9a2af 100644 --- a/hash/cc40_cart.xml +++ b/hash/cc40_cart.xml @@ -4,21 +4,21 @@ license:CC0 --> - - + + Advanced Electrical Engineering 1983 diff --git a/hash/microvision.xml b/hash/microvision.xml index 82414a93454..1e6ad7c22e4 100644 --- a/hash/microvision.xml +++ b/hash/microvision.xml @@ -27,6 +27,7 @@ The "clock" feature is used to indicate MCU clock frequency The "pla" feature is for TMS1100 output PLA type The "paddle" feature is used to indicate if paddle circuitry exists on the PCB The "butmask" feature indicates cartridge button restrict mask (active-low) + --> diff --git a/hash/ti74_cart.xml b/hash/ti74_cart.xml index 51dc51e77b1..e750df78ece 100644 --- a/hash/ti74_cart.xml +++ b/hash/ti74_cart.xml @@ -2,13 +2,16 @@ - Not dumped yet: - - Chemical Engineering - - Statistics + diff --git a/hash/ti95_cart.xml b/hash/ti95_cart.xml index 813063efd63..563ad1315ce 100644 --- a/hash/ti95_cart.xml +++ b/hash/ti95_cart.xml @@ -2,14 +2,17 @@ - Library functions can be reached from [RUN], [F3] + diff --git a/src/devices/bus/odyssey2/homecomp.cpp b/src/devices/bus/odyssey2/homecomp.cpp index 3357bec193d..7de27efaeed 100644 --- a/src/devices/bus/odyssey2/homecomp.cpp +++ b/src/devices/bus/odyssey2/homecomp.cpp @@ -169,7 +169,7 @@ void o2_homecomp_device::device_add_mconfig(machine_config &config) // cassette CASSETTE(config, m_cass); - m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED); + m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_MUTED | CASSETTE_MOTOR_DISABLED); SPEAKER(config, "cass_output").front_center(); // on data recorder m_cass->add_route(ALL_OUTPUTS, "cass_output", 0.05); } diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp index 669d2536155..502689403bf 100644 --- a/src/mame/drivers/cc40.cpp +++ b/src/mame/drivers/cc40.cpp @@ -1,5 +1,6 @@ // license:BSD-3-Clause // copyright-holders:hap +// thanks-to:Jon Guidry /*************************************************************************** Texas Instruments Compact Computer 40 (aka CC-40) @@ -38,7 +39,7 @@ --------- HM6116LP-4 - Hitachi 2KB SRAM (newer 18KB version has two HM6264 8KB chips) - HN61256PC09 - Hitachi DIP-28 32KB CMOS Mask PROM + HN61256PC09 - Hitachi DIP-28 32KB CMOS Mask PROM (also seen with HN61256PB02, earlier version?) TMX70C20N2L - Texas Instruments TMS70C20 CPU (128 bytes RAM, 2KB ROM) @ 2.5MHz, 40 pins - "X" implies prototype AMI 1041036-1 - 68-pin QFP AMI Gate Array HD44100H - 60-pin QFP Hitachi HD44100 LCD Driver @@ -59,6 +60,15 @@ can be loaded. Load a program by pressing the [RUN] key while viewing the list, or manually with the command RUN "" + As for the CC-40+, the product was finalized, but in the end it wasn't released. + The hardware is very similar to CC-40. The main differences are the CPU: + a TMS70C40 (twice larger internal ROM), and a cassette port separate from Hexbus. + The controller chip is a TI TP0373 this time, it appears that the basic functionality + is the same as the one by AMI. Like the CC-40, it had either 6KB or 18KB RAM. + + The CC-40+ cassette device number is 1, eg. SAVE"1.FILENAME" to save, and + OLD"1.FILENAME" to load. + TODO: - external RAM cartridge (bus_control_w cartridge memory addressing) @@ -73,9 +83,11 @@ ***************************************************************************/ #include "emu.h" + #include "bus/generic/slot.h" #include "bus/generic/carts.h" #include "cpu/tms7000/tms7000.h" +#include "imagedev/cassette.h" #include "machine/nvram.h" #include "sound/dac.h" #include "video/hd44780.h" @@ -88,17 +100,21 @@ #include "cc40.lh" +namespace { + class cc40_state : public driver_device { public: cc40_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_cart(*this, "cartslot"), - m_key_matrix(*this, "IN.%u", 0), - m_battery_inp(*this, "BATTERY"), m_nvram(*this, "sysram.%u", 1U), - m_lamps(*this, "lamp%u", 0U) + m_sysbank(*this, "sysbank"), + m_cartbank(*this, "cartbank"), + m_cart(*this, "cartslot"), + m_cass(*this, "cassette"), + m_key_matrix(*this, "IN.%u", 0), + m_segs(*this, "seg%u", 0U) { m_sysram[0] = nullptr; m_sysram[1] = nullptr; @@ -107,13 +123,14 @@ public: DECLARE_INPUT_CHANGED_MEMBER(sysram_size_changed); void cc40(machine_config &config); + void cc40p(machine_config &config); protected: virtual void machine_reset() override; virtual void machine_start() override; + virtual void device_post_load() override; private: - void postload(); void init_sysram(int chip, u16 size); void update_lcd_indicator(u8 y, u8 x, int state); void update_clock_divider(); @@ -122,41 +139,46 @@ private: void sysram_w(offs_t offset, u8 data); u8 bus_control_r(); void bus_control_w(u8 data); + u8 power_r(); void power_w(u8 data); - u8 battery_r(); u8 bankswitch_r(); void bankswitch_w(u8 data); u8 clock_control_r(); void clock_control_w(u8 data); u8 keyboard_r(); void keyboard_w(u8 data); + u8 cass_r(); + void cass_w(u8 data); void cc40_palette(palette_device &palette) const; DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); HD44780_PIXEL_UPDATE(cc40_pixel_update); - void main_map(address_map &map); + void cc40_map(address_map &map); + void cc40p_map(address_map &map); - required_device m_maincpu; - required_device m_cart; - required_ioport_array<8> m_key_matrix; - required_ioport m_battery_inp; + required_device m_maincpu; required_device_array m_nvram; + required_memory_bank m_sysbank; + required_memory_bank m_cartbank; + required_device m_cart; + optional_device m_cass; + required_ioport_array<8> m_key_matrix; + output_finder<80> m_segs; memory_region *m_cart_rom; - u8 m_bus_control; - u8 m_power; - u8 m_banks; - u8 m_clock_control; - u8 m_clock_divider; - u8 m_key_select; + u8 m_bus_control = 0; + u8 m_power = 0; + u8 m_banks = 0; + u8 m_clock_control = 0; + u8 m_clock_divider = 0; + u8 m_key_select = 0; std::unique_ptr m_sysram[2]; u16 m_sysram_size[2]; u16 m_sysram_end[2]; u16 m_sysram_mask[2]; - output_finder<80> m_lamps; }; @@ -195,7 +217,7 @@ DEVICE_IMAGE_LOAD_MEMBER(cc40_state::cart_load) void cc40_state::cc40_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(138, 146, 148)); // background - palette.set_pen_color(1, rgb_t(92, 83, 88)); // lcd pixel on + palette.set_pen_color(1, rgb_t(50, 45, 60)); // lcd pixel on palette.set_pen_color(2, rgb_t(131, 136, 139)); // lcd pixel off } @@ -207,7 +229,7 @@ void cc40_state::update_lcd_indicator(u8 y, u8 x, int state) // ---- raw lcd screen here ---- // under | ERROR v v v v v v _LOW // output# | 60 61 62 63 50 51 52 53 - m_lamps[y * 10 + x] = state ? 1 : 0; + m_segs[y * 10 + x] = state ? 1 : 0; } HD44780_PIXEL_UPDATE(cc40_state::cc40_pixel_update) @@ -290,6 +312,11 @@ void cc40_state::bus_control_w(u8 data) m_bus_control = data; } +u8 cc40_state::power_r() +{ + return m_power; +} + void cc40_state::power_w(u8 data) { // d0: power-on hold latch @@ -300,12 +327,6 @@ void cc40_state::power_w(u8 data) m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } -u8 cc40_state::battery_r() -{ - // d0: low battery sense line (0 = low power) - return m_battery_inp->read(); -} - u8 cc40_state::bankswitch_r() { return m_banks; @@ -316,11 +337,11 @@ void cc40_state::bankswitch_w(u8 data) data &= 0x0f; // d0-d1: system rom bankswitch - membank("sysbank")->set_entry(data & 3); + m_sysbank->set_entry(data & 3); // d2-d3: cartridge 32KB page bankswitch if (m_cart_rom) - membank("cartbank")->set_entry(data >> 2 & 3); + m_cartbank->set_entry(data >> 2 & 3); m_banks = data; } @@ -353,35 +374,50 @@ void cc40_state::clock_control_w(u8 data) u8 cc40_state::keyboard_r() { - u8 ret = 0; + u8 data = 0; // read selected keyboard rows for (int i = 0; i < 8; i++) { if (m_key_select >> i & 1) - ret |= m_key_matrix[i]->read(); + data |= m_key_matrix[i]->read(); } - return ret; + return data; } void cc40_state::keyboard_w(u8 data) { - // d(0-7): select keyboard column + // d0-d7: select keyboard column m_key_select = data; } -void cc40_state::main_map(address_map &map) +u8 cc40_state::cass_r() +{ + // d3: cass data in + return (m_cass->input() > 0.04) ? 8 : 0; +} + +void cc40_state::cass_w(u8 data) +{ + // d4: cass motor + m_cass->set_motor((data & 0x10) ? 1 : 0); + + // d3: cass data out + m_cass->output((data & 8) ? +1.0 : -1.0); +} + +void cc40_state::cc40_map(address_map &map) { map.unmap_value_high(); map(0x0110, 0x0110).rw(FUNC(cc40_state::bus_control_r), FUNC(cc40_state::bus_control_w)); - map(0x0111, 0x0111).w(FUNC(cc40_state::power_w)); + map(0x0111, 0x0111).rw(FUNC(cc40_state::power_r), FUNC(cc40_state::power_w)); map(0x0112, 0x0112).noprw(); // d0-d3: Hexbus data map(0x0113, 0x0113).noprw(); // d0: Hexbus available map(0x0114, 0x0114).noprw(); // d0,d1: Hexbus handshake - map(0x0115, 0x0115).w("dac", FUNC(dac_bit_interface::data_w)); // d0: piezo control - map(0x0116, 0x0116).r(FUNC(cc40_state::battery_r)); + map(0x0115, 0x0115).w("dac", FUNC(dac_bit_interface::data_w)); + map(0x0116, 0x0116).portr("BATTERY"); map(0x0119, 0x0119).rw(FUNC(cc40_state::bankswitch_r), FUNC(cc40_state::bankswitch_w)); map(0x011a, 0x011a).rw(FUNC(cc40_state::clock_control_r), FUNC(cc40_state::clock_control_w)); map(0x011e, 0x011f).rw("hd44780", FUNC(hd44780_device::read), FUNC(hd44780_device::write)); @@ -392,6 +428,12 @@ void cc40_state::main_map(address_map &map) map(0xd000, 0xefff).bankr("sysbank"); } +void cc40_state::cc40p_map(address_map &map) +{ + cc40_map(map); + map(0x0121, 0x0121).rw(FUNC(cc40_state::cass_r), FUNC(cc40_state::cass_w)); +} + /*************************************************************************** @@ -518,7 +560,6 @@ void cc40_state::machine_reset() m_power = 1; update_clock_divider(); - bankswitch_w(0); } @@ -539,7 +580,7 @@ void cc40_state::init_sysram(int chip, u16 size) m_sysram_size[chip] = size; } -void cc40_state::postload() +void cc40_state::device_post_load() { init_sysram(0, m_sysram_size[0]); init_sysram(1, m_sysram_size[1]); @@ -550,15 +591,15 @@ void cc40_state::postload() void cc40_state::machine_start() { // init - m_lamps.resolve(); + m_segs.resolve(); std::string region_tag; m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); - membank("sysbank")->configure_entries(0, 4, memregion("system")->base(), 0x2000); + m_sysbank->configure_entries(0, 4, memregion("system")->base(), 0x2000); if (m_cart_rom) - membank("cartbank")->configure_entries(0, 4, m_cart_rom->base(), 0x8000); + m_cartbank->configure_entries(0, 4, m_cart_rom->base(), 0x8000); else - membank("cartbank")->set_base(memregion("maincpu")->base() + 0x5000); + m_cartbank->set_base(memregion("maincpu")->base() + 0x5000); init_sysram(0, 0x800); // default to 6KB init_sysram(1, 0x800); // " @@ -566,11 +607,6 @@ void cc40_state::machine_start() bus_control_w(0); bankswitch_w(0); - // zerofill other - m_power = 0; - m_clock_control = 0; - m_key_select = 0; - // register for savestates save_item(NAME(m_bus_control)); save_item(NAME(m_power)); @@ -578,15 +614,13 @@ void cc40_state::machine_start() save_item(NAME(m_clock_control)); save_item(NAME(m_clock_divider)); save_item(NAME(m_key_select)); - - machine().save().register_postload(save_prepost_delegate(FUNC(cc40_state::postload), this)); } void cc40_state::cc40(machine_config &config) { - /* basic machine hardware */ - TMS70C20(config, m_maincpu, XTAL(5'000'000) / 2); - m_maincpu->set_addrmap(AS_PROGRAM, &cc40_state::main_map); + // basic machine hardware + TMS70C20(config, m_maincpu, 5_MHz_XTAL / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &cc40_state::cc40_map); m_maincpu->in_porta().set(FUNC(cc40_state::keyboard_r)); m_maincpu->out_portb().set(FUNC(cc40_state::keyboard_w)); @@ -594,7 +628,7 @@ void cc40_state::cc40(machine_config &config) NVRAM(config, "sysram.1", nvram_device::DEFAULT_ALL_0); NVRAM(config, "sysram.2", nvram_device::DEFAULT_ALL_0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); screen.set_refresh_hz(60); // arbitrary screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); @@ -610,15 +644,32 @@ void cc40_state::cc40(machine_config &config) hd44780.set_lcd_size(2, 16); // 2*16 internal hd44780.set_pixel_update_cb(FUNC(cc40_state::cc40_pixel_update)); - /* sound hardware */ + // sound hardware SPEAKER(config, "speaker").front_center(); DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); - /* cartridge */ + // cartridge GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "cc40_cart", "bin,rom,256").set_device_load(FUNC(cc40_state::cart_load)); SOFTWARE_LIST(config, "cart_list").set_original("cc40_cart"); } +void cc40_state::cc40p(machine_config &config) +{ + cc40(config); + + // basic machine hardware + TMS70C40(config.replace(), m_maincpu, 5_MHz_XTAL / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &cc40_state::cc40p_map); + m_maincpu->in_porta().set(FUNC(cc40_state::keyboard_r)); + m_maincpu->out_portb().set(FUNC(cc40_state::keyboard_w)); + + // cassette + CASSETTE(config, m_cass); + m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_MUTED | CASSETTE_MOTOR_DISABLED); + SPEAKER(config, "cass_output").front_center(); // on data recorder + m_cass->add_route(ALL_OUTPUTS, "cass_output", 0.05); +} + /*************************************************************************** @@ -628,13 +679,24 @@ void cc40_state::cc40(machine_config &config) ***************************************************************************/ ROM_START( cc40 ) - ROM_REGION( 0x800, "maincpu", 0 ) - ROM_LOAD( "tms70c20.bin", 0x000, 0x800, CRC(a21bf6ab) SHA1(3da8435ecbee143e7fa149ee8e1c92949bade1d8) ) // internal cpu rom + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "c11002", 0x0000, 0x0800, CRC(a21bf6ab) SHA1(3da8435ecbee143e7fa149ee8e1c92949bade1d8) ) // internal cpu rom ROM_REGION( 0x8000, "system", 0 ) - ROM_LOAD( "hn61256pc09.bin", 0x0000, 0x8000, CRC(f5322fab) SHA1(1b5c4052a53654363c458f75eac7a27f0752def6) ) // system rom, banked + ROM_LOAD( "hn61256pc09", 0x0000, 0x8000, CRC(f5322fab) SHA1(1b5c4052a53654363c458f75eac7a27f0752def6) ) // system rom, banked ROM_END +ROM_START( cc40p ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "75305.u200", 0x0000, 0x1000, CRC(42bb6af2) SHA1(642dede16cb4ef2c5b9eaae79e28054f1111eef8) ) // internal cpu rom + + ROM_REGION( 0x8000, "system", 0 ) + ROM_LOAD( "hn61256pc09.u205", 0x0000, 0x8000, CRC(f5322fab) SHA1(1b5c4052a53654363c458f75eac7a27f0752def6) ) // system rom, banked +ROM_END + +} // anonymous namespace + // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1983, cc40, 0, 0, cc40, cc40, cc40_state, empty_init, "Texas Instruments", "Compact Computer 40", MACHINE_SUPPORTS_SAVE ) +COMP( 1983, cc40, 0, 0, cc40, cc40, cc40_state, empty_init, "Texas Instruments", "Compact Computer 40", MACHINE_SUPPORTS_SAVE ) +COMP( 1984, cc40p, cc40, 0, cc40p, cc40, cc40_state, empty_init, "Texas Instruments", "Compact Computer 40 Plus (prototype)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/dai3wksi.cpp b/src/mame/drivers/dai3wksi.cpp index 22b7552fbb1..12db34f3d76 100644 --- a/src/mame/drivers/dai3wksi.cpp +++ b/src/mame/drivers/dai3wksi.cpp @@ -382,8 +382,8 @@ void dai3wksi_state::main_map(address_map &map) { map(0x0000, 0x1bff).rom(); map(0x2000, 0x23ff).ram(); - map(0x2400, 0x24ff).mirror(0x100).portr("IN0"); - map(0x2800, 0x28ff).mirror(0x100).portr("IN1"); + map(0x2400, 0x2400).mirror(0x1ff).portr("IN0"); + map(0x2800, 0x2800).mirror(0x1ff).portr("IN1"); map(0x3000, 0x3000).w(FUNC(dai3wksi_state::audio_1_w)); map(0x3400, 0x3400).w(FUNC(dai3wksi_state::audio_2_w)); map(0x3800, 0x3800).w(FUNC(dai3wksi_state::audio_3_w)); diff --git a/src/mame/drivers/mephisto_mm2.cpp b/src/mame/drivers/mephisto_mm2.cpp index 2299218ec0f..0116edea644 100644 --- a/src/mame/drivers/mephisto_mm2.cpp +++ b/src/mame/drivers/mephisto_mm2.cpp @@ -76,7 +76,7 @@ Mephisto 4 Turbo Kit 18mhz - (mm4tk) The MM V prototype was the program that Ed Schroeder participated with as "Rebel" at the 1989 WMCCC in Portorose. It was used with the TK20 TurboKit. -http://chesseval.com/ChessEvalJournal/PrototypeMMV.htm +For more information, see: http://chesseval.com/ChessEvalJournal/PrototypeMMV.htm MM VI (Saitek, 1994) is on different hardware, H8 CPU. @@ -514,4 +514,4 @@ CONS( 1987, mm4tk, mm4, 0, mm4tk, mm2, mm2_state, empty_init, "ha CONS( 1990, mm5, 0, 0, mm5, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM V (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1990, mm5a, mm5, 0, mm5, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM V (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1989, mm5p, mm5, 0, mm5p, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM V (Portorose TM version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING ) +CONS( 1989, mm5p, mm5, 0, mm5p, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM V (Portorose TM version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING ) // aka Rebel diff --git a/src/mame/drivers/tasc.cpp b/src/mame/drivers/tasc.cpp index be31fbf38e2..348fea94dfb 100644 --- a/src/mame/drivers/tasc.cpp +++ b/src/mame/drivers/tasc.cpp @@ -8,12 +8,16 @@ Commonly known as Tasc R30, it's basically a dedicated ChessMachine. The King chess engines are also compatible with Tasc's The ChessMachine software on PC, however the prototype Gideon 2.1(internally: Rebel 2.01) is not. +The King 2.23 version was not released to the public. It has an opening book +meant for chesscomputer competitions. +For more information, see: http://chesseval.com/ChessEvalJournal/R30v223.htm + R30 hardware notes: - ARM6 CPU(P60ARM/CG) @ 30MHz - 256KB system ROM (2*27C010) - 512KB program RAM (4*MT5C1008), 128KB permanent RAM (KM681000ALP-7L) - Toshiba LCD drivers (3*T7778A, T7900, T6963C), TC5565AFL-15 -- SB20 or SB30 "Smartboard" chessboard with piece recognition +- SB20 or SB30 "SmartBoard" chessboard with piece recognition R40 hardware notes: - ARM6 CPU(VY86C061PSTC) @ 40MHz @@ -305,5 +309,5 @@ ROM_END // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS CONS( 1995, tascr30, 0, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.50)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) CONS( 1993, tascr30a, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.20)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) -CONS( 1993, tascr30b, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.23, unreleased)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) +CONS( 1993, tascr30b, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.23, TM version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) // competed in several chesscomputer tournaments CONS( 1993, tascr30g, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (Gideon 2.1, prototype)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) // made in 1993, later released in 2012 diff --git a/src/mame/drivers/ti74.cpp b/src/mame/drivers/ti74.cpp index d473b040492..3047da4e1b1 100644 --- a/src/mame/drivers/ti74.cpp +++ b/src/mame/drivers/ti74.cpp @@ -51,9 +51,8 @@ Overall, the hardware is very similar to TI CC-40. A lot has been shuffled around - to cut down on complexity (and probably for protection too). To reduce power usage - even more, the OS often idles while waiting for any keypress that triggers an interrupt - and wakes the processor up. + to cut down on complexity. To reduce power usage even more, the OS often idles while + waiting for any keypress that triggers an interrupt and wakes the processor up. The machine is powered by 4 AAA batteries. These will also save internal RAM, provided that the machine is turned off properly. @@ -70,11 +69,13 @@ ***************************************************************************/ #include "emu.h" + #include "bus/generic/carts.h" #include "bus/generic/slot.h" #include "cpu/tms7000/tms7000.h" #include "machine/nvram.h" #include "video/hd44780.h" + #include "emupal.h" #include "screen.h" #include "softlist.h" @@ -83,16 +84,19 @@ #include "ti95.lh" +namespace { + class ti74_state : public driver_device { public: ti74_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_sysbank(*this, "sysbank"), m_cart(*this, "cartslot"), m_key_matrix(*this, "IN.%u", 0), m_battery_inp(*this, "BATTERY"), - m_lamps(*this, "lamp%u", 0U) + m_segs(*this, "seg%u", 0U) { } void ti74(machine_config &config); @@ -119,14 +123,14 @@ private: void main_map(address_map &map); required_device m_maincpu; + required_memory_bank m_sysbank; required_device m_cart; required_ioport_array<8> m_key_matrix; required_ioport m_battery_inp; + output_finder<80> m_segs; - u8 m_key_select; - u8 m_power; - - output_finder<80> m_lamps; + u8 m_key_select = 0; + u8 m_power = 0; }; @@ -165,7 +169,7 @@ DEVICE_IMAGE_LOAD_MEMBER(ti74_state::cart_load) void ti74_state::ti74_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(138, 146, 148)); // background - palette.set_pen_color(1, rgb_t(92, 83, 88)); // LCD pixel on + palette.set_pen_color(1, rgb_t(50, 45, 60)); // LCD pixel on palette.set_pen_color(2, rgb_t(131, 136, 139)); // LCD pixel off } @@ -183,7 +187,7 @@ void ti74_state::update_lcd_indicator(u8 y, u8 x, int state) // above | _LOW _ERROR 2nd INV ALPHA LC INS DEGRAD HEX OCT I/O // screen- | _P{70} <{71} RUN{3} // area . SYS{4} - m_lamps[y * 10 + x] = state ? 1 : 0; + m_segs[y * 10 + x] = state ? 1 : 0; } HD44780_PIXEL_UPDATE(ti74_state::ti74_pixel_update) @@ -242,28 +246,28 @@ HD44780_PIXEL_UPDATE(ti74_state::ti95_pixel_update) u8 ti74_state::keyboard_r() { - u8 ret = 0; + u8 data = 0; // read selected keyboard rows for (int i = 0; i < 8; i++) { if (m_key_select >> i & 1) - ret |= m_key_matrix[i]->read(); + data |= m_key_matrix[i]->read(); } - return ret; + return data; } void ti74_state::keyboard_w(u8 data) { - // d(0-7): select keyboard column + // d0-d7: select keyboard column m_key_select = data; } void ti74_state::bankswitch_w(u8 data) { // d0-d1: system rom bankswitch - membank("sysbank")->set_entry(data & 3); + m_sysbank->set_entry(data & 3); // d2: power-on latch if (~data & 4 && m_power) @@ -496,22 +500,18 @@ void ti74_state::machine_reset() { m_power = 1; + m_sysbank->set_entry(0); update_battery_status(m_battery_inp->read()); } void ti74_state::machine_start() { - m_lamps.resolve(); + m_segs.resolve(); if (m_cart->exists()) m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0xbfff, read8sm_delegate(*m_cart, FUNC(generic_slot_device::read_rom))); - membank("sysbank")->configure_entries(0, 4, memregion("system")->base(), 0x2000); - membank("sysbank")->set_entry(0); - - // zerofill - m_key_select = 0; - m_power = 0; + m_sysbank->configure_entries(0, 4, memregion("system")->base(), 0x2000); // register for savestates save_item(NAME(m_key_select)); @@ -520,8 +520,8 @@ void ti74_state::machine_start() void ti74_state::ti74(machine_config &config) { - /* basic machine hardware */ - TMS70C46(config, m_maincpu, XTAL(4'000'000)); + // basic machine hardware + TMS70C46(config, m_maincpu, 4_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &ti74_state::main_map); m_maincpu->in_porta().set(FUNC(ti74_state::keyboard_r)); m_maincpu->out_portb().set(FUNC(ti74_state::bankswitch_w)); @@ -529,7 +529,7 @@ void ti74_state::ti74(machine_config &config) NVRAM(config, "sysram.ic3", nvram_device::DEFAULT_ALL_0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); screen.set_refresh_hz(60); // arbitrary screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); @@ -546,16 +546,15 @@ void ti74_state::ti74(machine_config &config) hd44780.set_lcd_size(2, 16); // 2*16 internal hd44780.set_pixel_update_cb(FUNC(ti74_state::ti74_pixel_update)); - /* cartridge */ + // cartridge GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "ti74_cart", "bin,rom,256").set_device_load(FUNC(ti74_state::cart_load)); - SOFTWARE_LIST(config, "cart_list").set_original("ti74_cart"); } void ti74_state::ti95(machine_config &config) { - /* basic machine hardware */ - TMS70C46(config, m_maincpu, XTAL(4'000'000)); + // basic machine hardware + TMS70C46(config, m_maincpu, 4_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &ti74_state::main_map); m_maincpu->in_porta().set(FUNC(ti74_state::keyboard_r)); m_maincpu->out_portb().set(FUNC(ti74_state::bankswitch_w)); @@ -563,7 +562,7 @@ void ti74_state::ti95(machine_config &config) NVRAM(config, "sysram.ic3", nvram_device::DEFAULT_ALL_0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); screen.set_refresh_hz(60); // arbitrary screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); @@ -580,9 +579,8 @@ void ti74_state::ti95(machine_config &config) hd44780.set_lcd_size(2, 16); hd44780.set_pixel_update_cb(FUNC(ti74_state::ti95_pixel_update)); - /* cartridge */ + // cartridge GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "ti95_cart", "bin,rom,256").set_device_load(FUNC(ti74_state::cart_load)); - SOFTWARE_LIST(config, "cart_list").set_original("ti95_cart"); } @@ -611,7 +609,9 @@ ROM_START( ti95 ) ROM_LOAD( "hn61256pc95.ic1", 0x0000, 0x8000, CRC(c46d29ae) SHA1(c653f08590dbc28241a9f5a6c2541641bdb0208b) ) // system rom, banked ROM_END +} // anonymous namespace + // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1985, ti74, 0, 0, ti74, ti74, ti74_state, empty_init, "Texas Instruments", "TI-74 BASICALC", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) -COMP( 1986, ti95, 0, 0, ti95, ti95, ti74_state, empty_init, "Texas Instruments", "TI-95 PROCALC", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 1985, ti74, 0, 0, ti74, ti74, ti74_state, empty_init, "Texas Instruments", "TI-74 Basicalc", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 1986, ti95, 0, 0, ti95, ti95, ti74_state, empty_init, "Texas Instruments", "TI-95 Procalc", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) diff --git a/src/mame/layout/cc40.lay b/src/mame/layout/cc40.lay index 04cef47a1e1..bc7f338727c 100644 --- a/src/mame/layout/cc40.lay +++ b/src/mame/layout/cc40.lay @@ -16,7 +16,7 @@ license:CC0 - + @@ -26,7 +26,7 @@ license:CC0 - + @@ -36,7 +36,7 @@ license:CC0 - + @@ -46,7 +46,7 @@ license:CC0 - + @@ -56,7 +56,7 @@ license:CC0 - + @@ -66,7 +66,7 @@ license:CC0 - + @@ -76,7 +76,7 @@ license:CC0 - + @@ -86,7 +86,7 @@ license:CC0 - + @@ -96,7 +96,7 @@ license:CC0 - + @@ -106,7 +106,7 @@ license:CC0 - + @@ -116,7 +116,7 @@ license:CC0 - + @@ -126,13 +126,13 @@ license:CC0 - + - + @@ -164,65 +164,65 @@ license:CC0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/mame/layout/saitek_risc2500.lay b/src/mame/layout/saitek_risc2500.lay index 179179907d3..265c42ed573 100644 --- a/src/mame/layout/saitek_risc2500.lay +++ b/src/mame/layout/saitek_risc2500.lay @@ -8,7 +8,7 @@ license:CC0 - + @@ -66,22 +66,22 @@ license:CC0 - + - + - + - + diff --git a/src/mame/layout/ti74.lay b/src/mame/layout/ti74.lay index faee228c2c3..40bb7196daf 100644 --- a/src/mame/layout/ti74.lay +++ b/src/mame/layout/ti74.lay @@ -16,7 +16,7 @@ license:CC0 - + @@ -26,7 +26,7 @@ license:CC0 - + @@ -36,7 +36,7 @@ license:CC0 - + @@ -46,7 +46,7 @@ license:CC0 - + @@ -56,7 +56,7 @@ license:CC0 - + @@ -66,7 +66,7 @@ license:CC0 - + @@ -76,7 +76,7 @@ license:CC0 - + @@ -86,7 +86,7 @@ license:CC0 - + @@ -96,7 +96,7 @@ license:CC0 - + @@ -106,7 +106,7 @@ license:CC0 - + @@ -116,7 +116,7 @@ license:CC0 - + @@ -126,7 +126,7 @@ license:CC0 - + @@ -136,13 +136,13 @@ license:CC0 - + - + @@ -174,51 +174,51 @@ license:CC0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/mame/layout/ti95.lay b/src/mame/layout/ti95.lay index a0e5f7596f5..44c760dc542 100644 --- a/src/mame/layout/ti95.lay +++ b/src/mame/layout/ti95.lay @@ -11,14 +11,14 @@ license:CC0 - + - + @@ -26,7 +26,7 @@ license:CC0 - + @@ -34,7 +34,7 @@ license:CC0 - + @@ -46,7 +46,7 @@ license:CC0 - + @@ -56,7 +56,7 @@ license:CC0 - + @@ -66,7 +66,7 @@ license:CC0 - + @@ -76,7 +76,7 @@ license:CC0 - + @@ -86,7 +86,7 @@ license:CC0 - + @@ -96,7 +96,7 @@ license:CC0 - + @@ -106,7 +106,7 @@ license:CC0 - + @@ -116,7 +116,7 @@ license:CC0 - + @@ -126,7 +126,7 @@ license:CC0 - + @@ -136,7 +136,7 @@ license:CC0 - + @@ -146,7 +146,7 @@ license:CC0 - + @@ -156,7 +156,7 @@ license:CC0 - + @@ -166,7 +166,7 @@ license:CC0 - + @@ -176,7 +176,7 @@ license:CC0 - + @@ -258,68 +258,68 @@ license:CC0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index b21a816b2bb..f0cc2708fe4 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -10058,6 +10058,7 @@ twocrudea // MAB (c) 1990 Data East USA (US) @source:cc40.cpp cc40 // 1983 TI CC-40 +cc40p // 1983 TI CC-40+ @source:ccastles.cpp ccastles // 136022 (c) 1983