trunk/src/mess/drivers/hh_hmcs40.c
| r245160 | r245161 | |
| 92 | 92 | void display_matrix(int maxx, int maxy, UINT64 setx, UINT32 sety); |
| 93 | 93 | |
| 94 | 94 | // game-specific handlers |
| 95 | DECLARE_WRITE8_MEMBER(bambball_plate_w); |
| 96 | DECLARE_WRITE16_MEMBER(bambball_grid_w); |
| 97 | DECLARE_READ8_MEMBER(bambball_input_r); |
| 98 | |
| 95 | 99 | DECLARE_WRITE8_MEMBER(alnattck_plate_w); |
| 96 | | DECLARE_WRITE16_MEMBER(alnattck_d_w); |
| 97 | | DECLARE_READ16_MEMBER(alnattck_d_r); |
| 100 | DECLARE_WRITE16_MEMBER(alnattck_grid_w); |
| 101 | DECLARE_READ16_MEMBER(alnattck_input_r); |
| 98 | 102 | |
| 99 | 103 | void egalaxn2_display(); |
| 100 | 104 | DECLARE_WRITE8_MEMBER(egalaxn2_plate_w); |
| r245160 | r245161 | |
| 231 | 235 | |
| 232 | 236 | /*************************************************************************** |
| 233 | 237 | |
| 234 | | Bambino Basketball (manufactured in Japan) |
| 238 | Bambino Basketball - Dribble Away (manufactured in Japan) |
| 235 | 239 | * boards are labeled Emix Corp. ET-05 |
| 236 | 240 | * Hitachi HD38750A08 MCU |
| 237 | | * green VFD display Emix-106 |
| 241 | * green VFD display Emix-106, with bezel overlay |
| 238 | 242 | |
| 239 | 243 | NOTE!: MESS external artwork is recommended |
| 240 | 244 | |
| 241 | 245 | ***************************************************************************/ |
| 242 | 246 | |
| 247 | WRITE8_MEMBER(hh_hmcs40_state::bambball_plate_w) |
| 248 | { |
| 249 | // R1x-R3x, D0-D3: vfd matrix plate |
| 250 | int shift = (offset - HMCS40_PORT_R1X) * 4; |
| 251 | m_plate = (m_plate & ~(0xf << shift)) | (data << shift); |
| 252 | |
| 253 | // update display |
| 254 | UINT32 plate = BITSWAP16(m_plate,13,8,4,12,9,10,14,1,7,0,15,11,6,3,5,2); |
| 255 | |
| 256 | display_matrix(16, 9, plate, m_grid); |
| 257 | } |
| 258 | |
| 259 | WRITE16_MEMBER(hh_hmcs40_state::bambball_grid_w) |
| 260 | { |
| 261 | // D4: speaker out |
| 262 | m_speaker->level_w(data >> 4 & 1); |
| 263 | |
| 264 | // D7-D10: input mux |
| 265 | m_inp_mux = data >> 7 & 0xf; |
| 266 | |
| 267 | // D7-D15: vfd matrix grid |
| 268 | m_grid = data >> 7 & 0x1ff; |
| 269 | |
| 270 | // D0-D3: plates (update display there) |
| 271 | bambball_plate_w(space, 3 + HMCS40_PORT_R1X, data & 0xf); |
| 272 | } |
| 273 | |
| 274 | READ8_MEMBER(hh_hmcs40_state::bambball_input_r) |
| 275 | { |
| 276 | // R0x: inputs |
| 277 | return read_inputs(4); |
| 278 | } |
| 279 | |
| 280 | |
| 243 | 281 | static INPUT_PORTS_START( bambball ) |
| 282 | PORT_START("IN.0") // D7 port R0x |
| 283 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Dribble Low") |
| 284 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Dribble Medium") |
| 285 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Dribble High") |
| 286 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Shoot") |
| 287 | |
| 288 | PORT_START("IN.1") // D8 port R0x |
| 289 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // separate directional buttons, hence 16way |
| 290 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // " |
| 291 | PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 292 | |
| 293 | PORT_START("IN.2") // D9 port R0x |
| 294 | PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 295 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START ) |
| 296 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Display") |
| 297 | |
| 298 | PORT_START("IN.3") // D10 port R0x |
| 299 | PORT_CONFNAME( 0x07, 0x01, "Skill Level") |
| 300 | PORT_CONFSETTING( 0x01, "1" ) |
| 301 | PORT_CONFSETTING( 0x02, "2" ) |
| 302 | PORT_CONFSETTING( 0x04, "3" ) |
| 303 | PORT_CONFNAME( 0x08, 0x08, "Players" ) |
| 304 | PORT_CONFSETTING( 0x08, "1" ) |
| 305 | PORT_CONFSETTING( 0x00, "2" ) |
| 244 | 306 | INPUT_PORTS_END |
| 245 | 307 | |
| 246 | 308 | |
| r245160 | r245161 | |
| 248 | 310 | |
| 249 | 311 | /* basic machine hardware */ |
| 250 | 312 | MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation - RC osc. |
| 313 | MCFG_HMCS40_READ_R_CB(0, READ8(hh_hmcs40_state, bambball_input_r)) |
| 314 | MCFG_HMCS40_WRITE_R_CB(1, WRITE8(hh_hmcs40_state, bambball_plate_w)) |
| 315 | MCFG_HMCS40_WRITE_R_CB(2, WRITE8(hh_hmcs40_state, bambball_plate_w)) |
| 316 | MCFG_HMCS40_WRITE_R_CB(3, WRITE8(hh_hmcs40_state, bambball_plate_w)) |
| 317 | MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, bambball_grid_w)) |
| 251 | 318 | |
| 252 | | // MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 319 | MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 253 | 320 | MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) |
| 254 | 321 | |
| 255 | 322 | /* no video! */ |
| r245160 | r245161 | |
| 269 | 336 | Bandai Packri Monster (manufactured in Japan) |
| 270 | 337 | * board label DM-21ZA2 |
| 271 | 338 | * Hitachi HD38800A27 MCU |
| 272 | | * cyan/red/green VFD display Futaba DM-21ZK 2B |
| 339 | * cyan/red/green VFD display Futaba DM-21ZK 2B, with bezel overlay |
| 273 | 340 | |
| 274 | 341 | NOTE!: MESS external artwork is recommended |
| 275 | 342 | |
| r245160 | r245161 | |
| 355 | 422 | display_matrix(20, 10, plate, m_grid); |
| 356 | 423 | } |
| 357 | 424 | |
| 358 | | WRITE16_MEMBER(hh_hmcs40_state::alnattck_d_w) |
| 425 | WRITE16_MEMBER(hh_hmcs40_state::alnattck_grid_w) |
| 359 | 426 | { |
| 360 | 427 | // D4: speaker out |
| 361 | 428 | m_speaker->level_w(data >> 4 & 1); |
| r245160 | r245161 | |
| 370 | 437 | alnattck_plate_w(space, 4, data & 0xf); |
| 371 | 438 | } |
| 372 | 439 | |
| 373 | | READ16_MEMBER(hh_hmcs40_state::alnattck_d_r) |
| 440 | READ16_MEMBER(hh_hmcs40_state::alnattck_input_r) |
| 374 | 441 | { |
| 375 | 442 | // D5: inputs |
| 376 | 443 | return (read_inputs(7) & 1) << 5; |
| r245160 | r245161 | |
| 411 | 478 | MCFG_HMCS40_WRITE_R_CB(1, WRITE8(hh_hmcs40_state, alnattck_plate_w)) |
| 412 | 479 | MCFG_HMCS40_WRITE_R_CB(2, WRITE8(hh_hmcs40_state, alnattck_plate_w)) |
| 413 | 480 | MCFG_HMCS40_WRITE_R_CB(3, WRITE8(hh_hmcs40_state, alnattck_plate_w)) |
| 414 | | MCFG_HMCS40_READ_D_CB(READ16(hh_hmcs40_state, alnattck_d_r)) |
| 415 | | MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, alnattck_d_w)) |
| 481 | MCFG_HMCS40_WRITE_D_CB(WRITE16(hh_hmcs40_state, alnattck_grid_w)) |
| 482 | MCFG_HMCS40_READ_D_CB(READ16(hh_hmcs40_state, alnattck_input_r)) |
| 416 | 483 | |
| 417 | 484 | MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) |
| 418 | 485 | MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) |
| r245160 | r245161 | |
| 956 | 1023 | |
| 957 | 1024 | |
| 958 | 1025 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ |
| 959 | | CONS( 1979, bambball, 0, 0, bambball, bambball, driver_device, 0, "Bambino", "Basketball (Bambino)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) |
| 1026 | CONS( 1979, bambball, 0, 0, bambball, bambball, driver_device, 0, "Bambino", "Basketball - Dribble Away", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) |
| 960 | 1027 | |
| 961 | 1028 | CONS( 1981, packmon, 0, 0, packmon, packmon, driver_device, 0, "Bandai", "Packri Monster", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) |
| 962 | 1029 | CONS( 1983, zackman, 0, 0, zackman, zackman, driver_device, 0, "Bandai", "Zackman", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) |