novag*: refactor diablo,delta1,presto (nw)

This commit is contained in:
hap 2019-02-20 16:10:28 +01:00
parent 1983c113ae
commit 24da0f87e2
30 changed files with 277 additions and 233 deletions

View File

@ -2,6 +2,15 @@
// copyright-holders:hap
// thanks-to:Berger
/******************************************************************************
*
* cking_master.cpp, subdriver of ckingbase.cpp
TODO:
- 1 WAIT CLK per M1, workaround with z80_set_cycle_tables is possible
(wait state is similar to MSX) but I can't be bothered, better solution
is to add M1 pin to the z80 core. Until then, it'll run ~20% too fast.
*******************************************************************************
Master: (yes, it's plainly named "Master")
- Z80 CPU(NEC D780C-1) @ 4MHz(8MHz XTAL), IRQ from 555 timer
@ -9,11 +18,6 @@ Master: (yes, it's plainly named "Master")
- simple I/O via 2*74373 and a 74145
- 8*8 chessboard buttons, 32+1 border leds, piezo
TODO:
- 1 WAIT CLK per M1, workaround with z80_set_cycle_tables is possible
(wait state is similar to MSX) but I can't be bothered, better solution
is to add M1 pin to the z80 core. Until then, it'll run ~20% too fast.
******************************************************************************/
#include "emu.h"

View File

