diff options
author | 2019-07-02 01:16:36 +0200 | |
---|---|---|
committer | 2019-07-02 01:16:36 +0200 | |
commit | b1dff791ed66f114f3b8d63c156d8f16f06c0f0c (patch) | |
tree | e0e398bbe358706b46a0939197a0038f09c446af | |
parent | 35af77fcfad6db45904b555e8bd2d2a97fc51800 (diff) |
fidel_card: disconnect from fidelbase class (nw)
-rw-r--r-- | src/mame/drivers/fidel_card.cpp | 67 | ||||
-rw-r--r-- | src/mame/drivers/fidel_vsc.cpp | 11 | ||||
-rw-r--r-- | src/mame/drivers/hh_ucom4.cpp | 1 | ||||
-rw-r--r-- | src/mame/layout/scisys_chesstrv.lay | 44 | ||||
-rw-r--r-- | src/mame/machine/fidelbase.cpp | 3 |
5 files changed, 75 insertions, 51 deletions
diff --git a/src/mame/drivers/fidel_card.cpp b/src/mame/drivers/fidel_card.cpp index 6a9fff06c8d..51e3c6fe570 100644 --- a/src/mame/drivers/fidel_card.cpp +++ b/src/mame/drivers/fidel_card.cpp @@ -2,8 +2,6 @@ // copyright-holders:Kevin Horton, Jonathan Gevaryahu, Sandro Ronco, hap /****************************************************************************** -* fidel_card.cpp, subdriver of machine/fidelbase.cpp, machine/chessbase.cpp - Fidelity electronic card games - *Bridge Challenger (BRC) - Advanced Bridge Challenger (UBC) @@ -17,9 +15,6 @@ Fidelity electronic card games NOTE: The card scanner is simulated, but the player is kind of forced to cheat and has to peek at the card before it is scanned. -TODO: -- Z80 WAIT pin is not fully emulated, affecting VBRC speech busy state - ******************************************************************************* Voice Bridge Challenger (Model VBRC, later reissued as Model 7002) @@ -164,12 +159,14 @@ Two card decks exist (red and blue), each has the same set of barcodes. ******************************************************************************/ #include "emu.h" -#include "includes/fidelbase.h" - #include "cpu/z80/z80.h" #include "cpu/mcs48/mcs48.h" +#include "video/pwm.h" #include "machine/i8243.h" #include "machine/clock.h" +#include "machine/timer.h" +#include "sound/dac.h" +#include "sound/s14001a.h" #include "sound/volt_reg.h" #include "speaker.h" @@ -181,13 +178,18 @@ Two card decks exist (red and blue), each has the same set of barcodes. namespace { -class card_state : public fidelbase_state +class card_state : public driver_device { public: card_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_mcu(*this, "mcu"), - m_i8243(*this, "i8243") + m_i8243(*this, "i8243"), + m_display(*this, "display"), + m_speech(*this, "speech"), + m_dac(*this, "dac"), + m_inputs(*this, "IN.%u", 0) { } // machine drivers @@ -196,7 +198,7 @@ public: void bv3(machine_config &config); void gin(machine_config &config); - virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button) override; + DECLARE_INPUT_CHANGED_MEMBER(reset_button); DECLARE_INPUT_CHANGED_MEMBER(start_scan); protected: @@ -206,8 +208,13 @@ private: void brc_base(machine_config &config); // devices/pointers + required_device<cpu_device> m_maincpu; required_device<i8041a_device> m_mcu; required_device<i8243_device> m_i8243; + required_device<pwm_display_device> m_display; + optional_device<s14001a_device> m_speech; + optional_device<dac_bit_interface> m_dac; + required_ioport_array<8> m_inputs; // address maps void main_map(address_map &map); @@ -215,6 +222,8 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(barcode_shift) { m_barcode >>= 1; } u32 m_barcode; + u16 m_vfd_data; + u8 m_inp_mux; // I/O handlers void update_display(); @@ -227,14 +236,19 @@ private: void card_state::machine_start() { - fidelbase_state::machine_start(); - - // zerofill/register for savestates + // zerofill m_barcode = 0; + m_vfd_data = 0; + m_inp_mux = 0; + + // register for savestates save_item(NAME(m_barcode)); + save_item(NAME(m_vfd_data)); + save_item(NAME(m_inp_mux)); } + /****************************************************************************** Devices, I/O ******************************************************************************/ @@ -243,10 +257,9 @@ void card_state::machine_start() void card_state::update_display() { - // 14seg led segments, d15(12) is extra led - u16 outdata = bitswap<16>(m_7seg_data,12,13,1,6,5,2,0,7,15,11,10,14,4,3,9,8); - set_display_segmask(0xff, 0x3fff); - display_matrix(16, 8, outdata, m_led_select); + // 14seg VFD segments, d15(12) is extra LED + u16 outdata = bitswap<16>(m_vfd_data,12,13,1,6,5,2,0,7,15,11,10,14,4,3,9,8); + m_display->matrix(m_inp_mux, outdata); } WRITE8_MEMBER(card_state::speech_w) @@ -266,7 +279,7 @@ template<int P> void card_state::ioexp_port_w(uint8_t data) { // P4x-P7x: digit segment data - m_7seg_data = (m_7seg_data & ~(0xf << (4*P))) | ((data & 0xf) << (4*P)); + m_vfd_data = (m_vfd_data & ~(0xf << (4*P))) | ((data & 0xf) << (4*P)); update_display(); // P71 is tone (not on speech model) @@ -279,16 +292,22 @@ void card_state::ioexp_port_w(uint8_t data) WRITE8_MEMBER(card_state::mcu_p1_w) { - // P10-P17: select digits, input mux - m_inp_mux = m_led_select = data; + // P10-P17: input mux, digit select + m_inp_mux = data; update_display(); } READ8_MEMBER(card_state::mcu_p2_r) { // P20-P23: I8243 P2 + u8 data = m_i8243->p2_r() & 0x0f; + // P24-P27: multiplexed inputs (active low) - return (m_i8243->p2_r() & 0x0f) | (read_inputs(8) << 4 ^ 0xf0); + for (int i = 0; i < 8; i++) + if (BIT(m_inp_mux, i)) + data |= m_inputs[i]->read() << 4; + + return data ^ 0xf0; } READ_LINE_MEMBER(card_state::mcu_t0_r) @@ -567,7 +586,9 @@ void card_state::brc_base(machine_config &config) TIMER(config, "barcode_shift").configure_periodic(FUNC(card_state::barcode_shift), attotime::from_msec(2)); - TIMER(config, "display_decay").configure_periodic(FUNC(card_state::display_decay_tick), attotime::from_msec(1)); + /* video hardware */ + PWM_DISPLAY(config, m_display).set_size(8, 16); + m_display->set_segmask(0xff, 0x3fff); config.set_default_layout(layout_fidel_brc); } diff --git a/src/mame/drivers/fidel_vsc.cpp b/src/mame/drivers/fidel_vsc.cpp index a47c3648ec3..6c7e15427ef 100644 --- a/src/mame/drivers/fidel_vsc.cpp +++ b/src/mame/drivers/fidel_vsc.cpp @@ -124,8 +124,8 @@ PA.7 - button row 8 PB.0 - button column I PB.1 - button column J PB.2 - hi/lo TSI speaker volume -PB.3 - violet wire -PB.4 - white wire (and TSI BUSY line) +PB.3 - violet wire to printer port? +PB.4 - white wire to printer port? (and TSI BUSY line) PB.5 - selection jumper input (see below) PB.6 - TSI start line PB.7 - TSI ROM A12 line @@ -142,6 +142,13 @@ Anyways, the two jumpers are connected to button columns A and B and the common connects to Z80A PIO PB.5, which basically makes a 10th button row. I would expect that the software reads these once on startup only. +printer: +-------- +This is the 1st Fidelity chess computer with a printer port. Many later Fidelity chess +computers also have support for it. Two models were released: +FP: Challenger Printer - thermal printer, MCU=D8048C243 +IFP: Impact Printer - also compatible with C64 apparently. + ******************************************************************************/ #include "emu.h" diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp index 2b3d208312a..cce4f3d54bd 100644 --- a/src/mame/drivers/hh_ucom4.cpp +++ b/src/mame/drivers/hh_ucom4.cpp @@ -877,7 +877,6 @@ static INPUT_PORTS_START( splasfgt ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END - void splasfgt_state::splasfgt(machine_config &config) { /* basic machine hardware */ diff --git a/src/mame/layout/scisys_chesstrv.lay b/src/mame/layout/scisys_chesstrv.lay index 968ff146e9f..f71a5902764 100644 --- a/src/mame/layout/scisys_chesstrv.lay +++ b/src/mame/layout/scisys_chesstrv.lay @@ -358,34 +358,34 @@ <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element> <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element> <element name="text_uib2"> - <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <rect><color red="0.7" green="0.8" blue="0.8" /></rect> <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text> </element> <element name="text_uib3"> - <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <rect><color red="0.7" green="0.8" blue="0.8" /></rect> <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text> </element> <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element> <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element> <element name="text_uih2"> - <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <rect><color red="0.7" green="0.8" blue="0.8" /></rect> <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text> </element> <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element> <element name="text_uiu2a"> - <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <rect><color red="0.7" green="0.8" blue="0.8" /></rect> <text string=" <<"><color red="0.01" green="0.01" blue="0.01" /></text> </element> <element name="text_uiu2b"> - <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <rect><color red="0.7" green="0.8" blue="0.8" /></rect> <text string=" < "><color red="0.01" green="0.01" blue="0.01" /></text> </element> <element name="text_uiu2c"> - <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <rect><color red="0.7" green="0.8" blue="0.8" /></rect> <text string=" >"><color red="0.01" green="0.01" blue="0.01" /></text> </element> <element name="text_uiu2d"> - <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <rect><color red="0.7" green="0.8" blue="0.8" /></rect> <text string=" >>"><color red="0.01" green="0.01" blue="0.01" /></text> </element> <element name="text_uiu3a" defstate="0"> @@ -402,14 +402,16 @@ <group name="sb_ui"> <bounds x="0" y="0" width="10" height="80" /> + <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel> <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel> + <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel> <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel> <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel> <!-- board --> <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel> - <bezel element="white"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel> - <bezel element="white"><bounds x="1" y="15" width="8" height="2.5" /></bezel> + <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel> + <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel> <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel> <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel> @@ -419,8 +421,8 @@ <!-- spawn --> <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel> - <bezel element="white"><bounds x="1" y="23" width="8" height="12" /></bezel> - <bezel element="white"><bounds x="1" y="36" width="8" height="12" /></bezel> + <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel> + <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel> <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel> <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel> @@ -453,16 +455,16 @@ <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel> <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel> - <bezel element="white"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel> + <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel> <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel> <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel> <!-- undo --> <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel> - <bezel element="white"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel> - <bezel element="white"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel> - <bezel element="white"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel> - <bezel element="white"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel> <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel> <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel> <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel> @@ -549,14 +551,12 @@ <!-- build screen --> <view name="Internal Layout (Full)"> - <bounds left="-5.5" right="31.775" top="-12.3" bottom="39.3" /> + <bounds left="-5" right="31.775" top="-11.8" bottom="39.3" /> - <bezel element="white"><bounds x="-5.5" y="-4.975" width="37.275" height="32.55" /></bezel> - <bezel element="blackb"><bounds x="-5.5" y="-4.5875" width="5" height="31.775" /></bezel> - <group ref="sb_board"><bounds x="0" y="-4.2" width="31" height="31" /></group> - <group ref="sb_ui"><bounds x="-5" y="-4.975" width="4.06875" height="32.55" /></group> + <group ref="sb_board"><bounds x="0" y="-3.8" width="31" height="31" /></group> + <group ref="sb_ui"><bounds x="-4.5" y="-3.8" width="3.875" height="31" /></group> - <group ref="digits"><bounds x="8" y="-11.2" width="15" height="5" /></group> + <group ref="digits"><bounds x="8" y="-10.4" width="15" height="5" /></group> <group ref="buttons"><bounds x="-1" y="28.5" width="32" height="10.1" /></group> </view> diff --git a/src/mame/machine/fidelbase.cpp b/src/mame/machine/fidelbase.cpp index e1da97c2e19..dae297109b5 100644 --- a/src/mame/machine/fidelbase.cpp +++ b/src/mame/machine/fidelbase.cpp @@ -27,9 +27,6 @@ Keypad legend: Read the official manual(s) on how to play. -Peripherals, compatible with various boards: -- Fidelity Challenger Printer - thermal printer, MCU=D8048C243 - Program/data cartridges, for various boards, some cross-compatible: - CB9: Challenger Book Openings 1 - 8KB (label not known) - CB16: Challenger Book Openings 2 - 8+8KB 101-1042A01,02 |