From de4d2a590209f4effd4e37b9f09fb15957f170da Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 22 Feb 2024 21:30:18 +0100 Subject: New working systems ------------------- Primo (Novag) [hap, Berger] --- src/mame/layout/novag_primo.lay | 475 ++++++++++++++++++++++++++++++++++++++ src/mame/layout/novag_supremo.lay | 2 +- src/mame/mame.lst | 1 + src/mame/novag/mentor16.cpp | 41 ++-- src/mame/novag/snova.cpp | 142 +++++++++--- src/mame/novag/svip.cpp | 1 + 6 files changed, 602 insertions(+), 60 deletions(-) create mode 100644 src/mame/layout/novag_primo.lay diff --git a/src/mame/layout/novag_primo.lay b/src/mame/layout/novag_primo.lay new file mode 100644 index 00000000000..bbcbde141fe --- /dev/null +++ b/src/mame/layout/novag_primo.lay @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/novag_supremo.lay b/src/mame/layout/novag_supremo.lay index fe0fed214d1..c0c39a26943 100644 --- a/src/mame/layout/novag_supremo.lay +++ b/src/mame/layout/novag_supremo.lay @@ -345,7 +345,7 @@ authors:hap - + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 42cc84fbc79..e8c1ec00b2c 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -34888,6 +34888,7 @@ sfortec // sfortec1 // @source:novag/snova.cpp +nprimo nsnova supremo diff --git a/src/mame/novag/mentor16.cpp b/src/mame/novag/mentor16.cpp index d5941e0025c..5e8db50f628 100644 --- a/src/mame/novag/mentor16.cpp +++ b/src/mame/novag/mentor16.cpp @@ -11,10 +11,11 @@ properly. Hardware notes: - PCB label: 100103 - Hitachi HD6301Y0P @ 8MHz -- 2*4-digit LCD panels, +- 2*4-digit LCD panels - piezo, 16+4 LEDs, 8*8 chessboard buttons TODO: +- if/when MAME supports an exit callback, hook up power-off switch to that - is Novag Amigo the same ROM? MCU label is also "892A", but QFP, ROM serial M44 BTANB: @@ -55,11 +56,11 @@ public: void mentor16(machine_config &config); - DECLARE_INPUT_CHANGED_MEMBER(power_off); + DECLARE_INPUT_CHANGED_MEMBER(power_off) { if (newval) m_power = false; } protected: virtual void machine_start() override; - virtual void machine_reset() override; + virtual void machine_reset() override { m_power = true; } private: // devices/pointers @@ -115,30 +116,6 @@ void mentor16_state::machine_start() I/O *******************************************************************************/ -// power - -void mentor16_state::machine_reset() -{ - m_power = true; -} - -INPUT_CHANGED_MEMBER(mentor16_state::power_off) -{ - if (newval) - m_power = false; -} - -void mentor16_state::standby(int state) -{ - // clear display - if (state) - { - m_led_pwm->clear(); - m_lcd_pwm->clear(); - } -} - - // LCD void mentor16_state::lcd_pwm_w(offs_t offset, u8 data) @@ -183,6 +160,16 @@ void mentor16_state::lcd_com_w(u8 data) // misc +void mentor16_state::standby(int state) +{ + // clear display + if (state) + { + m_led_pwm->clear(); + m_lcd_pwm->clear(); + } +} + void mentor16_state::update_piezo(s32 param) { m_piezo_data = param & 3; diff --git a/src/mame/novag/snova.cpp b/src/mame/novag/snova.cpp index ba2141b5495..ee5fd6c7f0c 100644 --- a/src/mame/novag/snova.cpp +++ b/src/mame/novag/snova.cpp @@ -3,29 +3,46 @@ // thanks-to:Berger, bataais /******************************************************************************* -Novag Super Nova & related chess computers. I believe the series started with -Primo. The chess engine is by David Kittinger. +Novag Primo & related chess computers. The chess engine is by David Kittinger. -NOTE: nsnova does an NMI at power-off (or power-failure). If this isn't done, -NVRAM won't work properly (supremo doesn't have NVRAM). +NOTE: Turn the power switch off before exiting MAME, otherwise NVRAM won't save +properly. TODO: -- if/when MAME supports an exit callback, hook up nsnova power-off switch to that -- unmapped reads from 0x33/0x34 (nsnova) or 0x3c/0x3d (supremo) +- if/when MAME supports an exit callback, hook up power-off switch to that +- unmapped reads from 0x3c/0x3d (primo/supremo) or 0x33/0x34 (nsnova) - supremo unmapped writes to 0x2000/0x6000, always 0? - is "Aquamarine / Super Nova" the same rom as nsnova and just a redesign? - is the 1st version of supremo(black plastic) the same ROM? +BTANB: +- primo has the same bug as nvip, where if the user presses Go right after + entering a move, the CPU opponent will answer by playing a move with white + +================================================================================ + +Novag Primo (model 871) +----------------------- + +Hardware notes: +- PCB label: 100059/100060 +- Hitachi HD6301Y0P (mode 2) @ 8MHz +- 2KB RAM(M5M5118P) +- LCD with 4 digits 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. + ================================================================================ Novag Supremo (model 881) ------------------------- Hardware notes: -- Hitachi HD63A03YP MCU @ 8MHz (2MHz internal) +- PCB label: 100090 +- Hitachi HD63A03YP @ 8MHz - 32KB ROM(TC57256AD-12), 2KB RAM(TC5516APL) -- LCD with 4 digits and custom segments, no LCD chip -- buzzer, 16 LEDs, 8*8 chessboard buttons +- rest is same as Primo Supremo also had a "limited edition" rerelease in 1990, plastic is fake-wood instead of black and backpanel sticker is gold, otherwise it's the same game. @@ -37,7 +54,7 @@ Novag Super Nova (model 904) ---------------------------- Hardware notes: -- Hitachi HD63A03YP MCU @ 16MHz (4MHz internal) +- Hitachi HD63A03YP @ 16MHz - 32KB ROM(TC57256AD-12), 8KB RAM(CXK58648P-10L) - LCD with 4 digits and custom segments, no LCD chip - RJ-12 port for Novag Super System (like the one in nsvip/sexpertc) @@ -63,6 +80,7 @@ the Super VIP combined with the Novag Super System Touch Sensory board. #include "speaker.h" // internal artwork +#include "novag_primo.lh" #include "novag_snova.lh" #include "novag_supremo.lh" @@ -84,17 +102,20 @@ public: m_out_lcd(*this, "s%u.%u", 0U, 0U) { } + void primo(machine_config &config); void supremo(machine_config &config); void snova(machine_config &config); - DECLARE_INPUT_CHANGED_MEMBER(power_off); + DECLARE_INPUT_CHANGED_MEMBER(primo_power_off) { if (newval) m_power = false; } + DECLARE_INPUT_CHANGED_MEMBER(snova_power_off); protected: virtual void machine_start() override; + virtual void machine_reset() override { m_power = true; } private: // devices/pointers - required_device m_maincpu; + required_device m_maincpu; required_device m_board; required_device m_lcd_pwm; required_device m_led_pwm; @@ -103,14 +124,17 @@ private: required_ioport_array<2> m_inputs; output_finder<4, 10> m_out_lcd; + bool m_power = false; bool m_lcd_strobe = false; u8 m_inp_mux = 0; u8 m_select = 0; u8 m_led_data = 0; - void snova_map(address_map &map); + void primo_map(address_map &map); void supremo_map(address_map &map); + void snova_map(address_map &map); + // I/O handlers void standby(int state); void lcd_pwm_w(offs_t offset, u8 data); void update_leds(); @@ -126,6 +150,7 @@ void snova_state::machine_start() m_out_lcd.resolve(); // register for savestates + save_item(NAME(m_power)); save_item(NAME(m_lcd_strobe)); save_item(NAME(m_inp_mux)); save_item(NAME(m_select)); @@ -150,7 +175,7 @@ void snova_state::standby(int state) } } -INPUT_CHANGED_MEMBER(snova_state::power_off) +INPUT_CHANGED_MEMBER(snova_state::snova_power_off) { // NMI at power-off, which will trigger standby mode if (newval && !m_maincpu->standby()) @@ -188,6 +213,10 @@ u8 snova_state::p2_r() if (BIT(m_select, i + 6)) data |= BIT(m_inputs[i]->read(), m_inp_mux); + // P23 (nprimo, supremo): power switch + if (!m_power) + data |= 8; + // P23 (nsnova): serial rx if (m_rs232) data |= m_rs232->rxd_r() << 3; @@ -239,9 +268,14 @@ void snova_state::p6_w(u8 data) Address Maps *******************************************************************************/ +void snova_state::primo_map(address_map &map) +{ + map(0x4000, 0x47ff).ram().share("nvram"); +} + void snova_state::supremo_map(address_map &map) { - map(0x4000, 0x47ff).ram(); + primo_map(map); map(0x8000, 0xffff).rom(); } @@ -257,16 +291,16 @@ void snova_state::snova_map(address_map &map) Input Ports *******************************************************************************/ -static INPUT_PORTS_START( supremo ) +static INPUT_PORTS_START( primo ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Trace Back / Next Best") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Trace Forward / Auto Play") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Set Level / Pawn") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Info / Knight") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Easy / Print Moves / Bishop") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Solve Mate / Print Eval / Rook") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Sound / Print List / Queen") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Referee / Print Board / King") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Easy / Bishop") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Solve Mate / Rook") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Sound / Queen") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Referee / King") PORT_START("IN.1") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Go") @@ -277,8 +311,22 @@ static INPUT_PORTS_START( supremo ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Verify / Set Up") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Random") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") + + PORT_START("POWER") // needs to be triggered for nvram to work + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, snova_state, primo_power_off, 0) PORT_NAME("Power Off") +INPUT_PORTS_END + +static INPUT_PORTS_START( supremo ) + PORT_INCLUDE( primo ) + + PORT_MODIFY("IN.0") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Easy / Print Moves / Bishop") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Solve Mate / Print Eval / Rook") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Sound / Print List / Queen") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Referee / Print Board / King") INPUT_PORTS_END + static INPUT_PORTS_START( snova ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Trace Back / Next Best") @@ -300,8 +348,8 @@ static INPUT_PORTS_START( snova ) PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Random / Auto Clock") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") - PORT_START("POWER") // needs to be triggered for nvram to work - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, snova_state, power_off, 0) PORT_NAME("Power Off") + PORT_START("POWER") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, snova_state, snova_power_off, 0) PORT_NAME("Power Off") INPUT_PORTS_END @@ -310,19 +358,25 @@ INPUT_PORTS_END Machine Configs *******************************************************************************/ -void snova_state::supremo(machine_config &config) +void snova_state::primo(machine_config &config) { // basic machine hardware - HD6303Y(config, m_maincpu, 8_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &snova_state::supremo_map); + HD6301Y0(config, m_maincpu, 8_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &snova_state::primo_map); + m_maincpu->nvram_enable_backup(true); + m_maincpu->standby_cb().set(m_maincpu, FUNC(hd6301y0_cpu_device::nvram_set_battery)); + m_maincpu->standby_cb().append(FUNC(snova_state::standby)); m_maincpu->in_p2_cb().set(FUNC(snova_state::p2_r)); m_maincpu->out_p2_cb().set(FUNC(snova_state::p2_w)); m_maincpu->out_p5_cb().set(FUNC(snova_state::p5_w)); m_maincpu->out_p6_cb().set(FUNC(snova_state::p6_w)); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); m_board->set_delay(attotime::from_msec(350)); + m_board->set_nvram_enable(true); // video hardware PWM_DISPLAY(config, m_lcd_pwm).set_size(4, 10); @@ -334,26 +388,38 @@ void snova_state::supremo(machine_config &config) screen.set_visarea_full(); PWM_DISPLAY(config, m_led_pwm).set_size(2, 8); - config.set_default_layout(layout_novag_supremo); + config.set_default_layout(layout_novag_primo); // sound hardware SPEAKER(config, "speaker").front_center(); DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); } -void snova_state::snova(machine_config &config) +void snova_state::supremo(machine_config &config) { - supremo(config); + primo(config); // basic machine hardware - m_maincpu->set_clock(16_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &snova_state::snova_map); + HD6303Y(config.replace(), m_maincpu, 8_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &snova_state::supremo_map); m_maincpu->nvram_enable_backup(true); m_maincpu->standby_cb().set(m_maincpu, FUNC(hd6303y_cpu_device::nvram_set_battery)); m_maincpu->standby_cb().append(FUNC(snova_state::standby)); + m_maincpu->in_p2_cb().set(FUNC(snova_state::p2_r)); + m_maincpu->out_p2_cb().set(FUNC(snova_state::p2_w)); + m_maincpu->out_p5_cb().set(FUNC(snova_state::p5_w)); + m_maincpu->out_p6_cb().set(FUNC(snova_state::p6_w)); - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - m_board->set_nvram_enable(true); + config.set_default_layout(layout_novag_supremo); +} + +void snova_state::snova(machine_config &config) +{ + supremo(config); + + // basic machine hardware + m_maincpu->set_clock(16_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &snova_state::snova_map); config.set_default_layout(layout_novag_snova); @@ -367,6 +433,15 @@ void snova_state::snova(machine_config &config) ROM Definitions *******************************************************************************/ +ROM_START( nprimo ) + ROM_REGION( 0x4000, "maincpu", 0 ) + ROM_LOAD("novag_871_31y0c34p.u1", 0x0000, 0x4000, CRC(ad692d2e) SHA1(f41ae4e02a83ba6446a6df59a6ee2c2f87a1f4d8) ) + + ROM_REGION( 36256, "screen", 0 ) + ROM_LOAD("nvip.svg", 0, 36256, CRC(3373e0d5) SHA1(25bfbf0405017388c30f4529106baccb4723bc6b) ) +ROM_END + + ROM_START( supremo ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("sp_a10.u5", 0x8000, 0x8000, CRC(1db63786) SHA1(4f24452ed8955b31ba88f68cc95c357660930aa4) ) @@ -375,6 +450,7 @@ ROM_START( supremo ) ROM_LOAD("nvip.svg", 0, 36256, CRC(3373e0d5) SHA1(25bfbf0405017388c30f4529106baccb4723bc6b) ) ROM_END + ROM_START( nsnova ) // ID = N1.05 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("n_530.u5", 0x8000, 0x8000, CRC(727a0ada) SHA1(129c1edc5c1d2e12ce97ebef81c6d5555464a11d) ) @@ -392,6 +468,8 @@ ROM_END *******************************************************************************/ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +SYST( 1987, nprimo, 0, 0, primo, primo, snova_state, empty_init, "Novag", "Primo (Novag)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + SYST( 1988, supremo, 0, 0, supremo, supremo, snova_state, empty_init, "Novag", "Supremo", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) SYST( 1990, nsnova, 0, 0, snova, snova, snova_state, empty_init, "Novag", "Super Nova (Novag, v1.05)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/novag/svip.cpp b/src/mame/novag/svip.cpp index f8dc111a05d..92297e4cbd8 100644 --- a/src/mame/novag/svip.cpp +++ b/src/mame/novag/svip.cpp @@ -127,6 +127,7 @@ private: void vip_map(address_map &map); void svip_map(address_map &map); + // I/O handlers void lcd_pwm_w(offs_t offset, u8 data); u8 p2_r(); void p2_w(u8 data); -- cgit v1.2.3