remove chessbase class, rename fidelbase to fidel_clockdiv (nw)

This commit is contained in:
hap 2019-07-04 13:16:18 +02:00
parent 7e1e7e23ac
commit 15e938cd03
22 changed files with 137 additions and 406 deletions

View File

@ -2189,10 +2189,8 @@ files {
createMESSProjects(_target, _subtarget, "fidelity")
files {
MAME_DIR .. "src/mame/machine/chessbase.cpp",
MAME_DIR .. "src/mame/includes/chessbase.h",
MAME_DIR .. "src/mame/machine/fidelbase.cpp",
MAME_DIR .. "src/mame/includes/fidelbase.h",
MAME_DIR .. "src/mame/machine/fidel_clockdiv.cpp",
MAME_DIR .. "src/mame/machine/fidel_clockdiv.h",
MAME_DIR .. "src/mame/drivers/fidel_as12.cpp",
MAME_DIR .. "src/mame/drivers/fidel_card.cpp",
MAME_DIR .. "src/mame/drivers/fidel_cc1.cpp",

View File

@ -3,11 +3,9 @@
// thanks-to:yoyo_chessboard
/******************************************************************************
* fidel_as12.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity Elegance Chess Challenger (AS12)
*******************************************************************************
Fidelity Elegance Chess Challenger (AS12) overview:
Hardware notes:
- R65C02P4 CPU @ 4MHz
- 3*8KB ROM(TMM2764), 2*2KB RAM(HM6116)
- PCB label 510-1084B01
@ -18,7 +16,7 @@ magnetic chess board sensors. See fidel_sc12.cpp for a more technical descriptio
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "machine/fidel_clockdiv.h"
#include "cpu/m6502/r65c02.h"
#include "machine/timer.h"
@ -37,11 +35,13 @@ magnetic chess board sensors. See fidel_sc12.cpp for a more technical descriptio
namespace {
class as12_state : public fidelbase_state
// note: sub-class of fidel_clockdiv_state (see mame/machine/fidel_clockdiv.*)
class as12_state : public fidel_clockdiv_state
{
public:
as12_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
fidel_clockdiv_state(mconfig, type, tag),
m_irq_on(*this, "irq_on"),
m_display(*this, "display"),
m_dac(*this, "dac"),
@ -84,7 +84,7 @@ private:
void as12_state::machine_start()
{
fidelbase_state::machine_start();
fidel_clockdiv_state::machine_start();
// zerofill
m_inp_mux = 0;
@ -268,7 +268,7 @@ INPUT_PORTS_START( generic_cb_magnets )
INPUT_PORTS_END
static INPUT_PORTS_START( as12 )
PORT_INCLUDE( fidel_cpu_div_4 )
PORT_INCLUDE( fidel_clockdiv_4 )
PORT_INCLUDE( generic_cb_magnets )
PORT_START("IN.8")

View File

@ -3,8 +3,6 @@
// thanks-to:Berger, Sean Riddle
/******************************************************************************
* fidel_cc1.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity's 1st generation chess computers:
- *Chess Challenger
- Chess Challenger 3
@ -43,10 +41,9 @@ offered as an upgrade to CC1, or CC3.
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/i8085/i8085.h"
#include "machine/i8255.h"
#include "machine/timer.h"
#include "video/pwm.h"
// internal artwork
@ -56,11 +53,12 @@ offered as an upgrade to CC1, or CC3.
namespace {
class cc1_state : public fidelbase_state
class cc1_state : public driver_device
{
public:
cc1_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ppi8255(*this, "ppi8255"),
m_display(*this, "display"),
m_delay(*this, "delay"),
@ -79,6 +77,7 @@ protected:
private:
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<i8255_device> m_ppi8255;
required_device<pwm_display_device> m_display;
optional_device<timer_device> m_delay;
@ -100,8 +99,6 @@ private:
void cc1_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_led_select = 0;
m_7seg_data = 0;

View File

@ -3,7 +3,7 @@
// thanks-to:Berger, Sean Riddle
/******************************************************************************
* fidel_cc10.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity CC10 / Fidelity ACR
TODO:
- What is cc10 8255 PB.7 for? When set, maximum levels is 3, like in CC3. But
@ -25,10 +25,10 @@ Checker Challenger 4 (ACR) is on the same PCB, twice less RAM and the beeper gon
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/z80/z80.h"
#include "machine/bankdev.h"
#include "machine/i8255.h"
#include "machine/timer.h"
#include "sound/beep.h"
#include "video/pwm.h"
#include "speaker.h"
@ -40,11 +40,13 @@ Checker Challenger 4 (ACR) is on the same PCB, twice less RAM and the beeper gon
namespace {
class ccx_state : public fidelbase_state
class ccx_state : public driver_device
{
public:
ccx_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_mainmap(*this, "mainmap"),
m_ppi8255(*this, "ppi8255"),
m_display(*this, "display"),
m_beeper_off(*this, "beeper_off"),
@ -64,6 +66,8 @@ protected:
private:
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<address_map_bank_device> m_mainmap;
required_device<i8255_device> m_ppi8255;
required_device<pwm_display_device> m_display;
optional_device<timer_device> m_beeper_off;
@ -95,8 +99,6 @@ private:
void ccx_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_inp_mux = 0;
m_led_select = 0;

View File

@ -3,10 +3,6 @@
// thanks-to:Berger
/******************************************************************************
* fidel_cc7.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
*******************************************************************************
Fidelity Chess Challenger 7 (CC7, BCC)
------------------------
It was Fidelity's most sold chess computer. model CC7 is an older version.
@ -45,8 +41,6 @@ D0-D3: keypad row
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/z80/z80.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
@ -60,11 +54,12 @@ D0-D3: keypad row
namespace {
class bcc_state : public fidelbase_state
class bcc_state : public driver_device
{
public:
bcc_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_display(*this, "display"),
m_dac(*this, "dac"),
m_inputs(*this, "IN.%u", 0)
@ -79,6 +74,7 @@ protected:
private:
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<pwm_display_device> m_display;
optional_device<dac_bit_interface> m_dac;
required_ioport_array<4> m_inputs;
@ -97,8 +93,6 @@ private:
void bcc_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_inp_mux = 0;
m_7seg_data = 0;

View File

@ -3,7 +3,7 @@
// thanks-to:yoyo_chessboard, Berger
/******************************************************************************
* fidel_chesster.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity Chesster Challenger
These were made after Hegener & Glaser took over Fidelity(design phase started
before that). Kishon Chesster was released under both Fidelity, and Mephisto brands.
@ -27,8 +27,6 @@ the S14001A in the 70s), this time a 65C02 software solution.
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/m6502/r65c02.h"
#include "machine/timer.h"
#include "sound/dac.h"
@ -42,11 +40,12 @@ the S14001A in the 70s), this time a 65C02 software solution.
namespace {
class chesster_state : public fidelbase_state
class chesster_state : public driver_device
{
public:
chesster_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_irq_on(*this, "irq_on"),
m_rombank(*this, "rombank"),
m_display(*this, "display"),
@ -64,6 +63,7 @@ protected:
private:
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<timer_device> m_irq_on;
required_memory_bank m_rombank;
required_device<pwm_display_device> m_display;
@ -93,8 +93,6 @@ void chesster_state::init_chesster()
void chesster_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_speech_bank = 0;
m_select = 0;

View File

@ -3,8 +3,6 @@
// thanks-to:Berger, yoyo_chessboard
/******************************************************************************
* fidel_csc.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity CSC(and derived) hardware
- Champion Sensory Chess Challenger
- Elite Champion Challenger
@ -194,8 +192,6 @@ PCB label 510-1035A01
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/m6502/m6502.h"
#include "machine/6821pia.h"
#include "machine/timer.h"
@ -215,11 +211,12 @@ namespace {
// CSC / shared
class csc_state : public fidelbase_state
class csc_state : public driver_device
{
public:
csc_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_irq_on(*this, "irq_on"),
m_pia(*this, "pia%u", 0),
m_display(*this, "display"),
@ -240,6 +237,7 @@ protected:
virtual void machine_start() override;
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<timer_device> m_irq_on;
optional_device_array<pia6821_device, 2> m_pia;
required_device<pwm_display_device> m_display;
@ -284,8 +282,6 @@ protected:
void csc_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_led_data = 0;
m_7seg_data = 0;

View File

@ -3,11 +3,9 @@
// thanks-to:yoyo_chessboard
/******************************************************************************
* fidel_dames.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity Dame Sensory Challenger (DSC)
*******************************************************************************
Fidelity Dame Sensory Challenger (DSC) overview:
Hardware notes:
- Z80A CPU @ 3.9MHz
- 8KB ROM(MOS 2364), 1KB RAM(2*TMM314APL)
- 4-digit 7seg panel, sensory board with 50 buttons
@ -18,8 +16,6 @@ It's a checkers game for once instead of chess
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/z80/z80.h"
#include "machine/timer.h"
#include "sound/dac.h"
@ -33,11 +29,12 @@ It's a checkers game for once instead of chess
namespace {
class dsc_state : public fidelbase_state
class dsc_state : public driver_device
{
public:
dsc_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_irq_on(*this, "irq_on"),
m_display(*this, "display"),
m_dac(*this, "dac"),
@ -52,6 +49,7 @@ protected:
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<dac_bit_interface> m_dac;
@ -76,8 +74,6 @@ private:
void dsc_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_inp_mux = 0;
m_led_select = 0;

View File

@ -3,8 +3,6 @@
// thanks-to:Berger, yoyo_chessboard
/******************************************************************************
* fidel_desdis.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity Designer Display series, 6502 and 68000
(6502-based displayless Designer is in fidel_excel.cpp)
@ -38,8 +36,6 @@ Designer Mach IV Master 2325 (model 6129) overview:
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/m6502/r65c02.h"
#include "cpu/m6502/m65sc02.h"
#include "cpu/m68000/m68000.h"
@ -59,11 +55,12 @@ namespace {
// Designer Display / shared
class desdis_state : public fidelbase_state
class desdis_state : public driver_device
{
public:
desdis_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_irq_on(*this, "irq_on"),
m_rombank(*this, "rombank"),
m_display(*this, "display"),
@ -81,6 +78,7 @@ protected:
virtual void machine_start() override;
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<timer_device> m_irq_on;
optional_memory_bank m_rombank;
required_device<pwm_display_device> m_display;
@ -110,8 +108,6 @@ void desdis_state::init_fdes2100d()
void desdis_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_select = 0;
m_lcd_data = 0;

View File

@ -3,8 +3,6 @@
// thanks-to:Berger, yoyo_chessboard
/******************************************************************************
* fidel_eag68k.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity 68000-based Elite Avant Garde driver
For 6502-based EAG, see fidel_elite.cpp
Excel 68000 I/O is very similar to EAG, so it's handled in this driver as well
@ -152,8 +150,6 @@ B0000x-xxxxxx: see V7, -800000
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/m68000/m68000.h"
#include "machine/gen_latch.h"
#include "machine/ram.h"
@ -177,11 +173,11 @@ namespace {
// EAG / shared
class eag_state : public fidelbase_state
class eag_state : public driver_device
{
public:
eag_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_irq_on(*this, "irq_on"),
m_ram(*this, "ram"),
@ -241,8 +237,6 @@ protected:
void eag_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_select = 0;
m_7seg_data = 0;

View File

@ -3,8 +3,6 @@
// thanks-to:Berger
/******************************************************************************
* fidel_elite.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity Elite A/S series hardware (EAS, EAG, PC)
see fidel_eag68k.cpp for 68000-based EAG hardware
@ -49,7 +47,7 @@ It was probably only released in Germany.
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "machine/fidel_clockdiv.h"
#include "cpu/m6502/m65c02.h"
#include "cpu/m6502/r65c02.h"
@ -75,11 +73,13 @@ It was probably only released in Germany.
namespace {
class elite_state : public fidelbase_state
// note: sub-class of fidel_clockdiv_state (see mame/machine/fidel_clockdiv.*)
class elite_state : public fidel_clockdiv_state
{
public:
elite_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
fidel_clockdiv_state(mconfig, type, tag),
m_irq_on(*this, "irq_on"),
m_ppi8255(*this, "ppi8255"),
m_rombank(*this, "rombank"),
@ -152,7 +152,7 @@ void elite_state::init_eag2100()
void elite_state::machine_start()
{
fidelbase_state::machine_start();
fidel_clockdiv_state::machine_start();
// zerofill
m_led_data = 0;
@ -425,7 +425,7 @@ INPUT_PORTS_START( generic_cb_magnets )
INPUT_PORTS_END
static INPUT_PORTS_START( eas )
PORT_INCLUDE( fidel_cpu_div_4 )
PORT_INCLUDE( fidel_clockdiv_4 )
PORT_INCLUDE( generic_cb_magnets )
PORT_START("IN.8")
@ -445,7 +445,7 @@ static INPUT_PORTS_START( eas )
INPUT_PORTS_END
static INPUT_PORTS_START( eag )
PORT_INCLUDE( fidel_cpu_div_4 )
PORT_INCLUDE( fidel_clockdiv_4 )
PORT_INCLUDE( generic_cb_magnets )
PORT_START("IN.8")

View File

@ -3,8 +3,6 @@
// thanks-to:Berger, yoyo_chessboard
/******************************************************************************
* fidel_vsc.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity Excellence series hardware
(for Excel 68000, see fidel_eag68k.cpp)
@ -132,8 +130,6 @@ Designer 2100 (model 6103): exactly same, but running at 5MHz
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/m6502/r65c02.h"
#include "cpu/m6502/m65sc02.h"
#include "machine/timer.h"
@ -151,11 +147,12 @@ Designer 2100 (model 6103): exactly same, but running at 5MHz
namespace {
class excel_state : public fidelbase_state
class excel_state : public driver_device
{
public:
excel_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_irq_on(*this, "irq_on"),
m_display(*this, "display"),
m_dac(*this, "dac"),
@ -182,6 +179,7 @@ protected:
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<dac_bit_interface> m_dac;
@ -210,8 +208,6 @@ private:
void excel_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_select = 0;
m_7seg_data = 0;

View File

@ -3,10 +3,6 @@
// thanks-to:Berger, yoyo_chessboard
/******************************************************************************
* fidel_sc12.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
*******************************************************************************
Fidelity Sensory 12 Chess Challenger (SC12-B, 6086)
4 versions are known to exist: A,B,C, and X, with increasing CPU speed.
---------------------------------
@ -50,7 +46,7 @@ If control Q4 is set, printer data can be read from I0.
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "machine/fidel_clockdiv.h"
#include "cpu/m6502/r65c02.h"
#include "machine/timer.h"
@ -69,11 +65,13 @@ If control Q4 is set, printer data can be read from I0.
namespace {
class sc12_state : public fidelbase_state
// note: sub-class of fidel_clockdiv_state (see mame/machine/fidel_clockdiv.*)
class sc12_state : public fidel_clockdiv_state
{
public:
sc12_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
fidel_clockdiv_state(mconfig, type, tag),
m_irq_on(*this, "irq_on"),
m_display(*this, "display"),
m_dac(*this, "dac"),
@ -114,7 +112,7 @@ private:
void sc12_state::machine_start()
{
fidelbase_state::machine_start();
fidel_clockdiv_state::machine_start();
// zerofill/register for savestates
m_inp_mux = 0;
@ -293,13 +291,13 @@ static INPUT_PORTS_START( sc12_sidepanel )
INPUT_PORTS_END
static INPUT_PORTS_START( sc12 )
PORT_INCLUDE( fidel_cpu_div_2 )
PORT_INCLUDE( fidel_clockdiv_2 )
PORT_INCLUDE( generic_cb_buttons )
PORT_INCLUDE( sc12_sidepanel )
INPUT_PORTS_END
static INPUT_PORTS_START( sc12b )
PORT_INCLUDE( fidel_cpu_div_4 )
PORT_INCLUDE( fidel_clockdiv_4 )
PORT_INCLUDE( generic_cb_buttons )
PORT_INCLUDE( sc12_sidepanel )
INPUT_PORTS_END

View File

@ -3,11 +3,9 @@
// thanks-to:yoyo_chessboard
/******************************************************************************
* fidel_sc6.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity Sensory Chess Challenger 6 (model SC6)
*******************************************************************************
Fidelity Sensory Chess Challenger 6 (model SC6) overview:
Hardware notes:
- PCB label 510-1045B01
- INS8040N-11 MCU, 11MHz XTAL
- external 4KB ROM 2332 101-1035A01, in module slot
@ -23,8 +21,6 @@ SC6 program is contained in BO6 and CG6.
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/mcs48/mcs48.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
@ -41,11 +37,11 @@ SC6 program is contained in BO6 and CG6.
namespace {
class sc6_state : public fidelbase_state
class sc6_state : public driver_device
{
public:
sc6_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_display(*this, "display"),
m_dac(*this, "dac"),
@ -88,8 +84,6 @@ private:
void sc6_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_led_select = 0;
m_inp_mux = 0;

View File

@ -3,11 +3,9 @@
// thanks-to:yoyo_chessboard
/******************************************************************************
* fidel_sc8.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity Sensory Chess Challenger 8
*******************************************************************************
Fidelity Sensory Chess Challenger 8 overview:
Hardware notes:
- Z80A CPU @ 3.9MHz
- 4KB ROM(MOS 2732), 256 bytes RAM(35391CP)
- chessboard buttons, 8*8+1 leds
@ -16,8 +14,6 @@ Fidelity Sensory Chess Challenger 8 overview:
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/z80/z80.h"
#include "sound/dac.h"
#include "sound/volt_reg.h"
@ -30,11 +26,12 @@ Fidelity Sensory Chess Challenger 8 overview:
namespace {
class scc_state : public fidelbase_state
class scc_state : public driver_device
{
public:
scc_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_display(*this, "display"),
m_dac(*this, "dac"),
m_inputs(*this, "IN.%u", 0)
@ -48,6 +45,7 @@ protected:
private:
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<pwm_display_device> m_display;
required_device<dac_bit_interface> m_dac;
required_ioport_array<9> m_inputs;
@ -66,8 +64,6 @@ private:
void scc_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_inp_mux = 0;
m_led_data = 0;

View File

@ -3,10 +3,6 @@
// thanks-to:Berger, yoyo_chessboard
/******************************************************************************
* fidel_sc9.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
*******************************************************************************
Fidelity Sensory Chess Challenger "9" (SC9) overview:
- 8*(8+1) buttons, 8*8+1 LEDs
- 36-pin edge connector, assume same as SC12
@ -38,8 +34,6 @@ IRQ and write strobe are unused. Maximum known size is 16KB.
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/m6502/m6502.h"
#include "machine/timer.h"
#include "sound/dac.h"
@ -60,11 +54,12 @@ namespace {
// SC9 / shared
class sc9_state : public fidelbase_state
class sc9_state : public driver_device
{
public:
sc9_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_irq_on(*this, "irq_on"),
m_display(*this, "display"),
m_dac(*this, "dac"),
@ -82,6 +77,7 @@ protected:
virtual void machine_start() override;
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<timer_device> m_irq_on;
required_device<pwm_display_device> m_display;
required_device<dac_bit_interface> m_dac;
@ -111,8 +107,6 @@ protected:
void sc9_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_inp_mux = 0;
m_led_data = 0;

View File

@ -2,8 +2,6 @@
// copyright-holders:Kevin Horton, Jonathan Gevaryahu, Sandro Ronco, hap
/******************************************************************************
* fidel_vcc.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
Fidelity Voice Chess Challenger series hardware
- Voice Chess Challenger (VCC) (version A and B?)
- Advanced Voice Chess Challenger (UVC)
@ -103,8 +101,6 @@ determination and give you a language option on power up or something.
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/z80/z80.h"
#include "machine/i8255.h"
#include "sound/s14001a.h"
@ -117,11 +113,12 @@ determination and give you a language option on power up or something.
namespace {
class vcc_state : public fidelbase_state
class vcc_state : public driver_device
{
public:
vcc_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ppi8255(*this, "ppi8255"),
m_display(*this, "display"),
m_speech(*this, "speech"),
@ -141,6 +138,7 @@ protected:
private:
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<i8255_device> m_ppi8255;
required_device<pwm_display_device> m_display;
required_device<s14001a_device> m_speech;
@ -169,8 +167,6 @@ private:
void vcc_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_led_select = 0;
m_7seg_data = 0;

View File

@ -2,10 +2,6 @@
// copyright-holders:Kevin Horton, Jonathan Gevaryahu, Sandro Ronco, hap
/******************************************************************************
* fidel_vsc.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp
*******************************************************************************
Fidelity Voice Sensory Chess Challenger (VSC)
---------------------------------------------
RE notes by Kevin Horton
@ -152,8 +148,6 @@ IFP: Impact Printer - also compatible with C64 apparently.
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "cpu/z80/z80.h"
#include "machine/i8255.h"
#include "machine/z80pio.h"
@ -168,11 +162,12 @@ IFP: Impact Printer - also compatible with C64 apparently.
namespace {
class vsc_state : public fidelbase_state
class vsc_state : public driver_device
{
public:
vsc_state(const machine_config &mconfig, device_type type, const char *tag) :
fidelbase_state(mconfig, type, tag),
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_irq_on(*this, "irq_on"),
m_z80pio(*this, "z80pio"),
m_ppi8255(*this, "ppi8255"),
@ -191,6 +186,7 @@ protected:
private:
// devices/pointers
required_device<cpu_device> m_maincpu;
required_device<timer_device> m_irq_on;
required_device<z80pio_device> m_z80pio;
required_device<i8255_device> m_ppi8255;
@ -230,8 +226,6 @@ private:
void vsc_state::machine_start()
{
fidelbase_state::machine_start();
// zerofill
m_led_data = 0;
m_7seg_data = 0;

View File

@ -1,56 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:hap
/******************************************************************************
*
* Generic chess computers base driver
* implementation is in machine/chessbase.cpp
*
******************************************************************************/
#ifndef MAME_INCLUDES_CHESSBASE_H
#define MAME_INCLUDES_CHESSBASE_H
#pragma once
#include "machine/timer.h"
class chessbase_state : public driver_device
{
public:
chessbase_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_out_x(*this, "%u.%u", 0U, 0U),
m_out_a(*this, "%u.a", 0U),
m_out_digit(*this, "digit%u", 0U),
m_display_wait(33),
m_display_maxy(1),
m_display_maxx(0)
{ }
protected:
// devices/pointers
output_finder<0x20, 0x20> m_out_x;
output_finder<0x20> m_out_a;
output_finder<0x20> m_out_digit;
// display common
int m_display_wait; // led/lamp off-delay in milliseconds (default 33ms)
int m_display_maxy; // display matrix number of rows
int m_display_maxx; // display matrix number of columns (max 31 for now)
u32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on)
u16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments
u8 m_display_decay[0x20][0x20]; // (internal use)
TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
void display_update();
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);
virtual void machine_start() override;
virtual void machine_reset() override;
};
#endif // MAME_INCLUDES_CHESSBASE_H

