trunk/src/mess/drivers/hh_hmcs40.c
| r245720 | r245721 | |
| 10 | 10 | ---------------------------------------------------------------- |
| 11 | 11 | *07 HD38750A 1979, Bambino Knock-Em Out Boxing (ET-06B) |
| 12 | 12 | @08 HD38750A 1979, Bambino Basketball (ET-05) |
| 13 | | *45 HD38750A 1981, Vtech Invaders |
| 13 | @45 HD38750A 1981, VTech Invaders |
| 14 | 14 | *58 HD38750A 1982, Ludotronic(Hanzawa) Grand Prix Turbo |
| 15 | 15 | *62 HD38750A 1982, Actronics(Hanzawa) Pack'n Maze |
| 16 | 16 | |
| r245720 | r245721 | |
| 315 | 315 | |
| 316 | 316 | WRITE8_MEMBER(bambball_state::plate_w) |
| 317 | 317 | { |
| 318 | | // R1x-R3x, D0-D3: vfd matrix plate |
| 318 | // R1x-R3x(,D0-D3): vfd matrix plate |
| 319 | 319 | int shift = (offset - HMCS40_PORT_R1X) * 4; |
| 320 | 320 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 321 | 321 | |
| r245720 | r245721 | |
| 335 | 335 | // D7-D15: vfd matrix grid |
| 336 | 336 | m_grid = data >> 7 & 0x1ff; |
| 337 | 337 | |
| 338 | | // D0-D3: plates (update display there) |
| 338 | // D0-D3: more plates (update display there) |
| 339 | 339 | plate_w(space, 3 + HMCS40_PORT_R1X, data & 0xf); |
| 340 | 340 | } |
| 341 | 341 | |
| r245720 | r245721 | |
| 557 | 557 | |
| 558 | 558 | WRITE8_MEMBER(packmon_state::plate_w) |
| 559 | 559 | { |
| 560 | | // R0x-R3x, D0-D3: vfd matrix plate |
| 560 | // R0x-R3x(,D0-D3): vfd matrix plate |
| 561 | 561 | int shift = offset * 4; |
| 562 | 562 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 563 | 563 | |
| r245720 | r245721 | |
| 796 | 796 | |
| 797 | 797 | WRITE8_MEMBER(zackman_state::plate_w) |
| 798 | 798 | { |
| 799 | | // R0x-R6x,D0,D1: vfd matrix plate |
| 799 | // R0x-R6x(,D0,D1): vfd matrix plate |
| 800 | 800 | int shift = offset * 4; |
| 801 | 801 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 802 | 802 | |
| r245720 | r245721 | |
| 915 | 915 | |
| 916 | 916 | WRITE8_MEMBER(alnattck_state::plate_w) |
| 917 | 917 | { |
| 918 | | // R0x-R3x, D0-D3: vfd matrix plate |
| 918 | // R0x-R3x(,D0-D3): vfd matrix plate |
| 919 | 919 | int shift = offset * 4; |
| 920 | 920 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 921 | 921 | |
| r245720 | r245721 | |
| 1283 | 1283 | |
| 1284 | 1284 | WRITE8_MEMBER(cpacman_state::plate_w) |
| 1285 | 1285 | { |
| 1286 | | // R1x-R6x, D1,D2: vfd matrix plate |
| 1286 | // R1x-R6x(,D1,D2): vfd matrix plate |
| 1287 | 1287 | int shift = (offset - HMCS40_PORT_R1X) * 4; |
| 1288 | 1288 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 1289 | 1289 | |
| r245720 | r245721 | |
| 1399 | 1399 | |
| 1400 | 1400 | WRITE8_MEMBER(cmspacmn_state::plate_w) |
| 1401 | 1401 | { |
| 1402 | | // R1x-R6x, D0,D1: vfd matrix plate |
| 1402 | // R1x-R6x(,D0,D1): vfd matrix plate |
| 1403 | 1403 | int shift = (offset - HMCS40_PORT_R1X) * 4; |
| 1404 | 1404 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 1405 | 1405 | |
| r245720 | r245721 | |
| 1607 | 1607 | Entex Pac Man 2 (manufactured in Japan) |
| 1608 | 1608 | * Hitachi HD38820A23 MCU |
| 1609 | 1609 | * cyan/red VFD display Futaba DM-28Z 1G |
| 1610 | |
| 1611 | 2 VFD revisions are known, the difference is Pac-Man's color: cyan or red. |
| 1610 | 1612 | |
| 1611 | 1613 | NOTE!: MESS external artwork is recommended |
| 1612 | 1614 | |
| r245720 | r245721 | |
| 1707 | 1709 | |
| 1708 | 1710 | WRITE8_MEMBER(pbqbert_state::plate_w) |
| 1709 | 1711 | { |
| 1710 | | // R0x-R6x,D8: vfd matrix plate |
| 1712 | // R0x-R6x(,D8): vfd matrix plate |
| 1711 | 1713 | int shift = offset * 4; |
| 1712 | 1714 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 1713 | 1715 | |
| r245720 | r245721 | |
| 2013 | 2015 | |
| 2014 | 2016 | /*************************************************************************** |
| 2015 | 2017 | |
| 2018 | VTech Invaders (manufactured in Taiwan) |
| 2019 | * Hitachi HD38750A45 MCU |
| 2020 | * cyan/red VFD display Futaba DM-26Z 1G, with bezel |
| 2021 | |
| 2022 | known releases: |
| 2023 | - USA: Invaders/Sonic Invader |
| 2024 | - UK: Cosmic Invader, published by Grandstand |
| 2025 | - UK: Galactic Invaders, published by Prinztronic |
| 2026 | |
| 2027 | NOTE!: MESS external artwork is recommended |
| 2028 | |
| 2029 | ***************************************************************************/ |
| 2030 | |
| 2031 | class vinvader_state : public hh_hmcs40_state |
| 2032 | { |
| 2033 | public: |
| 2034 | vinvader_state(const machine_config &mconfig, device_type type, const char *tag) |
| 2035 | : hh_hmcs40_state(mconfig, type, tag) |
| 2036 | { } |
| 2037 | |
| 2038 | DECLARE_WRITE8_MEMBER(plate_w); |
| 2039 | DECLARE_WRITE16_MEMBER(grid_w); |
| 2040 | }; |
| 2041 | |
| 2042 | // handlers |
| 2043 | |
| 2044 | WRITE8_MEMBER(vinvader_state::plate_w) |
| 2045 | { |
| 2046 | // R1x-R3x(,D4-D6): vfd matrix plate |
| 2047 | int shift = (offset - HMCS40_PORT_R1X) * 4; |
| 2048 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 2049 | |
| 2050 | // update display |
| 2051 | UINT16 plate = BITSWAP16(m_plate,15,11,7,3,10,6,14,2,9,5,13,1,8,4,12,0); |
| 2052 | display_matrix(12, 9, plate, m_grid); |
| 2053 | } |
| 2054 | |
| 2055 | WRITE16_MEMBER(vinvader_state::grid_w) |
| 2056 | { |
| 2057 | // D0: speaker out |
| 2058 | m_speaker->level_w(data & 1); |
| 2059 | |
| 2060 | // D7-D15: vfd matrix grid |
| 2061 | m_grid = data >> 7 & 0x1ff; |
| 2062 | |
| 2063 | // D4-D6: more plates (update display there) |
| 2064 | plate_w(space, 3 + HMCS40_PORT_R1X, data >> 4 & 7); |
| 2065 | } |
| 2066 | |
| 2067 | |
| 2068 | // config |
| 2069 | |
| 2070 | static INPUT_PORTS_START( vinvader ) |
| 2071 | PORT_START("IN.0") // port R0x |
| 2072 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| 2073 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) |
| 2074 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 2075 | |
| 2076 | PORT_START("IN.1") // port D |
| 2077 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 2078 | PORT_CONFNAME( 0x08, 0x00, "Skill Level") |
| 2079 | PORT_CONFSETTING( 0x00, "1" ) |
| 2080 | PORT_CONFSETTING( 0x08, "2" ) |
| 2081 | PORT_BIT( 0xfff5, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 2082 | INPUT_PORTS_END |
| 2083 | |
| 2084 | static MACHINE_CONFIG_START( vinvader, vinvader_state ) |
| 2085 | |
| 2086 | /* basic machine hardware */ |
| 2087 | MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation - RC osc. |
| 2088 | MCFG_HMCS40_READ_R_CB(0, IOPORT("IN.0")) |
| 2089 | MCFG_HMCS40_WRITE_R_CB(1, WRITE8(vinvader_state, plate_w)) |
| 2090 | MCFG_HMCS40_WRITE_R_CB(2, WRITE8(vinvader_state, plate_w)) |
| 2091 | MCFG_HMCS40_WRITE_R_CB(3, WRITE8(vinvader_state, plate_w)) |
| 2092 | MCFG_HMCS40_WRITE_D_CB(WRITE16(vinvader_state, grid_w)) |
| 2093 | MCFG_HMCS40_READ_D_CB(IOPORT("IN.1")) |
| 2094 | |
| 2095 | MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 2096 | MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) |
| 2097 | |
| 2098 | /* no video! */ |
| 2099 | |
| 2100 | /* sound hardware */ |
| 2101 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 2102 | MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) |
| 2103 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 2104 | MACHINE_CONFIG_END |
| 2105 | |
| 2106 | |
| 2107 | |
| 2108 | |
| 2109 | |
| 2110 | /*************************************************************************** |
| 2111 | |
| 2016 | 2112 | Game driver(s) |
| 2017 | 2113 | |
| 2018 | 2114 | ***************************************************************************/ |
| r245720 | r245721 | |
| 2128 | 2224 | ROM_END |
| 2129 | 2225 | |
| 2130 | 2226 | |
| 2227 | ROM_START( vinvader ) |
| 2228 | ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASE00 ) |
| 2229 | ROM_LOAD( "hd38750a45", 0x0000, 0x0800, CRC(e02d94d9) SHA1(d4679abbb9c6778e5e853aa6c2b90dee1d21c9dd) ) |
| 2230 | ROM_CONTINUE( 0x0f00, 0x0080 ) |
| 2231 | ROM_END |
| 2131 | 2232 | |
| 2233 | |
| 2234 | |
| 2132 | 2235 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ |
| 2133 | 2236 | CONS( 1979, bambball, 0, 0, bambball, bambball, driver_device, 0, "Bambino", "Basketball - Dribble Away", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 2134 | 2237 | |
| r245720 | r245721 | |
| 2147 | 2250 | CONS( 1981, egalaxn2, 0, 0, egalaxn2, egalaxn2, driver_device, 0, "Entex", "Galaxian 2 (Entex)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 2148 | 2251 | CONS( 1981, epacman2, 0, 0, epacman2, epacman2, driver_device, 0, "Entex", "Pac Man 2 (Entex)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 2149 | 2252 | |
| 2150 | | |
| 2151 | 2253 | CONS( 1983, pbqbert, 0, 0, pbqbert, pbqbert, driver_device, 0, "Parker Brothers", "Q*Bert (Parker Brothers)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 2152 | 2254 | |
| 2153 | 2255 | CONS( 1982, kingman, 0, 0, kingman, kingman, driver_device, 0, "Tomy", "Kingman", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 2154 | 2256 | CONS( 1984, tmtron, 0, 0, tmtron, tmtron, driver_device, 0, "Tomy", "Tron (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 2257 | |
| 2258 | CONS( 1981, vinvader, 0, 0, vinvader, vinvader, driver_device, 0, "VTech", "Invaders (VTech)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) |