summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-09-10 22:29:29 +0200
committer hap <happppp@users.noreply.github.com>2020-09-10 22:29:29 +0200
commitc4373361d4d73c933f5cdb6ef0c22d0d0847d6aa (patch)
treee973fea5a054b8aa2c18eef793e2e109d75f6b1c
parent2569839c9d3140635759299a04e6c24c80086c4e (diff)
New machines marked as NOT_WORKING
---------------------------------- Constellation Expert [hap, Berger]
-rw-r--r--scripts/target/mame/mess.lua1
-rw-r--r--src/mame/drivers/novag_cexpert.cpp258
-rw-r--r--src/mame/drivers/novag_cforte.cpp7
-rw-r--r--src/mame/mame.cpp2
-rw-r--r--src/mame/mame.lst7
-rw-r--r--src/mame/mess.cpp2
-rw-r--r--src/mame/mess.flt1
7 files changed, 271 insertions, 7 deletions
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index d92ad24ab4a..cd6242983a0 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -3092,6 +3092,7 @@ files {
createMESSProjects(_target, _subtarget, "novag")
files {
+ MAME_DIR .. "src/mame/drivers/novag_cexpert.cpp",
MAME_DIR .. "src/mame/drivers/novag_cforte.cpp",
MAME_DIR .. "src/mame/drivers/novag_const.cpp",
MAME_DIR .. "src/mame/drivers/novag_diablo.cpp",
diff --git a/src/mame/drivers/novag_cexpert.cpp b/src/mame/drivers/novag_cexpert.cpp
new file mode 100644
index 00000000000..22d0f0eaea0
--- /dev/null
+++ b/src/mame/drivers/novag_cexpert.cpp
@@ -0,0 +1,258 @@
+// license:BSD-3-Clause
+// copyright-holders:hap
+// thanks-to:Berger
+/******************************************************************************
+
+Novag Constellation Expert (model 853)
+
+The u3 ROM contains this message: (it's David Kittinger's company)
+Copyright (c) 1985, Intelligent Heuristic Programming, Inc
+
+Hardware notes:
+- R65C02P4 @ 5MHz (10MHz XTAL)
+- 2*2KB RAM(NEC D449C-3), 2*32KB ROM
+- 64+8 leds, magnet sensors chessboard
+- ports for optional printer and chess clock
+
+TODO:
+- based on a copy-paste of cforte driver, need to finish it and make internal artwork
+
+******************************************************************************/
+
+#include "emu.h"
+
+#include "cpu/m6502/r65c02.h"
+#include "machine/sensorboard.h"
+#include "machine/nvram.h"
+#include "machine/timer.h"
+#include "sound/beep.h"
+#include "video/pwm.h"
+#include "speaker.h"
+
+// internal artwork
+//#include "novag_cexpert.lh" // clickable
+
+
+namespace {
+
+class cexpert_state : public driver_device
+{
+public:
+ cexpert_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_irq_on(*this, "irq_on"),
+ m_display(*this, "display"),
+ m_board(*this, "board"),
+ m_beeper(*this, "beeper"),
+ m_inputs(*this, "IN.%u", 0)
+ { }
+
+ // machine configs
+ void cexpert(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+private:
+ // devices/pointers
+ required_device<cpu_device> m_maincpu;
+ required_device<timer_device> m_irq_on;
+ required_device<pwm_display_device> m_display;
+ required_device<sensorboard_device> m_board;
+ required_device<beep_device> m_beeper;
+ required_ioport_array<8> m_inputs;
+
+ // address maps
+ void main_map(address_map &map);
+
+ // periodic interrupts
+ template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(Line, ASSERT_LINE); }
+ template<int Line> TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(Line, CLEAR_LINE); }
+
+ // I/O handlers
+ void update_display();
+ void mux_w(u8 data);
+ void control_w(u8 data);
+ u8 input1_r();
+ u8 input2_r();
+
+ u8 m_inp_mux = 0;
+ u8 m_led_select = 0;
+};
+
+void cexpert_state::machine_start()
+{
+ // register for savestates
+ save_item(NAME(m_inp_mux));
+ save_item(NAME(m_led_select));
+}
+
+
+
+/******************************************************************************
+ I/O
+******************************************************************************/
+
+void cexpert_state::update_display()
+{
+ m_display->matrix(1 << m_led_select, m_inp_mux);
+}
+
+void cexpert_state::mux_w(u8 data)
+{
+ // d0-d7: input mux, led data
+ m_inp_mux = data;
+ update_display();
+}
+
+void cexpert_state::control_w(u8 data)
+{
+ // d0-d2: clock/printer?
+
+ // d3: enable beeper
+ m_beeper->set_state(data >> 3 & 1);
+
+ // d4-d7: 74145 to led select
+ m_led_select = data >> 4 & 0xf;
+ update_display();
+}
+
+u8 cexpert_state::input1_r()
+{
+ u8 data = 0;
+
+ // d0-d7: multiplexed inputs (chessboard squares)
+ for (int i = 0; i < 8; i++)
+ if (BIT(m_inp_mux, i))
+ data |= m_board->read_rank(i ^ 7, true);
+
+ return ~data;
+}
+
+u8 cexpert_state::input2_r()
+{
+ u8 data = 0;
+
+ // d6,d7: multiplexed inputs (side panel)
+ for (int i = 0; i < 8; i++)
+ if (BIT(m_inp_mux, i))
+ data |= m_inputs[i]->read() << 6;
+
+ // other: ?
+
+ return ~data;
+}
+
+
+
+/******************************************************************************
+ Address Maps
+******************************************************************************/
+
+void cexpert_state::main_map(address_map &map)
+{
+ map(0x0000, 0x0fff).ram(); //.share("nvram");
+ map(0x1000, 0x1000).nopw(); // accessory?
+ map(0x1100, 0x1100).nopw(); // "
+ map(0x1200, 0x1200).rw(FUNC(cexpert_state::input2_r), FUNC(cexpert_state::mux_w));
+ map(0x1300, 0x1300).rw(FUNC(cexpert_state::input1_r), FUNC(cexpert_state::control_w));
+ map(0x1800, 0xffff).rom();
+}
+
+
+
+/******************************************************************************
+ Input Ports
+******************************************************************************/
+
+static INPUT_PORTS_START( cexpert )
+ PORT_START("IN.0")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("New Game")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Player/Player / Gambit/Large / King")
+
+ PORT_START("IN.1")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Verify/Set Up / Pro-Op")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Random/Tour/Normal / Training Level / Queen")
+
+ PORT_START("IN.2")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Change Color / Time Control / Priority")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Sound / Depth Search / Bishop")
+
+ PORT_START("IN.3")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Flip Display / Clear Board / Clear Book")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Solve Mate / Infinite / Knight")
+
+ PORT_START("IN.4")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Print Moves / Print Evaluations / Print Book")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Print Board / Interface / Rook")
+
+ PORT_START("IN.5")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Trace Forward / Auto Play / No/End")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Print List / Acc. Time / Pawn")
+
+ PORT_START("IN.6")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Hint / Next Best / Yes/Start")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Set Level")
+
+ PORT_START("IN.7")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Go / ->")
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Take Back / Restore / <-")
+INPUT_PORTS_END
+
+
+
+/******************************************************************************
+ Machine Configs
+******************************************************************************/
+
+void cexpert_state::cexpert(machine_config &config)
+{
+ /* basic machine hardware */
+ R65C02(config, m_maincpu, 10_MHz_XTAL/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cexpert_state::main_map);
+
+ const attotime irq_period = attotime::from_hz(15440 / 32.0); // 555 timer (measured), to 4020
+ TIMER(config, m_irq_on).configure_periodic(FUNC(cexpert_state::irq_on<M6502_IRQ_LINE>), irq_period);
+ m_irq_on->set_start_delay(irq_period - attotime::from_nsec(15200)); // active for 15.2us
+ TIMER(config, "irq_off").configure_periodic(FUNC(cexpert_state::irq_off<M6502_IRQ_LINE>), irq_period);
+
+ //NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
+
+ SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS);
+ m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
+ m_board->set_delay(attotime::from_msec(200));
+ //m_board->set_nvram_enable(true);
+
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(9, 8);
+ //config.set_default_layout(layout_novag_cexpert);
+
+ /* sound hardware */
+ SPEAKER(config, "mono").front_center();
+ BEEP(config, m_beeper, 15440 / 16); // 965Hz
+ m_beeper->add_route(ALL_OUTPUTS, "mono", 0.25);
+}
+
+
+
+/******************************************************************************
+ ROM Definitions
+******************************************************************************/
+
+ROM_START( cexpert )
+ ROM_REGION( 0x10000, "maincpu", 0 )
+ ROM_LOAD("novag_8533-503.u3", 0x0000, 0x8000, CRC(e384de2f) SHA1(13b56e2870e3755073e7a7cc63bae995cd468562) )
+ ROM_LOAD("novag_8532-502.u2", 0x8000, 0x8000, CRC(c2c367b5) SHA1(e000871c93a5e0fc2f8b29f3d2fec0607a91559b) )
+ROM_END
+
+} // anonymous namespace
+
+
+
+/******************************************************************************
+ Drivers
+******************************************************************************/
+
+// YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS
+CONS( 1985, cexpert, 0, 0, cexpert, cexpert, cexpert_state, empty_init, "Novag", "Constellation Expert", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/drivers/novag_cforte.cpp b/src/mame/drivers/novag_cforte.cpp
index 67e499cc57a..b291bc6480b 100644
--- a/src/mame/drivers/novag_cforte.cpp
+++ b/src/mame/drivers/novag_cforte.cpp
@@ -172,12 +172,13 @@ u8 cforte_state::input2_r()
{
u8 data = 0;
- // d0-d5: ?
// d6,d7: multiplexed inputs (side panel)
for (int i = 0; i < 8; i++)
if (BIT(m_inp_mux, i))
data |= m_inputs[i]->read() << 6;
+ // other: ?
+
return ~data;
}
@@ -190,8 +191,8 @@ u8 cforte_state::input2_r()
void cforte_state::main_map(address_map &map)
{
map(0x0000, 0x0fff).ram().share("nvram");
- map(0x1c00, 0x1c00).nopw(); // printer?
- map(0x1d00, 0x1d00).nopw(); // printer?
+ map(0x1c00, 0x1c00).nopw(); // accessory?
+ map(0x1d00, 0x1d00).nopw(); // "
map(0x1e00, 0x1e00).rw(FUNC(cforte_state::input2_r), FUNC(cforte_state::mux_w));
map(0x1f00, 0x1f00).rw(FUNC(cforte_state::input1_r), FUNC(cforte_state::control_w));
map(0x2000, 0xffff).rom();
diff --git a/src/mame/mame.cpp b/src/mame/mame.cpp
index 9dc8d96c382..d40869d53fe 100644
--- a/src/mame/mame.cpp
+++ b/src/mame/mame.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles
/***************************************************************************
- mame.c
+ mame.cpp
Specific (per target) constants
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 36a482b90a9..7ae987631a3 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -32518,9 +32518,12 @@ pkunwarj // UPL-????? (c) 1985 (Arcade Game TV List - P.9
raiders5 // UPL-85004 (c) 1985
raiders5t // UPL-85004 (c) 1985 Taito license
+@source:novag_cexpert.cpp
+cexpert
+
@source:novag_cforte.cpp
-cfortea //
-cforteb //
+cfortea
+cforteb
@source:novag_const.cpp
const
diff --git a/src/mame/mess.cpp b/src/mame/mess.cpp
index 160f777c044..06e49420e3b 100644
--- a/src/mame/mess.cpp
+++ b/src/mame/mess.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles
/***************************************************************************
- mess.c
+ mess.cpp
Specific (per target) constants
diff --git a/src/mame/mess.flt b/src/mame/mess.flt
index 6e0eafa6e56..5bc0b7d10c1 100644
--- a/src/mame/mess.flt
+++ b/src/mame/mess.flt
@@ -653,6 +653,7 @@ ngen.cpp
ngp.cpp
nokia_3310.cpp
notetaker.cpp
+novag_cexpert.cpp
novag_cforte.cpp
novag_const.cpp
novag_diablo.cpp