@ -2,6 +2,10 @@
// copyright-holders:hap
// thanks-to:Berger
/******************************************************************************
*
* cxg_ch2001.cpp, subdriver of cxgbase.cpp
*******************************************************************************
Chess 2001:
- Zilog Z8400APS @ 4 MHz (8MHz XTAL)

View File

@ -2,6 +2,10 @@
// copyright-holders:hap
// thanks-to:yoyo_chessboard
/******************************************************************************
*
* fidel_as12.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Elegance Chess Challenger (AS12)
----------------

View File

@ -1,6 +1,8 @@
// license:BSD-3-Clause
// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco,hap
/******************************************************************************
*
* fidel_card.cpp, subdriver of fidelbase.cpp
Fidelity electronic card games
- *Bridge Challenger (BRC)

View File

@ -2,6 +2,10 @@
// copyright-holders:Jonathan Gevaryahu,Sandro Ronco,hap
// thanks-to:Berger
/******************************************************************************
*
* fidel_cc10.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Chess Challenger 10 (CCX)
-------------------

View File

@ -2,6 +2,10 @@
// copyright-holders:hap
// thanks-to:Berger
/******************************************************************************
*
* fidel_cc7.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Chess Challenger 7 (BCC)
------------------------

View File

@ -2,11 +2,14 @@
// copyright-holders:hap
// thanks-to:yoyo_chessboard
/******************************************************************************
*
* fidel_chesster.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Chesster (model 6120)
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

View File

@ -2,6 +2,8 @@
// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco,hap
// thanks-to:Berger,yoyo_chessboard
/******************************************************************************
*
* fidel_csc.cpp, subdriver of fidelbase.cpp
Fidelity CSC(and derived) hardware
- Champion Sensory Chess Challenger

View File

@ -2,6 +2,10 @@
// copyright-holders:hap
// thanks-to:yoyo_chessboard
/******************************************************************************
*
* fidel_dames.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Dame Sensory Challenger (DSC)
It's a checkers game for once instead of chess

View File

@ -2,8 +2,11 @@
// copyright-holders:hap
// thanks-to:Berger,yoyo_chessboard
/******************************************************************************
*
* fidel_desdis.cpp, subdriver of fidelbase.cpp
Fidelity Designer Display series (6502-based displayless Designer is in fidel_excel.cpp)
Fidelity Designer Display series, 6502 and 68000
(6502-based displayless Designer is in fidel_excel.cpp)
*******************************************************************************

View File

@ -2,6 +2,8 @@
// copyright-holders:hap
// thanks-to:Berger,yoyo_chessboard
/******************************************************************************
*
* fidel_eag68k.cpp, subdriver of fidelbase.cpp
Fidelity 68000-based Elite Avant Garde driver
For 6502-based EAG, see fidel_elite.cpp

View File

@ -2,6 +2,8 @@
// copyright-holders:hap
// thanks-to:Berger
/******************************************************************************
*
* fidel_elite.cpp, subdriver of fidelbase.cpp
Fidelity Elite A/S series hardware (EAS, EAG, PC)
see fidel_eag68k.cpp for 68000-based EAG hardware

View File

@ -2,8 +2,11 @@
// copyright-holders:hap
// thanks-to:Berger,yoyo_chessboard
/******************************************************************************
*
* fidel_vsc.cpp, subdriver of fidelbase.cpp
Fidelity Excellence series hardware (for Excel 68000, see fidel_eag68k.cpp)
Fidelity Excellence series hardware
(for Excel 68000, see fidel_eag68k.cpp)
TODO:
- granits gives error beeps at start, need to press clear to play

View File

@ -1,11 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:hap
/******************************************************************************
Fidelity Phantom Chess Challenger
*
* fidel_phantom.cpp, subdriver of fidelbase.cpp
TODO:
- everything
- everything, this is a skeleton driver
*******************************************************************************

View File

@ -2,6 +2,10 @@
// copyright-holders:hap
// thanks-to:Berger,yoyo_chessboard
/******************************************************************************
*
* fidel_sc12.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Sensory 12 Chess Challenger (SC12-B, 6086)
4 versions are known to exist: A,B,C, and X, with increasing CPU speed.

View File

@ -2,6 +2,10 @@
// copyright-holders:hap
// thanks-to:yoyo_chessboard
/******************************************************************************
*
* fidel_sc6.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Sensory Chess Challenger 6 (model SC6):
- PCB label 510-1045B01

View File

@ -2,6 +2,10 @@
// copyright-holders:hap
// thanks-to:yoyo_chessboard
/******************************************************************************
*
* fidel_sc8.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Sensory Chess Challenger 8
---------------

View File

@ -2,6 +2,10 @@
// copyright-holders:hap
// thanks-to:Berger,yoyo_chessboard
/******************************************************************************
*
* fidel_sc9.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Sensory Chess Challenger "9" (SC9)
3 versions were available, the newest "B" version was 2MHz and included the Budapest program.

View File

@ -1,6 +1,8 @@
// license:BSD-3-Clause
// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco,hap
/******************************************************************************
*
* fidel_vcc.cpp, subdriver of fidelbase.cpp
Fidelity Voice Chess Challenger series hardware
- Voice Chess Challenger (VCC) (version A and B?)

View File

@ -1,6 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Kevin Horton,Jonathan Gevaryahu,Sandro Ronco,hap
/******************************************************************************
*
* fidel_vsc.cpp, subdriver of fidelbase.cpp
*******************************************************************************
Fidelity Voice Sensory Chess Challenger (VSC)
---------------------------------------------

View File

@ -2,20 +2,20 @@
// copyright-holders:hap
// thanks-to:Berger
/******************************************************************************
*
* novag_delta1.cpp, subdriver of novagbase.cpp
Novag generic F8 based chess computer driver
TODO:
- ccdelta1 doesn't work, goes bonkers when you press Enter. CPU core bug?
- hardware is similar to MK I, the drivers can be merged in theory.
But I prefer my source code to be licensed BSD3, mk1.cpp is GPL2.
TODO:
- ccdelta1 doesn't work, goes bonkers when you press Enter. CPU core bug?
I suspect related to interrupts
*******************************************************************************
Delta-1:
- 3850PK CPU at ~2MHz, 3853PK memory interface
- 4KB ROM(2332A), 256 bytes RAM(2*2111A-4)
- 4-digit 7seg panel, no sound, no chessboard
Delta-1
------------
3850PK CPU at ~2MHz, 3853PK memory interface
4KB ROM(2332A), 256 bytes RAM(2*2111A-4)
4-digit 7seg panel, no sound, no chessboard
******************************************************************************/
@ -29,53 +29,50 @@ Delta-1:
#include "novag_delta1.lh"
class novagf8_state : public novagbase_state
namespace {
class delta1_state : public novagbase_state
{
public:
novagf8_state(const machine_config &mconfig, device_type type, const char *tag) :
delta1_state(const machine_config &mconfig, device_type type, const char *tag) :
novagbase_state(mconfig, type, tag)
{ }
void delta1(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(reset_button);
private:
u8 m_io[2]; // F8 CPU I/O ports
// address maps
void main_map(address_map &map);
void main_io(address_map &map);
// Delta-1
DECLARE_WRITE8_MEMBER(delta1_io0_w);
DECLARE_WRITE8_MEMBER(delta1_io1_w);
DECLARE_READ8_MEMBER(delta1_io0_r);
DECLARE_READ8_MEMBER(delta1_io1_r);
void delta1_io(address_map &map);
void delta1_map(address_map &map);
// I/O handlers
DECLARE_WRITE8_MEMBER(io0_w);
DECLARE_WRITE8_MEMBER(io1_w);
DECLARE_READ8_MEMBER(io0_r);
DECLARE_READ8_MEMBER(io1_r);
u8 m_io[2]; // F8 CPU I/O ports
virtual void machine_start() override;
};
void novagf8_state::machine_start()
void delta1_state::machine_start()
{
novagbase_state::machine_start();
// zerofill
// zerofill/register for savestates
memset(m_io, 0, sizeof(m_io));
// register for savestates
save_item(NAME(m_io));
}
// Devices, I/O
/******************************************************************************
Delta-1
Devices, I/O
******************************************************************************/
// CPU I/O ports
WRITE8_MEMBER(novagf8_state::delta1_io0_w)
WRITE8_MEMBER(delta1_state::io0_w)
{
m_io[0] = data;
@ -90,13 +87,13 @@ WRITE8_MEMBER(novagf8_state::delta1_io0_w)
display_matrix(7, 4, m_led_data, sel >> 4);
}
READ8_MEMBER(novagf8_state::delta1_io0_r)
READ8_MEMBER(delta1_state::io0_r)
{
// IO04-07: multiplexed inputs
return read_inputs(5) << 4 | m_io[0];
}
WRITE8_MEMBER(novagf8_state::delta1_io1_w)
WRITE8_MEMBER(delta1_state::io1_w)
{
m_io[1] = data;
@ -106,7 +103,7 @@ WRITE8_MEMBER(novagf8_state::delta1_io1_w)
m_led_data = bitswap<7>(data, 0,1,2,3,4,5,6);
}
READ8_MEMBER(novagf8_state::delta1_io1_r)
READ8_MEMBER(delta1_state::io1_r)
{
// unused?
return m_io[1];
@ -118,19 +115,17 @@ READ8_MEMBER(novagf8_state::delta1_io1_r)
Address Maps
******************************************************************************/
// Delta-1
void novagf8_state::delta1_map(address_map &map)
void delta1_state::main_map(address_map &map)
{
map.global_mask(0x3fff);
map(0x0000, 0x0fff).mirror(0x1000).rom(); // _A13
map(0x2000, 0x20ff).mirror(0x1f00).ram(); // A13
}
void novagf8_state::delta1_io(address_map &map)
void delta1_state::main_io(address_map &map)
{
map(0x0, 0x0).rw(FUNC(novagf8_state::delta1_io0_r), FUNC(novagf8_state::delta1_io0_w));
map(0x1, 0x1).rw(FUNC(novagf8_state::delta1_io1_r), FUNC(novagf8_state::delta1_io1_w));
map(0x0, 0x0).rw(FUNC(delta1_state::io0_r), FUNC(delta1_state::io0_w));
map(0x1, 0x1).rw(FUNC(delta1_state::io1_r), FUNC(delta1_state::io1_w));
map(0xc, 0xf).rw("f3853", FUNC(f3853_device::read), FUNC(f3853_device::write));
}
@ -140,12 +135,6 @@ void novagf8_state::delta1_io(address_map &map)
Input Ports
******************************************************************************/
INPUT_CHANGED_MEMBER(novagf8_state::reset_button)
{
// wired directly to CPU reset pin
m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE);
}
static INPUT_PORTS_START( delta1 )
PORT_START("IN.0")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Time Set")
@ -176,7 +165,7 @@ static INPUT_PORTS_START( delta1 )
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
PORT_START("RESET") // not on matrix
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_CHANGED_MEMBER(DEVICE_SELF, novagf8_state, reset_button, nullptr) PORT_NAME("New Game")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_CHANGED_MEMBER(DEVICE_SELF, delta1_state, reset_button, nullptr) PORT_NAME("New Game")
INPUT_PORTS_END
@ -185,20 +174,20 @@ INPUT_PORTS_END
Machine Drivers
******************************************************************************/
MACHINE_CONFIG_START(novagf8_state::delta1)
void delta1_state::delta1(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", F8, 2000000) // LC circuit, measured 2MHz
MCFG_DEVICE_PROGRAM_MAP(delta1_map)
MCFG_DEVICE_IO_MAP(delta1_io)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("f3853", f3853_device, int_acknowledge)
F8(config, m_maincpu, 2000000); // LC circuit, measured 2MHz
m_maincpu->set_addrmap(AS_PROGRAM, &delta1_state::main_map);
m_maincpu->set_addrmap(AS_IO, &delta1_state::main_io);
m_maincpu->set_irq_acknowledge_callback("f3853", FUNC(f3853_device::int_acknowledge));
f3853_device &f3853(F3853(config, "f3853", 2000000));
f3853.int_req_callback().set_inputline("maincpu", F8_INPUT_LINE_INT_REQ);
TIMER(config, "display_decay").configure_periodic(FUNC(novagf8_state::display_decay_tick), attotime::from_msec(1));
TIMER(config, "display_decay").configure_periodic(FUNC(delta1_state::display_decay_tick), attotime::from_msec(1));
config.set_default_layout(layout_novag_delta1);
MACHINE_CONFIG_END
}
@ -211,11 +200,13 @@ ROM_START( ccdelta1 )
ROM_LOAD("ma_winke_y1d", 0x0000, 0x1000, CRC(ddc04aca) SHA1(bbf334c82bc89b2f131f5a50f0a617bc3bc4c329) ) // 2332a
ROM_END
} // anonymous namespace
/******************************************************************************
Drivers
******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
CONS( 1979, ccdelta1, 0, 0, delta1, delta1, novagf8_state, empty_init, "Novag", "Chess Champion: Delta-1", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )
// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
CONS( 1979, ccdelta1, 0, 0, delta1, delta1, delta1_state, empty_init, "Novag", "Chess Champion: Delta-1", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING )

View File

@ -2,25 +2,21 @@
// copyright-holders:hap
// thanks-to:yoyo_chessboard
/******************************************************************************
*
* novag_diablo.cpp, subdriver of novagbase.cpp
Novag generic 68000 based chess computer driver
NOTE: MAME doesn't include a generalized implementation for boardpieces yet,
greatly affecting user playability of emulated electronic board games.
As workaround for the chess games, use an external chess GUI on the side,
such as Arena(in editmode).
TODO:
- RS232 port (when connected, I'm only getting "New Game")
TODO:
- RS232 port (when connected, I'm only getting "New Game")
*******************************************************************************
Diablo 68000:
- M68000 @ 16MHz, IPL1 256Hz, IPL2 from ACIA IRQ(always high)
- 2*8KB RAM TC5565 battery-backed, 2*32KB hashtable RAM TC55257 3*32KB ROM
- HD44780 LCD controller (16x1)
- R65C51P2 ACIA @ 1.8432MHz, RS232
- magnetic sensors, 8*8 chessboard leds
Diablo 68000
----------------
M68000 @ 16MHz, IPL1 256Hz, IPL2 from ACIA IRQ(always high)
2*8KB RAM TC5565 battery-backed, 2*32KB hashtable RAM TC55257 3*32KB ROM
HD44780 LCD controller (16x1)
R65C51P2 ACIA @ 1.8432MHz, RS232
magnetic sensors, 8*8 chessboard leds
Scorpio 68000 hardware is very similar, but with chessboard buttons and side leds.
@ -40,41 +36,40 @@ Scorpio 68000 hardware is very similar, but with chessboard buttons and side led
#include "novag_scorpio68k.lh" // clickable
class novag68k_state : public novagbase_state
namespace {
class diablo_state : public novagbase_state
{
public:
novag68k_state(const machine_config &mconfig, device_type type, const char *tag) :
diablo_state(const machine_config &mconfig, device_type type, const char *tag) :
novagbase_state(mconfig, type, tag)
{ }
// machine drivers
void diablo68k(machine_config &config);
void scorpio68k(machine_config &config);
private:
// Diablo 68000
DECLARE_WRITE8_MEMBER(diablo68k_control_w);
DECLARE_WRITE8_MEMBER(diablo68k_lcd_data_w);
DECLARE_WRITE8_MEMBER(diablo68k_leds_w);
DECLARE_READ8_MEMBER(diablo68k_input1_r);
DECLARE_READ8_MEMBER(diablo68k_input2_r);
// address maps
void diablo68k_map(address_map &map);
// Scorpio 68000
DECLARE_WRITE8_MEMBER(scorpio68k_control_w);
void scorpio68k_map(address_map &map);
// I/O handlers
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_WRITE8_MEMBER(lcd_data_w);
DECLARE_WRITE8_MEMBER(leds_w);
DECLARE_READ8_MEMBER(input1_r);
DECLARE_READ8_MEMBER(input2_r);
};
// Devices, I/O
/******************************************************************************
Diablo 68000
Devices, I/O
******************************************************************************/
// TTL
WRITE8_MEMBER(novag68k_state::diablo68k_control_w)
WRITE8_MEMBER(diablo_state::control_w)
{
// d0: HD44780 E
// d1: HD44780 RS
@ -85,31 +80,34 @@ WRITE8_MEMBER(novag68k_state::diablo68k_control_w)
// d7: enable beeper
m_beeper->set_state(data >> 7 & 1);
// d2,d3: side leds(scorpio)
u8 leds2 = ~data >> 2 & 3;
// d4-d6: input mux, led select
m_inp_mux = 1 << (data >> 4 & 0x7) & 0xff;
display_matrix(8, 8, m_led_data, m_inp_mux);
display_matrix(8+2, 8, m_led_data | leds2 << 8, m_inp_mux);
m_led_data = 0; // ?
}
WRITE8_MEMBER(novag68k_state::diablo68k_lcd_data_w)
WRITE8_MEMBER(diablo_state::lcd_data_w)
{
// d0-d7: HD44780 data
m_lcd_data = data;
}
WRITE8_MEMBER(novag68k_state::diablo68k_leds_w)
WRITE8_MEMBER(diablo_state::leds_w)
{
// d0-d7: chessboard leds
m_led_data = data;
}
READ8_MEMBER(novag68k_state::diablo68k_input1_r)
READ8_MEMBER(diablo_state::input1_r)
{
// d0-d7: multiplexed inputs (chessboard squares)
return ~read_inputs(8) & 0xff;
}
READ8_MEMBER(novag68k_state::diablo68k_input2_r)
READ8_MEMBER(diablo_state::input2_r)
{
// d0-d2: multiplexed inputs (side panel)
// other: ?
@ -118,43 +116,28 @@ READ8_MEMBER(novag68k_state::diablo68k_input2_r)
/******************************************************************************
Scorpio 68000
******************************************************************************/
WRITE8_MEMBER(novag68k_state::scorpio68k_control_w)
{
// d2,d3: led data, rest same as diablo
m_led_data = ~data >> 2 & 3;
diablo68k_control_w(space, offset, data);
}
/******************************************************************************
Address Maps
******************************************************************************/
// Diablo 68000 / Scorpio 68000
void novag68k_state::diablo68k_map(address_map &map)
void diablo_state::diablo68k_map(address_map &map)
{
map(0x000000, 0x00ffff).rom();
map(0x200000, 0x20ffff).rom().region("maincpu", 0x10000);
map(0x280000, 0x28ffff).ram();
map(0x300000, 0x300007).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)).umask16(0xff00);
map(0x380000, 0x380001).nopr();
map(0x380000, 0x380000).w(FUNC(novag68k_state::diablo68k_leds_w));
map(0x3a0000, 0x3a0000).w(FUNC(novag68k_state::diablo68k_lcd_data_w));
map(0x3c0000, 0x3c0000).rw(FUNC(novag68k_state::diablo68k_input2_r), FUNC(novag68k_state::diablo68k_control_w));
map(0x3e0000, 0x3e0000).r(FUNC(novag68k_state::diablo68k_input1_r));
map(0x380000, 0x380000).w(FUNC(diablo_state::leds_w));
map(0x3a0000, 0x3a0000).w(FUNC(diablo_state::lcd_data_w));
map(0x3c0000, 0x3c0000).rw(FUNC(diablo_state::input2_r), FUNC(diablo_state::control_w));
map(0x3e0000, 0x3e0000).r(FUNC(diablo_state::input1_r));
map(0xff8000, 0xffbfff).ram().share("nvram");
}
void novag68k_state::scorpio68k_map(address_map &map)
void diablo_state::scorpio68k_map(address_map &map)
{
diablo68k_map(map);
map(0x380000, 0x380000).w(FUNC(novag68k_state::scorpio68k_control_w));
map(0x380000, 0x380000).w(FUNC(diablo_state::control_w));
map(0x3c0000, 0x3c0001).nopw();
}
@ -222,16 +205,16 @@ INPUT_PORTS_END
Machine Drivers
******************************************************************************/
MACHINE_CONFIG_START(novag68k_state::diablo68k)
MACHINE_CONFIG_START(diablo_state::diablo68k)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M68000, 16_MHz_XTAL)
MCFG_DEVICE_PROGRAM_MAP(diablo68k_map)
M68000(config, m_maincpu, 16_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &diablo_state::diablo68k_map);
const attotime irq_period = attotime::from_hz(32.768_kHz_XTAL/128); // 256Hz
TIMER(config, m_irq_on).configure_periodic(FUNC(novag68k_state::irq_on<M68K_IRQ_2>), irq_period);
TIMER(config, m_irq_on).configure_periodic(FUNC(diablo_state::irq_on<M68K_IRQ_2>), irq_period);
m_irq_on->set_start_delay(irq_period - attotime::from_nsec(1100)); // active for 1.1us
TIMER(config, "irq_off").configure_periodic(FUNC(novag68k_state::irq_off<M68K_IRQ_2>), irq_period);
TIMER(config, "irq_off").configure_periodic(FUNC(diablo_state::irq_off<M68K_IRQ_2>), irq_period);
mos6551_device &acia(MOS6551(config, "acia", 0));
acia.set_xtal(1.8432_MHz_XTAL);
@ -246,13 +229,13 @@ MACHINE_CONFIG_START(novag68k_state::diablo68k)
MCFG_SCREEN_VISIBLE_AREA(0, 6*16, 0, 10-1)
MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
MCFG_SCREEN_PALETTE("palette")
PALETTE(config, "palette", FUNC(novag68k_state::novag_lcd_palette), 3);
PALETTE(config, "palette", FUNC(diablo_state::novag_lcd_palette), 3);
HD44780(config, m_lcd, 0);
m_lcd->set_lcd_size(2, 8);
m_lcd->set_pixel_update_cb(FUNC(novag68k_state::novag_lcd_pixel_update), this);
m_lcd->set_pixel_update_cb(FUNC(diablo_state::novag_lcd_pixel_update), this);
TIMER(config, "display_decay").configure_periodic(FUNC(novag68k_state::display_decay_tick), attotime::from_msec(1));
TIMER(config, "display_decay").configure_periodic(FUNC(diablo_state::display_decay_tick), attotime::from_msec(1));
config.set_default_layout(layout_novag_diablo68k);
/* sound hardware */
@ -261,15 +244,14 @@ MACHINE_CONFIG_START(novag68k_state::diablo68k)
m_beeper->add_route(ALL_OUTPUTS, "mono", 0.25);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(novag68k_state::scorpio68k)
void diablo_state::scorpio68k(machine_config &config)
{
diablo68k(config);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(scorpio68k_map)
m_maincpu->set_addrmap(AS_PROGRAM, &diablo_state::scorpio68k_map);
config.set_default_layout(layout_novag_scorpio68k);
MACHINE_CONFIG_END
}
@ -292,12 +274,14 @@ ROM_START( scorpio68 )
ROM_LOAD16_BYTE("502.u4", 0x10000, 0x8000, CRC(553a5c8c) SHA1(ccb5460ff10766a5ca8008ae2cffcff794318108) ) // no odd rom
ROM_END
} // anonymous namespace
/******************************************************************************
Drivers
******************************************************************************/
// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
CONS( 1991, diablo68, 0, 0, diablo68k, diablo68k, novag68k_state, empty_init, "Novag", "Diablo 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
CONS( 1991, scorpio68, 0, 0, scorpio68k, scorpio68k, novag68k_state, empty_init, "Novag", "Scorpio 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
CONS( 1991, diablo68, 0, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag", "Diablo 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
CONS( 1991, scorpio68, 0, 0, scorpio68k, scorpio68k, diablo_state, empty_init, "Novag", "Scorpio 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )

View File

@ -2,26 +2,24 @@
// copyright-holders:hap
// thanks-to:Berger
/******************************************************************************
*
* novag_presto.cpp, subdriver of novagbase.cpp
Novag generic MCS-48 based chess computer driver
NOTE: MAME doesn't include a generalized implementation for boardpieces yet,
greatly affecting user playability of emulated electronic board games.
As workaround for the chess games, use an external chess GUI on the side,
such as Arena(in editmode).
TODO:
- is presto led handling correct? mux data needs to be auto cleared
similar to diablo/sexpert
TODO:
- is presto led handling correct? mux data needs to be auto cleared
similar to diablo/sexpert
*******************************************************************************
Presto:
- NEC D80C49C MCU(serial 186), OSC from LC circuit measured ~6MHz
- buzzer, 16+4 LEDs, 8*8 chessboard buttons
Presto
----------
NEC D80C49C MCU(serial 186), OSC from LC circuit measured ~6MHz
buzzer, 16+4 LEDs, 8*8 chessboard buttons
Octo
----------
NEC D80C49HC MCU(serial 111), OSC from LC circuit measured ~12MHz
Octo:
- NEC D80C49HC MCU(serial 111), OSC from LC circuit measured ~12MHz
The buzzer has a little electronic circuit going on, not sure whatfor.
Otherwise, it's identical to Presto. The MCU internal ROM is same too.
@ -38,48 +36,71 @@ Otherwise, it's identical to Presto. The MCU internal ROM is same too.
#include "novag_presto.lh" // clickable
class novagmcs48_state : public novagbase_state
namespace {
class presto_state : public novagbase_state
{
public:
novagmcs48_state(const machine_config &mconfig, device_type type, const char *tag) :
presto_state(const machine_config &mconfig, device_type type, const char *tag) :
novagbase_state(mconfig, type, tag),
m_maincpu(*this, "maincpu")
{ }
// machine drivers
void presto(machine_config &config);
void octo(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(octo_cpu_freq);
private:
protected:
// devices/pointers
required_device<mcs48_cpu_device> m_maincpu;
// Presto/Octo
DECLARE_WRITE8_MEMBER(presto_mux_w);
DECLARE_WRITE8_MEMBER(presto_control_w);
DECLARE_READ8_MEMBER(presto_input_r);
DECLARE_MACHINE_RESET(octo);
// I/O handlers
DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_READ8_MEMBER(input_r);
};
class octo_state : public presto_state
{
public:
octo_state(const machine_config &mconfig, device_type type, const char *tag) :
presto_state(mconfig, type, tag)
{ }
DECLARE_INPUT_CHANGED_MEMBER(octo_cpu_freq) { octo_set_cpu_freq(); }
protected:
virtual void machine_reset() override;
void octo_set_cpu_freq();
};
void octo_state::machine_reset()
{
presto_state::machine_reset();
octo_set_cpu_freq();
}
void octo_state::octo_set_cpu_freq()
{
// Octo was released with either 12MHz or 15MHz CPU
m_maincpu->set_unscaled_clock((ioport("FAKE")->read() & 1) ? (15000000) : (12000000));
}
// Devices, I/O
/******************************************************************************
Presto/Octo
Devices, I/O
******************************************************************************/
// MCU ports/generic
WRITE8_MEMBER(novagmcs48_state::presto_mux_w)
WRITE8_MEMBER(presto_state::mux_w)
{
// D0-D7: input mux low, led data
m_inp_mux = (m_inp_mux & ~0xff) | (~data & 0xff);
display_matrix(8, 3, m_inp_mux, m_led_select);
}
WRITE8_MEMBER(novagmcs48_state::presto_control_w)
WRITE8_MEMBER(presto_state::control_w)
{
// P21: input mux high
m_inp_mux = (m_inp_mux & 0xff) | (~data << 7 & 0x100);
@ -92,24 +113,12 @@ WRITE8_MEMBER(novagmcs48_state::presto_control_w)
m_inp_mux &= ~0xff; // ?
}
READ8_MEMBER(novagmcs48_state::presto_input_r)
READ8_MEMBER(presto_state::input_r)
{
// P10-P17: multiplexed inputs
return ~read_inputs(9) & 0xff;
}
void novagmcs48_state::octo_set_cpu_freq()
{
// Octo was released with either 12MHz or 15MHz CPU
m_maincpu->set_unscaled_clock((ioport("FAKE")->read() & 1) ? (15000000) : (12000000));
}
MACHINE_RESET_MEMBER(novagmcs48_state, octo)
{
novagbase_state::machine_reset();
octo_set_cpu_freq();
}
/******************************************************************************
@ -134,31 +143,26 @@ static INPUT_PORTS_START( octo )
PORT_INCLUDE( presto )
PORT_START("FAKE")
PORT_CONFNAME( 0x01, 0x00, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, novagmcs48_state, octo_cpu_freq, nullptr) // factory set
PORT_CONFNAME( 0x01, 0x00, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, octo_state, octo_cpu_freq, nullptr) // factory set
PORT_CONFSETTING( 0x00, "12MHz" )
PORT_CONFSETTING( 0x01, "15MHz" )
INPUT_PORTS_END
INPUT_CHANGED_MEMBER(novagmcs48_state::octo_cpu_freq)
{
octo_set_cpu_freq();
}
/******************************************************************************
Machine Drivers
******************************************************************************/
void novagmcs48_state::presto(machine_config &config)
void presto_state::presto(machine_config &config)
{
/* basic machine hardware */
I8049(config, m_maincpu, 6000000); // LC circuit, measured 6MHz
m_maincpu->p1_in_cb().set(FUNC(novagmcs48_state::presto_input_r));
m_maincpu->p2_out_cb().set(FUNC(novagmcs48_state::presto_control_w));
m_maincpu->bus_out_cb().set(FUNC(novagmcs48_state::presto_mux_w));
m_maincpu->p1_in_cb().set(FUNC(presto_state::input_r));
m_maincpu->p2_out_cb().set(FUNC(presto_state::control_w));
m_maincpu->bus_out_cb().set(FUNC(presto_state::mux_w));
TIMER(config, "display_decay").configure_periodic(FUNC(novagmcs48_state::display_decay_tick), attotime::from_msec(1));
TIMER(config, "display_decay").configure_periodic(FUNC(presto_state::display_decay_tick), attotime::from_msec(1));
config.set_default_layout(layout_novag_presto);
/* sound hardware */
@ -167,14 +171,12 @@ void novagmcs48_state::presto(machine_config &config)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}
void novagmcs48_state::octo(machine_config &config)
void presto_state::octo(machine_config &config)
{
presto(config);
/* basic machine hardware */
m_maincpu->set_clock(12000000); // LC circuit, measured, see octo_set_cpu_freq
MCFG_MACHINE_RESET_OVERRIDE(novagmcs48_state, octo)
}
@ -193,12 +195,14 @@ ROM_START( nocto )
ROM_LOAD("d80c49hc_111", 0x0000, 0x0800, CRC(29a0eb4c) SHA1(e058d6018e53ddcaa3b5ec25b33b8bff091b04db) ) // same program as npresto
ROM_END
} // anonymous namespace
/******************************************************************************
Drivers
******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
CONS( 1984, npresto, 0, 0, presto, presto, novagmcs48_state, empty_init, "Novag", "Presto (Novag)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
CONS( 1987, nocto, npresto, 0, octo, octo, novagmcs48_state, empty_init, "Novag", "Octo (Novag)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
CONS( 1984, npresto, 0, 0, presto, presto, presto_state, empty_init, "Novag", "Presto (Novag)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )
CONS( 1987, nocto, npresto, 0, octo, octo, octo_state, empty_init, "Novag", "Octo (Novag)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_CONTROLS )

View File

@ -40,8 +40,8 @@
class rzone_state : public hh_sm510_state
{
public:
rzone_state(const machine_config &mconfig, device_type type, const char *tag)
: hh_sm510_state(mconfig, type, tag),
rzone_state(const machine_config &mconfig, device_type type, const char *tag) :
hh_sm510_state(mconfig, type, tag),
m_led_out(*this, "led"),
m_led_off(*this, "led_off")
{ }

View File

@ -3,15 +3,14 @@
/******************************************************************************
*
* Fidelity Electronics chess machines base class
* main driver is fidelz80.cpp
*
******************************************************************************/
#pragma once
#ifndef MAME_INCLUDES_FIDELBASE_H
#define MAME_INCLUDES_FIDELBASE_H
#pragma once
#include "machine/bankdev.h"
#include "machine/timer.h"
#include "sound/dac.h"

View File

@ -17,8 +17,8 @@
class hh_sm510_state : public driver_device
{
public:
hh_sm510_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
hh_sm510_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_inp_matrix(*this, "IN.%u", 0),
m_out_x(*this, "%u.%u.%u", 0U, 0U, 0U),

View File

@ -26,8 +26,8 @@
class hh_tms1k_state : public driver_device
{
public:
hh_tms1k_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
hh_tms1k_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_inp_matrix(*this, "IN.%u", 0),
m_out_x(*this, "%u.%u", 0U, 0U),

View File

@ -17,8 +17,8 @@
class hh_ucom4_state : public driver_device
{
public:
hh_ucom4_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
hh_ucom4_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_inp_matrix(*this, "IN.%u", 0),
m_out_x(*this, "%u.%u", 0U, 0U),

View File

@ -3,9 +3,9 @@
/******************************************************************************
*
* Novag chess machines base class
* main driver is novag6502.cpp
*
******************************************************************************/
#ifndef MAME_INCLUDES_NOVAGBASE_H
#define MAME_INCLUDES_NOVAGBASE_H
@ -36,10 +36,6 @@ public:
m_display_maxx(0)
{ }
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
// devices/pointers
required_device<cpu_device> m_maincpu;
optional_device<timer_device> m_irq_on;
@ -60,6 +56,9 @@ protected:
u16 read_inputs(int columns);
// in case reset button is directly tied to maincpu reset pin
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button) { m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); }
// 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); }
@ -80,6 +79,10 @@ protected:
void set_display_size(int maxx, int maxy);
void set_display_segmask(u32 digits, u32 mask);
void display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update = true);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
};

View File

@ -183,23 +183,23 @@
<!-- chessboard leds -->
<bezel name="7.1" element="ledr"><bounds x="-1" y="7.5" width="2" height="1" /></bezel>
<bezel name="6.1" element="ledr"><bounds x="-1" y="17.5" width="2" height="1" /></bezel>
<bezel name="5.1" element="ledr"><bounds x="-1" y="27.5" width="2" height="1" /></bezel>
<bezel name="4.1" element="ledr"><bounds x="-1" y="37.5" width="2" height="1" /></bezel>
<bezel name="3.1" element="ledr"><bounds x="-1" y="47.5" width="2" height="1" /></bezel>
<bezel name="2.1" element="ledr"><bounds x="-1" y="57.5" width="2" height="1" /></bezel>
<bezel name="1.1" element="ledr"><bounds x="-1" y="67.5" width="2" height="1" /></bezel>
<bezel name="0.1" element="ledr"><bounds x="-1" y="77.5" width="2" height="1" /></bezel>
<bezel name="7.9" element="ledr"><bounds x="-1" y="7.5" width="2" height="1" /></bezel>
<bezel name="6.9" element="ledr"><bounds x="-1" y="17.5" width="2" height="1" /></bezel>
<bezel name="5.9" element="ledr"><bounds x="-1" y="27.5" width="2" height="1" /></bezel>
<bezel name="4.9" element="ledr"><bounds x="-1" y="37.5" width="2" height="1" /></bezel>
<bezel name="3.9" element="ledr"><bounds x="-1" y="47.5" width="2" height="1" /></bezel>
<bezel name="2.9" element="ledr"><bounds x="-1" y="57.5" width="2" height="1" /></bezel>
<bezel name="1.9" element="ledr"><bounds x="-1" y="67.5" width="2" height="1" /></bezel>
<bezel name="0.9" element="ledr"><bounds x="-1" y="77.5" width="2" height="1" /></bezel>
<bezel name="7.0" element="ledr"><bounds x="7" y="85" width="2" height="1" /></bezel>
<bezel name="6.0" element="ledr"><bounds x="17" y="85" width="2" height="1" /></bezel>
<bezel name="5.0" element="ledr"><bounds x="27" y="85" width="2" height="1" /></bezel>
<bezel name="4.0" element="ledr"><bounds x="37" y="85" width="2" height="1" /></bezel>
<bezel name="3.0" element="ledr"><bounds x="47" y="85" width="2" height="1" /></bezel>
<bezel name="2.0" element="ledr"><bounds x="57" y="85" width="2" height="1" /></bezel>
<bezel name="1.0" element="ledr"><bounds x="67" y="85" width="2" height="1" /></bezel>
<bezel name="0.0" element="ledr"><bounds x="77" y="85" width="2" height="1" /></bezel>
<bezel name="7.8" element="ledr"><bounds x="7" y="85" width="2" height="1" /></bezel>
<bezel name="6.8" element="ledr"><bounds x="17" y="85" width="2" height="1" /></bezel>
<bezel name="5.8" element="ledr"><bounds x="27" y="85" width="2" height="1" /></bezel>
<bezel name="4.8" element="ledr"><bounds x="37" y="85" width="2" height="1" /></bezel>
<bezel name="3.8" element="ledr"><bounds x="47" y="85" width="2" height="1" /></bezel>
<bezel name="2.8" element="ledr"><bounds x="57" y="85" width="2" height="1" /></bezel>
<bezel name="1.8" element="ledr"><bounds x="67" y="85" width="2" height="1" /></bezel>
<bezel name="0.8" element="ledr"><bounds x="77" y="85" width="2" height="1" /></bezel>
<!-- chessboard sensors -->