From 607e2c165a0348dc142dd26fc5d1242707ebc1b4 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 7 Feb 2024 22:57:58 +0100 Subject: New working systems ------------------- Kasparov Turbo S-24K [hap, Berger] --- src/devices/cpu/h8/h8325.cpp | 3 + src/devices/cpu/h8/h83337.cpp | 1 + src/devices/cpu/h8/h8_timer16.cpp | 2 + src/devices/cpu/h8/h8_timer16.h | 8 +- src/devices/cpu/h8/h8_timer8.cpp | 2 + src/devices/cpu/h8/h8_watchdog.cpp | 4 +- src/mame/layout/saitek_turbo16k.lay | 2 +- src/mame/layout/saitek_turbos24k.lay | 658 +++++++++++++++++++++++++++++++++++ src/mame/mame.lst | 3 + src/mame/saitek/leonardo.cpp | 14 +- src/mame/saitek/turbo16k.cpp | 4 +- src/mame/saitek/turbos24k.cpp | 349 +++++++++++++++++++ 12 files changed, 1034 insertions(+), 16 deletions(-) create mode 100644 src/mame/layout/saitek_turbos24k.lay create mode 100644 src/mame/saitek/turbos24k.cpp diff --git a/src/devices/cpu/h8/h8325.cpp b/src/devices/cpu/h8/h8325.cpp index c47d294bc5f..28efafd6ce4 100644 --- a/src/devices/cpu/h8/h8325.cpp +++ b/src/devices/cpu/h8/h8325.cpp @@ -181,6 +181,7 @@ void h8325_device::internal_update(uint64_t current_time) void h8325_device::device_start() { h8_device::device_start(); + save_item(NAME(m_syscr)); } void h8325_device::device_reset() @@ -202,5 +203,7 @@ void h8325_device::syscr_w(uint8_t data) uint8_t h8325_device::mdcr_r() { + if(!machine().side_effects_disabled()) + logerror("mdcr_r\n"); return 0xe7; } diff --git a/src/devices/cpu/h8/h83337.cpp b/src/devices/cpu/h8/h83337.cpp index 4ddd832dcba..98abb321c95 100644 --- a/src/devices/cpu/h8/h83337.cpp +++ b/src/devices/cpu/h8/h83337.cpp @@ -176,6 +176,7 @@ void h83337_device::internal_update(uint64_t current_time) void h83337_device::device_start() { h8_device::device_start(); + save_item(NAME(m_syscr)); } void h83337_device::device_reset() diff --git a/src/devices/cpu/h8/h8_timer16.cpp b/src/devices/cpu/h8/h8_timer16.cpp index 50d50d43008..94052e8e249 100644 --- a/src/devices/cpu/h8/h8_timer16.cpp +++ b/src/devices/cpu/h8/h8_timer16.cpp @@ -9,6 +9,8 @@ TODO: - IRQs are level triggered? eg. when an interrupt enable flag gets set while an overflow or compare match flag is 1, will it trigger an IRQ? + Or if it's edge triggered, will it trigger an IRQ on rising edge of + (irq_enable & flag)? - H8/325 16-bit timer is shoehorned in and may have a bug lurking? It doesn't have TGR registers, but functionally equivalent OCR/ICR. diff --git a/src/devices/cpu/h8/h8_timer16.h b/src/devices/cpu/h8/h8_timer16.h index 15a9689990d..6e2651eb275 100644 --- a/src/devices/cpu/h8/h8_timer16.h +++ b/src/devices/cpu/h8/h8_timer16.h @@ -136,11 +136,11 @@ public: m_intc.set_tag(std::forward(intc)); m_tgr_count = 3; // OCRA/OCRB/ICR - m_interrupt[0] = irq_base + 1; - m_interrupt[1] = irq_base + 2; - m_interrupt[2] = irq_base; + m_interrupt[0] = irq_base + 1; // OCIA + m_interrupt[1] = irq_base + 2; // OCIB + m_interrupt[2] = irq_base; // ICI m_interrupt[3] = -1; - m_interrupt[4] = irq_base + 3; + m_interrupt[4] = irq_base + 3; // FOVI m_interrupt[5] = -1; } diff --git a/src/devices/cpu/h8/h8_timer8.cpp b/src/devices/cpu/h8/h8_timer8.cpp index ad8c4c021c3..b19e5a5cad1 100644 --- a/src/devices/cpu/h8/h8_timer8.cpp +++ b/src/devices/cpu/h8/h8_timer8.cpp @@ -9,6 +9,8 @@ TODO: - IRQs are level triggered? eg. when an interrupt enable flag gets set while an overflow or compare match flag is 1, will it trigger an IRQ? + Or if it's edge triggered, will it trigger an IRQ on rising edge of + (irq_enable & flag)? ***************************************************************************/ diff --git a/src/devices/cpu/h8/h8_watchdog.cpp b/src/devices/cpu/h8/h8_watchdog.cpp index 579b1fdb543..634909ca483 100644 --- a/src/devices/cpu/h8/h8_watchdog.cpp +++ b/src/devices/cpu/h8/h8_watchdog.cpp @@ -41,7 +41,7 @@ void h8_watchdog_device::tcnt_update(uint64_t cur_time) int next_tcnt = m_tcnt + int(epos - spos); m_tcnt = next_tcnt; m_tcnt_cycle_base = cur_time; - // logerror("%10lld tcnt %02x -> %03x shift=%d\n", cur_time, m_tcnt, next_tcnt, shift); + //logerror("%10lld tcnt %02x -> %03x shift=%d\n", cur_time, m_tcnt, next_tcnt, shift); if(next_tcnt >= 0x100) { if(m_tcsr & TCSR_WT) { @@ -87,7 +87,7 @@ void h8_watchdog_device::wd_w(offs_t offset, uint16_t data, uint16_t mem_mask) if(m_tcsr & TCSR_TME) { m_tcnt = data & 0xff; m_tcnt_cycle_base = m_cpu->total_cycles(); - // logerror("%10lld tcnt = %02x\n", m_tcnt_cycle_base, m_tcnt); + //logerror("%10lld tcnt = %02x\n", m_tcnt_cycle_base, m_tcnt); } m_cpu->internal_update(); } diff --git a/src/mame/layout/saitek_turbo16k.lay b/src/mame/layout/saitek_turbo16k.lay index 987fae25cb6..dd3b42113b0 100644 --- a/src/mame/layout/saitek_turbo16k.lay +++ b/src/mame/layout/saitek_turbo16k.lay @@ -48,7 +48,7 @@ authors:hap - + diff --git a/src/mame/layout/saitek_turbos24k.lay b/src/mame/layout/saitek_turbos24k.lay new file mode 100644 index 00000000000..8d7fcf7eed3 --- /dev/null +++ b/src/mame/layout/saitek_turbos24k.lay @@ -0,0 +1,658 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index f4cc8fb440d..bbd9a75fd0b 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -38588,6 +38588,9 @@ t1850 tmate turbo16k +@source:saitek/turbos24k.cpp +turbos24k + @source:samcoupe/samcoupe.cpp samcoupe // 1989 Sam Coupe diff --git a/src/mame/saitek/leonardo.cpp b/src/mame/saitek/leonardo.cpp index 53bebe5588d..d6f396b6c3f 100644 --- a/src/mame/saitek/leonardo.cpp +++ b/src/mame/saitek/leonardo.cpp @@ -173,7 +173,7 @@ INPUT_CHANGED_MEMBER(leo_state::go_button) void leo_state::update_display() { m_display->matrix_partial(0, 8, 1 << (m_inp_mux & 0xf), m_led_data[0]); - m_display->matrix_partial(8, 2, 1 << BIT(m_inp_mux, 5), (~m_inp_mux << 2 & 0x300) | m_led_data[1]); + m_display->matrix_partial(8, 2, 1 << BIT(m_inp_mux, 5), (m_inp_mux << 2 & 0x300) | m_led_data[1]); } void leo_state::mux_w(u8 data) @@ -181,7 +181,7 @@ void leo_state::mux_w(u8 data) // d0-d3: input/chessboard led mux // d5: button led select // d6,d7: button led data - m_inp_mux = data; + m_inp_mux = data ^ 0xc0; update_display(); // d4: speaker out @@ -190,7 +190,7 @@ void leo_state::mux_w(u8 data) void leo_state::leds_w(u8 data) { - // button led data + // d0-d7: button led data m_led_data[1] = ~data; update_display(); } @@ -222,8 +222,8 @@ u8 leo_state::p2_r() u8 data = 0; // P20-P22: multiplexed inputs - u8 mux = (m_inp_mux & 8) ? 8 : (m_inp_mux & 7); - data = m_inputs[mux]->read(); + if ((m_inp_mux & 0xf) <= 8) + data = m_inputs[m_inp_mux & 0xf]->read(); // P23: serial rx data |= m_rs232->rxd_r() << 3; @@ -291,8 +291,8 @@ void leo_state::main_map(address_map &map) { map(0x0002, 0x0002).rw(FUNC(leo_state::p1_r), FUNC(leo_state::p1_w)); // external map(0x4000, 0x5fff).ram().share("nvram"); - map(0x6000, 0x6000).w(FUNC(leo_state::mux_w)); - map(0x7000, 0x7000).w(FUNC(leo_state::leds_w)); + map(0x6000, 0x6000).mirror(0x0fff).w(FUNC(leo_state::mux_w)); + map(0x7000, 0x7000).mirror(0x0fff).w(FUNC(leo_state::leds_w)); map(0x8000, 0xffff).rom(); } diff --git a/src/mame/saitek/turbo16k.cpp b/src/mame/saitek/turbo16k.cpp index 045a88d0548..ff9efb34726 100644 --- a/src/mame/saitek/turbo16k.cpp +++ b/src/mame/saitek/turbo16k.cpp @@ -51,8 +51,8 @@ SX5(A) program is used in: SX8(A) program is used in: - Saitek Team-Mate aka Team-Mate Advanced Trainer (8MHz, ST8B-PE-017 PCB) -- Saitek Cavalier aka Portable Advanced Trainer (8MHz, ? PCB) -- Saitek Conquistador (12MHz, ? PCB) +- Saitek Cavalier aka Portable Advanced Trainer (suspected, 8MHz, ? PCB) +- Saitek Conquistador (12MHz, ST8-PE-021 PCB) *******************************************************************************/ diff --git a/src/mame/saitek/turbos24k.cpp b/src/mame/saitek/turbos24k.cpp new file mode 100644 index 00000000000..50a75341ca8 --- /dev/null +++ b/src/mame/saitek/turbos24k.cpp @@ -0,0 +1,349 @@ +// license:BSD-3-Clause +// copyright-holders:hap +// thanks-to:Berger +/******************************************************************************* + +SciSys Kasparov Turbo S-24K (model 280) + +Hardware notes: +- PCB label: SciSys ST6-PE-001 +- Hitachi HD6301Y0P MCU (mode 2) @ 12MHz (LC osc, no XTAL) +- 8KB RAM (M5M5165P-12L), battery-backed +- 2 LCD clocks, same ones as Turbo 16K +- 16+11 LEDs (23 tri-color, 4 red) +- buttons sensor board, piezo + +I/O is similar to Leonardo, and the housing is similar to the newer Turbo King. +It has an unused input (IN.7 0x01) that makes the program work with a magnet +sensor board. + +*******************************************************************************/ + +#include "emu.h" + +#include "cpu/m6800/m6801.h" +#include "machine/msm5001n.h" +#include "machine/nvram.h" +#include "machine/sensorboard.h" +#include "sound/spkrdev.h" +#include "video/pwm.h" + +#include "speaker.h" + +// internal artwork +#include "saitek_turbos24k.lh" + + +namespace { + +class turbos24k_state : public driver_device +{ +public: + turbos24k_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_board(*this, "board"), + m_lcd_clock(*this, "clock%u", 0), + m_display(*this, "display"), + m_dac(*this, "dac"), + m_inputs(*this, "IN.%u", 0), + m_lcd_digits(*this, "ldigit%u.%u", 0U, 0U), + m_lcd_colon(*this, "lc%u", 0U) + { } + + void turbos24k(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(go_button); + +protected: + virtual void machine_start() override; + +private: + // devices/pointers + required_device m_maincpu; + required_device m_board; + required_device_array m_lcd_clock; + required_device m_display; + required_device m_dac; + required_ioport_array<9> m_inputs; + output_finder<2, 4> m_lcd_digits; + output_finder<2> m_lcd_colon; + + u8 m_inp_mux = 0; + u8 m_led_data[2] = { }; + u16 m_lcd_data[4] = { }; + + void main_map(address_map &map); + + // I/O handlers + template void lcd_output_w(offs_t offset, u16 data); + void lcd_enable(u8 enable); + + void standby(int state); + void update_display(); + void mux_w(u8 data); + void leds_w(u8 data); + + u8 p2_r(); + void p2_w(u8 data); + void p5_w(u8 data); + u8 p6_r(); +}; + +void turbos24k_state::machine_start() +{ + m_lcd_digits.resolve(); + m_lcd_colon.resolve(); + + // register for savestates + save_item(NAME(m_inp_mux)); + save_item(NAME(m_led_data)); + save_item(NAME(m_lcd_data)); +} + + + +/******************************************************************************* + I/O +*******************************************************************************/ + +// power + +void turbos24k_state::standby(int state) +{ + if (state) + { + m_display->clear(); + lcd_enable(0); + } +} + +INPUT_CHANGED_MEMBER(turbos24k_state::go_button) +{ + if (newval && m_maincpu->standby()) + m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); +} + + +// LCD + +template +void turbos24k_state::lcd_output_w(offs_t offset, u16 data) +{ + m_lcd_data[N << 1 | (offset & 1)] = data; + u32 segs = m_lcd_data[N << 1 | 1] << 11 | m_lcd_data[N << 1]; + + // unscramble segments + m_lcd_digits[N][0] = bitswap<7>(segs,12,2,13,17,11,0,1); + m_lcd_digits[N][1] = bitswap<7>(segs,15,5,16,4,14,3,4); + m_lcd_digits[N][2] = bitswap<7>(segs,19,9,20,21,18,7,8); + m_lcd_digits[N][3] = BIT(segs, 10) ? 6 : 0; + m_lcd_colon[N] = BIT(segs, 6); +} + +void turbos24k_state::lcd_enable(u8 enable) +{ + // LCD XTAL can be disabled by software + for (int i = 0; i < 2; i++) + m_lcd_clock[i]->set_clock_scale(BIT(enable, i) ? 1.0 : 0.0); +} + + +// misc + +void turbos24k_state::update_display() +{ + m_display->matrix_partial(0, 8, 1 << (m_inp_mux & 0xf), m_led_data[0]); + m_display->matrix_partial(8, 2, 1 << BIT(m_inp_mux, 5), (m_inp_mux << 2 & 0x300) | m_led_data[1]); +} + +void turbos24k_state::mux_w(u8 data) +{ + // d0-d3: input/chessboard led mux + // d5: button led select + // d6,d7: button led data + m_inp_mux = data ^ 0xc0; + update_display(); + + // d4: speaker out + m_dac->level_w(BIT(data, 4)); +} + +void turbos24k_state::leds_w(u8 data) +{ + // d0-d7: button led data + m_led_data[1] = ~data; + update_display(); +} + + +// MCU ports + +u8 turbos24k_state::p2_r() +{ + u8 data = 0; + + // P20-P22: multiplexed inputs + if ((m_inp_mux & 0xf) <= 8) + data = m_inputs[m_inp_mux & 0xf]->read(); + + return ~data; +} + +void turbos24k_state::p2_w(u8 data) +{ + // P25,P26: chessboard led column data + m_led_data[0] = (m_led_data[0] & ~3) | (~data >> 5 & 3); + update_display(); +} + +void turbos24k_state::p5_w(u8 data) +{ + // P53,P54: LCD clocks enabled + lcd_enable(data >> 3 & 3); + + // P55: LCD clocks power (both) + m_lcd_clock[0]->power_w(BIT(data, 5)); + m_lcd_clock[1]->power_w(BIT(data, 5)); + + // P56,P57: chessboard led row data + m_led_data[0] = (m_led_data[0] & 3) | (~data >> 4 & 0xc); + update_display(); +} + +u8 turbos24k_state::p6_r() +{ + // P60-P67: read chessboard + return ~m_board->read_file(m_inp_mux & 0xf); +} + + + +/******************************************************************************* + Address Maps +*******************************************************************************/ + +void turbos24k_state::main_map(address_map &map) +{ + map(0x4000, 0x5fff).ram().share("nvram"); + map(0x6000, 0x6000).mirror(0x0fff).w(FUNC(turbos24k_state::mux_w)); + map(0x7000, 0x7000).mirror(0x0fff).w(FUNC(turbos24k_state::leds_w)); +} + + + +/******************************************************************************* + Input Ports +*******************************************************************************/ + +static INPUT_PORTS_START( turbos24k ) + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Play Normal") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Tab / Color") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-") + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_L) PORT_NAME("Level") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Library") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("Function") + + PORT_START("IN.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_CODE(KEYCODE_EQUALS) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Knight") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Pawn") + + PORT_START("IN.3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) // freq sel + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("King") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Queen") + + PORT_START("IN.4") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) // freq sel + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Rook") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop") + + PORT_START("IN.5") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Sound") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Normal") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Analysis") + + PORT_START("IN.6") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) // freq sel + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_J) PORT_NAME("Stop") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Set Up") + + PORT_START("IN.7") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) // freq sel + board config + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_K) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Info") + + PORT_START("IN.8") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN) + PORT_CONFNAME( 0x04, 0x04, "Battery Status" ) + PORT_CONFSETTING( 0x00, "Low" ) + PORT_CONFSETTING( 0x04, DEF_STR( Normal ) ) + + PORT_START("RESET") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_CHANGED_MEMBER(DEVICE_SELF, turbos24k_state, go_button, 0) PORT_NAME("Go") +INPUT_PORTS_END + + + +/******************************************************************************* + Machine Configs +*******************************************************************************/ + +void turbos24k_state::turbos24k(machine_config &config) +{ + // basic machine hardware + HD6301Y0(config, m_maincpu, 12'000'000); // approximation, no XTAL + m_maincpu->set_addrmap(AS_PROGRAM, &turbos24k_state::main_map); + m_maincpu->nvram_enable_backup(true); + m_maincpu->standby_cb().set(m_maincpu, FUNC(hd6301y_cpu_device::nvram_set_battery)); + m_maincpu->standby_cb().append(FUNC(turbos24k_state::standby)); + m_maincpu->in_p2_cb().set(FUNC(turbos24k_state::p2_r)); + m_maincpu->out_p2_cb().set(FUNC(turbos24k_state::p2_w)); + m_maincpu->out_p5_cb().set(FUNC(turbos24k_state::p5_w)); + m_maincpu->in_p6_cb().set(FUNC(turbos24k_state::p6_r)); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); + m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); + m_board->set_delay(attotime::from_msec(150)); + m_board->set_nvram_enable(true); + + // video hardware + MSM5001N(config, m_lcd_clock[0], 32.768_kHz_XTAL).write_segs().set(FUNC(turbos24k_state::lcd_output_w<0>)); + MSM5001N(config, m_lcd_clock[1], 32.768_kHz_XTAL).write_segs().set(FUNC(turbos24k_state::lcd_output_w<1>)); + + PWM_DISPLAY(config, m_display).set_size(8+2, 8+2); + config.set_default_layout(layout_saitek_turbos24k); + + // sound hardware + SPEAKER(config, "speaker").front_center(); + SPEAKER_SOUND(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); +} + + + +/******************************************************************************* + ROM Definitions +*******************************************************************************/ + +ROM_START( turbos24k ) + ROM_REGION( 0x4000, "maincpu", 0 ) + ROM_LOAD("1986_sx6a_scisys_6301y0b40p.u1", 0x0000, 0x4000, CRC(d2a6e194) SHA1(59c61ddb722aa143afb95ce38f5b1b94e4eed604) ) +ROM_END + +} // anonymous namespace + + + +/******************************************************************************* + Drivers +*******************************************************************************/ + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +SYST( 1986, turbos24k, 0, 0, turbos24k, turbos24k, turbos24k_state, empty_init, "SciSys", "Kasparov Turbo S-24K", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -- cgit v1.2.3