From b2c3b4ea910dbb784836930af6f6498cf6dec1a5 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 16 Feb 2024 22:09:04 +0100 Subject: [PATCH] saitek*: update some internal artwork Systems promoted to working --------------------------- Kasparov Prisma [hap, Sean Riddle] Kasparov GK 2000 [hap, Sean Riddle] --- src/devices/cpu/h8/h8325.h | 3 + src/mame/layout/mephisto_montreux.lay | 209 +++++----- src/mame/layout/saitek_gk2000.lay | 455 +++++++++++++++++++++ src/mame/layout/saitek_prisma.lay | 566 ++++++++++++++++++++++++++ src/mame/layout/saitek_risc2500.lay | 207 ++++++---- src/mame/layout/saitek_simultano.lay | 159 +++++--- src/mame/saitek/companion2.cpp | 2 +- src/mame/saitek/ecbackg.cpp | 4 +- src/mame/saitek/gk2000.cpp | 257 ++++++------ src/mame/saitek/prisma.cpp | 17 +- src/mame/saitek/risc2500.cpp | 24 +- src/mame/saitek/turbo16k.cpp | 4 +- 12 files changed, 1512 insertions(+), 395 deletions(-) create mode 100644 src/mame/layout/saitek_gk2000.lay create mode 100644 src/mame/layout/saitek_prisma.lay diff --git a/src/devices/cpu/h8/h8325.h b/src/devices/cpu/h8/h8325.h index e51b6fcfc88..6605b2b4d53 100644 --- a/src/devices/cpu/h8/h8325.h +++ b/src/devices/cpu/h8/h8325.h @@ -60,6 +60,9 @@ public: protected: h8325_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 start); + virtual u64 execute_clocks_to_cycles(u64 clocks) const noexcept override { return (clocks + 2 - 1) / 2; } + virtual u64 execute_cycles_to_clocks(u64 cycles) const noexcept override { return (cycles * 2); } + required_device m_intc; required_device m_port1; required_device m_port2; diff --git a/src/mame/layout/mephisto_montreux.lay b/src/mame/layout/mephisto_montreux.lay index 82703cca7dc..aecfe21f3b3 100644 --- a/src/mame/layout/mephisto_montreux.lay +++ b/src/mame/layout/mephisto_montreux.lay @@ -12,6 +12,7 @@ authors:Sandro Ronco, hap + @@ -20,50 +21,48 @@ authors:Sandro Ronco, hap - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -102,9 +101,10 @@ authors:Sandro Ronco, hap - - + + + @@ -366,6 +366,57 @@ authors:Sandro Ronco, hap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -414,7 +465,25 @@ authors:Sandro Ronco, hap - + + + + + + + + + + + + + + + + + + + @@ -434,53 +503,6 @@ authors:Sandro Ronco, hap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -500,10 +522,11 @@ authors:Sandro Ronco, hap - + + diff --git a/src/mame/layout/saitek_gk2000.lay b/src/mame/layout/saitek_gk2000.lay new file mode 100644 index 00000000000..ffe16fd7947 --- /dev/null +++ b/src/mame/layout/saitek_gk2000.lay @@ -0,0 +1,455 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/saitek_prisma.lay b/src/mame/layout/saitek_prisma.lay new file mode 100644 index 00000000000..967992d5dc7 --- /dev/null +++ b/src/mame/layout/saitek_prisma.lay @@ -0,0 +1,566 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/saitek_risc2500.lay b/src/mame/layout/saitek_risc2500.lay index 45b20441cea..cfccd4750bb 100644 --- a/src/mame/layout/saitek_risc2500.lay +++ b/src/mame/layout/saitek_risc2500.lay @@ -20,50 +20,47 @@ authors:Sandro Ronco, hap - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -102,9 +99,9 @@ authors:Sandro Ronco, hap - + - + @@ -367,6 +364,62 @@ authors:Sandro Ronco, hap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -415,9 +468,9 @@ authors:Sandro Ronco, hap - + - + @@ -438,56 +491,29 @@ authors:Sandro Ronco, hap - - - - - - - - - + + - - - - - + + + + + + + + - - - - - - + + - - - - - + + - - - - - - - - - - - - - - - - - - + + - + @@ -513,4 +539,5 @@ authors:Sandro Ronco, hap + diff --git a/src/mame/layout/saitek_simultano.lay b/src/mame/layout/saitek_simultano.lay index 4ca7677f446..2cd7817eb34 100644 --- a/src/mame/layout/saitek_simultano.lay +++ b/src/mame/layout/saitek_simultano.lay @@ -7,6 +7,10 @@ authors:hap + + + + @@ -74,6 +78,40 @@ authors:hap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -385,14 +423,13 @@ authors:hap - - + @@ -436,74 +473,88 @@ authors:hap - + + + - - + + + - - - + + + + - - - + - - - - - + + - - - - - + + + - - - - - + + + - - - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/saitek/companion2.cpp b/src/mame/saitek/companion2.cpp index 4214b11cb80..03889c6605a 100644 --- a/src/mame/saitek/companion2.cpp +++ b/src/mame/saitek/companion2.cpp @@ -46,7 +46,7 @@ is either VCC or GND to distinguish between the two. - SciSys Concord II - SciSys Electronic Chess Mark 8 - Tandy 1650 Portable Sensory Chess (Tandy brand Explorer Chess) -- Tandy 1650 (Fast Response Time) Computerized Chess (Tandy brand Concord) +- Tandy (Radio Shack) 1650 (Fast Response Time) Computerized Chess (Tandy brand Concord) The Tandy clones run at a lower clock frequency, 3MHz and 6MHz respectively. diff --git a/src/mame/saitek/ecbackg.cpp b/src/mame/saitek/ecbackg.cpp index 9c016d8c997..074e8b2f720 100644 --- a/src/mame/saitek/ecbackg.cpp +++ b/src/mame/saitek/ecbackg.cpp @@ -50,8 +50,8 @@ public: driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_board(*this, "board"), - m_lcd_pwm(*this, "lcd_pwm"), m_led_pwm(*this, "led_pwm"), + m_lcd_pwm(*this, "lcd_pwm"), m_dac(*this, "dac"), m_inputs(*this, "IN.%u", 0), m_out_lcd(*this, "s%u.%u", 0U, 0U) @@ -71,8 +71,8 @@ private: // devices/pointers required_device m_maincpu; required_device m_board; - required_device m_lcd_pwm; required_device m_led_pwm; + required_device m_lcd_pwm; required_device m_dac; required_ioport_array<6> m_inputs; output_finder<2, 24> m_out_lcd; diff --git a/src/mame/saitek/gk2000.cpp b/src/mame/saitek/gk2000.cpp index 462b3936a2a..e8678dd7dd9 100644 --- a/src/mame/saitek/gk2000.cpp +++ b/src/mame/saitek/gk2000.cpp @@ -5,11 +5,24 @@ Saitek Kasparov GK 2000 +the chess engine is by Frans Morsch. According to schematics, GK 2100 is on the +same hardware. + +Hardware notes: +- Hitachi H8/323 MCU, 20MHz XTAL +- LCD with custom segments +- piezo, 16 leds, button sensors chessboard + +A13 MCU is used in: +- Saitek GK 2000 (86071220X12) +- Saitek Travel Champion 2080 (86071220X12) +- Saitek Mephisto Champion (suspected) +- Tandy (Radio Shack) Mega 2050X (86071221X12) +- Tandy (Radio Shack) Master 2200X (suspected) + TODO: -- verify buttons -- add lcd -- clean up WIP code -- internal artwork +- it does a cold boot at every reset, so nvram won't work properly unless MAME + has some kind of auxillary autosave state feature at power-off *******************************************************************************/ @@ -20,10 +33,11 @@ TODO: #include "sound/dac.h" #include "video/pwm.h" +#include "screen.h" #include "speaker.h" // internal artwork -//#include "saitek_gk2000.lh" +#include "saitek_gk2000.lh" namespace { @@ -36,13 +50,16 @@ public: m_maincpu(*this, "maincpu"), m_board(*this, "board"), m_led_pwm(*this, "led_pwm"), + m_lcd_pwm(*this, "lcd_pwm"), m_dac(*this, "dac"), - m_inputs(*this, "IN.%u", 0) + m_inputs(*this, "IN.%u", 0), + m_out_lcd(*this, "s%u.%u", 0U, 0U) { } void gk2000(machine_config &config); DECLARE_INPUT_CHANGED_MEMBER(go_button); + DECLARE_INPUT_CHANGED_MEMBER(change_cpu_freq); protected: virtual void machine_start() override; @@ -52,33 +69,46 @@ private: required_device m_maincpu; required_device m_board; required_device m_led_pwm; + required_device m_lcd_pwm; required_device m_dac; - required_ioport_array<3> m_inputs; + required_ioport_array<4> m_inputs; + output_finder<2, 24> m_out_lcd; u16 m_inp_mux = 0; + u32 m_lcd_segs = 0; + u8 m_lcd_com = 0; void main_map(address_map &map); // I/O handlers - u8 p1_r(); - void p1_w(u8 data); - u8 p2_r(); + void lcd_pwm_w(offs_t offset, u8 data); + void update_lcd(); + template void lcd_segs_w(u8 data); + void lcd_com_w(u8 data); + void p2_w(u8 data); - u8 p3_r(); - void p3_w(u8 data); u8 p4_r(); - void p4_w(u8 data); - u8 p5_r(); void p5_w(offs_t offset, u8 data, u8 mem_mask); - void p6_w(u8 data); - u8 p7_r(); - void p7_w(u8 data); }; void gk2000_state::machine_start() { + m_out_lcd.resolve(); + // register for savestates save_item(NAME(m_inp_mux)); + save_item(NAME(m_lcd_segs)); + save_item(NAME(m_lcd_com)); +} + +INPUT_CHANGED_MEMBER(gk2000_state::change_cpu_freq) +{ + // only 20MHz and 14MHz versions are known to exist, but the software supports others (-1 is invalid) + static const int xm[9] = { 8, 20, 24, 28, 32, -1, -1, -1, 14 }; // XTAL in MHz + int mhz = xm[(count_leading_zeros_32(bitswap<8>(newval,0,1,2,3,4,5,6,7)) - 24) % 9]; + + if (mhz > 0) + m_maincpu->set_unscaled_clock(mhz * 1'000'000); } @@ -87,64 +117,57 @@ void gk2000_state::machine_start() I/O *******************************************************************************/ +// LCD + +void gk2000_state::lcd_pwm_w(offs_t offset, u8 data) +{ + m_out_lcd[offset & 0x3f][offset >> 6] = data; +} + +void gk2000_state::update_lcd() +{ + for (int i = 0; i < 2; i++) + { + // LCD common is analog (voltage level) + const u8 com = population_count_32(m_lcd_com >> (i * 2) & 3); + const u32 data = (com == 0) ? m_lcd_segs : (com == 2) ? ~m_lcd_segs : 0; + m_lcd_pwm->write_row(i, data); + } +} + +template +void gk2000_state::lcd_segs_w(u8 data) +{ + // P1x, P3x, P7x: LCD segments + const u8 shift = 8 * N; + m_lcd_segs = (m_lcd_segs & ~(0xff << shift)) | (data << shift); + update_lcd(); +} + +void gk2000_state::lcd_com_w(u8 data) +{ + // P60-P63: LCD common + m_lcd_com = data & 0xf; + update_lcd(); +} + + +// misc + INPUT_CHANGED_MEMBER(gk2000_state::go_button) { m_maincpu->set_input_line(INPUT_LINE_IRQ0, newval ? ASSERT_LINE : CLEAR_LINE); } -//[:maincpu] syscr = f9 -//[:maincpu:port1] ddr_w ff -//[:maincpu:port3] ddr_w ff -//[:maincpu:port7] ddr_w ff -//[:maincpu:port6] ddr_w 4f -//[:maincpu:port2] ddr_w 00 ? -//[:maincpu:port5] ddr_w 27 ? -//[:maincpu:port5] ddr_w 1f -//[:maincpu:port2] ddr_w ff - -// p4 ddr=0 -> read inputs - -u8 gk2000_state::p1_r() -{ - //printf("r1 "); - return 0xff; -} - -void gk2000_state::p1_w(u8 data) -{ - //printf("w1_%X ",data); -} - -u8 gk2000_state::p2_r() -{ - //printf("r2 "); - return 0xff; -} - void gk2000_state::p2_w(u8 data) { - //printf("w2_%X ",data); - // P20-P27: input mux (chessboard), led data m_inp_mux = (m_inp_mux & 0x700) | (data ^ 0xff); m_led_pwm->write_mx(~data); } -u8 gk2000_state::p3_r() -{ - //printf("r3 "); - return 0xff; -} - -void gk2000_state::p3_w(u8 data) -{ - //printf("w3_%X ",data); -} - u8 gk2000_state::p4_r() { - //printf("r4 "); - // P40-P47: multiplexed inputs u8 data = 0; @@ -161,20 +184,8 @@ u8 gk2000_state::p4_r() return ~data; } -void gk2000_state::p4_w(u8 data) -{ - //printf("w4_%X ",data); -} - -u8 gk2000_state::p5_r() -{ - //printf("r5 "); - return 0xff; -} - void gk2000_state::p5_w(offs_t offset, u8 data, u8 mem_mask) { - //printf("w5_%X ",data); data |= ~mem_mask; // P50: speaker out @@ -187,22 +198,6 @@ void gk2000_state::p5_w(offs_t offset, u8 data, u8 mem_mask) m_inp_mux = (m_inp_mux & 0xff) | (~data << 5 & 0x700); } -void gk2000_state::p6_w(u8 data) -{ - //printf("w6_%X ",data); -} - -u8 gk2000_state::p7_r() -{ - //printf("r7 "); - return 0xff; -} - -void gk2000_state::p7_w(u8 data) -{ - //printf("w7_%X ",data); -} - /******************************************************************************* @@ -222,37 +217,32 @@ void gk2000_state::main_map(address_map &map) static INPUT_PORTS_START( gk2000 ) PORT_START("IN.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) // ng - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) // pos - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) // lev - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) // opt - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) // info - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) // tb - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) // cl - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) // ent + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Position") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Option") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Info") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) // p - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) // n - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) // b - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) // r - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) // q - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) // k - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) // - - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) // + + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Pawn") + 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_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Rook") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Queen") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("King") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_CODE(KEYCODE_LEFT) PORT_NAME("White / Left") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Black / Right") PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_J) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_K) + PORT_CONFNAME( 0xff, 0x02, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, gk2000_state, change_cpu_freq, 0) // factory set + PORT_CONFSETTING( 0x00, "14MHz (Travel Champion 2080)" ) + PORT_CONFSETTING( 0x02, "20MHz (GK 2000)" ) - PORT_START("POWER") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_CHANGED_MEMBER(DEVICE_SELF, gk2000_state, go_button, 0) PORT_NAME("Go / Stop") + PORT_START("IN.3") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CHANGED_MEMBER(DEVICE_SELF, gk2000_state, go_button, 0) PORT_NAME("Go / Stop") PORT_BIT(0xef, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END @@ -265,24 +255,18 @@ INPUT_PORTS_END void gk2000_state::gk2000(machine_config &config) { // basic machine hardware - H8323(config, m_maincpu, 20_MHz_XTAL / 2); + H8323(config, m_maincpu, 20_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &gk2000_state::main_map); - //m_maincpu->nvram_enable_backup(true); - //m_maincpu->standby_cb().set(m_maincpu, FUNC(h8325_device::nvram_set_battery)); - m_maincpu->read_port1().set(FUNC(gk2000_state::p1_r)); - m_maincpu->write_port1().set(FUNC(gk2000_state::p1_w)); - m_maincpu->read_port2().set(FUNC(gk2000_state::p2_r)); + m_maincpu->nvram_enable_backup(true); + m_maincpu->standby_cb().set(m_maincpu, FUNC(h8325_device::nvram_set_battery)); + m_maincpu->write_port1().set(FUNC(gk2000_state::lcd_segs_w<0>)); m_maincpu->write_port2().set(FUNC(gk2000_state::p2_w)); - m_maincpu->read_port3().set(FUNC(gk2000_state::p3_r)); - m_maincpu->write_port3().set(FUNC(gk2000_state::p3_w)); + m_maincpu->write_port3().set(FUNC(gk2000_state::lcd_segs_w<1>)); m_maincpu->read_port4().set(FUNC(gk2000_state::p4_r)); - m_maincpu->write_port4().set(FUNC(gk2000_state::p4_w)); - m_maincpu->read_port5().set(FUNC(gk2000_state::p5_r)); m_maincpu->write_port5().set(FUNC(gk2000_state::p5_w)); - m_maincpu->read_port6().set_ioport("POWER").invert(); - m_maincpu->write_port6().set(FUNC(gk2000_state::p6_w)); - m_maincpu->read_port7().set(FUNC(gk2000_state::p7_r)); - m_maincpu->write_port7().set(FUNC(gk2000_state::p7_w)); + m_maincpu->read_port6().set_ioport("IN.3").invert(); + m_maincpu->write_port6().set(FUNC(gk2000_state::lcd_com_w)); + m_maincpu->write_port7().set(FUNC(gk2000_state::lcd_segs_w<2>)); SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); @@ -290,8 +274,16 @@ void gk2000_state::gk2000(machine_config &config) //m_board->set_nvram_enable(true); // video hardware + PWM_DISPLAY(config, m_lcd_pwm).set_size(2, 24); + m_lcd_pwm->output_x().set(FUNC(gk2000_state::lcd_pwm_w)); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG)); + screen.set_refresh_hz(60); + screen.set_size(1920/5, 804/5); + screen.set_visarea_full(); + PWM_DISPLAY(config, m_led_pwm).set_size(2, 8); - //config.set_default_layout(layout_saitek_gk2000); + config.set_default_layout(layout_saitek_gk2000); // sound hardware SPEAKER(config, "speaker").front_center(); @@ -307,6 +299,9 @@ void gk2000_state::gk2000(machine_config &config) ROM_START( gk2000 ) ROM_REGION( 0x4000, "maincpu", 0 ) ROM_LOAD("92_saitek_86071220x12_3238a13p.u1", 0x0000, 0x4000, CRC(2059399c) SHA1(d99d5f86b80565e6017b19ef3f330112ac1ce685) ) + + ROM_REGION( 68501, "screen", 0 ) + ROM_LOAD("gk2000.svg", 0, 68501, CRC(80554c49) SHA1(88f06ec8f403eaaf7cbce4cc84807b5742ce7108) ) ROM_END } // anonymous namespace @@ -318,4 +313,4 @@ ROM_END *******************************************************************************/ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -SYST( 1992, gk2000, 0, 0, gk2000, gk2000, gk2000_state, empty_init, "Saitek", "Kasparov GK 2000", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +SYST( 1992, gk2000, 0, 0, gk2000, gk2000, gk2000_state, empty_init, "Saitek", "Kasparov GK 2000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/saitek/prisma.cpp b/src/mame/saitek/prisma.cpp index 4ca61676f3d..0a4867903c2 100644 --- a/src/mame/saitek/prisma.cpp +++ b/src/mame/saitek/prisma.cpp @@ -21,9 +21,6 @@ Hardware notes: In 1992, it was also sold by Tandy as Chess Champion 2150L, still manufactured by Saitek. Overall, the hardware is the same, but with a slower CPU (16MHz XTAL). -TODO: -- internal artwork - *******************************************************************************/ #include "emu.h" @@ -38,7 +35,7 @@ TODO: #include "speaker.h" // internal artwork -//#include "saitek_prisma.lh" +#include "saitek_prisma.lh" namespace { @@ -118,7 +115,7 @@ void prisma_state::machine_start() INPUT_CHANGED_MEMBER(prisma_state::change_cpu_freq) { - // 6MHz and 12MHz versions don't exist, but the software supports it + // 12MHz and 24MHz versions don't exist, but the software supports it static const XTAL freq[4] = { 16_MHz_XTAL, 20_MHz_XTAL, 24_MHz_XTAL, 12_MHz_XTAL }; m_maincpu->set_unscaled_clock(freq[bitswap<2>(newval,7,0)] / 2); } @@ -275,8 +272,8 @@ static INPUT_PORTS_START( prisma ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("New Game") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_CONFNAME( 0x81, 0x01, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, prisma_state, change_cpu_freq, 0) // factory set - PORT_CONFSETTING( 0x00, "8MHz (CC 2150L)" ) - PORT_CONFSETTING( 0x01, "10MHz (Prisma)" ) + PORT_CONFSETTING( 0x00, "16MHz (CC 2150L)" ) + PORT_CONFSETTING( 0x01, "20MHz (Prisma)" ) PORT_START("IN.1") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Normal") @@ -316,7 +313,7 @@ INPUT_PORTS_END void prisma_state::prisma(machine_config &config) { // basic machine hardware - H8325(config, m_maincpu, 20_MHz_XTAL / 2); + H8325(config, m_maincpu, 20_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &prisma_state::main_map); m_maincpu->nvram_enable_backup(true); m_maincpu->nvram_set_default_value(~0); @@ -348,7 +345,7 @@ void prisma_state::prisma(machine_config &config) screen.set_visarea_full(); PWM_DISPLAY(config, m_led_pwm).set_size(2+1, 8); - //config.set_default_layout(layout_saitek_prisma); + config.set_default_layout(layout_saitek_prisma); // sound hardware SPEAKER(config, "speaker").front_center(); @@ -378,4 +375,4 @@ ROM_END *******************************************************************************/ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -SYST( 1990, prisma, 0, 0, prisma, prisma, prisma_state, empty_init, "Saitek", "Kasparov Prisma", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +SYST( 1990, prisma, 0, 0, prisma, prisma, prisma_state, empty_init, "Saitek", "Kasparov Prisma", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/saitek/risc2500.cpp b/src/mame/saitek/risc2500.cpp index 2224b816642..441c8115dcf 100644 --- a/src/mame/saitek/risc2500.cpp +++ b/src/mame/saitek/risc2500.cpp @@ -366,48 +366,48 @@ void risc2500_state::risc2500_mem(address_map &map) static INPUT_PORTS_START( risc2500 ) PORT_START("IN.0") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BACK") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Back") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_BACKSPACE) PORT_START("IN.1") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_START("IN.2") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) PORT_START("IN.3") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) PORT_START("IN.4") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MENU") PORT_CODE(KEYCODE_M) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Menu") PORT_CODE(KEYCODE_M) PORT_START("IN.5") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PLAY") PORT_CODE(KEYCODE_L) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Play") PORT_CODE(KEYCODE_L) PORT_START("IN.6") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("NEW GAME") PORT_CODE(KEYCODE_N) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("New Game") PORT_CODE(KEYCODE_N) PORT_START("IN.7") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("OFF") PORT_CODE(KEYCODE_O) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Off") PORT_CODE(KEYCODE_F) PORT_START("RESET") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ON") PORT_CODE(KEYCODE_I) PORT_CHANGED_MEMBER(DEVICE_SELF, risc2500_state, on_button, 0) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("On") PORT_CODE(KEYCODE_O) PORT_CHANGED_MEMBER(DEVICE_SELF, risc2500_state, on_button, 0) INPUT_PORTS_END static INPUT_PORTS_START( montreux ) // on/off buttons have different labels PORT_INCLUDE( risc2500 ) PORT_MODIFY("IN.7") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("STOP") PORT_CODE(KEYCODE_S) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Stop") PORT_CODE(KEYCODE_S) PORT_MODIFY("RESET") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("GO") PORT_CODE(KEYCODE_G) PORT_CHANGED_MEMBER(DEVICE_SELF, risc2500_state, on_button, 0) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Go") PORT_CODE(KEYCODE_G) PORT_CHANGED_MEMBER(DEVICE_SELF, risc2500_state, on_button, 0) INPUT_PORTS_END diff --git a/src/mame/saitek/turbo16k.cpp b/src/mame/saitek/turbo16k.cpp index ff9efb34726..50413098c36 100644 --- a/src/mame/saitek/turbo16k.cpp +++ b/src/mame/saitek/turbo16k.cpp @@ -37,7 +37,7 @@ I/O for LEDs and buttons is scrambled a bit for Team-Mate and Conquistador, the base hardware remains the same. SX4(A) program is used in: -- Tandy 1850 60-2199 (8MHz, ST4A-PE-015 PCB) +- Tandy (Radio Shack) 1850 60-2199 (8MHz, ST4A-PE-015 PCB) - no known SciSys chesscomputers, to distinguish: this program has 16 playing levels and SX5A has 17 @@ -46,7 +46,7 @@ SX5(A) program is used in: - SciSys Express 16K (8MHz, SH5-PE-009 PCB) - SciSys Astral (12MHz, SW4-PE-010 PCB) - SciSys Turbo 16K (12MHz, ST5-PE-023 PCB) -- Tandy 1850 60-2201A (8MHz, ST5A-PE-002 PCB) +- Tandy (Radio Shack) 1850 60-2201A (8MHz, ST5A-PE-002 PCB) - Mephisto Monaco (H+G brand Express 16K) SX8(A) program is used in: