summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers/hh_hmcs40.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/drivers/hh_hmcs40.c')
-rw-r--r--src/mess/drivers/hh_hmcs40.c1244
1 files changed, 1143 insertions, 101 deletions
diff --git a/src/mess/drivers/hh_hmcs40.c b/src/mess/drivers/hh_hmcs40.c
index cebec56b36e..ec8755a8319 100644
--- a/src/mess/drivers/hh_hmcs40.c
+++ b/src/mess/drivers/hh_hmcs40.c
@@ -2,33 +2,38 @@
// copyright-holders:hap, Kevin Horton
/***************************************************************************
- Hitachi HMCS40 MCU tabletops/handhelds or other simple devices.
+ Hitachi HMCS40 MCU tabletops/handhelds or other simple devices,
+ most of them are VFD electronic games/toys.
known chips:
serial device etc.
----------------------------------------------------------------
- *07 HD38750A 1979, Bambino Knock-Em Out Boxing (ET-06B)
- @08 HD38750A 1979, Bambino Basketball (ET-05)
- *45 HD38750A 1981, Vtech Invaders
+ @07 HD38750A 1979, Bambino Knock-Em Out Boxing (ET-06B)
+ @08 HD38750A 1979, Bambino Dribble Away Basketball (ET-05)
+ @45 HD38750A 1981, VTech Invaders
*58 HD38750A 1982, Ludotronic(Hanzawa) Grand Prix Turbo
*62 HD38750A 1982, Actronics(Hanzawa) Pack'n Maze
- *04 HD38800A 1980, Gakken Heiankyo Alien
+ @04 HD38800A 1980, Gakken Heiankyo Alien
@25 HD38800A 1981, Coleco Alien Attack
@27 HD38800A 1981, Bandai Packri Monster
+ *31 HD38800A 1981, Entex Select-a-Game cartridge: Space Invader 2 (have dump)
*41 HD38800A 1982, Gakken Puck Monster
*51 HD38800A 1981, Actronics(Hanzawa) Twinvader
@70 HD38800A 1982, Coleco Galaxian
- @73 HD38800A 1982, Bandai(Mattel) Star Hawk
- @77 HD38800A 1982, Bandai Frisky Tom
-
+ @73 HD38800A 1982, Bandai(Mattel) Star Hawk (PT-317B)
+ @77 HD38800A 1982, Bandai Frisky Tom (PT-327A)
+ @88 HD38800A 1984, Tomy Tron (THN-02)
+
+ @01 HD38800B 1982, Gakken Crazy Kong
@23 HD38800B 1982, Tomy Kingman (THF-01II)
*24 HD38800B 1982, Actronics(Hanzawa) Wanted G-Man
*29 HD38800B 1984, Tomy Portable 6000 Bombman
*35 HD38800B 1983, Bandai Gundam vs Gelgoog Zaku
- *43 HD38800B 1983, Bandai Dokodemo Dorayaki Doraemon
+ @43 HD38800B 1983, Bandai Dokodemo Dorayaki Doraemon (PT-412)
+ @09 HD38820A 1980, Mattel World Championship Baseball
@13 HD38820A 1981, Entex Galaxian 2
@23 HD38820A 1981, Entex Pac Man 2
@28 HD38820A 1981, Coleco Pac-Man (ver 1)
@@ -40,18 +45,33 @@
@45 HD38820A 1982, Coleco Donkey Kong
@49 HD38820A 1983, Bandai Zackman
@61 HD38820A 1983, Coleco Ms. Pac-Man
+ @69 HD38820A 1983, Gakken Dig Dug
@70 HD38820A 1983, Parker Brothers Q*Bert
- @88 HD38820A 1984, Tomy Tron (THN-02)
+ @85 HD38820A 1984, Bandai Machine Man (PT-438)
(* denotes not yet emulated by MESS, @ denotes it's in this driver)
+
+ TODO:
+ - cdkong discrete sound (simple volume decay, simulated for now)
+ - cgalaxn discrete sound (alien attacking sound effect)
+ - vinvader locks up at boot
+ - gckong random lockups (tap the jump button repeatedly): mcu stack overflow,
+ works ok if stack levels is increased, 38800 B rev. has more stack levels?
+ Or it could be a race condition: irq happening too late/early.
+ - epacman booting the game in demo mode, pacman should go straight to the
+ upper-left power pill: mcu cycle/interrupt timing related
+ - Though very uncommon when compared to games with LED/lamp display,
+ some games may manipulate VFD plate brightness by strobing it longer,
+ eg. cgalaxn when the player ship explodes.
+
***************************************************************************/
#include "emu.h"
#include "cpu/hmcs40/hmcs40.h"
#include "sound/speaker.h"
-#include "hh_hmcs40_test.lh" // test-layout - use external artwork
+#include "hh_hmcs40_test.lh" // common test-layout - use external artwork
class hh_hmcs40_state : public driver_device
@@ -290,7 +310,7 @@ INPUT_CHANGED_MEMBER(hh_hmcs40_state::single_interrupt_line)
/***************************************************************************
- Bambino Basketball - Dribble Away (manufactured in Japan)
+ Bambino Dribble Away Basketball (manufactured in Japan)
* PCBs are labeled Emix Corp. ET-05
* Hitachi HD38750A08 MCU
* green VFD display Emix-106, with bezel overlay
@@ -315,7 +335,7 @@ public:
WRITE8_MEMBER(bambball_state::plate_w)
{
- // R1x-R3x, D0-D3: vfd matrix plate
+ // R1x-R3x(,D0-D3): vfd matrix plate
int shift = (offset - HMCS40_PORT_R1X) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
@@ -335,13 +355,13 @@ WRITE16_MEMBER(bambball_state::grid_w)
// D7-D15: vfd matrix grid
m_grid = data >> 7 & 0x1ff;
- // D0-D3: plates (update display there)
+ // D0-D3: more plates (update display there)
plate_w(space, 3 + HMCS40_PORT_R1X, data & 0xf);
}
READ8_MEMBER(bambball_state::input_r)
{
- // R0x: inputs
+ // R0x: multiplexed inputs
return read_inputs(4);
}
@@ -356,8 +376,8 @@ static INPUT_PORTS_START( bambball )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Shoot")
PORT_START("IN.1") // D8 port R0x
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // separate directional buttons, hence 16way
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // "
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN.2") // D9 port R0x
@@ -378,7 +398,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( bambball, bambball_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation
MCFG_HMCS40_READ_R_CB(0, READ8(bambball_state, input_r))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(bambball_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(bambball_state, plate_w))
@@ -402,6 +422,142 @@ MACHINE_CONFIG_END
/***************************************************************************
+ Bambino Knock-Em Out Boxing
+ * PCBs are labeled Emix Corp. ET-06B
+ * Hitachi HD38750A07 MCU
+ * cyan VFD display Emix-103, with blue or green color overlay
+
+ NOTE!: MESS external artwork is recommended
+
+***************************************************************************/
+
+class bmboxing_state : public hh_hmcs40_state
+{
+public:
+ bmboxing_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_hmcs40_state(mconfig, type, tag)
+ { }
+
+ void prepare_display();
+ DECLARE_WRITE8_MEMBER(plate_w);
+ DECLARE_WRITE16_MEMBER(grid_w);
+ DECLARE_READ8_MEMBER(input_r);
+};
+
+// handlers
+
+void bmboxing_state::prepare_display()
+{
+ UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8);
+ UINT32 plate = BITSWAP16(m_plate,15,14,13,12,1,2,0,3,11,4,10,7,5,6,9,8);
+ display_matrix(12, 9, plate, grid);
+}
+
+WRITE8_MEMBER(bmboxing_state::plate_w)
+{
+ // R1x-R3x: vfd matrix plate
+ int shift = (offset - HMCS40_PORT_R1X) * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+ prepare_display();
+}
+
+WRITE16_MEMBER(bmboxing_state::grid_w)
+{
+ // D13: speaker out
+ m_speaker->level_w(data >> 13 & 1);
+
+ // D9-D12: input mux
+ m_inp_mux = data >> 9 & 0xf;
+
+ // D4-D12: vfd matrix grid
+ m_grid = data >> 4 & 0x1ff;
+ prepare_display();
+}
+
+READ8_MEMBER(bmboxing_state::input_r)
+{
+ // R0x: multiplexed inputs
+ return read_inputs(4);
+}
+
+
+// config
+
+/* physical button layout and labels is like this:
+
+ * left = P2 side * * right = P1 side *
+
+ [ BACK ] [ HIGH ] (players sw) [ HIGH ] [ BACK ]
+ 1<--->2 [START/
+ [NORMAL] [MEDIUM] RESET] [MEDIUM] [NORMAL]
+ 1<---OFF--->2
+ [ DUCK ] [ LOW ] (skill lvl sw) [ LOW ] [ DUCK ]
+*/
+
+static INPUT_PORTS_START( bmboxing )
+ PORT_START("IN.0") // D9 port R0x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("P1 Punch High")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("P1 Punch Medium")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("P1 Punch Low")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("IN.1") // D10 port R0x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_NAME("P1 Position Normal")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) PORT_NAME("P1 Position Back")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("P1 Position Ducking")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("IN.2") // D11 port R0x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("P2 Punch High")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("P2 Punch Medium")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("P2 Punch Low")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("IN.3") // D12 port R0x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("P2 Position Normal")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("P2 Position Back")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("P2 Position Ducking")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("IN.4") // port D
+ PORT_CONFNAME( 0x0001, 0x0000, "Players" )
+ PORT_CONFSETTING( 0x0000, "1" )
+ PORT_CONFSETTING( 0x0001, "2" )
+ PORT_CONFNAME( 0x0002, 0x0000, "Skill Level" )
+ PORT_CONFSETTING( 0x0000, "1" )
+ PORT_CONFSETTING( 0x0002, "2" )
+ PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_START )
+ PORT_BIT( 0xfff8, IP_ACTIVE_HIGH, IPT_UNUSED )
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( bmboxing, bmboxing_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation
+ MCFG_HMCS40_READ_R_CB(0, READ8(bmboxing_state, input_r))
+ MCFG_HMCS40_WRITE_R_CB(1, WRITE8(bmboxing_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(2, WRITE8(bmboxing_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(3, WRITE8(bmboxing_state, plate_w))
+ MCFG_HMCS40_WRITE_D_CB(WRITE16(bmboxing_state, grid_w))
+ MCFG_HMCS40_READ_D_CB(IOPORT("IN.4"))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
+
+ /* no video! */
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
Bandai Frisky Tom (manufactured in Japan)
* PCBs are labeled Kaken Corp., PT-327A
* Hitachi HD38800A77 MCU
@@ -502,7 +658,7 @@ INPUT_CHANGED_MEMBER(bfriskyt_state::input_changed)
static MACHINE_CONFIG_START( bfriskyt, bfriskyt_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(bfriskyt_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(bfriskyt_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(bfriskyt_state, plate_w))
@@ -557,7 +713,7 @@ public:
WRITE8_MEMBER(packmon_state::plate_w)
{
- // R0x-R3x, D0-D3: vfd matrix plate
+ // R0x-R3x(,D0-D3): vfd matrix plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
@@ -585,7 +741,7 @@ WRITE16_MEMBER(packmon_state::grid_w)
READ16_MEMBER(packmon_state::input_r)
{
// D5: multiplexed inputs
- return read_inputs(5);
+ return read_inputs(5) & 0x20;
}
@@ -611,7 +767,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( packmon, packmon_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(packmon_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(packmon_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(packmon_state, plate_w))
@@ -636,11 +792,11 @@ MACHINE_CONFIG_END
/***************************************************************************
- Bandai(Mattel) Star Hawk (manufactured in Japan)
+ Bandai/Mattel Star Hawk (manufactured in Japan)
* PCBs are labeled Kaken, PT-317B
* Hitachi HD38800A73 MCU
- * cyan/red VFD display Futaba DM-41ZK, with partial color overlay
-
+ * cyan/red VFD display Futaba DM-41ZK, with partial color overlay + bezel
+
Kaken was a subsidiary of Bandai. The original Japanese release is unknown,
was it canceled and only released in the USA?
@@ -746,7 +902,7 @@ INPUT_CHANGED_MEMBER(msthawk_state::input_changed)
static MACHINE_CONFIG_START( msthawk, msthawk_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(msthawk_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(msthawk_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(msthawk_state, plate_w))
@@ -771,7 +927,7 @@ MACHINE_CONFIG_END
/***************************************************************************
Bandai Zackman "The Pit, FL Exploration of Space" (manufactured in Japan)
- * Hitachi HD38820A49 MCU
+ * Hitachi QFP HD38820A49 MCU
* cyan/red/yellow VFD display Futaba DM-53Z 3E, with color overlay
NOTE!: MESS external artwork is recommended
@@ -796,7 +952,7 @@ public:
WRITE8_MEMBER(zackman_state::plate_w)
{
- // R0x-R6x,D0,D1: vfd matrix plate
+ // R0x-R6x(,D0,D1): vfd matrix plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
@@ -861,7 +1017,7 @@ INPUT_CHANGED_MEMBER(zackman_state::input_changed)
static MACHINE_CONFIG_START( zackman, zackman_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(zackman_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(zackman_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(zackman_state, plate_w))
@@ -888,10 +1044,197 @@ MACHINE_CONFIG_END
/***************************************************************************
+ Bandai Dokodemo Dorayaki Doraemon (FL LSI Game Push Up) (manufactured in Japan)
+ * PCB label Kaken Corp PT-412 FL-Doreamon(in katakana)
+ * Hitachi HD38800B43 MCU
+ * cyan/red/blue VFD display Futaba DM-71
+
+ NOTE!: MESS external artwork is recommended
+
+***************************************************************************/
+
+class bdoramon_state : public hh_hmcs40_state
+{
+public:
+ bdoramon_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_hmcs40_state(mconfig, type, tag)
+ { }
+
+ DECLARE_WRITE8_MEMBER(plate_w);
+ DECLARE_WRITE16_MEMBER(grid_w);
+};
+
+// handlers
+
+WRITE8_MEMBER(bdoramon_state::plate_w)
+{
+ // R0x-R3x(,D0-D3): vfd matrix plate
+ int shift = offset * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+
+ // update display
+ UINT8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,7,6);
+ UINT32 plate = BITSWAP24(m_plate,23,22,21,20,11,19,18,17,16,15,14,13,12,10,9,8,7,6,5,4,3,2,1,0);
+ display_matrix(19, 8, plate, grid);
+}
+
+WRITE16_MEMBER(bdoramon_state::grid_w)
+{
+ // D7: speaker out
+ m_speaker->level_w(data >> 7 & 1);
+
+ // D8-D15: vfd matrix grid
+ m_grid = data >> 8 & 0xff;
+
+ // D0-D3: plate 15-18 (update display there)
+ plate_w(space, 4, data & 0xf);
+}
+
+
+// config
+
+static INPUT_PORTS_START( bdoramon )
+ PORT_START("IN.0") // INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+
+ PORT_START("IN.1") // INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1)
+
+ PORT_START("IN.2") // port D
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
+ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
+ PORT_BIT( 0xff8f, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("IN.3") // port R2x
+ PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_CONFNAME( 0x08, 0x00, "Factory Test" )
+ PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
+ PORT_CONFSETTING( 0x08, DEF_STR( On ) )
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( bdoramon, bdoramon_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
+ MCFG_HMCS40_WRITE_R_CB(0, WRITE8(bdoramon_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(1, WRITE8(bdoramon_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(2, WRITE8(bdoramon_state, plate_w))
+ MCFG_HMCS40_READ_R_CB(2, IOPORT("IN.3"))
+ MCFG_HMCS40_WRITE_R_CB(3, WRITE8(bdoramon_state, plate_w))
+ MCFG_HMCS40_WRITE_D_CB(WRITE16(bdoramon_state, grid_w))
+ MCFG_HMCS40_READ_D_CB(IOPORT("IN.2"))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
+
+ /* no video! */
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
+ Bandai Machine Man (FL Flat Type) (manufactured in Japan)
+ * PCB label Kaken PT-438
+ * Hitachi QFP HD38820A85 MCU
+ * cyan/red/green VFD display NEC FIP5CM33T no. 4 21
+
+ NOTE!: MESS external artwork is recommended
+
+***************************************************************************/
+
+class machiman_state : public hh_hmcs40_state
+{
+public:
+ machiman_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_hmcs40_state(mconfig, type, tag)
+ { }
+
+ void prepare_display();
+ DECLARE_WRITE8_MEMBER(plate_w);
+ DECLARE_WRITE16_MEMBER(grid_w);
+};
+
+// handlers
+
+void machiman_state::prepare_display()
+{
+ UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);
+ display_matrix(19, 5, plate, m_grid);
+}
+
+WRITE8_MEMBER(machiman_state::plate_w)
+{
+ // R0x-R3x,R6012: vfd matrix plate
+ int shift = (offset == HMCS40_PORT_R6X) ? 16 : offset * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+ prepare_display();
+}
+
+WRITE16_MEMBER(machiman_state::grid_w)
+{
+ // D13: speaker out
+ m_speaker->level_w(data >> 13 & 1);
+
+ // D0-D4: vfd matrix grid
+ m_grid = data & 0x1f;
+ prepare_display();
+}
+
+
+// config
+
+static INPUT_PORTS_START( machiman )
+ PORT_START("IN.0") // INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+
+ PORT_START("IN.1") // port D
+ PORT_BIT( 0x3fff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( machiman, machiman_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
+ MCFG_HMCS40_WRITE_R_CB(0, WRITE8(machiman_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(1, WRITE8(machiman_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(2, WRITE8(machiman_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(3, WRITE8(machiman_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(6, WRITE8(machiman_state, plate_w))
+ MCFG_HMCS40_WRITE_D_CB(WRITE16(machiman_state, grid_w))
+ MCFG_HMCS40_READ_D_CB(IOPORT("IN.1"))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
+
+ /* no video! */
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
Coleco Alien Attack (manufactured in Taiwan)
* Hitachi HD38800A25 MCU
* cyan/red VFD display Futaba DM-19Z 1J
-
+
It looks like Coleco took Gakken's Heiankyo Alien and turned it into a more
action-oriented game.
@@ -915,12 +1258,12 @@ public:
WRITE8_MEMBER(alnattck_state::plate_w)
{
- // R0x-R3x, D0-D3: vfd matrix plate
+ // R0x-R3x(,D0-D3): vfd matrix plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
// update display
- UINT32 plate = BITSWAP16(m_plate,11,9,8,10,7,2,0,1,3,4,5,6,12,13,14,15) | (m_plate & 0xf0000);
+ UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,16,11,9,8,10,7,2,0,1,3,4,5,6,12,13,14,15);
display_matrix(20, 10, plate, m_grid);
}
@@ -942,14 +1285,14 @@ WRITE16_MEMBER(alnattck_state::grid_w)
READ16_MEMBER(alnattck_state::input_r)
{
// D5: multiplexed inputs
- return read_inputs(7);
+ return read_inputs(7) & 0x20;
}
// config
static INPUT_PORTS_START( alnattck )
- PORT_START("IN.0") // D5 D7
+ PORT_START("IN.0") // D7 line D5
PORT_CONFNAME( 0x20, 0x00, "Skill Level" )
PORT_CONFSETTING( 0x00, "1" )
PORT_CONFSETTING( 0x20, "2" )
@@ -967,16 +1310,16 @@ static INPUT_PORTS_START( alnattck )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
PORT_START("IN.5") // D12 line D5
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Move")
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Move")
PORT_START("IN.6") // D13 line D5
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Fire")
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Fire")
INPUT_PORTS_END
static MACHINE_CONFIG_START( alnattck, alnattck_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(alnattck_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(alnattck_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(alnattck_state, plate_w))
@@ -1003,7 +1346,7 @@ MACHINE_CONFIG_END
Coleco Donkey Kong (manufactured in Taiwan)
* PCB label Coleco Rev C 75790 DK
- * Hitachi HD38820A45 MCU
+ * Hitachi QFP HD38820A45 MCU
* cyan/red VFD display Futaba DM-47ZK 2K, with color overlay
NOTE!: MESS external artwork is recommended
@@ -1076,15 +1419,15 @@ WRITE16_MEMBER(cdkong_state::grid_w)
// config
static INPUT_PORTS_START( cdkong )
- PORT_START("IN.0") // port D
+ PORT_START("IN.0") // INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+
+ PORT_START("IN.1") // port D
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
- PORT_BIT( 0x7ff8, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
-
- PORT_START("IN.1") // INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+ PORT_BIT( 0x7ff8, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
@@ -1100,7 +1443,7 @@ void cdkong_state::machine_start()
static MACHINE_CONFIG_START( cdkong, cdkong_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(cdkong_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(cdkong_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(cdkong_state, plate_w))
@@ -1109,7 +1452,7 @@ static MACHINE_CONFIG_START( cdkong, cdkong_state )
MCFG_HMCS40_WRITE_R_CB(5, WRITE8(cdkong_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(6, WRITE8(cdkong_state, plate_w))
MCFG_HMCS40_WRITE_D_CB(WRITE16(cdkong_state, grid_w))
- MCFG_HMCS40_READ_D_CB(IOPORT("IN.0"))
+ MCFG_HMCS40_READ_D_CB(IOPORT("IN.1"))
MCFG_TIMER_DRIVER_ADD_PERIODIC("speaker_decay", cdkong_state, speaker_decay_sim, attotime::from_msec(CDKONG_SPEAKER_DECAY))
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
@@ -1152,9 +1495,11 @@ public:
{ }
void prepare_display();
- DECLARE_WRITE16_MEMBER(plate_w);
DECLARE_WRITE8_MEMBER(grid_w);
+ DECLARE_WRITE16_MEMBER(plate_w);
DECLARE_READ8_MEMBER(input_r);
+
+ DECLARE_INPUT_CHANGED_MEMBER(player_switch);
};
// handlers
@@ -1162,24 +1507,12 @@ public:
void cgalaxn_state::prepare_display()
{
UINT16 grid = BITSWAP16(m_grid,15,14,13,12,1,2,0,11,10,9,8,7,6,5,4,3);
- UINT16 plate = BITSWAP16(m_plate,15,14,5,4,3,2,1,0,7,11,12,9,8,10,6,13);
- display_matrix(14, 12, plate, grid);
+ UINT16 plate = BITSWAP16(m_plate,15,14,6,5,4,3,2,1,7,8,9,10,11,0,12,13);
+ display_matrix(15, 12, plate, grid);
}
WRITE8_MEMBER(cgalaxn_state::grid_w)
{
- // D0: speaker out
- m_speaker->level_w(data & 1);
-
- // D1: speaker on?
-
- // D2-D15: vfd matrix plate
- m_plate = data >> 2 & 0x3fff;
- prepare_display();
-}
-
-WRITE16_MEMBER(cgalaxn_state::plate_w)
-{
// R10,R11: input mux
if (offset == HMCS40_PORT_R1X)
m_inp_mux = data & 3;
@@ -1190,6 +1523,18 @@ WRITE16_MEMBER(cgalaxn_state::plate_w)
prepare_display();
}
+WRITE16_MEMBER(cgalaxn_state::plate_w)
+{
+ // D0: speaker out
+ m_speaker->level_w(data & 1);
+
+ // D1: start alien attack whine sound effect (edge triggered)
+
+ // D2-D15: vfd matrix plate
+ m_plate = (m_plate & 0x4000) | (data >> 2 & 0x3fff);
+ prepare_display();
+}
+
READ8_MEMBER(cgalaxn_state::input_r)
{
// R0x: multiplexed inputs
@@ -1207,7 +1552,7 @@ static INPUT_PORTS_START( cgalaxn )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
PORT_START("IN.1") // R11 port R0x
- PORT_CONFNAME( 0x01, 0x01, "Players" )
+ PORT_CONFNAME( 0x01, 0x01, "Players" ) PORT_CHANGED_MEMBER(DEVICE_SELF, cgalaxn_state, player_switch, NULL)
PORT_CONFSETTING( 0x01, "1" )
PORT_CONFSETTING( 0x00, "2" )
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
@@ -1219,10 +1564,17 @@ static INPUT_PORTS_START( cgalaxn )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1)
INPUT_PORTS_END
+INPUT_CHANGED_MEMBER(cgalaxn_state::player_switch)
+{
+ // 2-player switch directly enables plate 14
+ m_plate = (m_plate & 0x3fff) | (newval ? 0 : 0x4000);
+}
+
+
static MACHINE_CONFIG_START( cgalaxn, cgalaxn_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
MCFG_HMCS40_READ_R_CB(0, READ8(cgalaxn_state, input_r))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(cgalaxn_state, grid_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(cgalaxn_state, grid_w))
@@ -1248,7 +1600,7 @@ MACHINE_CONFIG_END
Coleco Pac-Man (manufactured in Taiwan)
* PCB label Coleco 75690
- * Hitachi HD38820A28/29 MCU
+ * Hitachi QFP HD38820A28/29 MCU
* cyan/red VFD display Futaba DM-34Z 2A, with color overlay
known releases:
@@ -1283,7 +1635,7 @@ public:
WRITE8_MEMBER(cpacman_state::plate_w)
{
- // R1x-R6x, D1,D2: vfd matrix plate
+ // R1x-R6x(,D1,D2): vfd matrix plate
int shift = (offset - HMCS40_PORT_R1X) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
@@ -1340,7 +1692,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( cpacman, cpacman_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
MCFG_HMCS40_READ_R_CB(0, READ8(cpacman_state, input_r))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(cpacman_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(cpacman_state, plate_w))
@@ -1369,7 +1721,7 @@ MACHINE_CONFIG_END
Coleco Ms. Pac-Man (manufactured in Taiwan)
* PCB label Coleco 911171
- * Hitachi HD38820A61 MCU
+ * Hitachi QFP HD38820A61 MCU
* cyan/red VFD display Futaba DM-60Z 3I, with color overlay
Select game mode on start:
@@ -1399,7 +1751,7 @@ public:
WRITE8_MEMBER(cmspacmn_state::plate_w)
{
- // R1x-R6x, D0,D1: vfd matrix plate
+ // R1x-R6x(,D0,D1): vfd matrix plate
int shift = (offset - HMCS40_PORT_R1X) * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
@@ -1420,7 +1772,7 @@ WRITE16_MEMBER(cmspacmn_state::grid_w)
// D5-D15: vfd matrix grid
m_grid = data >> 5 & 0x7ff;
- // D0,D1: plate 11+17,6+22 (update display there)
+ // D0,D1: more plates (update display there)
plate_w(space, 6 + HMCS40_PORT_R1X, data & 3);
}
@@ -1456,7 +1808,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( cmspacmn, cmspacmn_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
MCFG_HMCS40_READ_R_CB(0, READ8(cmspacmn_state, input_r))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(cmspacmn_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(cmspacmn_state, plate_w))
@@ -1484,7 +1836,8 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex Galaxian 2 (manufactured in Japan)
- * Hitachi HD38820A13 MCU
+ * PCB labels ENTEX GALAXIAN PB-118/116/097 80-210137/135/114
+ * Hitachi QFP HD38820A13 MCU
* cyan/red/green VFD display Futaba DM-20
NOTE!: MESS external artwork is recommended
@@ -1546,15 +1899,15 @@ READ8_MEMBER(egalaxn2_state::input_r)
static INPUT_PORTS_START( egalaxn2 )
PORT_START("IN.0") // D1 port R0x
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // separate directional buttons, hence 16way
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // "
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY
PORT_START("IN.1") // D2 port R0x
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY // separate directional buttons, hence 16way
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY // "
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY // "
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY // "
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY
PORT_START("IN.2") // D3 port R0x
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
@@ -1577,7 +1930,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( egalaxn2, egalaxn2_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
MCFG_HMCS40_READ_R_CB(0, READ8(egalaxn2_state, input_r))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(egalaxn2_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(egalaxn2_state, plate_w))
@@ -1605,8 +1958,11 @@ MACHINE_CONFIG_END
/***************************************************************************
Entex Pac Man 2 (manufactured in Japan)
- * Hitachi HD38820A23 MCU
- * cyan/red VFD display Futaba DM-28Z 1G
+ * PCB labels ENTEX PAC-MAN PB-093/094 80-210149/50/51
+ * Hitachi QFP HD38820A23 MCU
+ * cyan/red VFD display Futaba DM-28Z 1G(cyan Pac-Man) or DM-28 1K(orange Pac-Man)
+
+ 2 VFD revisions are known, the difference is Pac-Man's color: cyan or red.
NOTE!: MESS external artwork is recommended
@@ -1626,16 +1982,16 @@ public:
static INPUT_PORTS_START( epacman2 )
PORT_START("IN.0") // D1 port R0x
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY // separate directional buttons, hence 16way
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // "
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY // "
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // "
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY
PORT_START("IN.1") // D2 port R0x
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY // separate directional buttons, hence 16way
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY // "
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY // "
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY // "
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY
PORT_START("IN.2") // D3 port R0x
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P1 Skill Control")
@@ -1657,7 +2013,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( epacman2, epacman2_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
MCFG_HMCS40_READ_R_CB(0, READ8(egalaxn2_state, input_r))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(egalaxn2_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(egalaxn2_state, plate_w))
@@ -1684,8 +2040,534 @@ MACHINE_CONFIG_END
/***************************************************************************
+ Gakken Heiankyo Alien (manufactured in Japan)
+ * Hitachi HD38800A04 MCU
+ * cyan/red VFD display Futaba DM-11Z 1H
+
+ known releases:
+ - Japan: Heiankyo Alien
+ - USA: Earth Invaders, published by CGL
+
+ NOTE!: MESS external artwork is recommended
+
+***************************************************************************/
+
+class ghalien_state : public hh_hmcs40_state
+{
+public:
+ ghalien_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_hmcs40_state(mconfig, type, tag)
+ { }
+
+ DECLARE_WRITE8_MEMBER(plate_w);
+ DECLARE_WRITE16_MEMBER(grid_w);
+ DECLARE_READ16_MEMBER(input_r);
+};
+
+// handlers
+
+WRITE8_MEMBER(ghalien_state::plate_w)
+{
+ // R0x-R3x(,D10-D13): vfd matrix plate
+ int shift = offset * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+
+ // update display
+ UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9);
+ UINT32 plate = BITSWAP24(m_plate,23,22,21,20,14,12,10,8,9,13,15,2,0,1,3,11,7,5,4,6,19,17,16,18);
+ display_matrix(20, 10, plate, grid);
+}
+
+WRITE16_MEMBER(ghalien_state::grid_w)
+{
+ // D14: speaker out
+ m_speaker->level_w(data >> 14 & 1);
+
+ // D0-D6: input mux
+ m_inp_mux = data & 0x7f;
+
+ // D0-D9: vfd matrix grid
+ m_grid = data & 0x3ff;
+
+ // D10-D13: more plates (update display there)
+ plate_w(space, 4, data >> 10 & 0xf);
+}
+
+READ16_MEMBER(ghalien_state::input_r)
+{
+ // D15: multiplexed inputs
+ return read_inputs(7) & 0x8000;
+}
+
+
+// config
+
+static INPUT_PORTS_START( ghalien )
+ PORT_START("IN.0") // D0 line D15
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY
+
+ PORT_START("IN.1") // D1 line D15
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY
+
+ PORT_START("IN.2") // D2 line D15
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY
+
+ PORT_START("IN.3") // D3 line D15
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY
+
+ PORT_START("IN.4") // D4 line D15
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Dig")
+
+ PORT_START("IN.5") // D5 line D15
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Bury")
+
+ PORT_START("IN.6") // D6 line D15
+ PORT_CONFNAME( 0x8000, 0x0000, DEF_STR( Difficulty ) )
+ PORT_CONFSETTING( 0x0000, "Amateur" )
+ PORT_CONFSETTING( 0x8000, "Professional" )
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( ghalien, ghalien_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
+ MCFG_HMCS40_WRITE_R_CB(0, WRITE8(ghalien_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(1, WRITE8(ghalien_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(2, WRITE8(ghalien_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(3, WRITE8(ghalien_state, plate_w))
+ MCFG_HMCS40_WRITE_D_CB(WRITE16(ghalien_state, grid_w))
+ MCFG_HMCS40_READ_D_CB(READ16(ghalien_state, input_r))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
+
+ /* no video! */
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
+ Gakken Crazy Kong (manufactured in Japan)
+ * PCB label ZENY 5603601
+ * Hitachi HD38800B01 MCU
+ * cyan/red/blue VFD display Futaba DM-54Z 2H, with bezel overlay
+
+ known releases:
+ - Japan: Crazy Kong
+ - USA: Super Kong, published by CGL
+
+ NOTE!: MESS external artwork is recommended
+
+***************************************************************************/
+
+class gckong_state : public hh_hmcs40_state
+{
+public:
+ gckong_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_hmcs40_state(mconfig, type, tag)
+ { }
+
+ DECLARE_WRITE8_MEMBER(plate_w);
+ DECLARE_WRITE16_MEMBER(grid_w);
+
+ void update_int1();
+ DECLARE_INPUT_CHANGED_MEMBER(input_changed);
+};
+
+// handlers
+
+WRITE8_MEMBER(gckong_state::plate_w)
+{
+ // R0x-R3x(,D0,D1): vfd matrix plate
+ int shift = offset * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+
+ // update display
+ UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,0,1,2,3,4,5,6,7,8,9,10);
+ UINT32 plate = BITSWAP32(m_plate,31,30,29,28,27,26,25,6,7,8,12,13,14,15,16,17,18,17,16,12,11,10,9,8,7,6,5,4,3,2,1,0);
+ display_matrix(32, 11, plate, grid);
+}
+
+WRITE16_MEMBER(gckong_state::grid_w)
+{
+ // D2: speaker out
+ m_speaker->level_w(data >> 2 & 1);
+
+ // D5-D8: input mux
+ UINT8 inp_mux = data >> 5 & 0xf;
+ if (inp_mux != m_inp_mux)
+ {
+ m_inp_mux = inp_mux;
+ update_int1();
+ }
+
+ // D5-D15: vfd matrix grid
+ m_grid = data >> 5 & 0x7ff;
+
+ // D0,D1: more plates (update display there)
+ plate_w(space, 4, data & 3);
+}
+
+void gckong_state::update_int1()
+{
+ // INT1 on multiplexed inputs
+ set_interrupt(1, read_inputs(4));
+}
+
+
+// config
+
+static INPUT_PORTS_START( gckong )
+ PORT_START("IN.0") // D5 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL)
+
+ PORT_START("IN.1") // D6 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL)
+
+ PORT_START("IN.2") // D7 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL)
+
+ PORT_START("IN.3") // D8 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL)
+
+ PORT_START("IN.4") // INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+
+ PORT_START("IN.5") // port D
+ PORT_CONFNAME( 0x0010, 0x0000, "Skill Level" )
+ PORT_CONFSETTING( 0x0000, "A" )
+ PORT_CONFSETTING( 0x0010, "B" )
+ PORT_BIT( 0xffef, IP_ACTIVE_HIGH, IPT_UNUSED )
+INPUT_PORTS_END
+
+INPUT_CHANGED_MEMBER(gckong_state::input_changed)
+{
+ update_int1();
+}
+
+
+static MACHINE_CONFIG_START( gckong, gckong_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
+ MCFG_HMCS40_WRITE_R_CB(0, WRITE8(gckong_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(1, WRITE8(gckong_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(2, WRITE8(gckong_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(3, WRITE8(gckong_state, plate_w))
+ MCFG_HMCS40_WRITE_D_CB(WRITE16(gckong_state, grid_w))
+ MCFG_HMCS40_READ_D_CB(IOPORT("IN.5"))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
+
+ /* no video! */
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
+ Gakken Dig Dug (manufactured in Japan)
+ * PCB label Gakken DIG-DAG KS-004283(A/B)
+ * Hitachi QFP HD38820A69 MCU
+ * cyan/red/green VFD display Futaba DM-69Z 3F, with color overlay
+
+ NOTE!: MESS external artwork is recommended
+
+***************************************************************************/
+
+class gdigdug_state : public hh_hmcs40_state
+{
+public:
+ gdigdug_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_hmcs40_state(mconfig, type, tag)
+ { }
+
+ DECLARE_WRITE8_MEMBER(plate_w);
+ DECLARE_WRITE16_MEMBER(grid_w);
+
+ void update_int1();
+ DECLARE_INPUT_CHANGED_MEMBER(input_changed);
+};
+
+// handlers
+
+WRITE8_MEMBER(gdigdug_state::plate_w)
+{
+ // R0x-R6x(,D0-D3): vfd matrix plate
+ int shift = offset * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+
+ // update display
+ UINT32 plate = BITSWAP32(m_plate,30,31,0,1,2,3,4,5,6,7,20,21,22,27,26,25,28,29,24,23,15,14,13,12,8,9,10,11,19,18,17,16);
+ display_matrix(32, 9, plate, m_grid);
+}
+
+WRITE16_MEMBER(gdigdug_state::grid_w)
+{
+ // D6: speaker out
+ m_speaker->level_w(data >> 6 & 1);
+
+ // D11-D15: input mux
+ UINT8 inp_mux = data >> 11 & 0x1f;
+ if (inp_mux != m_inp_mux)
+ {
+ m_inp_mux = inp_mux;
+ update_int1();
+ }
+
+ // D7-D15: vfd matrix grid
+ m_grid = data >> 7 & 0x1ff;
+
+ // D0-D3: more plates (update display there)
+ plate_w(space, 7, data & 0xf);
+}
+
+void gdigdug_state::update_int1()
+{
+ // INT1 on multiplexed inputs
+ set_interrupt(1, read_inputs(5));
+}
+
+
+// config
+
+static INPUT_PORTS_START( gdigdug )
+ PORT_START("IN.0") // D11 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+
+ PORT_START("IN.1") // D12 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+
+ PORT_START("IN.2") // D13 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+
+ PORT_START("IN.3") // D14 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+
+ PORT_START("IN.4") // D15 INT1
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
+
+ PORT_START("IN.5") // INT0
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+INPUT_PORTS_END
+
+INPUT_CHANGED_MEMBER(gdigdug_state::input_changed)
+{
+ update_int1();
+}
+
+
+static MACHINE_CONFIG_START( gdigdug, gdigdug_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
+ MCFG_HMCS40_WRITE_R_CB(0, WRITE8(gdigdug_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(1, WRITE8(gdigdug_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(2, WRITE8(gdigdug_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(3, WRITE8(gdigdug_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(4, WRITE8(gdigdug_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(5, WRITE8(gdigdug_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(6, WRITE8(gdigdug_state, plate_w))
+ MCFG_HMCS40_WRITE_D_CB(WRITE16(gdigdug_state, grid_w))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
+
+ /* no video! */
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
+ Mattel World Championship Baseball
+ * PCB label MEL-001 Baseball Rev. B
+ * Hitachi QFP HD38820A09 MCU
+ * cyan/red/green VFD display Futaba DM-24ZK 1G, with etched overlay
+
+ To start the game in 2-player mode, simply turn the game on. For 1-player,
+ turn the game on while holding the 1-key and use the visitor's side keypad
+ to play offsense.
+
+ NOTE!: MESS external artwork is recommended
+
+***************************************************************************/
+
+class mwcbaseb_state : public hh_hmcs40_state
+{
+public:
+ mwcbaseb_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_hmcs40_state(mconfig, type, tag)
+ { }
+
+ void prepare_display();
+ DECLARE_WRITE8_MEMBER(plate_w);
+ DECLARE_WRITE16_MEMBER(grid_w);
+ DECLARE_WRITE8_MEMBER(speaker_w);
+ DECLARE_READ8_MEMBER(input_r);
+};
+
+// handlers
+
+void mwcbaseb_state::prepare_display()
+{
+ UINT8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7);
+ display_matrix(16, 8, m_plate, grid);
+}
+
+WRITE8_MEMBER(mwcbaseb_state::plate_w)
+{
+ // R1x-R3x,R6x: vfd matrix plate
+ int shift = (offset == HMCS40_PORT_R6X) ? 12 : (offset - HMCS40_PORT_R1X) * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+ prepare_display();
+}
+
+WRITE16_MEMBER(mwcbaseb_state::grid_w)
+{
+ // D9-D15: input mux
+ m_inp_mux = data >> 9 & 0x7f;
+
+ // D0-D7: vfd matrix grid
+ m_grid = data & 0xff;
+ prepare_display();
+}
+
+WRITE8_MEMBER(mwcbaseb_state::speaker_w)
+{
+ // R50,R51+R52(tied together): speaker out
+ m_speaker->level_w(data & 7);
+}
+
+READ8_MEMBER(mwcbaseb_state::input_r)
+{
+ // R4x: multiplexed inputs
+ return read_inputs(7);
+}
+
+
+// config
+
+/* physical button layout and labels is like this:
+
+ (visitor team side) (home team side)
+ COMP PITCH [SCORE] [INNING]
+ [1] [2] [3] [1] [2] [3]
+ NEW PITCHER PINCH HITTER NEW PITCHER PINCH HITTER
+
+ [4] [5] [6] [4] [5] [6]
+ BACKWARD (pitch) FORWARD BACKWARD (pitch) FORWARD
+
+ [7] [8] [9] [7] [8] [9]
+
+ BUNT NORMAL HR SWING BUNT NORMAL HR SWING
+ [CLEAR] [0] [ENTER] [CLEAR] [0] [ENTER]
+ SLOW CURVE FAST SLOW CURVE FAST
+*/
+
+static INPUT_PORTS_START( mwcbaseb )
+ PORT_START("IN.0") // D9 port R4x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) PORT_NAME("P2 4") // note: P1 = left/visitor, P2 = right/home
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_NAME("P2 3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_NAME("P2 2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_NAME("P2 1")
+
+ PORT_START("IN.1") // D10 port R4x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("P2 8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) PORT_NAME("P2 7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) PORT_NAME("P2 6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("P2 5")
+
+ PORT_START("IN.2") // D11 port R4x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("P2 Enter")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_NAME("P2 Clear")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("P2 0")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_NAME("P2 9")
+
+ PORT_START("IN.3") // D12 port R4x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Inning")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("Score")
+
+ PORT_START("IN.4") // D13 port R4x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("P1 Enter")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("P1 Clear")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("P1 0")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("P1 9")
+
+ PORT_START("IN.5") // D14 port R4x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("P1 8")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("P1 7")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("P1 6")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("P1 5")
+
+ PORT_START("IN.6") // D15 port R4x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("P1 4")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("P1 3")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("P1 2")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("P1 1")
+INPUT_PORTS_END
+
+
+static const INT16 mwcbaseb_speaker_levels[] = { 0, 16384, -16384, 0, -16384, 0, -32768, -16384 };
+
+static MACHINE_CONFIG_START( mwcbaseb, mwcbaseb_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
+ MCFG_HMCS40_WRITE_R_CB(1, WRITE8(mwcbaseb_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(2, WRITE8(mwcbaseb_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(3, WRITE8(mwcbaseb_state, plate_w))
+ MCFG_HMCS40_READ_R_CB(4, READ8(mwcbaseb_state, input_r))
+ MCFG_HMCS40_WRITE_R_CB(5, WRITE8(mwcbaseb_state, speaker_w))
+ MCFG_HMCS40_WRITE_R_CB(6, WRITE8(mwcbaseb_state, plate_w))
+ MCFG_HMCS40_WRITE_D_CB(WRITE16(mwcbaseb_state, grid_w))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
+
+ /* no video! */
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SPEAKER_LEVELS(8, mwcbaseb_speaker_levels)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
Parker Brothers Q*Bert
- * Hitachi HD38820A70 MCU
+ * PCB label 13662 REV-4
+ * Hitachi QFP HD38820A70 MCU
* cyan/red/green/darkgreen VFD display Itron CP5137
NOTE!: MESS external artwork is recommended
@@ -1707,7 +2589,7 @@ public:
WRITE8_MEMBER(pbqbert_state::plate_w)
{
- // R0x-R6x,D8: vfd matrix plate
+ // R0x-R6x(,D8): vfd matrix plate
int shift = offset * 4;
m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
@@ -1743,7 +2625,7 @@ INPUT_PORTS_END
static MACHINE_CONFIG_START( pbqbert, pbqbert_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(pbqbert_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(pbqbert_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(pbqbert_state, plate_w))
@@ -1868,7 +2750,7 @@ INPUT_CHANGED_MEMBER(kingman_state::input_changed)
static MACHINE_CONFIG_START( kingman, kingman_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(kingman_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(kingman_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(kingman_state, plate_w))
@@ -1965,16 +2847,16 @@ void tmtron_state::update_int1()
static INPUT_PORTS_START( tmtron )
PORT_START("IN.0") // D12 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_16WAY // separate directional buttons, hence 16way
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL)
PORT_START("IN.1") // D13 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_16WAY // "
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL)
PORT_START("IN.2") // D14 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_16WAY // "
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL)
PORT_START("IN.3") // D15 INT1
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_16WAY // "
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL)
PORT_START("IN.4") // INT0
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
@@ -1989,7 +2871,7 @@ INPUT_CHANGED_MEMBER(tmtron_state::input_changed)
static MACHINE_CONFIG_START( tmtron, tmtron_state )
/* basic machine hardware */
- MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc.
+ MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation
MCFG_HMCS40_WRITE_R_CB(0, WRITE8(tmtron_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(1, WRITE8(tmtron_state, plate_w))
MCFG_HMCS40_WRITE_R_CB(2, WRITE8(tmtron_state, plate_w))
@@ -2013,6 +2895,100 @@ MACHINE_CONFIG_END
/***************************************************************************
+ VTech Invaders (manufactured in Taiwan)
+ * Hitachi HD38750A45 MCU
+ * cyan/red VFD display Futaba DM-26Z 1G, with bezel
+
+ known releases:
+ - USA: Invaders/Sonic Invader
+ - UK: Cosmic Invader, published by Grandstand
+ - UK: Galactic Invaders, published by Prinztronic
+
+ NOTE!: MESS external artwork is recommended
+
+***************************************************************************/
+
+class vinvader_state : public hh_hmcs40_state
+{
+public:
+ vinvader_state(const machine_config &mconfig, device_type type, const char *tag)
+ : hh_hmcs40_state(mconfig, type, tag)
+ { }
+
+ DECLARE_WRITE8_MEMBER(plate_w);
+ DECLARE_WRITE16_MEMBER(grid_w);
+};
+
+// handlers
+
+WRITE8_MEMBER(vinvader_state::plate_w)
+{
+ // R1x-R3x(,D4-D6): vfd matrix plate
+ int shift = (offset - HMCS40_PORT_R1X) * 4;
+ m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
+
+ // update display
+ UINT16 plate = BITSWAP16(m_plate,15,11,7,3,10,6,14,2,9,5,13,1,8,4,12,0);
+ display_matrix(12, 9, plate, m_grid);
+}
+
+WRITE16_MEMBER(vinvader_state::grid_w)
+{
+ // D0: speaker out
+ m_speaker->level_w(data & 1);
+
+ // D7-D15: vfd matrix grid
+ m_grid = data >> 7 & 0x1ff;
+
+ // D4-D6: more plates (update display there)
+ plate_w(space, 3 + HMCS40_PORT_R1X, data >> 4 & 7);
+}
+
+
+// config
+
+static INPUT_PORTS_START( vinvader )
+ PORT_START("IN.0") // port R0x
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
+ PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
+
+ PORT_START("IN.1") // port D
+ PORT_CONFNAME( 0x0002, 0x0000, "Skill Level")
+ PORT_CONFSETTING( 0x0000, "1" )
+ PORT_CONFSETTING( 0x0002, "2" )
+ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0xfff5, IP_ACTIVE_HIGH, IPT_UNUSED )
+INPUT_PORTS_END
+
+static MACHINE_CONFIG_START( vinvader, vinvader_state )
+
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation
+ MCFG_HMCS40_READ_R_CB(0, IOPORT("IN.0"))
+ MCFG_HMCS40_WRITE_R_CB(1, WRITE8(vinvader_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(2, WRITE8(vinvader_state, plate_w))
+ MCFG_HMCS40_WRITE_R_CB(3, WRITE8(vinvader_state, plate_w))
+ MCFG_HMCS40_WRITE_D_CB(WRITE16(vinvader_state, grid_w))
+ MCFG_HMCS40_READ_D_CB(IOPORT("IN.1"))
+
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1))
+ MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test)
+
+ /* no video! */
+
+ /* sound hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+MACHINE_CONFIG_END
+
+
+
+
+
+/***************************************************************************
+
Game driver(s)
***************************************************************************/
@@ -2024,6 +3000,13 @@ ROM_START( bambball )
ROM_END
+ROM_START( bmboxing )
+ ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd38750a07", 0x0000, 0x0800, CRC(7f33e259) SHA1(c5fcdd6bf060c96666354f09f0570c754f6ed4e0) )
+ ROM_CONTINUE( 0x0f00, 0x0080 )
+ROM_END
+
+
ROM_START( bfriskyt )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800a77", 0x0000, 0x1000, CRC(a2445c4f) SHA1(0aaccfec90b66d27dae194d4462d88e654c41578) )
@@ -2038,6 +3021,13 @@ ROM_START( packmon )
ROM_END
+ROM_START( msthawk )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd38800a73", 0x0000, 0x1000, CRC(a4f9a523) SHA1(465f06b02e2e7d2277218fd447830725790a816c) )
+ ROM_CONTINUE( 0x1e80, 0x0100 )
+ROM_END
+
+
ROM_START( zackman )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38820a49", 0x0000, 0x1000, CRC(b97f5ef6) SHA1(7fe20e8107361caf9ea657e504be1f8b10b8b03f) )
@@ -2045,6 +3035,20 @@ ROM_START( zackman )
ROM_END
+ROM_START( bdoramon )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd38800b43", 0x0000, 0x1000, CRC(9387ca42) SHA1(8937e208934b34bd9f49700aa50287dfc8bda76c) )
+ ROM_CONTINUE( 0x1e80, 0x0100 )
+ROM_END
+
+
+ROM_START( machiman )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd38820a85", 0x0000, 0x1000, CRC(894b4954) SHA1(cab49638a326b031aa548301beb16f818759ef62) )
+ ROM_CONTINUE( 0x1e80, 0x0100 )
+ROM_END
+
+
ROM_START( alnattck )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "hd38800a25", 0x0000, 0x1000, CRC(18b50869) SHA1(11e9d5f7b4ae818b077b0ee14a3b43190e20bff3) )
@@ -2100,9 +3104,30 @@ ROM_START( epacman2 )
ROM_END
-ROM_START( msthawk )
+ROM_START( ghalien )
ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
- ROM_LOAD( "hd38800a73", 0x0000, 0x1000, CRC(a4f9a523) SHA1(465f06b02e2e7d2277218fd447830725790a816c) )
+ ROM_LOAD( "hd38800a04", 0x0000, 0x1000, CRC(019c3328) SHA1(9f1029c5c479f78350952c4f18747341ba5ea7a0) )
+ ROM_CONTINUE( 0x1e80, 0x0100 )
+ROM_END
+
+
+ROM_START( gckong )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd38800b01", 0x0000, 0x1000, CRC(d5a2cca3) SHA1(37bb5784383daab672ed1e0e2362c7a40d8d9b3f) )
+ ROM_CONTINUE( 0x1e80, 0x0100 )
+ROM_END
+
+
+ROM_START( gdigdug )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd38820a69", 0x0000, 0x1000, CRC(501165a9) SHA1(8a15d00c4aa66e870cadde33148426463560d2e6) )
+ ROM_CONTINUE( 0x1e80, 0x0100 )
+ROM_END
+
+
+ROM_START( mwcbaseb )
+ ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd38820a09", 0x0000, 0x1000, CRC(25ba7dc0) SHA1(69e0a867fdcf07b454b1faf835e576ae782432c0) )
ROM_CONTINUE( 0x1e80, 0x0100 )
ROM_END
@@ -2128,18 +3153,28 @@ ROM_START( tmtron )
ROM_END
+ROM_START( vinvader )
+ ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASE00 )
+ ROM_LOAD( "hd38750a45", 0x0000, 0x0800, CRC(e02d94d9) SHA1(d4679abbb9c6778e5e853aa6c2b90dee1d21c9dd) )
+ ROM_CONTINUE( 0x0f00, 0x0080 )
+ROM_END
+
+
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */
-CONS( 1979, bambball, 0, 0, bambball, bambball, driver_device, 0, "Bambino", "Basketball - Dribble Away", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
+CONS( 1979, bambball, 0, 0, bambball, bambball, driver_device, 0, "Bambino", "Dribble Away Basketball", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
+CONS( 1979, bmboxing, 0, 0, bmboxing, bmboxing, driver_device, 0, "Bambino", "Knock-Em Out Boxing", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1982, bfriskyt, 0, 0, bfriskyt, bfriskyt, driver_device, 0, "Bandai", "Frisky Tom (Bandai)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1981, packmon, 0, 0, packmon, packmon, driver_device, 0, "Bandai", "Packri Monster", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1982, msthawk, 0, 0, msthawk, msthawk, driver_device, 0, "Bandai (Mattel license)", "Star Hawk (Mattel)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1983, zackman, 0, 0, zackman, zackman, driver_device, 0, "Bandai", "Zackman", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
+CONS( 1983, bdoramon, 0, 0, bdoramon, bdoramon, driver_device, 0, "Bandai", "Dokodemo Dorayaki Doraemon", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
+CONS( 1984, machiman, 0, 0, machiman, machiman, driver_device, 0, "Bandai", "Machine Man", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1981, alnattck, 0, 0, alnattck, alnattck, driver_device, 0, "Coleco", "Alien Attack", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1982, cdkong, 0, 0, cdkong, cdkong, driver_device, 0, "Coleco", "Donkey Kong (Coleco)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_IMPERFECT_SOUND )
-CONS( 1982, cgalaxn, 0, 0, cgalaxn, cgalaxn, driver_device, 0, "Coleco", "Galaxian (Coleco)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING )
+CONS( 1982, cgalaxn, 0, 0, cgalaxn, cgalaxn, driver_device, 0, "Coleco", "Galaxian (Coleco)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_IMPERFECT_SOUND )
CONS( 1981, cpacman, 0, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 29)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1981, cpacmanr1, cpacman, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 28)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1983, cmspacmn, 0, 0, cmspacmn, cmspacmn, driver_device, 0, "Coleco", "Ms. Pac-Man (Coleco)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
@@ -2147,8 +3182,15 @@ CONS( 1983, cmspacmn, 0, 0, cmspacmn, cmspacmn, driver_device, 0, "Colec
CONS( 1981, egalaxn2, 0, 0, egalaxn2, egalaxn2, driver_device, 0, "Entex", "Galaxian 2 (Entex)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1981, epacman2, 0, 0, epacman2, epacman2, driver_device, 0, "Entex", "Pac Man 2 (Entex)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
+CONS( 1980, ghalien, 0, 0, ghalien, ghalien, driver_device, 0, "Gakken", "Heiankyo Alien (Gakken)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
+CONS( 1982, gckong, 0, 0, gckong, gckong, driver_device, 0, "Gakken", "Crazy Kong (Gakken)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING )
+CONS( 1983, gdigdug, 0, 0, gdigdug, gdigdug, driver_device, 0, "Gakken", "Dig Dug (Gakken)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
+
+CONS( 1980, mwcbaseb, 0, 0, mwcbaseb, mwcbaseb, driver_device, 0, "Mattel", "World Championship Baseball", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1983, pbqbert, 0, 0, pbqbert, pbqbert, driver_device, 0, "Parker Brothers", "Q*Bert (Parker Brothers)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1982, kingman, 0, 0, kingman, kingman, driver_device, 0, "Tomy", "Kingman", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
CONS( 1984, tmtron, 0, 0, tmtron, tmtron, driver_device, 0, "Tomy", "Tron (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK )
+
+CONS( 1981, vinvader, 0, 0, vinvader, vinvader, driver_device, 0, "VTech", "Invaders (VTech)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING )