From daccce59909505f1c4956ab36ca3367e309d827a Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 12 Jul 2024 16:33:53 +0200 Subject: [PATCH] ivant: rename to ivanto --- src/mame/excalibur/{ivant.cpp => ivanto.cpp} | 82 +++++++++---------- .../{excal_ivant.lay => excal_ivanto.lay} | 0 src/mame/mame.lst | 4 +- 3 files changed, 42 insertions(+), 44 deletions(-) rename src/mame/excalibur/{ivant.cpp => ivanto.cpp} (80%) rename src/mame/layout/{excal_ivant.lay => excal_ivanto.lay} (100%) diff --git a/src/mame/excalibur/ivant.cpp b/src/mame/excalibur/ivanto.cpp similarity index 80% rename from src/mame/excalibur/ivant.cpp rename to src/mame/excalibur/ivanto.cpp index 863fca1a7b2..2365b8180be 100644 --- a/src/mame/excalibur/ivant.cpp +++ b/src/mame/excalibur/ivanto.cpp @@ -3,10 +3,8 @@ // thanks-to:Sean Riddle /******************************************************************************* -Excalibur Ivan The Terrible (model 701E) - -The chess engine is by Ron Nelson, similar to the one in Excalibur Mirage. It -has speech, and also sound effects that are reminiscent of Battle Chess. +Excalibur Ivan The Terrible (model 701E, H8/3256 version) +This is the first version (see ivant.cpp for the newer version). Hardware notes: - PCB label: EXCALIBUR ELECTRONICS, INC. 6/28/96, IVANT @@ -15,10 +13,10 @@ Hardware notes: - 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 -produced in a factory owned by Eric White's company (ex-CXG). The LCD is the -same as the one in CXG Sphinx Legend and Krypton Challenge/Regency. +It was produced in a factory owned by Eric White's company (ex-CXG), hence it's +not that strange that the LCD is the same as the one in CXG Sphinx Legend and +Krypton Challenge/Regency. The MCU used here is a HD6433256A33P from Excalibur +Mirage, the internal ROM was disabled. TODO: - it does a cold boot at every reset, so nvram won't work properly unless MAME @@ -42,15 +40,15 @@ BTANB: #include "speaker.h" // internal artwork -#include "excal_ivant.lh" +#include "excal_ivanto.lh" namespace { -class ivant_state : public driver_device +class ivanto_state : public driver_device { public: - ivant_state(const machine_config &mconfig, device_type type, const char *tag) : + ivanto_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_rombank(*this, "rombank"), @@ -61,7 +59,7 @@ public: m_out_lcd(*this, "s%u.%u", 0U, 0U) { } - void ivant(machine_config &config); + void ivanto(machine_config &config); protected: virtual void machine_start() override; @@ -74,7 +72,7 @@ private: required_device m_board; required_device m_lcd_pwm; required_device m_dac; - required_ioport_array<3> m_inputs; + required_ioport_array<2> m_inputs; output_finder<2, 24> m_out_lcd; u16 m_inp_mux = 0; @@ -102,13 +100,13 @@ private: void p6_w(u8 data); }; -void ivant_state::machine_start() +void ivanto_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); + m_irqtimer = timer_alloc(FUNC(ivanto_state::update_irq), this); attotime period = attotime::from_msec(1); m_irqtimer->adjust(period, 0, period); @@ -119,7 +117,7 @@ void ivant_state::machine_start() save_item(NAME(m_lcd_com)); } -void ivant_state::machine_reset() +void ivanto_state::machine_reset() { m_dac->write(0x80); } @@ -132,12 +130,12 @@ void ivant_state::machine_reset() // LCD -void ivant_state::lcd_pwm_w(offs_t offset, u8 data) +void ivanto_state::lcd_pwm_w(offs_t offset, u8 data) { m_out_lcd[offset & 0x3f][offset >> 6] = data; } -void ivant_state::update_lcd() +void ivanto_state::update_lcd() { for (int i = 0; i < 2; i++) { @@ -147,7 +145,7 @@ void ivant_state::update_lcd() } } -void ivant_state::lcd_com_w(offs_t offset, u8 data, u8 mem_mask) +void ivanto_state::lcd_com_w(offs_t offset, u8 data, u8 mem_mask) { // P70,P71: LCD common m_lcd_com = (mem_mask << 2 & 0xc) | (data & 3); @@ -157,7 +155,7 @@ void ivant_state::lcd_com_w(offs_t offset, u8 data, u8 mem_mask) // misc -void ivant_state::latch_w(offs_t offset, u8 data) +void ivanto_state::latch_w(offs_t offset, u8 data) { // a0-a2,d0-d3: 4*74259 u32 mask = 1 << offset; @@ -182,7 +180,7 @@ void ivant_state::latch_w(offs_t offset, u8 data) read_inputs(); } -u8 ivant_state::read_inputs() +u8 ivanto_state::read_inputs() { u8 data = 0; @@ -204,19 +202,19 @@ u8 ivant_state::read_inputs() return ~data; } -u8 ivant_state::p4_r() +u8 ivanto_state::p4_r() { // P47: multiplexed inputs high bit return (read_inputs() & 0x80) | 0x7f; } -void ivant_state::p4_w(u8 data) +void ivanto_state::p4_w(u8 data) { // P40-P45: ROM bank m_rombank->set_entry(~data & 0x3f); } -void ivant_state::p5_w(u8 data) +void ivanto_state::p5_w(u8 data) { // P54: KA8602 mute m_dac->set_output_gain(0, (data & 0x10) ? 0.0 : 1.0); @@ -226,7 +224,7 @@ void ivant_state::p5_w(u8 data) read_inputs(); } -u8 ivant_state::p6_r() +u8 ivanto_state::p6_r() { // P60-P66: multiplexed inputs part return read_inputs() | 0x80; @@ -238,9 +236,9 @@ u8 ivant_state::p6_r() Address Maps *******************************************************************************/ -void ivant_state::main_map(address_map &map) +void ivanto_state::main_map(address_map &map) { - map(0x0000, 0x0007).mirror(0xfff8).w(FUNC(ivant_state::latch_w)); + map(0x0000, 0x0007).mirror(0xfff8).w(FUNC(ivanto_state::latch_w)); map(0x0000, 0x7fff).rom(); map(0x8000, 0xbfff).bankr(m_rombank); } @@ -251,7 +249,7 @@ void ivant_state::main_map(address_map &map) Input Ports *******************************************************************************/ -static INPUT_PORTS_START( ivant ) +static INPUT_PORTS_START( ivanto ) 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") @@ -272,7 +270,7 @@ static INPUT_PORTS_START( ivant ) 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_START("BATT") PORT_CONFNAME( 0x08, 0x00, "Battery Status" ) PORT_CONFSETTING( 0x08, "Low" ) PORT_CONFSETTING( 0x00, DEF_STR( Normal ) ) @@ -285,21 +283,21 @@ INPUT_PORTS_END Machine Configs *******************************************************************************/ -void ivant_state::ivant(machine_config &config) +void ivanto_state::ivanto(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->set_addrmap(AS_PROGRAM, &ivanto_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)); + m_maincpu->read_port4().set(FUNC(ivanto_state::p4_r)); + m_maincpu->write_port4().set(FUNC(ivanto_state::p4_w)); + m_maincpu->write_port5().set(FUNC(ivanto_state::p5_w)); + m_maincpu->read_port6().set(FUNC(ivanto_state::p6_r)); + m_maincpu->read_port7().set_ioport("BATT").invert(); + m_maincpu->write_port7().set(FUNC(ivanto_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)); @@ -308,14 +306,14 @@ void ivant_state::ivant(machine_config &config) // video hardware PWM_DISPLAY(config, m_lcd_pwm).set_size(2, 24); - m_lcd_pwm->output_x().set(FUNC(ivant_state::lcd_pwm_w)); + m_lcd_pwm->output_x().set(FUNC(ivanto_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); + config.set_default_layout(layout_excal_ivanto); // sound hardware SPEAKER(config, "speaker").front_center(); @@ -328,7 +326,7 @@ void ivant_state::ivant(machine_config &config) ROM Definitions *******************************************************************************/ -ROM_START( ivant ) +ROM_START( ivanto ) ROM_REGION16_BE( 0x8000, "maincpu", 0 ) ROM_LOAD("at27c256r.ic11", 0x0000, 0x8000, CRC(51a97959) SHA1(ea595001fd5eaa07ade96307a8d89d5fb44682ab) ) // no label @@ -347,5 +345,5 @@ ROM_END 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 ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +SYST( 1996, ivanto, 0, 0, ivanto, ivanto, ivanto_state, empty_init, "Excalibur Electronics", "Ivan The Terrible (H8/3256 version)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/layout/excal_ivant.lay b/src/mame/layout/excal_ivanto.lay similarity index 100% rename from src/mame/layout/excal_ivant.lay rename to src/mame/layout/excal_ivanto.lay diff --git a/src/mame/mame.lst b/src/mame/mame.lst index ca06500f32e..4ff365bb356 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -17798,8 +17798,8 @@ exe10102 // 1983 Esprit Systems @source:excalibur/igor.cpp igor -@source:excalibur/ivant.cpp -ivant +@source:excalibur/ivanto.cpp +ivanto @source:excalibur/mirage.cpp emirage