View File

@ -1,127 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:hap
/******************************************************************************
Generic chess computers base driver
This file contains helpers for generic chessboard leds and input handling.
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:
- use pwm_display_device, this file will be removed eventually
******************************************************************************/
#include "emu.h"
#include "includes/chessbase.h"
// machine start/reset
void chessbase_state::machine_start()
{
// resolve handlers
m_out_x.resolve();
m_out_a.resolve();
m_out_digit.resolve();
// zerofill
memset(m_display_state, 0, sizeof(m_display_state));
memset(m_display_decay, 0, sizeof(m_display_decay));
memset(m_display_segmask, 0, sizeof(m_display_segmask));
// register for savestates
save_item(NAME(m_display_maxy));
save_item(NAME(m_display_maxx));
save_item(NAME(m_display_wait));
save_item(NAME(m_display_state));
save_item(NAME(m_display_decay));
save_item(NAME(m_display_segmask));
}
void chessbase_state::machine_reset()
{
}
/***************************************************************************
Helper Functions
***************************************************************************/
// The device may strobe the outputs very fast, it is unnoticeable to the user.
// To prevent flickering here, we need to simulate a decay.
void chessbase_state::display_update()
{
for (int y = 0; y < m_display_maxy; y++)
{
u32 active_state = 0;
for (int x = 0; x <= m_display_maxx; x++)
{
// turn on powered segments
if (m_display_state[y] >> x & 1)
m_display_decay[y][x] = m_display_wait;
// determine active state
u32 ds = (m_display_decay[y][x] != 0) ? 1 : 0;
active_state |= (ds << x);
// output to y.x, or y.a when always-on
if (x != m_display_maxx)
m_out_x[y][x] = ds;
else
m_out_a[y] = ds;
}
// output to digity
if (m_display_segmask[y] != 0)
m_out_digit[y] = active_state & m_display_segmask[y];
}
}
TIMER_DEVICE_CALLBACK_MEMBER(chessbase_state::display_decay_tick)
{
// slowly turn off unpowered segments
for (int y = 0; y < m_display_maxy; y++)
for (int x = 0; x <= m_display_maxx; x++)
if (m_display_decay[y][x] != 0)
m_display_decay[y][x]--;
display_update();
}
void chessbase_state::set_display_size(int maxx, int maxy)
{
m_display_maxx = maxx;
m_display_maxy = maxy;
}
void chessbase_state::set_display_segmask(u32 digits, u32 mask)
{
// set a segment mask per selected digit, but leave unselected ones alone
for (int i = 0; i < 0x20; i++)
{
if (digits & 1)
m_display_segmask[i] = mask;
digits >>= 1;
}
}
void chessbase_state::display_matrix(int maxx, int maxy, u32 setx, u32 sety, bool update)
{
set_display_size(maxx, maxy);
// update current state
u32 mask = (1 << maxx) - 1;
for (int y = 0; y < maxy; y++)
m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0;
if (update)
display_update();
}

View File

@ -2,43 +2,25 @@
// copyright-holders:hap
/******************************************************************************
Fidelity Electronics (mostly-)chess computers base driver
Fidelity Electronics 6502 dynamic(offset-dependent) CPU clock divider base class.
Used to compensate slow memory chips in chess computer models: SC12, AS12, PC, EAS, EAG.
TODO: (see each driver for more specific)
- verify cpu speed and rom labels where uncertain
- support for printer
- improve EAS/SC12/etc CPU divider? it seems a little bit slower than the real machine.
TODO:
- improve clock divider? it seems a little bit slower than the real machine.
Currently, a dummy timer workaround is needed, or it's much worse.
Is the problem here due to timing of CPU addressbus changes? We can only 'sense'
the addressbus at read or write accesses.
Keypad legend:
- RE: Reset
- CL: Clear
- EN: Enter
- PB: Problem Mode
- PV: Position Verification
- LV: Playing Levels
- TB: Take Back
- DM: Display Move/Double Move
- RV: Reverse
- ST: Set/Stop
- TM: Time
Read the official manual(s) on how to play.
******************************************************************************/
#include "emu.h"
#include "includes/fidelbase.h"
#include "machine/fidel_clockdiv.h"
// machine start/reset
void fidelbase_state::machine_start()
void fidel_clockdiv_state::machine_start()
{
chessbase_state::machine_start();
// zerofill/register for savestates
m_div_config = 0;
@ -50,22 +32,34 @@ void fidelbase_state::machine_start()
m_div_timer = machine().scheduler().timer_alloc(timer_expired_delegate(), this);
}
void fidelbase_state::machine_reset()
void fidel_clockdiv_state::machine_reset()
{
chessbase_state::machine_reset();
// init cpu divider (optional)
div_refresh();
}
/***************************************************************************
Helper Functions
***************************************************************************/
// input ports
// Offset-dependent CPU divider on some 6502-based machines
INPUT_PORTS_START( fidel_clockdiv_2 )
PORT_START("div_config") // hardwired, default to /2
PORT_CONFNAME( 0x03, 0x02, "CPU Divider" ) PORT_CHANGED_MEMBER(DEVICE_SELF, fidel_clockdiv_state, div_changed, nullptr)
PORT_CONFSETTING( 0x00, "Disabled" )
PORT_CONFSETTING( 0x02, "2" )
PORT_CONFSETTING( 0x03, "4" )
INPUT_PORTS_END
void fidelbase_state::div_set_cpu_freq(offs_t offset)
INPUT_PORTS_START( fidel_clockdiv_4 )
PORT_START("div_config") // hardwired, default to /4
PORT_CONFNAME( 0x03, 0x03, "CPU Divider" ) PORT_CHANGED_MEMBER(DEVICE_SELF, fidel_clockdiv_state, div_changed, nullptr)
PORT_CONFSETTING( 0x00, "Disabled" )
PORT_CONFSETTING( 0x02, "2" )
PORT_CONFSETTING( 0x03, "4" )
INPUT_PORTS_END
// implementation
void fidel_clockdiv_state::div_set_cpu_freq(offs_t offset)
{
if (offset != m_div_status)
{
@ -77,7 +71,7 @@ void fidelbase_state::div_set_cpu_freq(offs_t offset)
}
}
void fidelbase_state::div_trampoline_w(offs_t offset, u8 data)
void fidel_clockdiv_state::div_trampoline_w(offs_t offset, u8 data)
{
if (m_div_config)
div_set_cpu_freq(offset & 0x6000);
@ -85,7 +79,7 @@ void fidelbase_state::div_trampoline_w(offs_t offset, u8 data)
m_mainmap->write8(offset, data);
}
u8 fidelbase_state::div_trampoline_r(offs_t offset)
u8 fidel_clockdiv_state::div_trampoline_r(offs_t offset)
{
if (m_div_config && !machine().side_effects_disabled())
div_set_cpu_freq(offset & 0x6000);
@ -93,12 +87,12 @@ u8 fidelbase_state::div_trampoline_r(offs_t offset)
return m_mainmap->read8(offset);
}
void fidelbase_state::div_trampoline(address_map &map)
void fidel_clockdiv_state::div_trampoline(address_map &map)
{
map(0x0000, 0xffff).rw(FUNC(fidelbase_state::div_trampoline_r), FUNC(fidelbase_state::div_trampoline_w));
map(0x0000, 0xffff).rw(FUNC(fidel_clockdiv_state::div_trampoline_r), FUNC(fidel_clockdiv_state::div_trampoline_w));
}
void fidelbase_state::div_refresh(ioport_value val)
void fidel_clockdiv_state::div_refresh(ioport_value val)
{
if (val == 0xff)
{
@ -119,19 +113,3 @@ void fidelbase_state::div_refresh(ioport_value val)
attotime period = (val) ? attotime::from_hz(m_maincpu->clock()) : attotime::never;
m_div_timer->adjust(period, 0, period);
}
INPUT_PORTS_START( fidel_cpu_div_2 )
PORT_START("div_config") // hardwired, default to /2
PORT_CONFNAME( 0x03, 0x02, "CPU Divider" ) PORT_CHANGED_MEMBER(DEVICE_SELF, fidelbase_state, div_changed, nullptr)
PORT_CONFSETTING( 0x00, "Disabled" )
PORT_CONFSETTING( 0x02, "2" )
PORT_CONFSETTING( 0x03, "4" )
INPUT_PORTS_END
INPUT_PORTS_START( fidel_cpu_div_4 )
PORT_START("div_config") // hardwired, default to /4
PORT_CONFNAME( 0x03, 0x03, "CPU Divider" ) PORT_CHANGED_MEMBER(DEVICE_SELF, fidelbase_state, div_changed, nullptr)
PORT_CONFSETTING( 0x00, "Disabled" )
PORT_CONFSETTING( 0x02, "2" )
PORT_CONFSETTING( 0x03, "4" )
INPUT_PORTS_END

View File

@ -1,26 +1,23 @@
// license:BSD-3-Clause
// copyright-holders:hap
/******************************************************************************
*
* Fidelity Electronics chess computers base driver
* implementation is in machine/fidelbase.cpp
*
******************************************************************************/
/*
#ifndef MAME_INCLUDES_FIDELBASE_H
#define MAME_INCLUDES_FIDELBASE_H
Fidelity Electronics 6502 dynamic CPU clock divider
*/
#ifndef MAME_MACHINE_FIDEL_CLOCKDIV_H
#define MAME_MACHINE_FIDEL_CLOCKDIV_H
#pragma once
#include "includes/chessbase.h"
#include "machine/bankdev.h"
class fidelbase_state : public chessbase_state
class fidel_clockdiv_state : public driver_device
{
public:
fidelbase_state(const machine_config &mconfig, device_type type, const char *tag) :
chessbase_state(mconfig, type, tag),
fidel_clockdiv_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_mainmap(*this, "mainmap")
{ }
@ -52,7 +49,7 @@ private:
};
INPUT_PORTS_EXTERN( fidel_cpu_div_2 );
INPUT_PORTS_EXTERN( fidel_cpu_div_4 );
INPUT_PORTS_EXTERN( fidel_clockdiv_2 );
INPUT_PORTS_EXTERN( fidel_clockdiv_4 );
#endif // MAME_INCLUDES_FIDELBASE_H
#endif // MAME_MACHINE_FIDEL_CLOCKDIV_H