From 114234967fb82f0f36b00d0048905c4b148fbc70 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 18 Mar 2024 02:03:43 +0100 Subject: misc chess: small cleanup New working systems ------------------- Ivan The Terrible [hap, Sean Riddle] Mirage (Excalibur) [hap, Sean Riddle] --- src/mame/chess/ave_arb.cpp | 2 +- src/mame/chess/cking_triomphe.cpp | 2 +- src/mame/chess/conic_cchess2.cpp | 2 +- src/mame/chess/conic_cchess3.cpp | 2 +- src/mame/chess/excal_ivant.cpp | 349 +++++++++++++++++++ src/mame/chess/excal_mirage.cpp | 621 ++++++++++++++++++++++++++++++++++ src/mame/chess/regence.cpp | 2 +- src/mame/chess/yeno_301xl.cpp | 2 +- src/mame/commodore/chessmate.cpp | 2 +- src/mame/cxg/chess2001.cpp | 2 +- src/mame/cxg/computachess.cpp | 2 +- src/mame/cxg/dominator.cpp | 2 +- src/mame/cxg/professor.cpp | 4 +- src/mame/cxg/senterprise.cpp | 1 + src/mame/cxg/sphinx40.cpp | 2 +- src/mame/ddr/chessmst.cpp | 2 +- src/mame/ddr/sc2.cpp | 2 +- src/mame/fidelity/as12.cpp | 2 +- src/mame/fidelity/bridgeb.cpp | 2 +- src/mame/fidelity/card.cpp | 2 +- src/mame/fidelity/cc7.cpp | 2 +- src/mame/fidelity/chesster.cpp | 16 +- src/mame/fidelity/csc.cpp | 4 +- src/mame/fidelity/dames.cpp | 2 +- src/mame/fidelity/desdis.cpp | 5 +- src/mame/fidelity/eag68k.cpp | 5 +- src/mame/fidelity/eldorado.cpp | 2 +- src/mame/fidelity/elite.cpp | 5 +- src/mame/fidelity/excel.cpp | 2 +- src/mame/fidelity/msc.cpp | 2 +- src/mame/fidelity/phantom.cpp | 36 +- src/mame/fidelity/sc12.cpp | 2 +- src/mame/fidelity/sc6.cpp | 2 +- src/mame/fidelity/sc8.cpp | 2 +- src/mame/fidelity/sc9.cpp | 4 +- src/mame/handheld/hh_tms1k.cpp | 3 +- src/mame/hegenerglaser/academy.cpp | 14 +- src/mame/hegenerglaser/amsterdam.cpp | 2 +- src/mame/hegenerglaser/berlin.cpp | 14 +- src/mame/hegenerglaser/brikett.cpp | 2 +- src/mame/hegenerglaser/europa.cpp | 2 +- src/mame/hegenerglaser/glasgow.cpp | 2 +- src/mame/hegenerglaser/milano.cpp | 14 +- src/mame/hegenerglaser/mm1.cpp | 2 +- src/mame/hegenerglaser/modena.cpp | 18 +- src/mame/hegenerglaser/mondial.cpp | 14 +- src/mame/hegenerglaser/mondial2.cpp | 16 +- src/mame/hegenerglaser/mondial68k.cpp | 18 +- src/mame/hegenerglaser/montec.cpp | 18 +- src/mame/hegenerglaser/polgar.cpp | 8 +- src/mame/hegenerglaser/risc.cpp | 12 +- src/mame/hegenerglaser/roma2.cpp | 4 +- src/mame/hegenerglaser/smondial.cpp | 23 +- src/mame/layout/excal_ivant.lay | 472 ++++++++++++++++++++++++++ src/mame/layout/excal_mirage.lay | 517 ++++++++++++++++++++++++++++ src/mame/layout/fidel_cphantom.lay | 163 +++++---- src/mame/layout/fidel_phantom.lay | 163 +++++---- src/mame/mame.lst | 6 + src/mame/novag/accord.cpp | 2 +- src/mame/novag/constjr.cpp | 2 +- src/mame/novag/micro.cpp | 2 +- src/mame/novag/micro2.cpp | 2 +- src/mame/novag/primo.cpp | 6 +- src/mame/novag/savant.cpp | 2 +- src/mame/novag/sdiamond.cpp | 4 +- src/mame/novag/sexpert.cpp | 1 + src/mame/novag/vip.cpp | 2 +- src/mame/saitek/companion.cpp | 2 +- src/mame/saitek/corona.cpp | 2 +- src/mame/saitek/cp2000.cpp | 2 +- src/mame/saitek/ecbackg.cpp | 2 +- src/mame/saitek/edames.cpp | 2 +- src/mame/saitek/gk2000.cpp | 4 +- src/mame/saitek/intchess.cpp | 2 +- src/mame/saitek/mark5.cpp | 2 +- src/mame/saitek/prschess.cpp | 2 +- src/mame/saitek/risc2500.cpp | 28 +- src/mame/saitek/schess.cpp | 2 +- src/mame/saitek/simultano.cpp | 2 +- src/mame/saitek/ssystem3.cpp | 2 +- src/mame/saitek/stratos.cpp | 4 +- src/mame/saitek/superstar.cpp | 2 +- src/mame/saitek/turbo16k.cpp | 1 + src/mame/ussr/debut.cpp | 2 +- src/mame/ussr/im01.cpp | 2 +- 85 files changed, 2368 insertions(+), 325 deletions(-) create mode 100644 src/mame/chess/excal_ivant.cpp create mode 100644 src/mame/chess/excal_mirage.cpp create mode 100644 src/mame/layout/excal_ivant.lay create mode 100644 src/mame/layout/excal_mirage.lay diff --git a/src/mame/chess/ave_arb.cpp b/src/mame/chess/ave_arb.cpp index 24ebc7aef8d..b635b779ac2 100644 --- a/src/mame/chess/ave_arb.cpp +++ b/src/mame/chess/ave_arb.cpp @@ -95,7 +95,7 @@ private: required_device m_board; required_device m_via; memory_share_creator m_extram; - required_device m_dac; + required_device m_dac; optional_device m_cart; required_ioport_array<2> m_inputs; diff --git a/src/mame/chess/cking_triomphe.cpp b/src/mame/chess/cking_triomphe.cpp index 9c4b4bb12ab..b5ae9313784 100644 --- a/src/mame/chess/cking_triomphe.cpp +++ b/src/mame/chess/cking_triomphe.cpp @@ -55,7 +55,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; u16 m_inp_mux = 0; diff --git a/src/mame/chess/conic_cchess2.cpp b/src/mame/chess/conic_cchess2.cpp index 6561e625798..e7bae493266 100644 --- a/src/mame/chess/conic_cchess2.cpp +++ b/src/mame/chess/conic_cchess2.cpp @@ -70,7 +70,7 @@ private: required_device_array m_pia; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<8> m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/chess/conic_cchess3.cpp b/src/mame/chess/conic_cchess3.cpp index a5747f68aee..93896c39e0c 100644 --- a/src/mame/chess/conic_cchess3.cpp +++ b/src/mame/chess/conic_cchess3.cpp @@ -58,7 +58,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; void main_map(address_map &map); diff --git a/src/mame/chess/excal_ivant.cpp b/src/mame/chess/excal_ivant.cpp new file mode 100644 index 00000000000..a7c12dc5b42 --- /dev/null +++ b/src/mame/chess/excal_ivant.cpp @@ -0,0 +1,349 @@ +// license:BSD-3-Clause +// copyright-holders:hap +// thanks-to:Sean Riddle +/******************************************************************************* + +Excalibur Ivan The Terrible + +The chess engine is by Ron Nelson, similar to the one in Excalibur Mirage. + +Hardware notes: +- PCB label: EXCALIBUR ELECTRONICS, INC. 6/28/96, IVANT +- Hitachi H8/3256 MCU (mode 1), 20MHz XTAL +- 8-bit DAC (8L503 resistor array), KA8602 amplifier, 1MB ROM (custom label) +- LCD with 5 7segs and custom segments +- no LEDs, button sensors chessboard + +The MCU used here is a HD6433256A33P from Excalibur Mirage, the internal ROM +is disabled. There's also a newer version on a H8/3216. The first version was +manufactured by CXG. + +TODO: +- it does a cold boot at every reset, so nvram won't work properly unless MAME + adds some kind of auxillary autosave state feature at power-off + +BTANB: +- sound is scratchy like a tape recorder and has spikes here and there, verified + with a digital capture, final (analog) output on the real thing sounds a bit + better than MAME though + +*******************************************************************************/ + +#include "emu.h" + +#include "cpu/h8/h8325.h" +#include "machine/sensorboard.h" +#include "sound/dac.h" +#include "video/pwm.h" + +#include "screen.h" +#include "speaker.h" + +// internal artwork +#include "excal_ivant.lh" + + +namespace { + +class ivant_state : public driver_device +{ +public: + ivant_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_rombank(*this, "rombank"), + m_board(*this, "board"), + 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) + { } + + void ivant(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + // devices/pointers + required_device m_maincpu; + required_memory_bank m_rombank; + required_device m_board; + required_device m_lcd_pwm; + required_device m_dac; + required_ioport_array<3> m_inputs; + output_finder<2, 24> m_out_lcd; + + u16 m_inp_mux = 0; + u32 m_latch = 0; + u32 m_lcd_segs = 0; + u8 m_lcd_com = 0; + emu_timer *m_irqtimer; + + void main_map(address_map &map); + + // I/O handlers + void lcd_pwm_w(offs_t offset, u8 data); + void update_lcd(); + void lcd_com_w(offs_t offset, u8 data, u8 mem_mask); + + void latch_w(offs_t offset, u8 data); + u8 read_inputs(); + + TIMER_CALLBACK_MEMBER(update_irq) { read_inputs(); } + + u8 p4_r(); + void p4_w(u8 data); + void p5_w(u8 data); + u8 p6_r(); + void p6_w(u8 data); +}; + +void ivant_state::machine_start() +{ + m_out_lcd.resolve(); + m_rombank->configure_entries(0, 64, memregion("rombank")->base(), 0x4000); + + // periodically check for interrupts + m_irqtimer = timer_alloc(FUNC(ivant_state::update_irq), this); + attotime period = attotime::from_msec(1); + m_irqtimer->adjust(period, 0, period); + + // register for savestates + save_item(NAME(m_inp_mux)); + save_item(NAME(m_latch)); + save_item(NAME(m_lcd_segs)); + save_item(NAME(m_lcd_com)); +} + +void ivant_state::machine_reset() +{ + m_dac->write(0x80); +} + + + +/******************************************************************************* + I/O +*******************************************************************************/ + +// LCD + +void ivant_state::lcd_pwm_w(offs_t offset, u8 data) +{ + m_out_lcd[offset & 0x3f][offset >> 6] = data; +} + +void ivant_state::update_lcd() +{ + for (int i = 0; i < 2; i++) + { + // LCD common is 0/1/Hi-Z + const u32 data = BIT(m_lcd_com, i + 2) ? (BIT(m_lcd_com, i) ? ~m_lcd_segs : m_lcd_segs) : 0; + m_lcd_pwm->write_row(i, data); + } +} + +void ivant_state::lcd_com_w(offs_t offset, u8 data, u8 mem_mask) +{ + // P70,P71: LCD common + m_lcd_com = mem_mask << 2 | (data & 3); + update_lcd(); +} + + +// misc + +void ivant_state::latch_w(offs_t offset, u8 data) +{ + // a0-a2,d0-d3: 4*74259 + u32 mask = 1 << offset; + for (int i = 0; i < 4; i++) + { + m_latch = (m_latch & ~mask) | (BIT(data, i) ? mask : 0); + mask <<= 8; + } + + // 74259(all) Q0,Q1: DAC data + m_dac->write(bitswap<8>(m_latch,0,8,16,24,1,9,17,25)); + + // 74259(all) Q2-Q7: LCD segments + m_lcd_segs = 0; + for (int i = 0; i < 4; i++) + m_lcd_segs |= (m_latch >> (i * 8 + 2) & 0x3f) << (i * 6); + + update_lcd(); + + // 74259(2) Q4-Q7, 74259(3) Q2-Q6: input mux low + m_inp_mux = (m_inp_mux & 0x200) | (~m_latch >> 22 & 0x1f0) | (~m_latch >> 20 & 0xf); + read_inputs(); +} + +u8 ivant_state::read_inputs() +{ + u8 data = 0; + + // read buttons + for (int i = 0; i < 2; i++) + if (BIT(m_inp_mux, i + 8)) + data |= m_inputs[i]->read(); + + // read chessboard + for (int i = 0; i < 8; i++) + if (BIT(m_inp_mux, i)) + data |= m_board->read_file(i, true); + + // P64-P66 are also IRQ pins (the ON button is IRQ0) + for (int i = 0; i < 3; i++) + m_maincpu->set_input_line(INPUT_LINE_IRQ0 + i, BIT(data, i + 4) ? ASSERT_LINE : CLEAR_LINE); + + return ~data; +} + +u8 ivant_state::p4_r() +{ + // P47: multiplexed inputs part + return (read_inputs() & 0x80) | 0x7f; +} + +void ivant_state::p4_w(u8 data) +{ + // P40-P45: ROM bank + m_rombank->set_entry(~data & 0x3f); +} + +void ivant_state::p5_w(u8 data) +{ + // P54: KA8602 mute + m_dac->set_output_gain(0, (data & 0x10) ? 0.0 : 1.0); + + // P55: input mux high bit + m_inp_mux = (m_inp_mux & 0x1ff) | BIT(~data, 5) << 9; + read_inputs(); +} + +u8 ivant_state::p6_r() +{ + // P60-P66: multiplexed inputs part + return read_inputs() | 0x80; +} + + + +/******************************************************************************* + Address Maps +*******************************************************************************/ + +void ivant_state::main_map(address_map &map) +{ + map(0x0000, 0x0007).mirror(0xfff8).w(FUNC(ivant_state::latch_w)); + map(0x0000, 0xffff).w(FUNC(ivant_state::latch_w)); + map(0x0000, 0x7fff).rom(); + map(0x8000, 0xbfff).bankr(m_rombank); +} + + + +/******************************************************************************* + Input Ports +*******************************************************************************/ + +static INPUT_PORTS_START( ivant ) + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_CODE(KEYCODE_LEFT) PORT_NAME("No / Left") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Repeat") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Mode") + 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_N) PORT_NAME("New Game") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("Black / White") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Yes / Right") + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Set Up / King") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Verify / Queen") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Multi-Move / Bishop") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F2) PORT_NAME("Off / Save") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F1) PORT_CODE(KEYCODE_C) PORT_NAME("On / Clear") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Move / Pawn") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Hint / Knight") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Level / Rook") + + PORT_START("IN.2") + PORT_CONFNAME( 0x08, 0x00, "Battery Status" ) + PORT_CONFSETTING( 0x08, "Low" ) + PORT_CONFSETTING( 0x00, DEF_STR( Normal ) ) + PORT_BIT(0xf7, IP_ACTIVE_HIGH, IPT_UNUSED) +INPUT_PORTS_END + + + +/******************************************************************************* + Machine Configs +*******************************************************************************/ + +void ivant_state::ivant(machine_config &config) +{ + // basic machine hardware + H83256(config, m_maincpu, 20_MHz_XTAL); + m_maincpu->set_mode(1); + m_maincpu->set_addrmap(AS_PROGRAM, &ivant_state::main_map); + m_maincpu->nvram_enable_backup(true); + m_maincpu->standby_cb().set(m_maincpu, FUNC(h83256_device::nvram_set_battery)); + m_maincpu->standby_cb().append([this](int state) { if (state) m_lcd_pwm->clear(); }); + m_maincpu->read_port4().set(FUNC(ivant_state::p4_r)); + m_maincpu->write_port4().set(FUNC(ivant_state::p4_w)); + m_maincpu->write_port5().set(FUNC(ivant_state::p5_w)); + m_maincpu->read_port6().set(FUNC(ivant_state::p6_r)); + m_maincpu->read_port7().set_ioport("IN.2").invert(); + m_maincpu->write_port7().set(FUNC(ivant_state::lcd_com_w)); + + 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 + PWM_DISPLAY(config, m_lcd_pwm).set_size(2, 24); + m_lcd_pwm->output_x().set(FUNC(ivant_state::lcd_pwm_w)); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG)); + screen.set_refresh_hz(60); + screen.set_size(1920/5, 697/5); + screen.set_visarea_full(); + + config.set_default_layout(layout_excal_ivant); + + // sound hardware + SPEAKER(config, "speaker").front_center(); + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); +} + + + +/******************************************************************************* + ROM Definitions +*******************************************************************************/ + +ROM_START( ivant ) + ROM_REGION16_BE( 0x8000, "maincpu", 0 ) + ROM_LOAD("at27c256r.ic11", 0x0000, 0x8000, CRC(51a97959) SHA1(ea595001fd5eaa07ade96307a8d89d5fb44682ab) ) // no label + + ROM_REGION16_BE( 0x100000, "rombank", 0 ) + ROM_LOAD("1996_701e_excalibur_ivan_t.ic2", 0x000000, 0x100000, CRC(f7c386a1) SHA1(357ca0b0c0b1409d33876b6fa00c5ad74b2643fc) ) + + ROM_REGION( 109652, "screen", 0 ) + ROM_LOAD("emirage.svg", 0, 109652, CRC(6840c49e) SHA1(a9c91143c5bea5ab41fe323e719da4a46ab9d631) ) +ROM_END + +} // anonymous namespace + + + +/******************************************************************************* + Drivers +*******************************************************************************/ + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +SYST( 1996, ivant, 0, 0, ivant, ivant, ivant_state, empty_init, "Excalibur Electronics", "Ivan The Terrible", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/chess/excal_mirage.cpp b/src/mame/chess/excal_mirage.cpp new file mode 100644 index 00000000000..8f20ec63e41 --- /dev/null +++ b/src/mame/chess/excal_mirage.cpp @@ -0,0 +1,621 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/******************************************************************************* + +Excalibur Mirage + +It's Excalibur's first chess computer, and also Ron Nelson's official return to +chess programming. The x/y motorized magnet is similar to the one used in +Fidelity Phantom (and Milton Bradley Phantom before that). + +Before moving a piece, wait until the computer is done with its own move. After +capturing a piece, select the captured piece from the MAME sensorboard spawn +block and place it anywhere on a free spot at the designated box at the edge +of the chessboard. + +Hardware notes: +- PCB label: EXCALIBUR ELECTRONICS, INC. 6/5/96, MIRAGE, 00-55052-000 +- Hitachi H8/3256 MCU (only 32KB out of 48KB internal ROM used), either mask ROM + or OTP ROM, 20MHz XTAL +- 2*L293DNE motor drivers, 2 DC motors (like a plotter), electromagnet under the + chessboard for automatically moving the pieces +- LCD with 5 7segs and custom segments +- piezo, button sensors chessboard + +There's also a version with a fake wood housing instead of black plastic, it's +most likely the same hardware. + +TODO: +- like fphantom, sensorboard undo buffer fills up pretty quickly +- dump/add OTP version, maybe they improved the motor drift issue? +- it does a cold boot at every reset, so nvram won't work properly unless MAME + adds some kind of auxillary autosave state feature at power-off + +BTANB: +- Motors gradually drift, causing it to place/pick up pieces off-center. It + recalibrates itself once in a while but it's not enough. MAME's sensorboard + device can't deal with it, so there's a workaround (see realign_magnet_pos). + +*******************************************************************************/ + +#include "emu.h" + +#include "cpu/h8/h8325.h" +#include "machine/sensorboard.h" +#include "sound/dac.h" +#include "video/pwm.h" + +#include "screen.h" +#include "speaker.h" + +// internal artwork +#include "excal_mirage.lh" + + +namespace { + +class mirage_state : public driver_device +{ +public: + mirage_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_pwm(*this, "lcd_pwm"), + m_dac(*this, "dac"), + m_inputs(*this, "IN.%u", 0), + m_out_lcd(*this, "s%u.%u", 0U, 0U), + m_piece_hand(*this, "cpu_hand"), + m_out_motor(*this, "motor%u", 0U), + m_out_pos(*this, "pos_%c", unsigned('x')) + { } + + void mirage(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(on_button); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + // devices/pointers + required_device m_maincpu; + required_device m_board; + required_device m_lcd_pwm; + required_device m_dac; + required_ioport_array<3> m_inputs; + output_finder<2, 24> m_out_lcd; + output_finder<> m_piece_hand; + output_finder<5> m_out_motor; + output_finder<2> m_out_pos; + + u16 m_inp_mux = 0; + u32 m_lcd_segs = 0; + u8 m_lcd_com = 0; + + u8 m_magnet = 0; + u8 m_pieces_map[0x40][0x40] = { }; + + u8 m_motor_control[2] = { }; + u32 m_motor_max[2] = { }; + u32 m_motor_pos[2] = { }; + s32 m_motor_drift[2] = { }; + u8 m_motor_quad[2] = { }; + + attotime m_motor_period; + attotime m_motor_remain[2]; + emu_timer *m_motor_timer[2]; + + void clear_board(int state); + void init_motors(); + + void get_scaled_pos(double *x, double *y); + void output_magnet_pos(); + void realign_magnet_pos(); + void update_piece(u8 magnet); + + TIMER_CALLBACK_MEMBER(motor_count); + void motor_control(int m, u8 control); + + // I/O handlers + void lcd_pwm_w(offs_t offset, u8 data); + void update_lcd(); + template void lcd_segs_w(u8 data); + + u8 p4_r(); + u8 p5_r(); + void p5_w(u8 data); + u8 p6_r(); + void p6_w(u8 data); + u8 p7_r(); + void p7_w(offs_t offset, u8 data, u8 mem_mask); +}; + + + +/******************************************************************************* + Initialization +*******************************************************************************/ + +void mirage_state::machine_start() +{ + init_motors(); + + // resolve handlers + m_out_lcd.resolve(); + m_piece_hand.resolve(); + m_out_motor.resolve(); + m_out_pos.resolve(); + + // register for savestates + save_item(NAME(m_inp_mux)); + save_item(NAME(m_lcd_segs)); + save_item(NAME(m_lcd_com)); + + save_item(NAME(m_magnet)); + save_item(NAME(m_pieces_map)); + save_item(NAME(m_motor_control)); + save_item(NAME(m_motor_pos)); + save_item(NAME(m_motor_drift)); + save_item(NAME(m_motor_quad)); + save_item(NAME(m_motor_remain)); +} + +void mirage_state::machine_reset() +{ + memset(m_motor_drift, 0, sizeof(m_motor_drift)); + output_magnet_pos(); +} + +void mirage_state::clear_board(int state) +{ + memset(m_pieces_map, 0, sizeof(m_pieces_map)); + m_piece_hand = 0; + m_board->clear_board(); +} + + + +/******************************************************************************* + Motor Sim +*******************************************************************************/ + +void mirage_state::init_motors() +{ + m_motor_period = attotime::from_usec(600); + + for (int i = 0; i < 2; i++) + { + m_motor_timer[i] = timer_alloc(FUNC(mirage_state::motor_count), this); + m_motor_remain[i] = m_motor_period / 2; + } + + m_motor_max[1] = 1500 - 1; + m_motor_pos[1] = 1480; + + m_motor_max[0] = 2020 - 1; + m_motor_pos[0] = 24; +} + +void mirage_state::get_scaled_pos(double *x, double *y) +{ + // 176 counts per square + *x = std::clamp(double(int(m_motor_pos[0]) - 20) / (176.0 / 4.0) + 2.0, 0.0, 48.0); + *y = std::clamp(double(int(m_motor_pos[1]) - 160) / (176.0 / 4.0) + 2.0, 0.0, 32.0); +} + +void mirage_state::output_magnet_pos() +{ + double x, y; + get_scaled_pos(&x, &y); + + // put active state on x bit 11 + const int active = m_magnet ? 0x800 : 0; + m_out_pos[0] = int(x * 25.0 + 0.5) | active; + m_out_pos[1] = int(y * 25.0 + 0.5); +} + +void mirage_state::realign_magnet_pos() +{ + // compensate for gradual drift, see BTANB + for (int i = 0; i < 2; ) + { + double pos[2]; + get_scaled_pos(&pos[0], &pos[1]); + + const double limit = 1.0 / 11.0; // 4 counts + int inc = 0; + + if ((round(pos[i]) - pos[i]) > limit && m_motor_pos[i] < m_motor_max[i] - 4) + inc = 1; + else if ((round(pos[i]) - pos[i]) < -limit && m_motor_pos[i] > 4) + inc = -1; + else + i++; + + if (inc != 0) + { + m_motor_pos[i] += inc * 4; + m_motor_drift[i] -= inc; + + logerror("motor %C drift error (%d total)\n", 'X' + i, m_motor_drift[i]); + } + } +} + +void mirage_state::update_piece(u8 magnet) +{ + if (magnet == m_magnet) + return; + + realign_magnet_pos(); + + m_magnet = magnet; + output_magnet_pos(); + + double dx, dy; + get_scaled_pos(&dx, &dy); + + int mx = dx + 0.5; + int my = dy + 0.5; + + // convert motors position into board coordinates + int x = mx / 4 - 2; + int y = 7 - (my / 4); + + if (x < 0) + x += 12; + + const bool valid_pos = (mx & 2) && (my & 2); + + // sensorboard handling is almost the same as fidelity/phantom.cpp + if (magnet) + { + if (valid_pos) + { + // pick up piece, unless it was picked up by the user + const int pos = (y << 4 & 0xf0) | (x & 0x0f); + if (pos != m_board->get_handpos()) + { + m_piece_hand = m_board->read_piece(x, y); + + if (m_piece_hand != 0) + { + m_board->write_piece(x, y, 0); + m_board->refresh(); + } + } + } + else + { + int count = 0; + + // check surrounding area for piece + for (int sy = my & ~1; sy <= (my | 1); sy++) + for (int sx = mx & ~1; sx <= (mx | 1); sx++) + if (m_pieces_map[sy][sx] != 0) + { + m_piece_hand = m_pieces_map[sy][sx]; + m_pieces_map[sy][sx] = 0; + count++; + } + + // more than one piece found (shouldn't happen) + if (count > 1) + popmessage("Internal collision!"); + } + } + else if (m_piece_hand != 0) + { + if (valid_pos) + { + // collision with piece on board (user interference) + if (m_board->read_piece(x, y) != 0) + popmessage("Collision at %c%d!", x + 'A', y + 1); + else + { + m_board->write_piece(x, y, m_piece_hand); + m_board->refresh(); + } + } + else + { + // collision with internal pieces map (shouldn't happen) + if (m_pieces_map[my][mx] != 0) + popmessage("Internal collision!"); + else + m_pieces_map[my][mx] = m_piece_hand; + } + + m_piece_hand = 0; + } +} + +TIMER_CALLBACK_MEMBER(mirage_state::motor_count) +{ + const int m = param ? 1 : 0; + assert(m_motor_control[m] & 2); + + // 1 quarter rotation per period + int inc = 0; + if (m_motor_control[m] & 1) + { + if (m_motor_pos[m] < m_motor_max[m]) + inc = 1; + } + else if (m_motor_pos[m] > 0) + inc = -1; + + m_motor_remain[m] = m_motor_period; + + if (inc == 0) + return; + + m_motor_pos[m] += inc; + m_motor_timer[m]->adjust(m_motor_period, m); + + output_magnet_pos(); + + // update quadrature encoder + static const u8 lut_quad[4] = { 0,1,3,2 }; + m_motor_quad[m] = lut_quad[m_motor_pos[m] & 3]; + + m_maincpu->set_input_line(INPUT_LINE_IRQ1 + m, (m_motor_quad[m] & 1) ? ASSERT_LINE : CLEAR_LINE); +} + +void mirage_state::motor_control(int m, u8 control) +{ + if (control == m_motor_control[m]) + return; + + // remember remaining time + if (m_motor_control[m] & 2 && !m_motor_timer[m]->remaining().is_never()) + { + m_motor_remain[m] = m_motor_timer[m]->remaining(); + m_motor_timer[m]->adjust(attotime::never); + } + + // invert remaining time if direction flipped + if ((m_motor_control[m] ^ control) & 1) + m_motor_remain[m] = m_motor_period - m_motor_remain[m]; + + m_motor_control[m] = control; + + // (re)start the timer + if (control & 2) + m_motor_timer[m]->adjust(m_motor_remain[m], m); +} + + + +/******************************************************************************* + I/O +*******************************************************************************/ + +// LCD + +void mirage_state::lcd_pwm_w(offs_t offset, u8 data) +{ + m_out_lcd[offset & 0x3f][offset >> 6] = data; +} + +void mirage_state::update_lcd() +{ + u32 lcd_segs = (m_lcd_segs & 0xfff000) | bitswap<12>(m_lcd_segs,7,6,5,4,3,2,1,0,8,9,10,11); + + for (int i = 0; i < 2; i++) + { + // LCD common is 0/1/Hi-Z + const u32 data = BIT(m_lcd_com, i + 2) ? (BIT(m_lcd_com, i) ? ~lcd_segs : lcd_segs) : 0; + m_lcd_pwm->write_row(i, data); + } +} + +template +void mirage_state::lcd_segs_w(u8 data) +{ + // P1x, P2x, P3x: LCD segments + const u8 shift = 8 * N; + m_lcd_segs = (m_lcd_segs & ~(0xff << shift)) | (data << shift); + update_lcd(); + + // P1x,P20-P23: input mux (chessboard) + m_inp_mux = (m_inp_mux & 0x3000) | bitswap<12>(~m_lcd_segs,18,19,8,9,10,11,12,13,14,15,16,17); +} + + +// misc + +INPUT_CHANGED_MEMBER(mirage_state::on_button) +{ + m_maincpu->set_input_line(INPUT_LINE_IRQ0, newval ? ASSERT_LINE : CLEAR_LINE); +} + +u8 mirage_state::p4_r() +{ + // P40-P47: multiplexed inputs + u8 data = 0; + + // read buttons + for (int i = 0; i < 2; i++) + if (BIT(m_inp_mux, i + 12)) + data |= m_inputs[i]->read(); + + // read chessboard + for (int i = 0; i < 12; i++) + if (BIT(m_inp_mux, i)) + data |= m_board->read_file(i); + + return bitswap<8>(~data,7,6,5,4,0,1,2,3); +} + +u8 mirage_state::p5_r() +{ + // P55: motor Y quadrature B + return ~(BIT(m_motor_quad[1], 1) << 5); +} + +void mirage_state::p5_w(u8 data) +{ + // P52: speaker out + m_dac->write(BIT(~data, 2)); + + // P53: motor Y direction + // P54: motor Y on + motor_control(1, data >> 3 & 3); + + for (int i = 0; i < 2; i++) + m_out_motor[i] = BIT(data, i + 3); +} + +u8 mirage_state::p6_r() +{ + // P63: battery status + // P64: on/off button (IRQ0) + u8 data = m_inputs[2]->read() << 3 & 0x18; + + // P64: motor X quadrature A (IRQ1) + // P65: motor Y quadrature A (IRQ2) + data |= m_motor_quad[0] << 4 & 0x10; + data |= m_motor_quad[1] << 5 & 0x20; + + return ~data; +} + +void mirage_state::p6_w(u8 data) +{ + // P60,P61: input mux (buttons) + m_inp_mux = (m_inp_mux & 0xfff) | (~data << 12 & 0x3000); +} + +u8 mirage_state::p7_r() +{ + // P73: motor X quadrature B + return ~(BIT(m_motor_quad[0], 1) << 3); +} + +void mirage_state::p7_w(offs_t offset, u8 data, u8 mem_mask) +{ + // P70,P71: LCD common + m_lcd_com = mem_mask << 2 | (data & 3); + update_lcd(); + + // P74: motor X direction + // P75: motor X on + motor_control(0, data >> 4 & 3); + + // P76: electromagnet + update_piece(BIT(data, 6)); + + for (int i = 0; i < 3; i++) + m_out_motor[i + 2] = BIT(data, i + 4); + + // P77: motor board power? +} + + + +/******************************************************************************* + Input Ports +*******************************************************************************/ + +static INPUT_PORTS_START( mirage ) + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Hint / Bishop") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Takeback / Knight") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Move / Pawn") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Clear") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Level / Rook") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Verify / Queen") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Setup / King") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Option") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Replay") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Auto / Stop") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Multi-Move / Right") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Black / White / Left") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Mode") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("IN.2") + PORT_CONFNAME( 0x01, 0x00, "Battery Status" ) + PORT_CONFSETTING( 0x01, "Low" ) + PORT_CONFSETTING( 0x00, DEF_STR( Normal ) ) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mirage_state, on_button, 0) PORT_NAME("On / Off") +INPUT_PORTS_END + + + +/******************************************************************************* + Machine Configs +*******************************************************************************/ + +void mirage_state::mirage(machine_config &config) +{ + // basic machine hardware + H83256(config, m_maincpu, 20_MHz_XTAL); + m_maincpu->nvram_enable_backup(true); + m_maincpu->standby_cb().set(m_maincpu, FUNC(h83256_device::nvram_set_battery)); + m_maincpu->standby_cb().append([this](int state) { if (state) m_lcd_pwm->clear(); }); + m_maincpu->write_port1().set(FUNC(mirage_state::lcd_segs_w<1>)); + m_maincpu->write_port2().set(FUNC(mirage_state::lcd_segs_w<2>)); + m_maincpu->write_port3().set(FUNC(mirage_state::lcd_segs_w<0>)); + m_maincpu->read_port4().set(FUNC(mirage_state::p4_r)); + m_maincpu->read_port5().set(FUNC(mirage_state::p5_r)); + m_maincpu->write_port5().set(FUNC(mirage_state::p5_w)); + m_maincpu->read_port6().set(FUNC(mirage_state::p6_r)); + m_maincpu->write_port6().set(FUNC(mirage_state::p6_w)); + m_maincpu->read_port7().set(FUNC(mirage_state::p7_r)); + m_maincpu->write_port7().set(FUNC(mirage_state::p7_w)); + + SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); + m_board->set_size(8+4, 8); + m_board->clear_cb().set(FUNC(mirage_state::clear_board)); + 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 + PWM_DISPLAY(config, m_lcd_pwm).set_size(2, 24); + m_lcd_pwm->output_x().set(FUNC(mirage_state::lcd_pwm_w)); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG)); + screen.set_refresh_hz(60); + screen.set_size(1920/5, 697/5); + screen.set_visarea_full(); + + config.set_default_layout(layout_excal_mirage); + + // sound hardware + SPEAKER(config, "speaker").front_center(); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); +} + + + +/******************************************************************************* + ROM Definitions +*******************************************************************************/ + +ROM_START( emirage ) + ROM_REGION( 0xc000, "maincpu", 0 ) + ROM_LOAD("1996_7012_excalibur_hd6433256a33p.ic1", 0x0000, 0xc000, CRC(41eed8ea) SHA1(8b5370814d2bfc2d5fcb4ee86c30d676517bcd3a) ) + + ROM_REGION( 109652, "screen", 0 ) + ROM_LOAD("emirage.svg", 0, 109652, CRC(6840c49e) SHA1(a9c91143c5bea5ab41fe323e719da4a46ab9d631) ) +ROM_END + +} // anonymous namespace + + + +/******************************************************************************* + Drivers +*******************************************************************************/ + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +SYST( 1996, emirage, 0, 0, mirage, mirage, mirage_state, empty_init, "Excalibur Electronics", "Mirage (Excalibur)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_MECHANICAL | MACHINE_IMPERFECT_CONTROLS ) diff --git a/src/mame/chess/regence.cpp b/src/mame/chess/regence.cpp index 1c7097fd516..81ba20752f8 100644 --- a/src/mame/chess/regence.cpp +++ b/src/mame/chess/regence.cpp @@ -68,7 +68,7 @@ private: required_device m_maincpu; required_device m_display; required_device m_board; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; bool m_power = false; diff --git a/src/mame/chess/yeno_301xl.cpp b/src/mame/chess/yeno_301xl.cpp index 51d3ad323b6..f91f4d53904 100644 --- a/src/mame/chess/yeno_301xl.cpp +++ b/src/mame/chess/yeno_301xl.cpp @@ -64,7 +64,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; emu_timer *m_standbytimer; diff --git a/src/mame/commodore/chessmate.cpp b/src/mame/commodore/chessmate.cpp index fabf7a24484..59d647d5802 100644 --- a/src/mame/commodore/chessmate.cpp +++ b/src/mame/commodore/chessmate.cpp @@ -85,7 +85,7 @@ private: required_device m_maincpu; required_device m_miot; required_device m_display; - required_device m_dac; + required_device m_dac; optional_ioport_array<5> m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/cxg/chess2001.cpp b/src/mame/cxg/chess2001.cpp index c8a0b8dfd3d..c7c27db56d6 100644 --- a/src/mame/cxg/chess2001.cpp +++ b/src/mame/cxg/chess2001.cpp @@ -59,7 +59,7 @@ private: required_device m_maincpu; required_device m_display; required_device m_board; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; u16 m_inp_mux = 0; diff --git a/src/mame/cxg/computachess.cpp b/src/mame/cxg/computachess.cpp index cab59f9f34f..413e8232084 100644 --- a/src/mame/cxg/computachess.cpp +++ b/src/mame/cxg/computachess.cpp @@ -98,7 +98,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/cxg/dominator.cpp b/src/mame/cxg/dominator.cpp index d99cfdc0f15..b39c8301e88 100644 --- a/src/mame/cxg/dominator.cpp +++ b/src/mame/cxg/dominator.cpp @@ -69,7 +69,7 @@ private: required_device m_board; required_device m_lcd; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; output_finder<8> m_out_digit; output_finder<2, 52> m_out_lcd; diff --git a/src/mame/cxg/professor.cpp b/src/mame/cxg/professor.cpp index 56bacbdcc25..f35f1e155ec 100644 --- a/src/mame/cxg/professor.cpp +++ b/src/mame/cxg/professor.cpp @@ -14,7 +14,7 @@ For some reason, they've put the row leds on the right instead of on the left. Hardware notes: - PCB label: 243 600 001 - Hitachi HD63B01Y0P, 8MHz XTAL -- Sanyo LC7580, LCD with custom segments +- Sanyo LC7580, LCD with 5 7segs and custom segments - 8*8 chessboard buttons, 16 LEDs, piezo *******************************************************************************/ @@ -63,7 +63,7 @@ private: required_device m_board; required_device m_lcd; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<3> m_inputs; output_finder<2, 52> m_out_lcd; diff --git a/src/mame/cxg/senterprise.cpp b/src/mame/cxg/senterprise.cpp index 1d9a74e653d..9dfba4e4269 100644 --- a/src/mame/cxg/senterprise.cpp +++ b/src/mame/cxg/senterprise.cpp @@ -108,6 +108,7 @@ void senterp_state::machine_start() save_item(NAME(m_inp_mux)); } + // model 210.C class senterpc_state : public senterp_state diff --git a/src/mame/cxg/sphinx40.cpp b/src/mame/cxg/sphinx40.cpp index 9a7831bef8d..f048dd00afd 100644 --- a/src/mame/cxg/sphinx40.cpp +++ b/src/mame/cxg/sphinx40.cpp @@ -282,7 +282,7 @@ void sphinx40_state::sphinx40(machine_config &config) PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(sphinx40_state::cb_mux_w)); m_pia->writepb_handler().set(FUNC(sphinx40_state::cb_leds_w)); - m_pia->cb2_handler().set("dac", FUNC(dac_bit_interface::write)); + m_pia->cb2_handler().set("dac", FUNC(dac_1bit_device::write)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/ddr/chessmst.cpp b/src/mame/ddr/chessmst.cpp index 1d860d3ad2d..035f38b7a0d 100644 --- a/src/mame/ddr/chessmst.cpp +++ b/src/mame/ddr/chessmst.cpp @@ -71,7 +71,7 @@ private: required_device_array m_pio; required_device m_board; required_device m_led_pwm; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; u16 m_matrix = 0; diff --git a/src/mame/ddr/sc2.cpp b/src/mame/ddr/sc2.cpp index 0014d620ce6..88f3e394d41 100644 --- a/src/mame/ddr/sc2.cpp +++ b/src/mame/ddr/sc2.cpp @@ -68,7 +68,7 @@ private: required_device m_maincpu; required_device m_pio; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<4> m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/fidelity/as12.cpp b/src/mame/fidelity/as12.cpp index 3387a368441..3d4486a3198 100644 --- a/src/mame/fidelity/as12.cpp +++ b/src/mame/fidelity/as12.cpp @@ -77,7 +77,7 @@ private: // devices/pointers required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; u16 m_inp_mux = 0; diff --git a/src/mame/fidelity/bridgeb.cpp b/src/mame/fidelity/bridgeb.cpp index 5ccb208102a..b03143faa90 100644 --- a/src/mame/fidelity/bridgeb.cpp +++ b/src/mame/fidelity/bridgeb.cpp @@ -62,7 +62,7 @@ private: required_device m_z80pio; required_device_array m_dl1414; required_device m_led_pwm; - required_device m_dac; + required_device m_dac; required_ioport_array<8> m_inputs; output_finder<12> m_digits; diff --git a/src/mame/fidelity/card.cpp b/src/mame/fidelity/card.cpp index ee452e6c755..20228d7281a 100644 --- a/src/mame/fidelity/card.cpp +++ b/src/mame/fidelity/card.cpp @@ -225,7 +225,7 @@ private: required_device m_i8243; required_device m_display; optional_device m_speech; - optional_device m_dac; + optional_device m_dac; required_ioport_array<8> m_inputs; u32 m_barcode = 0; diff --git a/src/mame/fidelity/cc7.cpp b/src/mame/fidelity/cc7.cpp index 4975e9266c5..fc587827763 100644 --- a/src/mame/fidelity/cc7.cpp +++ b/src/mame/fidelity/cc7.cpp @@ -83,7 +83,7 @@ private: // devices/pointers required_device m_maincpu; required_device m_display; - optional_device m_dac; + optional_device m_dac; required_ioport_array<4> m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/fidelity/chesster.cpp b/src/mame/fidelity/chesster.cpp index 43f5e36539e..a402c3b2af2 100644 --- a/src/mame/fidelity/chesster.cpp +++ b/src/mame/fidelity/chesster.cpp @@ -16,7 +16,7 @@ There is also a German version titled Kishon Chesster (model 6120G, or 6127) 8*(8+1) buttons, 8+8+1 LEDs 8KB RAM(UM6264-12), 32KB ROM(M27C256B) Ricoh RP65C02G CPU, 5MHz XTAL -8-bit DAC speech timed via IRQ, 128KB ROM(AMI custom label) +8-bit DAC (8L513 02 resistor array) timed via IRQ, 128KB ROM(AMI custom label) PCB label 510.1141C01 I/O is via TTL, memory map is similar to Designer Display @@ -51,6 +51,7 @@ public: m_rombank(*this, "rombank"), m_board(*this, "board"), m_display(*this, "display"), + m_dac(*this, "dac"), m_inputs(*this, "IN.0") { } @@ -59,6 +60,7 @@ public: protected: virtual void machine_start() override; + virtual void machine_reset() override; private: // devices/pointers @@ -66,6 +68,7 @@ private: required_memory_bank m_rombank; required_device m_board; required_device m_display; + required_device m_dac; required_ioport m_inputs; int m_numbanks = 0; @@ -90,6 +93,11 @@ void chesster_state::machine_start() save_item(NAME(m_select)); } +void chesster_state::machine_reset() +{ + m_dac->write(0x80); +} + /******************************************************************************* @@ -143,8 +151,8 @@ void chesster_state::main_map(address_map &map) { map(0x0000, 0x1fff).ram(); map(0x2000, 0x2007).mirror(0x1ff8).rw(FUNC(chesster_state::input_r), FUNC(chesster_state::control_w)); - map(0x4000, 0x7fff).bankr("rombank"); - map(0x6000, 0x6000).mirror(0x1fff).w("dac", FUNC(dac_byte_interface::data_w)); + map(0x4000, 0x7fff).bankr(m_rombank); + map(0x6000, 0x6000).mirror(0x1fff).w(m_dac, FUNC(dac_8bit_r2r_device::data_w)); map(0x8000, 0xffff).rom(); } @@ -192,7 +200,7 @@ void chesster_state::chesster(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // m74hc374b1.ic1 + 8l513_02.z2 + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); } void chesster_state::kishon(machine_config &config) diff --git a/src/mame/fidelity/csc.cpp b/src/mame/fidelity/csc.cpp index b123079548f..791436c81cc 100644 --- a/src/mame/fidelity/csc.cpp +++ b/src/mame/fidelity/csc.cpp @@ -227,8 +227,6 @@ clicking on the game board. namespace { -// CSC / shared - class csc_state : public driver_device { public: @@ -263,7 +261,7 @@ protected: optional_device_array m_pia; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; optional_device m_speech; optional_region_ptr m_speech_rom; optional_region_ptr m_language; diff --git a/src/mame/fidelity/dames.cpp b/src/mame/fidelity/dames.cpp index e69d859746b..02fe0d23e87 100644 --- a/src/mame/fidelity/dames.cpp +++ b/src/mame/fidelity/dames.cpp @@ -60,7 +60,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/fidelity/desdis.cpp b/src/mame/fidelity/desdis.cpp index b497bc4f953..c24b51a9469 100644 --- a/src/mame/fidelity/desdis.cpp +++ b/src/mame/fidelity/desdis.cpp @@ -85,7 +85,7 @@ protected: optional_memory_bank m_rombank; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; u8 m_select = 0; @@ -113,6 +113,7 @@ void desdis_state::machine_start() save_item(NAME(m_lcd_data)); } + // Designer Master class desmas_state : public desdis_state @@ -231,7 +232,7 @@ void desdis_state::fdes2100d_map(address_map &map) { map(0x0000, 0x1fff).ram(); map(0x2000, 0x2007).mirror(0x1ff8).rw(FUNC(desdis_state::input_r), FUNC(desdis_state::control_w)); - map(0x4000, 0x7fff).bankr("rombank"); + map(0x4000, 0x7fff).bankr(m_rombank); map(0x6000, 0x6007).mirror(0x1ff8).w(FUNC(desdis_state::lcd_w)); map(0x8000, 0xffff).rom(); } diff --git a/src/mame/fidelity/eag68k.cpp b/src/mame/fidelity/eag68k.cpp index 60a8bb6d6da..c1b2b8b7b90 100644 --- a/src/mame/fidelity/eag68k.cpp +++ b/src/mame/fidelity/eag68k.cpp @@ -270,7 +270,7 @@ protected: optional_device m_usart; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; optional_ioport_array<3> m_inputs; u8 m_select = 0; @@ -305,6 +305,7 @@ void eag_state::machine_reset() update_dsr(); } + // EAG V5 class eagv5_state : public eag_state @@ -336,6 +337,7 @@ private: u8 sub_ack_r(); }; + // Elite Premiere class premiere_state : public eag_state @@ -384,6 +386,7 @@ void premiere_state::machine_reset() m_nvrambank->set_entry(bank); } + // Excel 68000 class excel68k_state : public eag_state diff --git a/src/mame/fidelity/eldorado.cpp b/src/mame/fidelity/eldorado.cpp index 4145cbd0958..0a57e37d4e2 100644 --- a/src/mame/fidelity/eldorado.cpp +++ b/src/mame/fidelity/eldorado.cpp @@ -53,7 +53,7 @@ private: required_device m_maincpu; required_device m_display; required_device m_board; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; bool m_kp_select = false; diff --git a/src/mame/fidelity/elite.cpp b/src/mame/fidelity/elite.cpp index aaa8dad71e3..0378a64fdcf 100644 --- a/src/mame/fidelity/elite.cpp +++ b/src/mame/fidelity/elite.cpp @@ -130,7 +130,7 @@ protected: optional_memory_bank m_rombank; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_device m_speech; required_region_ptr m_speech_rom; required_region_ptr m_language; @@ -175,6 +175,7 @@ INPUT_CHANGED_MEMBER(elite_state::change_cpu_freq) m_maincpu->set_unscaled_clock(xtal[newval % 3]); } + // EAG class eag_state : public elite_state @@ -370,7 +371,7 @@ void eag_state::eag_map(address_map &map) void eag_state::eag2100_map(address_map &map) { eag_map(map); - map(0xa000, 0xbfff).bankr("rombank"); + map(0xa000, 0xbfff).bankr(m_rombank); } diff --git a/src/mame/fidelity/excel.cpp b/src/mame/fidelity/excel.cpp index 8cab91d51eb..c4e4f2260ee 100644 --- a/src/mame/fidelity/excel.cpp +++ b/src/mame/fidelity/excel.cpp @@ -187,7 +187,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; optional_device m_speech; optional_region_ptr m_speech_rom; optional_ioport_array<3> m_inputs; diff --git a/src/mame/fidelity/msc.cpp b/src/mame/fidelity/msc.cpp index 3d30c3c29b3..665e76294c9 100644 --- a/src/mame/fidelity/msc.cpp +++ b/src/mame/fidelity/msc.cpp @@ -65,7 +65,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; u8 m_led_select = 0; diff --git a/src/mame/fidelity/phantom.cpp b/src/mame/fidelity/phantom.cpp index 756df180f09..131e4cd77f1 100644 --- a/src/mame/fidelity/phantom.cpp +++ b/src/mame/fidelity/phantom.cpp @@ -10,6 +10,15 @@ their own version. It has a small LCD panel added, the rest looks nearly the sam the outside. After Fidelity was taken over by H+G, it was rereleased in 1990 as the Mephisto Phantom. This is assumed to be identical. +At boot-up, the computer will do a self-test, the user can start playing after the +motor has moved to the upper-right corner. The computer will continue positioning +pieces though, so it may be a bit distracting. Or, just hold INSERT (on PC) for a +while to speed up MAME before starting a new game. + +After the user captures a piece, select the captured piece from the MAME sensorboard +spawn block and place it anywhere on a free spot at the designated box at the +edge of the chessboard. + Hardware notes: - PCB label 510.1128A01 - R65C02P4, XTAL marked 4.915200 @@ -24,15 +33,6 @@ daughterboard, the housing is the same as model 6100, except for button labels. Model 6126 has a dedicated PCB, this version also has a motion sensor at the front and 2 leds to mimic eyes, and the housing color theme is green instead of beige. -At boot-up, the computer will do a self-test, the user can start playing after the -motor has moved to the upper-right corner. The computer will continue positioning -pieces though, so it may be a bit distracting. Or, just hold INSERT (on PC) for a -while to speed up MAME before starting a new game. - -After the user captures a piece, select the captured piece from the MAME sensorboard -spawn block and place it anywhere on a free spot at the designated box at the -edge of the chessboard. - TODO: - sensorboard undo buffer goes out of control, probably not worth solving this issue - cphantom artwork should be green instead of beige @@ -90,7 +90,7 @@ protected: // devices/pointers required_device m_maincpu; required_memory_bank m_rombank; - optional_device m_dac; + optional_device m_dac; required_device m_board; required_device m_display; optional_ioport_array<2> m_inputs; @@ -175,6 +175,7 @@ void phantom_state::init_phantom() m_rombank->configure_entries(0, numbanks, memregion("rombank")->base(), 0x4000); } + // Chesster Phantom class chessterp_state : public phantom_state @@ -182,6 +183,7 @@ class chessterp_state : public phantom_state public: chessterp_state(const machine_config &mconfig, device_type type, const char *tag) : phantom_state(mconfig, type, tag), + m_speech(*this, "speech"), m_eye_led(*this, "eye_led") { } @@ -189,8 +191,10 @@ public: protected: virtual void machine_start() override; + virtual void machine_reset() override; private: + required_device m_speech; output_finder<> m_eye_led; virtual void main_map(address_map &map) override; @@ -210,6 +214,12 @@ void chessterp_state::machine_start() save_item(NAME(m_select2)); } +void chessterp_state::machine_reset() +{ + phantom_state::machine_reset(); + m_speech->write(0x80); +} + TIMER_DEVICE_CALLBACK_MEMBER(chessterp_state::nmi_timer) { m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); @@ -531,14 +541,14 @@ void phantom_state::main_map(address_map &map) map(0x2500, 0x2500).mirror(0x00ff).r(FUNC(phantom_state::hmotor_ff_clear_r)); map(0x2600, 0x2600).mirror(0x00ff).r(FUNC(phantom_state::vmotor_ff_clear_r)); map(0x2700, 0x2700).mirror(0x00ff).r(FUNC(phantom_state::irq_ack_r)); - map(0x4000, 0x7fff).bankr("rombank"); + map(0x4000, 0x7fff).bankr(m_rombank); map(0x8000, 0xffff).rom(); } void chessterp_state::main_map(address_map &map) { phantom_state::main_map(map); - map(0x2300, 0x2300).mirror(0x00ff).w("speech", FUNC(dac_byte_interface::data_w)); + map(0x2300, 0x2300).mirror(0x00ff).w(m_speech, FUNC(dac_8bit_r2r_device::data_w)); } @@ -625,7 +635,7 @@ void chessterp_state::cphantom(machine_config &config) // sound hardware config.device_remove("dac"); - DAC_8BIT_R2R(config, "speech").add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC_8BIT_R2R(config, m_speech).add_route(ALL_OUTPUTS, "speaker", 0.5); } diff --git a/src/mame/fidelity/sc12.cpp b/src/mame/fidelity/sc12.cpp index f1b7b2f17d3..d54c5011d79 100644 --- a/src/mame/fidelity/sc12.cpp +++ b/src/mame/fidelity/sc12.cpp @@ -98,7 +98,7 @@ private: // devices/pointers required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/fidelity/sc6.cpp b/src/mame/fidelity/sc6.cpp index 64f0fa16598..70204733f78 100644 --- a/src/mame/fidelity/sc6.cpp +++ b/src/mame/fidelity/sc6.cpp @@ -119,7 +119,7 @@ private: required_region_ptr m_rom; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; optional_device m_cart; required_ioport m_inputs; diff --git a/src/mame/fidelity/sc8.cpp b/src/mame/fidelity/sc8.cpp index 442979dfb90..d7117ebb973 100644 --- a/src/mame/fidelity/sc8.cpp +++ b/src/mame/fidelity/sc8.cpp @@ -60,7 +60,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/fidelity/sc9.cpp b/src/mame/fidelity/sc9.cpp index bdc23721407..2ae740f76e5 100644 --- a/src/mame/fidelity/sc9.cpp +++ b/src/mame/fidelity/sc9.cpp @@ -64,8 +64,6 @@ IRQ and write strobe are unused. Maximum known size is 16KB. namespace { -// SC9 / shared - class sc9_state : public driver_device { public: @@ -93,7 +91,7 @@ protected: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/handheld/hh_tms1k.cpp b/src/mame/handheld/hh_tms1k.cpp index e15073449da..8844f5d886f 100644 --- a/src/mame/handheld/hh_tms1k.cpp +++ b/src/mame/handheld/hh_tms1k.cpp @@ -17410,12 +17410,11 @@ SYST( 1976, ti30, 0, 0, ti30, ti30, ti30_state, SYST( 1976, tibusan, 0, 0, ti30, tibusan, ti30_state, empty_init, "Texas Instruments", "TI Business Analyst", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) SYST( 1977, tiprog, 0, 0, ti30, tiprog, ti30_state, empty_init, "Texas Instruments", "TI Programmer", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) SYST( 1977, ti1000, 0, 0, ti1000, ti1000, ti1000_state, empty_init, "Texas Instruments", "TI-1000 (1977 version)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) -SYST( 1977, wizatron, 0, 0, lilprofo, wizatron, lilprofo_state, empty_init, "Texas Instruments", "Wiz-A-Tron", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) SYST( 1978, lilprof, 0, 0, lilprof, lilprof, lilprof_state, empty_init, "Texas Instruments", "Little Professor (1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) SYST( 1976, lilprofoa, lilprof, 0, lilprofo, lilprofo, lilprofo_state, empty_init, "Texas Instruments", "Little Professor (1976 version, rev. A)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) SYST( 1976, lilprofob, lilprof, 0, lilprofo, lilprofo, lilprofo_state, empty_init, "Texas Instruments", "Little Professor (1976 version, rev. B)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) SYST( 1976, lilprofo, lilprof, 0, lilprofoc, lilprofo, lilprofo_state, empty_init, "Texas Instruments", "Little Professor (1976 version, rev. C)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) - +SYST( 1977, wizatron, 0, 0, lilprofo, wizatron, lilprofo_state, empty_init, "Texas Instruments", "Wiz-A-Tron", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) SYST( 1977, ti1680, 0, 0, ti1680, ti1680, ti1680_state, empty_init, "Texas Instruments", "TI-1680", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) SYST( 1977, dataman, 0, 0, dataman, dataman, dataman_state, empty_init, "Texas Instruments", "DataMan", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) SYST( 1980, mathmarv, 0, 0, mathmarv, mathmarv, mathmarv_state, empty_init, "Texas Instruments", "Math Marvel", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/hegenerglaser/academy.cpp b/src/mame/hegenerglaser/academy.cpp index 6d92ab6537e..d58965d7aba 100644 --- a/src/mame/hegenerglaser/academy.cpp +++ b/src/mame/hegenerglaser/academy.cpp @@ -41,13 +41,13 @@ namespace { class academy_state : public driver_device { public: - academy_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_led_pwm(*this, "led_pwm") - , m_outlatch(*this, "outlatch") - , m_keys(*this, "KEY") + academy_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_led_pwm(*this, "led_pwm"), + m_outlatch(*this, "outlatch"), + m_keys(*this, "KEY") { } void academy(machine_config &config); diff --git a/src/mame/hegenerglaser/amsterdam.cpp b/src/mame/hegenerglaser/amsterdam.cpp index e097eae67d8..e446f055a0f 100644 --- a/src/mame/hegenerglaser/amsterdam.cpp +++ b/src/mame/hegenerglaser/amsterdam.cpp @@ -58,7 +58,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_keys; required_ioport m_reset; diff --git a/src/mame/hegenerglaser/berlin.cpp b/src/mame/hegenerglaser/berlin.cpp index 4178c677208..5fa281f489e 100644 --- a/src/mame/hegenerglaser/berlin.cpp +++ b/src/mame/hegenerglaser/berlin.cpp @@ -33,13 +33,13 @@ namespace { class berlin_state : public driver_device { public: - berlin_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_nvram(*this, "nvram", 0x2000, ENDIANNESS_BIG) - , m_board(*this, "board") - , m_display(*this, "display") - , m_keys(*this, "KEY") + berlin_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_nvram(*this, "nvram", 0x2000, ENDIANNESS_BIG), + m_board(*this, "board"), + m_display(*this, "display"), + m_keys(*this, "KEY") { } void berlin(machine_config &config); diff --git a/src/mame/hegenerglaser/brikett.cpp b/src/mame/hegenerglaser/brikett.cpp index 2f03ba464c8..5e53fd18d3d 100644 --- a/src/mame/hegenerglaser/brikett.cpp +++ b/src/mame/hegenerglaser/brikett.cpp @@ -131,7 +131,7 @@ private: optional_device m_board; required_device m_display; optional_device m_led_pwm; - required_device m_dac; + required_device m_dac; required_device m_speaker_off; optional_ioport_array<4+2> m_inputs; diff --git a/src/mame/hegenerglaser/europa.cpp b/src/mame/hegenerglaser/europa.cpp index f6b904ec22f..b8269f8f81a 100644 --- a/src/mame/hegenerglaser/europa.cpp +++ b/src/mame/hegenerglaser/europa.cpp @@ -66,7 +66,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<3> m_inputs; u16 m_inp_mux = 0; diff --git a/src/mame/hegenerglaser/glasgow.cpp b/src/mame/hegenerglaser/glasgow.cpp index ea9d2e4c886..be19a3c06b6 100644 --- a/src/mame/hegenerglaser/glasgow.cpp +++ b/src/mame/hegenerglaser/glasgow.cpp @@ -68,7 +68,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_keys; u8 m_kp_mux = 0; diff --git a/src/mame/hegenerglaser/milano.cpp b/src/mame/hegenerglaser/milano.cpp index b728a728695..d804b7bbfa3 100644 --- a/src/mame/hegenerglaser/milano.cpp +++ b/src/mame/hegenerglaser/milano.cpp @@ -34,13 +34,13 @@ namespace { class milano_state : public driver_device { public: - milano_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_display(*this, "display") - , m_led_pwm(*this, "led_pwm") - , m_keys(*this, "KEY") + milano_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_display(*this, "display"), + m_led_pwm(*this, "led_pwm"), + m_keys(*this, "KEY") { } void milano(machine_config &config); diff --git a/src/mame/hegenerglaser/mm1.cpp b/src/mame/hegenerglaser/mm1.cpp index 738bdb312fb..5919f6bb595 100644 --- a/src/mame/hegenerglaser/mm1.cpp +++ b/src/mame/hegenerglaser/mm1.cpp @@ -82,7 +82,7 @@ private: // devices/pointers required_device m_maincpu; required_device m_board; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; bool m_reset = false; diff --git a/src/mame/hegenerglaser/modena.cpp b/src/mame/hegenerglaser/modena.cpp index 8b0786274e0..df5079cff79 100644 --- a/src/mame/hegenerglaser/modena.cpp +++ b/src/mame/hegenerglaser/modena.cpp @@ -38,14 +38,14 @@ namespace { class modena_state : public driver_device { public: - modena_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_display(*this, "display") - , m_led_pwm(*this, "led_pwm") - , m_dac(*this, "dac") - , m_keys(*this, "KEY") + modena_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_display(*this, "display"), + m_led_pwm(*this, "led_pwm"), + m_dac(*this, "dac"), + m_keys(*this, "KEY") { } void modena(machine_config &config); @@ -58,7 +58,7 @@ private: required_device m_board; required_device m_display; required_device m_led_pwm; - required_device m_dac; + required_device m_dac; required_ioport m_keys; u8 m_board_mux = 0; diff --git a/src/mame/hegenerglaser/mondial.cpp b/src/mame/hegenerglaser/mondial.cpp index 709d36a992b..c40fd9cb54f 100644 --- a/src/mame/hegenerglaser/mondial.cpp +++ b/src/mame/hegenerglaser/mondial.cpp @@ -39,13 +39,13 @@ namespace { class mondial_state : public driver_device { public: - mondial_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_led_pwm(*this, "led_pwm") - , m_beeper(*this, "beeper") - , m_keys(*this, "KEY.%u", 0) + mondial_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_led_pwm(*this, "led_pwm"), + m_beeper(*this, "beeper"), + m_keys(*this, "KEY.%u", 0) { } void mondial(machine_config &config); diff --git a/src/mame/hegenerglaser/mondial2.cpp b/src/mame/hegenerglaser/mondial2.cpp index b91eab10fcc..4eb1acd7c05 100644 --- a/src/mame/hegenerglaser/mondial2.cpp +++ b/src/mame/hegenerglaser/mondial2.cpp @@ -31,13 +31,13 @@ namespace { class mondial2_state : public driver_device { public: - mondial2_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_led_pwm(*this, "led_pwm") - , m_dac(*this, "dac") - , m_keys(*this, "KEY.%u", 0) + mondial2_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_led_pwm(*this, "led_pwm"), + m_dac(*this, "dac"), + m_keys(*this, "KEY.%u", 0) { } void mondial2(machine_config &config); @@ -49,7 +49,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_led_pwm; - required_device m_dac; + required_device m_dac; required_ioport_array<4> m_keys; u8 m_keypad_mux = 0; diff --git a/src/mame/hegenerglaser/mondial68k.cpp b/src/mame/hegenerglaser/mondial68k.cpp index fa41e3f5f4b..f517ab9db1e 100644 --- a/src/mame/hegenerglaser/mondial68k.cpp +++ b/src/mame/hegenerglaser/mondial68k.cpp @@ -39,15 +39,15 @@ namespace { class mondial68k_state : public driver_device { public: - mondial68k_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_latch(*this, "lcd_latch") - , m_led_pwm(*this, "led_pwm") - , m_lcd(*this, "lcd") - , m_inputs(*this, "IN.%u", 0) - , m_digits(*this, "digit%u", 0U) + mondial68k_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_latch(*this, "lcd_latch"), + m_led_pwm(*this, "led_pwm"), + m_lcd(*this, "lcd"), + m_inputs(*this, "IN.%u", 0), + m_digits(*this, "digit%u", 0U) { } void mondial68k(machine_config &config); diff --git a/src/mame/hegenerglaser/montec.cpp b/src/mame/hegenerglaser/montec.cpp index 6fbdca465a5..040ea4c886d 100644 --- a/src/mame/hegenerglaser/montec.cpp +++ b/src/mame/hegenerglaser/montec.cpp @@ -42,15 +42,15 @@ namespace { class montec_state : public driver_device { public: - montec_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_latch(*this, "lcd_latch") - , m_led_pwm(*this, "led_pwm") - , m_lcd(*this, "lcd%u", 0) - , m_keys(*this, "KEY.%u", 0) - , m_digits(*this, "digit%u", 0U) + montec_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_latch(*this, "lcd_latch"), + m_led_pwm(*this, "led_pwm"), + m_lcd(*this, "lcd%u", 0), + m_keys(*this, "KEY.%u", 0), + m_digits(*this, "digit%u", 0U) { } void montec(machine_config &config); diff --git a/src/mame/hegenerglaser/polgar.cpp b/src/mame/hegenerglaser/polgar.cpp index a88e604505c..a0a9b74c874 100644 --- a/src/mame/hegenerglaser/polgar.cpp +++ b/src/mame/hegenerglaser/polgar.cpp @@ -33,10 +33,10 @@ namespace { class polgar_state : public driver_device { public: - polgar_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_keys(*this, "KEY") + polgar_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_keys(*this, "KEY") { } void polgar10(machine_config &config); diff --git a/src/mame/hegenerglaser/risc.cpp b/src/mame/hegenerglaser/risc.cpp index a79eb322052..08873d1792c 100644 --- a/src/mame/hegenerglaser/risc.cpp +++ b/src/mame/hegenerglaser/risc.cpp @@ -36,12 +36,12 @@ namespace { class risc_state : public driver_device { public: - risc_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_chessm(*this, "chessm") - , m_rombank(*this, "rombank") - , m_keys(*this, "KEY") + risc_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_chessm(*this, "chessm"), + m_rombank(*this, "rombank"), + m_keys(*this, "KEY") { } void mrisc(machine_config &config); diff --git a/src/mame/hegenerglaser/roma2.cpp b/src/mame/hegenerglaser/roma2.cpp index bab69bcb7fc..e8c7f2699d3 100644 --- a/src/mame/hegenerglaser/roma2.cpp +++ b/src/mame/hegenerglaser/roma2.cpp @@ -63,7 +63,7 @@ private: required_device m_outlatch; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<4> m_inputs; optional_ioport m_reset; @@ -186,7 +186,7 @@ void roma2_state::roma2(machine_config &config) HC259(config, m_outlatch); // Q0-Q3: input mux; Q4: strobe; Q6-Q7: DAC m_outlatch->q_out_cb<4>().set(m_display, FUNC(mephisto_display1_device::strobe_w)); - m_outlatch->parallel_out_cb().set(m_dac, FUNC(dac_byte_interface::write)).rshift(6).mask(3); + m_outlatch->parallel_out_cb().set(m_dac, FUNC(dac_2bit_ones_complement_device::write)).rshift(6).mask(3); MEPHISTO_SENSORS_BOARD(config, m_board); m_board->set_delay(attotime::from_msec(200)); diff --git a/src/mame/hegenerglaser/smondial.cpp b/src/mame/hegenerglaser/smondial.cpp index 7df1af35955..fffa3ccf140 100644 --- a/src/mame/hegenerglaser/smondial.cpp +++ b/src/mame/hegenerglaser/smondial.cpp @@ -48,16 +48,16 @@ namespace { class smondialb_state : public driver_device { public: - smondialb_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_latch(*this, "lcd_latch") - , m_led_pwm(*this, "led_pwm") - , m_lcd(*this, "lcd%u", 0) - , m_dac(*this, "dac") - , m_keys(*this, "KEY.%u", 0) - , m_digits(*this, "digit%u", 0U) + smondialb_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_latch(*this, "lcd_latch"), + m_led_pwm(*this, "led_pwm"), + m_lcd(*this, "lcd%u", 0), + m_dac(*this, "dac"), + m_keys(*this, "KEY.%u", 0), + m_digits(*this, "digit%u", 0U) { } // machine configs @@ -74,7 +74,7 @@ protected: required_device m_lcd_latch; required_device m_led_pwm; required_device_array m_lcd; - required_device m_dac; + required_device m_dac; required_ioport_array<4> m_keys; output_finder<8> m_digits; @@ -102,6 +102,7 @@ void smondialb_state::machine_start() save_item(NAME(m_board_mux)); } + // Super Mondial A class smondiala_state : public smondialb_state diff --git a/src/mame/layout/excal_ivant.lay b/src/mame/layout/excal_ivant.lay new file mode 100644 index 00000000000..c0337ba43d5 --- /dev/null +++ b/src/mame/layout/excal_ivant.lay @@ -0,0 +1,472 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/excal_mirage.lay b/src/mame/layout/excal_mirage.lay new file mode 100644 index 00000000000..37f66cb8829 --- /dev/null +++ b/src/mame/layout/excal_mirage.lay @@ -0,0 +1,517 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/fidel_cphantom.lay b/src/mame/layout/fidel_cphantom.lay index 1f7b910659f..c4b74128c03 100644 --- a/src/mame/layout/fidel_cphantom.lay +++ b/src/mame/layout/fidel_cphantom.lay @@ -51,23 +51,41 @@ authors:Sandro Ronco, hap - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -219,59 +237,68 @@ authors:Sandro Ronco, hap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + diff --git a/src/mame/layout/fidel_phantom.lay b/src/mame/layout/fidel_phantom.lay index 49e1e9c1953..79d85b366d1 100644 --- a/src/mame/layout/fidel_phantom.lay +++ b/src/mame/layout/fidel_phantom.lay @@ -51,23 +51,41 @@ authors:Sandro Ronco, hap - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -219,59 +237,68 @@ authors:Sandro Ronco, hap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index b6995caf4a9..98dca5a7752 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -16135,6 +16135,12 @@ cncchess2 @source:chess/conic_cchess3.cpp cncchess3 +@source:chess/excal_ivant.cpp +ivant + +@source:chess/excal_mirage.cpp +emirage + @source:chess/regence.cpp regence diff --git a/src/mame/novag/accord.cpp b/src/mame/novag/accord.cpp index abe4971c1df..3de3cf1a969 100644 --- a/src/mame/novag/accord.cpp +++ b/src/mame/novag/accord.cpp @@ -64,7 +64,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; emu_timer *m_standbytimer; diff --git a/src/mame/novag/constjr.cpp b/src/mame/novag/constjr.cpp index 32a60e64133..774d5fe470a 100644 --- a/src/mame/novag/constjr.cpp +++ b/src/mame/novag/constjr.cpp @@ -69,7 +69,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; emu_timer *m_standbytimer; diff --git a/src/mame/novag/micro.cpp b/src/mame/novag/micro.cpp index 7529f1284f9..18de5d37744 100644 --- a/src/mame/novag/micro.cpp +++ b/src/mame/novag/micro.cpp @@ -56,7 +56,7 @@ private: required_device m_maincpu; required_device m_display; required_device m_board; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; u8 m_led_data = 0; diff --git a/src/mame/novag/micro2.cpp b/src/mame/novag/micro2.cpp index 88faff7eccd..3bb3d7082c7 100644 --- a/src/mame/novag/micro2.cpp +++ b/src/mame/novag/micro2.cpp @@ -85,7 +85,7 @@ private: required_device m_maincpu; required_device m_display; required_device m_board; - required_device m_dac; + required_device m_dac; required_ioport m_inputs; bool m_kp_select = false; diff --git a/src/mame/novag/primo.cpp b/src/mame/novag/primo.cpp index 66144978c0e..7e88fd4c2ea 100644 --- a/src/mame/novag/primo.cpp +++ b/src/mame/novag/primo.cpp @@ -29,7 +29,7 @@ Hardware notes: - PCB label: 100059/100060 - Hitachi HD6301Y0P (mode 2) @ 8MHz - 2KB RAM(M5M5118P) -- LCD with 4 digits and custom segments, no LCD chip +- LCD with 4 7segs and custom segments, no LCD chip - buzzer, 16 LEDs, 8*8 chessboard buttons The LCD is the same as the one in VIP / Super VIP. @@ -57,7 +57,7 @@ Novag Super Nova (model 904) Hardware notes: - Hitachi HD63A03YP @ 16MHz - 32KB ROM(TC57256AD-12), 8KB RAM(CXK58648P-10L) -- LCD with 4 digits and custom segments, no LCD chip +- LCD with 4 7segs and custom segments, no LCD chip - RJ-12 port for Novag Super System (like the one in nsvip/sexpertc) - buzzer, 16 LEDs, 8*8 chessboard buttons @@ -120,7 +120,7 @@ private: required_device m_board; required_device m_lcd_pwm; required_device m_led_pwm; - required_device m_dac; + required_device m_dac; optional_device m_rs232; required_ioport_array<2> m_inputs; output_finder<4, 10> m_out_lcd; diff --git a/src/mame/novag/savant.cpp b/src/mame/novag/savant.cpp index 0c511872b76..7f2fa1ff147 100644 --- a/src/mame/novag/savant.cpp +++ b/src/mame/novag/savant.cpp @@ -78,7 +78,7 @@ private: required_device m_lcd2; required_device m_display; required_device m_board; - required_device m_dac; + required_device m_dac; required_shared_ptr m_nvram; required_ioport_array<3> m_inputs; diff --git a/src/mame/novag/sdiamond.cpp b/src/mame/novag/sdiamond.cpp index 89bc8d01cef..8dba100a1dc 100644 --- a/src/mame/novag/sdiamond.cpp +++ b/src/mame/novag/sdiamond.cpp @@ -14,7 +14,7 @@ Hardware notes: - Hitachi H8S/2312 12312VTE25V, 25MHz XTAL - 512KB Flash ROM (SST 39VF400A), only 192KB used - 256KB RAM (2*Hynix HY62V8100B) -- LCD with custom segments +- LCD with 6 7segs and custom segments - RJ-12 port for Novag Super System (always 57600 baud) - piezo, 16 LEDs, button sensors chessboard @@ -71,7 +71,7 @@ private: required_device m_board; required_device m_led_pwm; required_device m_lcd_pwm; - required_device m_dac; + required_device m_dac; required_device m_rs232; required_ioport_array<4> m_inputs; output_finder<4, 16> m_out_lcd; diff --git a/src/mame/novag/sexpert.cpp b/src/mame/novag/sexpert.cpp index 62a415b3a6f..bcf35aaf085 100644 --- a/src/mame/novag/sexpert.cpp +++ b/src/mame/novag/sexpert.cpp @@ -148,6 +148,7 @@ void sexpert_state::init_sexpert() m_rombank->configure_entries(0, 2, memregion("maincpu")->base() + 0x8000, 0x8000); } + // Super Forte class sforte_state : public sexpert_state diff --git a/src/mame/novag/vip.cpp b/src/mame/novag/vip.cpp index ee72e8869a4..a40e3055522 100644 --- a/src/mame/novag/vip.cpp +++ b/src/mame/novag/vip.cpp @@ -33,7 +33,7 @@ Hardware notes: - PCB label: 100078 - Hitachi HD6301Y0F (mode 2) @ 8MHz - 2KB RAM (NEC D449G-15) -- LCD with 4 digits and custom segments, no LCD chip +- LCD with 4 7segs and custom segments, no LCD chip - 24 buttons, piezo The LCD is the same as the one in Primo / Supremo / Super Nova. diff --git a/src/mame/saitek/companion.cpp b/src/mame/saitek/companion.cpp index 279119772e4..3a2fab39ce9 100644 --- a/src/mame/saitek/companion.cpp +++ b/src/mame/saitek/companion.cpp @@ -58,7 +58,7 @@ private: required_device m_pia; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/saitek/corona.cpp b/src/mame/saitek/corona.cpp index 1c515c567cb..1c8e68ce83e 100644 --- a/src/mame/saitek/corona.cpp +++ b/src/mame/saitek/corona.cpp @@ -53,7 +53,7 @@ private: // devices/pointers memory_view m_rombank; required_device m_board; - required_device m_dac; + required_device m_dac; required_ioport_array<8+1> m_inputs; u8 m_control1 = 0; diff --git a/src/mame/saitek/cp2000.cpp b/src/mame/saitek/cp2000.cpp index 7bdb1ccdc93..076d28e7921 100644 --- a/src/mame/saitek/cp2000.cpp +++ b/src/mame/saitek/cp2000.cpp @@ -64,7 +64,7 @@ private: required_device m_maincpu; required_device m_display; required_device m_board; - required_device m_dac; + required_device m_dac; required_ioport_array<4> m_inputs; u16 m_inp_mux = 0; diff --git a/src/mame/saitek/ecbackg.cpp b/src/mame/saitek/ecbackg.cpp index 047c8f32a68..86553c489ef 100644 --- a/src/mame/saitek/ecbackg.cpp +++ b/src/mame/saitek/ecbackg.cpp @@ -73,7 +73,7 @@ private: required_device m_board; required_device m_led_pwm; required_device m_lcd_pwm; - required_device m_dac; + required_device m_dac; required_ioport_array<6> m_inputs; output_finder<2, 24> m_out_lcd; diff --git a/src/mame/saitek/edames.cpp b/src/mame/saitek/edames.cpp index 1234fb34776..c82b6ea9183 100644 --- a/src/mame/saitek/edames.cpp +++ b/src/mame/saitek/edames.cpp @@ -71,7 +71,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<4> m_inputs; u16 m_inp_mux = 0; diff --git a/src/mame/saitek/gk2000.cpp b/src/mame/saitek/gk2000.cpp index be6c61368d7..2a5ed56b2b2 100644 --- a/src/mame/saitek/gk2000.cpp +++ b/src/mame/saitek/gk2000.cpp @@ -10,7 +10,7 @@ same hardware. Hardware notes: - Hitachi H8/323 MCU, 20MHz XTAL -- LCD with custom segments +- LCD with 5 7segs and custom segments - piezo, 16 LEDs, button sensors chessboard A13 MCU is used in: @@ -71,7 +71,7 @@ private: required_device m_board; required_device m_led_pwm; required_device m_lcd_pwm; - required_device m_dac; + required_device m_dac; required_ioport_array<4> m_inputs; output_finder<2, 24> m_out_lcd; diff --git a/src/mame/saitek/intchess.cpp b/src/mame/saitek/intchess.cpp index 15c5be97055..2410b626165 100644 --- a/src/mame/saitek/intchess.cpp +++ b/src/mame/saitek/intchess.cpp @@ -74,7 +74,7 @@ private: required_device m_via; required_device m_encoder; required_device m_display; - required_device m_dac; + required_device m_dac; required_shared_ptr m_vram; required_device m_gfxdecode; required_device m_screen; diff --git a/src/mame/saitek/mark5.cpp b/src/mame/saitek/mark5.cpp index 9bd78ee7670..881885b98d7 100644 --- a/src/mame/saitek/mark5.cpp +++ b/src/mame/saitek/mark5.cpp @@ -96,7 +96,7 @@ private: optional_region_ptr m_cb_rom; optional_device_array m_display; required_device_array m_lcd; - required_device m_dac; + required_device m_dac; required_shared_ptr m_nvram; required_ioport_array<7+2> m_inputs; output_finder<3, 8, 34> m_out_x; diff --git a/src/mame/saitek/prschess.cpp b/src/mame/saitek/prschess.cpp index 03b9ee4d16b..12b9f4248bc 100644 --- a/src/mame/saitek/prschess.cpp +++ b/src/mame/saitek/prschess.cpp @@ -59,7 +59,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<3> m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/saitek/risc2500.cpp b/src/mame/saitek/risc2500.cpp index 13bbe52792f..20eb9d4befc 100644 --- a/src/mame/saitek/risc2500.cpp +++ b/src/mame/saitek/risc2500.cpp @@ -65,20 +65,20 @@ namespace { class risc2500_state : public driver_device { public: - risc2500_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_rom(*this, "maincpu") - , m_ram(*this, "ram") - , m_nvram(*this, "nvram") - , m_disable_bootrom(*this, "disable_bootrom") - , m_speaker(*this, "speaker") - , m_lcdc(*this, "lcdc") - , m_board(*this, "board") - , m_inputs(*this, "IN.%u", 0) - , m_digits(*this, "digit%u", 0U) - , m_syms(*this, "sym%u", 0U) - , m_leds(*this, "led%u", 0U) + risc2500_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_rom(*this, "maincpu"), + m_ram(*this, "ram"), + m_nvram(*this, "nvram"), + m_disable_bootrom(*this, "disable_bootrom"), + m_speaker(*this, "speaker"), + m_lcdc(*this, "lcdc"), + m_board(*this, "board"), + m_inputs(*this, "IN.%u", 0), + m_digits(*this, "digit%u", 0U), + m_syms(*this, "sym%u", 0U), + m_leds(*this, "led%u", 0U) { } DECLARE_INPUT_CHANGED_MEMBER(on_button); diff --git a/src/mame/saitek/schess.cpp b/src/mame/saitek/schess.cpp index 16dcd9e7da4..e32e7f2dcbf 100644 --- a/src/mame/saitek/schess.cpp +++ b/src/mame/saitek/schess.cpp @@ -73,7 +73,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<3> m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/saitek/simultano.cpp b/src/mame/saitek/simultano.cpp index df2a95f6f7b..c7aa7378693 100644 --- a/src/mame/saitek/simultano.cpp +++ b/src/mame/saitek/simultano.cpp @@ -82,7 +82,7 @@ private: required_device m_led_pwm; required_device m_lcd_pwm; required_device m_lcd; - required_device m_dac; + required_device m_dac; required_ioport_array<8+1> m_inputs; output_finder<16, 34> m_out_lcd; diff --git a/src/mame/saitek/ssystem3.cpp b/src/mame/saitek/ssystem3.cpp index cef95116872..b6d9893a25a 100644 --- a/src/mame/saitek/ssystem3.cpp +++ b/src/mame/saitek/ssystem3.cpp @@ -123,7 +123,7 @@ private: required_device m_lcd1; optional_device_array m_lcd2; optional_device_array m_display; - required_device m_dac; + required_device m_dac; optional_shared_ptr m_nvram; optional_ioport_array<4+3> m_inputs; output_finder<8, 48> m_out_lcd2; diff --git a/src/mame/saitek/stratos.cpp b/src/mame/saitek/stratos.cpp index 3a6e3fb8d43..1fc910fe3cf 100644 --- a/src/mame/saitek/stratos.cpp +++ b/src/mame/saitek/stratos.cpp @@ -101,7 +101,7 @@ private: required_memory_bank m_rombank; required_device m_extrom; required_device m_board; - required_device m_dac; + required_device m_dac; required_ioport_array<8+2> m_inputs; u8 m_select = 0; @@ -122,6 +122,7 @@ private: u8 extrom_r(offs_t offset); }; + // saitek_stratos_state void saitek_stratos_state::machine_start() @@ -154,6 +155,7 @@ INPUT_CHANGED_MEMBER(saitek_stratos_state::change_cpu_freq) m_maincpu->set_unscaled_clock(xtal[newval % 3]); } + // stratos_state void stratos_state::machine_start() diff --git a/src/mame/saitek/superstar.cpp b/src/mame/saitek/superstar.cpp index c29b98c5804..fd0320b91b1 100644 --- a/src/mame/saitek/superstar.cpp +++ b/src/mame/saitek/superstar.cpp @@ -91,7 +91,7 @@ private: required_device m_nmi_clock; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<2> m_inputs; u8 m_inp_mux = 0; diff --git a/src/mame/saitek/turbo16k.cpp b/src/mame/saitek/turbo16k.cpp index 20e23cf1b82..ce2d44a4d9e 100644 --- a/src/mame/saitek/turbo16k.cpp +++ b/src/mame/saitek/turbo16k.cpp @@ -150,6 +150,7 @@ INPUT_CHANGED_MEMBER(turbo16k_state::change_cpu_freq) m_maincpu->set_unscaled_clock(freq[bitswap<2>(newval,4,0)]); } + // Conquistador class conquist_state : public turbo16k_state diff --git a/src/mame/ussr/debut.cpp b/src/mame/ussr/debut.cpp index 0902b257351..8880723e3f3 100644 --- a/src/mame/ussr/debut.cpp +++ b/src/mame/ussr/debut.cpp @@ -86,7 +86,7 @@ private: required_device m_maincpu; required_device m_board; required_device m_display; - required_device m_dac; + required_device m_dac; output_finder<4> m_out_digit; required_ioport m_inputs; diff --git a/src/mame/ussr/im01.cpp b/src/mame/ussr/im01.cpp index d0942d2cec0..aa6c78e1b93 100644 --- a/src/mame/ussr/im01.cpp +++ b/src/mame/ussr/im01.cpp @@ -123,7 +123,7 @@ private: // devices/pointers required_device m_maincpu; required_device m_display; - required_device m_dac; + required_device m_dac; required_ioport_array<6> m_inputs; u16 m_inp_mux = 0; -- cgit v1.2.3