diff --git a/src/mess/drivers/hh_hmcs40.c b/src/mess/drivers/hh_hmcs40.c index 1ea775a681b..6ad6a6e1209 100644 --- a/src/mess/drivers/hh_hmcs40.c +++ b/src/mess/drivers/hh_hmcs40.c @@ -101,6 +101,14 @@ public: DECLARE_WRITE16_MEMBER(alnattck_grid_w); DECLARE_READ16_MEMBER(alnattck_input_r); + DECLARE_WRITE8_MEMBER(cpacman_plate_w); + DECLARE_WRITE16_MEMBER(cpacman_grid_w); + DECLARE_READ8_MEMBER(cpacman_input_r); + + DECLARE_WRITE8_MEMBER(cmspacmn_plate_w); + DECLARE_WRITE16_MEMBER(cmspacmn_grid_w); + DECLARE_READ8_MEMBER(cmspacmn_input_r); + void egalaxn2_display(); DECLARE_WRITE8_MEMBER(egalaxn2_plate_w); DECLARE_WRITE16_MEMBER(egalaxn2_grid_w); @@ -257,7 +265,7 @@ WRITE8_MEMBER(hh_hmcs40_state::bambball_plate_w) m_plate = (m_plate & ~(0xf << shift)) | (data << shift); // update display - UINT32 plate = BITSWAP16(m_plate,13,8,4,12,9,10,14,1,7,0,15,11,6,3,5,2); + UINT16 plate = BITSWAP16(m_plate,13,8,4,12,9,10,14,1,7,0,15,11,6,3,5,2); display_matrix(16, 9, plate, m_grid); } @@ -452,7 +460,7 @@ READ16_MEMBER(hh_hmcs40_state::alnattck_input_r) static INPUT_PORTS_START( alnattck ) PORT_START("IN.0") // D5 D7 - PORT_CONFNAME( 0x01, 0x00, "Skill" ) + PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CONFSETTING( 0x00, "1" ) PORT_CONFSETTING( 0x01, "2" ) @@ -583,7 +591,65 @@ MACHINE_CONFIG_END ***************************************************************************/ +WRITE8_MEMBER(hh_hmcs40_state::cpacman_plate_w) +{ + // R1x-R6x, D1,D2: vfd matrix plate + int shift = (offset - HMCS40_PORT_R1X) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + + // update display + + // 31,30,29,28,27,13,14, 8,12,11,10, 9,15,16,17,18, 7, 6, 5, 4,19,20,21,22, 0, 1, 2, 3,23,24,25,26 + // 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 + // 31,30,29,28,27, 0, 1, 2, 3, 8, 9,10,11,16,17,18,19,25,26,23,22,21,20,24,15,14,13,12, 4, 5, 6, 7 + + 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,0,1,2,3,8,9,10,11,16,17,18,19,25,26,23,22,21,20,24,15,14,13,12,4,5,6,7); + plate |= 0x2000; // plate 13(maze) is always on + + display_matrix(27, 11, plate, grid); +} + +WRITE16_MEMBER(hh_hmcs40_state::cpacman_grid_w) +{ + // D0: speaker out + m_speaker->level_w(data & 1); + + // D13-D15: input mux + m_inp_mux = data >> 13 & 7; + + // D5-D15: vfd matrix grid + m_grid = data >> 5 & 0x7ff; + + // D1,D2: plate 8,14 (update display there) + cpacman_plate_w(space, 6 + HMCS40_PORT_R1X, data >> 1 & 3); +} + +READ8_MEMBER(hh_hmcs40_state::cpacman_input_r) +{ + // R0x: multiplexed inputs + return read_inputs(3); +} + + static INPUT_PORTS_START( cpacman ) + PORT_START("IN.0") // D13 port R0x + PORT_CONFNAME( 0x01, 0x01, "Skill Level" ) + PORT_CONFSETTING( 0x01, "1" ) + PORT_CONFSETTING( 0x00, "2" ) + PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // D14 port R0x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + + PORT_START("IN.2") // D15 port R0x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) INPUT_PORTS_END @@ -591,8 +657,16 @@ static MACHINE_CONFIG_START( cpacman, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. + MCFG_HMCS40_READ_R_CB(0, READ8(hh_hmcs40_state, cpacman_input_r)) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(hh_hmcs40_state, cpacman_plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(hh_hmcs40_state, cpacman_plate_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(hh_hmcs40_state, cpacman_plate_w)) + MCFG_HMCS40_WRITE_R_CB(4, WRITE8(hh_hmcs40_state, cpacman_plate_w)) + MCFG_HMCS40_WRITE_R_CB(5, WRITE8(hh_hmcs40_state, cpacman_plate_w)) + MCFG_HMCS40_WRITE_R_CB(6, WRITE8(hh_hmcs40_state, cpacman_plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, cpacman_grid_w)) -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(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! */ @@ -618,7 +692,65 @@ MACHINE_CONFIG_END ***************************************************************************/ +WRITE8_MEMBER(hh_hmcs40_state::cmspacmn_plate_w) +{ + // R1x-R6x, D0,D1: vfd matrix plate + int shift = (offset - HMCS40_PORT_R1X) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + + // update display + // 22,17 18,13 + // 31,30,29,28,27,26, 6,11,23,21,20,19,15, 2, 1, 0,32,31,30,29,12, 9, 4, 8,25,26,27,28,16,10, 3, 5 + // 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 + // 14,13,12, 4, 5, 6, 7,24,23,25,22,21,20,13,24, 3,19,14,12,11,24, 2,10, 8, 7,25, 0, 9, 1,18,17,16 + + UINT16 grid = BITSWAP16(m_grid,15,14,13,11,10,9,8,7,6,5,4,3,2,1,1,0); + UINT64 plate = BIT(m_plate,15)<<32 | BITSWAP32(m_plate,14,13,12,4,5,6,7,24,23,25,22,21,20,13,24,3,19,14,12,11,24,2,10,8,7,25,0,9,1,18,17,16); + plate |= 0x1004080; // plates 7,14,24 are always on + + display_matrix(33, 12, plate, grid); +} + +WRITE16_MEMBER(hh_hmcs40_state::cmspacmn_grid_w) +{ + // D2: speaker out + m_speaker->level_w(data >> 2 & 1); + + // D13-D15: input mux + m_inp_mux = data >> 13 & 7; + + // D5-D15: vfd matrix grid + m_grid = data >> 5 & 0x7ff; + + // D0,D1: plate 11+17,6+22 (update display there) + cmspacmn_plate_w(space, 6 + HMCS40_PORT_R1X, data & 3); +} + +READ8_MEMBER(hh_hmcs40_state::cmspacmn_input_r) +{ + // R0x: multiplexed inputs + return read_inputs(3); +} + + static INPUT_PORTS_START( cmspacmn ) + PORT_START("IN.0") // D13 port R0x + PORT_CONFNAME( 0x01, 0x01, "Skill Level" ) + PORT_CONFSETTING( 0x01, "1" ) + PORT_CONFSETTING( 0x00, "2" ) + PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // D14 port R0x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) + + PORT_START("IN.2") // D15 port R0x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) INPUT_PORTS_END @@ -626,8 +758,16 @@ static MACHINE_CONFIG_START( cmspacmn, hh_hmcs40_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. + MCFG_HMCS40_READ_R_CB(0, READ8(hh_hmcs40_state, cmspacmn_input_r)) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(hh_hmcs40_state, cmspacmn_plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(hh_hmcs40_state, cmspacmn_plate_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(hh_hmcs40_state, cmspacmn_plate_w)) + MCFG_HMCS40_WRITE_R_CB(4, WRITE8(hh_hmcs40_state, cmspacmn_plate_w)) + MCFG_HMCS40_WRITE_R_CB(5, WRITE8(hh_hmcs40_state, cmspacmn_plate_w)) + MCFG_HMCS40_WRITE_R_CB(6, WRITE8(hh_hmcs40_state, cmspacmn_plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, cmspacmn_grid_w)) -// MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(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! */ @@ -654,7 +794,7 @@ MACHINE_CONFIG_END void hh_hmcs40_state::egalaxn2_display() { - UINT32 grid = BITSWAP16(m_grid,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); + UINT16 grid = BITSWAP16(m_grid,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); UINT32 plate = BITSWAP24(m_plate,23,22,21,20,15,14,13,12,7,6,5,4,3,2,1,0,19,18,17,16,11,10,9,8); display_matrix(24, 15, plate, grid); @@ -675,7 +815,7 @@ WRITE16_MEMBER(hh_hmcs40_state::egalaxn2_grid_w) WRITE8_MEMBER(hh_hmcs40_state::egalaxn2_plate_w) { - // R10-R63: vfd matrix plate + // R1x-R6x: vfd matrix plate int shift = (offset - HMCS40_PORT_R1X) * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); @@ -710,7 +850,7 @@ static INPUT_PORTS_START( egalaxn2 ) PORT_START("IN.3") // D4 port R0x PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_CONFNAME( 0x02, 0x02, "Skill" ) + PORT_CONFNAME( 0x02, 0x02, "Skill Level" ) PORT_CONFSETTING( 0x02, "1" ) PORT_CONFSETTING( 0x00, "2" ) PORT_CONFNAME( 0x0c, 0x00, "Players" ) @@ -758,7 +898,7 @@ MACHINE_CONFIG_END ***************************************************************************/ -// hardware is identical to Galaxian 2, so we can use those handlers +// i/o hookup is identical to Galaxian 2, so we can use those handlers // note: plate numbers are 0-23, not 1-24(with 0 always-on) static INPUT_PORTS_START( epacman2 ) @@ -782,7 +922,7 @@ static INPUT_PORTS_START( epacman2 ) PORT_START("IN.3") // D4 port R0x PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_CONFNAME( 0x02, 0x02, "Skill" ) + PORT_CONFNAME( 0x02, 0x02, "Skill Level" ) PORT_CONFSETTING( 0x00, "1" ) PORT_CONFSETTING( 0x02, "2" ) PORT_CONFNAME( 0x0c, 0x04, "Players" ) diff --git a/src/mess/drivers/hh_tms1k.c b/src/mess/drivers/hh_tms1k.c index b17b40e2035..aad5eddcab1 100644 --- a/src/mess/drivers/hh_tms1k.c +++ b/src/mess/drivers/hh_tms1k.c @@ -7,7 +7,7 @@ part of a series is (or will be) in its own driver. Let's use this driver for a list of known devices and their serials, - excluding TI's own products (see for example ticalc1x.c, tispeak.c) + excluding TI's own products (see ticalc1x.c, tispeak.c) serial device etc. -------------------------------------------------------------------- @@ -21,8 +21,8 @@ @MP1204 TMS1100 1980, Entex Baseball 3 *MP1221 TMS1100 1980, Entex Raise The Devil *MP1312 TMS1100 198?, Tandy/RadioShack Science Fair Microcomputer Trainer - *MP2139 ? 1982, Gakken Galaxy Invader 1000 - *MP2788 ? 1980, Bandai Flight Time + *MP2139 ? 1982, Gakken Galaxy Invader 1000 (? note: VFD-capable) + *MP2788 ? 1980, Bandai Flight Time (? note: VFD-capable) @MP3226 TMS1000 1978, Milton Bradley Simon *MP3301 TMS1000 1979, Milton Bradley Bigtrak *MP3320A TMS1000 1979, Coleco Head to Head Basketball @@ -45,12 +45,14 @@ M34047 TMS1100 1982, MicroVision cartridge: Super Blockbuster @MP6100A TMS0980 1979, Ideal Electronic Detective @MP6101B TMS0980 1979, Parker Brothers Stop Thief - *MP6361 ? 1983, Defender Strikes + *MP6361 ? 1983, Defender Strikes (? note: VFD-capable) *MP7303 TMS1400? 19??, Tiger 7-in-1 Sports Stadium @MP7313 TMS1400 1980, Parker Brothers Bank Shot @MP7314 TMS1400 1980, Parker Brothers Split Second MP7332 TMS1400 1981, Milton Bradley Dark Tower -> mbdtower.c @MP7334 TMS1400 1981, Coleco Total Control 4 + *MP7573 ? 1981, Entex Select-a-Game cartridge: Football (? note: 40-pin, VFD-capable) + *M95041 ? 1983, Tsukuda Game Pachinko (? note: 40-pin, VFD-capable) inconsistent: diff --git a/src/mess/drivers/hh_ucom4.c b/src/mess/drivers/hh_ucom4.c index a91ffa52340..04023eea11a 100644 --- a/src/mess/drivers/hh_ucom4.c +++ b/src/mess/drivers/hh_ucom4.c @@ -265,6 +265,7 @@ UINT8 hh_ucom4_state::read_inputs(int columns) void hh_ucom4_state::ssfball_display() { UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,10,9,8,0,1,2,4,5,6); + display_matrix(16, 9, plate, m_grid); } @@ -374,6 +375,7 @@ MACHINE_CONFIG_END void hh_ucom4_state::splasfgt_display() { UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,13,1,0,8,6,0,10,11,14,15,16,9,5,7,4,2,3); + display_matrix(16, 9, plate, m_grid); } @@ -511,7 +513,7 @@ MACHINE_CONFIG_END void hh_ucom4_state::astrocmd_display() { - UINT32 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,4,5,6,7,0,1,2,3); + UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,4,5,6,7,0,1,2,3); UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,3,2,12,13,14,15,16,17,18,0,1,4,8,5,9,7,11,6,10); display_matrix(17, 9, plate, grid); @@ -611,7 +613,7 @@ WRITE8_MEMBER(hh_ucom4_state::edracula_grid_w) int shift = (offset - NEC_UCOM4_PORTC) * 4; m_grid = (m_grid & ~(0xf << shift)) | (data << shift); - display_matrix(18, 8, m_plate, m_grid); + display_matrix(18+1, 8, m_plate, m_grid); } WRITE8_MEMBER(hh_ucom4_state::edracula_plate_w) @@ -623,8 +625,9 @@ WRITE8_MEMBER(hh_ucom4_state::edracula_plate_w) // E,F,G,H,I01: vfd matrix plate int shift = (offset - NEC_UCOM4_PORTE) * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + m_plate |= 1 << 18; // for always-on plates - display_matrix(18, 8, m_plate, m_grid); + display_matrix(18+1, 8, m_plate, m_grid); } @@ -834,10 +837,11 @@ MACHINE_CONFIG_END void hh_ucom4_state::tmpacman_display() { - UINT32 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7); + UINT16 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7); UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,16,17,18,11,10,9,8,0,2,3,1,4,5,6,7,12,13,14,15); + plate |= 0x100; // plate 8(maze) is always on - display_matrix(19, 8, plate | 0x100, grid); // plate 8 (maze) is always on + display_matrix(19, 8, plate, grid); } WRITE8_MEMBER(hh_ucom4_state::tmpacman_grid_w) @@ -947,9 +951,10 @@ WRITE8_MEMBER(hh_ucom4_state::alnchase_output_w) // E23,F,G,H,I: vfd matrix plate int shift = (offset - NEC_UCOM4_PORTE) * 4; m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2; + m_plate |= 1 << 17; // for always-on plates } - display_matrix(17, 9, m_plate, m_grid); + display_matrix(17+1, 9, m_plate, m_grid); } READ8_MEMBER(hh_ucom4_state::alnchase_input_r)