diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 3b9811695ff..32c549c15ca 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -3082,6 +3082,7 @@ files { MAME_DIR .. "src/mame/drivers/novag_cforte.cpp", MAME_DIR .. "src/mame/drivers/novag_const.cpp", MAME_DIR .. "src/mame/drivers/novag_diablo.cpp", + MAME_DIR .. "src/mame/drivers/novag_micro.cpp", MAME_DIR .. "src/mame/drivers/novag_micro2.cpp", MAME_DIR .. "src/mame/drivers/novag_savant.cpp", MAME_DIR .. "src/mame/drivers/novag_sexpert.cpp", diff --git a/src/mame/drivers/novag_micro.cpp b/src/mame/drivers/novag_micro.cpp new file mode 100644 index 00000000000..bc98cf8e957 --- /dev/null +++ b/src/mame/drivers/novag_micro.cpp @@ -0,0 +1,246 @@ +// license:BSD-3-Clause +// copyright-holders:hap +// thanks-to:Berger +/****************************************************************************** + +Novag Micro Chess + +It's a portable chesscomputer with sensory board. The MCU says "(C) CAL R & O3", +though the program is supposedly by David Kittinger? + +Hardware notes: +- Mostek 3875/42 (4KB ROM, 64 bytes executable RAM) +- buzzer, button sensors chessboard, 16+4 leds + +TODO: +- memory switch? probably a hardware thing to power only the MCU + +******************************************************************************/ + +#include "emu.h" + +#include "cpu/f8/f8.h" +#include "machine/f3853.h" +#include "machine/sensorboard.h" +#include "sound/dac.h" +#include "sound/volt_reg.h" +#include "video/pwm.h" + +#include "speaker.h" + +// internal artwork +#include "novag_micro.lh" // clickable + + +namespace { + +class micro_state : public driver_device +{ +public: + micro_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_display(*this, "display"), + m_board(*this, "board"), + m_dac(*this, "dac"), + m_inputs(*this, "IN.0") + { } + + void micro(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + // devices/pointers + required_device m_maincpu; + required_device m_display; + required_device m_board; + required_device m_dac; + required_ioport m_inputs; + + // address maps + void main_map(address_map &map); + void main_io(address_map &map); + + // I/O handlers + void update_display(); + void input_w(u8 data); + u8 input_r(); + void control_w(u8 data); + u8 control_r(); + void led_w(u8 data); + + u8 m_led_data = 0; + u8 m_control = 0; + u8 m_inp_mux = 0; +}; + +void micro_state::machine_start() +{ + // register for savestates + save_item(NAME(m_led_data)); + save_item(NAME(m_control)); + save_item(NAME(m_inp_mux)); + + // game relies on RAM filled with FF at power-on + for (int i = 0; i < 0x40; i++) + m_maincpu->space(AS_PROGRAM).write_byte(i + 0xfc0, 0xff); +} + + + +/****************************************************************************** + I/O +******************************************************************************/ + +void micro_state::update_display() +{ + u8 sel = (m_control << 2 & 0x3c) | (m_led_data >> 6 & 3); + m_display->matrix(sel, m_led_data & 0x3f); +} + +void micro_state::input_w(u8 data) +{ + // P00-P01: MK3875 doesn't have these pins + // P02-P07: input mux part + m_inp_mux = data; +} + +u8 micro_state::input_r() +{ + u8 data = 0; + + // P10-P17: multiplexed inputs + // read buttons + if (m_control & 0x10) + data |= m_inputs->read(); + + // read chessboard + u8 cb_mux = (m_inp_mux & 0xfc) | (m_control >> 5 & 3); + cb_mux = bitswap<8>(cb_mux,4,5,6,7,1,0,3,2); + for (int i = 0; i < 8; i++) + if (BIT(cb_mux, i)) + data |= m_board->read_file(i); + + return bitswap<8>(data,4,5,6,7,3,2,1,0); +} + +void micro_state::control_w(u8 data) +{ + // P40: led select part + // P41: white led + // P42: ? + // P43: black led + // P44-P46: input mux part + m_control = data; + update_display(); + + // P47: speaker out + m_dac->write(BIT(data, 7)); +} + +u8 micro_state::control_r() +{ + return m_control; +} + +void micro_state::led_w(u8 data) +{ + // P50-P55: led data + // P56,P57: led select part + m_led_data = data; + update_display(); +} + + + +/****************************************************************************** + Address Maps +******************************************************************************/ + +void micro_state::main_map(address_map &map) +{ + map.global_mask(0xfff); + map(0x0000, 0x0fbf).rom(); + map(0x0fc0, 0x0fff).ram(); +} + +void micro_state::main_io(address_map &map) +{ + map(0x00, 0x00).w(FUNC(micro_state::input_w)); + map(0x01, 0x01).r(FUNC(micro_state::input_r)).nopw(); + map(0x04, 0x07).rw("psu", FUNC(f38t56_device::read), FUNC(f38t56_device::write)); +} + + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( micro ) + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Level / Bishop") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Sound / Queen") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Take Back / King") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Go") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("New Game / Knight") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Set Up / Rook") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Verify / Pawn") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("B/W") +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Configs +******************************************************************************/ + +void micro_state::micro(machine_config &config) +{ + // basic machine hardware + F8(config, m_maincpu, 4500000/2); // approximation + m_maincpu->set_addrmap(AS_PROGRAM, µ_state::main_map); + m_maincpu->set_addrmap(AS_IO, µ_state::main_io); + + f38t56_device &psu(F38T56(config, "psu", 4500000/2)); + psu.read_a().set(FUNC(micro_state::control_r)); + psu.write_a().set(FUNC(micro_state::control_w)); + psu.write_b().set(FUNC(micro_state::led_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)); + + // video hardware + PWM_DISPLAY(config, m_display).set_size(6, 6); + config.set_default_layout(layout_novag_micro); + + // sound hardware + SPEAKER(config, "speaker").front_center(); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); + VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); +} + + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + +ROM_START( nmicro ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD("3875_42_mk17121n", 0x0000, 0x1000, CRC(f21189f7) SHA1(ba346177eaeddc87a03b1103f0299b5bcd4b6c27) ) +ROM_END + +} // anonymous namespace + + + +/****************************************************************************** + Drivers +******************************************************************************/ + +// YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS +CONS( 1981, nmicro, 0, 0, micro, micro, micro_state, empty_init, "Novag", "Micro Chess", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/novag_micro2.cpp b/src/mame/drivers/novag_micro2.cpp index 4b5bb0336bf..d14c30f75fc 100644 --- a/src/mame/drivers/novag_micro2.cpp +++ b/src/mame/drivers/novag_micro2.cpp @@ -7,18 +7,18 @@ Novag Micro II (model 821) This program was used in several Novag chesscomputers: - Novag Micro II (1st use) +- Novag Micro III - Novag Presto - Novag Octo suspected, to be confirmed: -- Novag Micro III - Novag Allegro - Novag Piccolo - Novag Alto Hardware notes: -Micro II: +Micro II, Micro III(same pcb): - Mitsubishi M5L8049-079P-6, 6MHz XTAL - buzzer, 20 leds, 8*8 chessboard buttons @@ -31,7 +31,7 @@ Octo (listed differences): - speaker circuit is a bit different, not sure why Note that even though the MCUs are different, internal ROM contents is -identical for Micro II, Presto, Octo. +identical for Micro II/III, Presto, Octo. TODO: - controls are too sensitive, is there a bug in the CPU core timer emulation? @@ -222,7 +222,7 @@ void micro2_state::micro2(machine_config &config) ROM_START( nmicro2 ) ROM_REGION( 0x0800, "maincpu", 0 ) - ROM_LOAD("8049_8210", 0x0000, 0x0800, CRC(29a0eb4c) SHA1(e058d6018e53ddcaa3b5ec25b33b8bff091b04db) ) + ROM_LOAD("8049_8210.u1", 0x0000, 0x0800, CRC(29a0eb4c) SHA1(e058d6018e53ddcaa3b5ec25b33b8bff091b04db) ) ROM_END } // anonymous namespace diff --git a/src/mame/drivers/saitek_exchess.cpp b/src/mame/drivers/saitek_exchess.cpp index e471bca197a..e95ec363acf 100644 --- a/src/mame/drivers/saitek_exchess.cpp +++ b/src/mame/drivers/saitek_exchess.cpp @@ -58,9 +58,11 @@ private: output_finder<> m_battery; required_ioport_array<4> m_inputs; + // address maps void main_map(address_map &map); void main_io(address_map &map); + // I/O handlers template void lcd_output_w(u64 data); void lcd_data_w(u8 data); diff --git a/src/mame/drivers/saitek_intchess.cpp b/src/mame/drivers/saitek_intchess.cpp index ba5fa0e6b5e..1c7b942f5cb 100644 --- a/src/mame/drivers/saitek_intchess.cpp +++ b/src/mame/drivers/saitek_intchess.cpp @@ -3,6 +3,16 @@ // thanks-to:Berger, Achim /****************************************************************************** + +Hardware notes: +- Synertek 6502A @ ~1.1MHz +- Synertek 6522 VIA +- 2*4KB ROM(Synertek 2332), 2KB RAM(4*M5L2114LP) +- 256 bytes PROM(MMI 6336-1J), 256x4 VRAM(2101-1), RF video +- MM74C923N keyboard encoder, 20 buttons +- tape deck with microphone +- 4-digit 7seg display + TODO: WIP ******************************************************************************/ @@ -220,21 +230,19 @@ void intchess_state::intchess(machine_config &config) - /****************************************************************************** ROM Definitions ******************************************************************************/ ROM_START( intchess ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("lo.bin", 0xc000, 0x1000, CRC(eef04467) SHA1(5bdcb8d596b91aa06c6ef1ed53ef14d0d13f4194) ) // 2332 - ROM_LOAD("hi.bin", 0xd000, 0x1000, CRC(7e6f85b4) SHA1(4cd15257eae04067160026f9a062a28581f46227) ) // " + ROM_LOAD("c45015_ytv-lrom.u9", 0xc000, 0x1000, CRC(eef04467) SHA1(5bdcb8d596b91aa06c6ef1ed53ef14d0d13f4194) ) // 2332 + ROM_LOAD("c45016_ytv-hrom.u8", 0xd000, 0x1000, CRC(7e6f85b4) SHA1(4cd15257eae04067160026f9a062a28581f46227) ) // " ROM_REGION( 0x100, "gfx", 0 ) - ROM_LOAD( "prom.bin", 0x000, 0x100, CRC(bf8358e0) SHA1(880e0d9bd8a75874ba9e51dfb5999b8fcd321a4f) ) + ROM_LOAD("igp.u15", 0x000, 0x100, CRC(bf8358e0) SHA1(880e0d9bd8a75874ba9e51dfb5999b8fcd321a4f) ) // 6336-1 ROM_END - } // anonymous namespace @@ -243,5 +251,5 @@ ROM_END Drivers ******************************************************************************/ -// YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS +// YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS CONS( 1980, intchess, 0, 0, intchess, intchess, intchess_state, empty_init, "SciSys / Intelligent Games", "Intelligent Chess", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_NOT_WORKING ) diff --git a/src/mame/layout/novag_micro.lay b/src/mame/layout/novag_micro.lay new file mode 100644 index 00000000000..62795b06b11 --- /dev/null +++ b/src/mame/layout/novag_micro.lay @@ -0,0 +1,489 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 2ce2ad010f7..16e6335b766 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -32097,6 +32097,9 @@ supercon diablo68 // scorpio68 // +@source:novag_micro.cpp +nmicro + @source:novag_micro2.cpp nmicro2 diff --git a/src/mame/mess.flt b/src/mame/mess.flt index 3c6ee9c83a7..1775631c5b7 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -651,6 +651,7 @@ notetaker.cpp novag_cforte.cpp novag_const.cpp novag_diablo.cpp +novag_micro.cpp novag_micro2.cpp novag_savant.cpp novag_sexpert.cpp