trunk/src/mame/drivers/cybertnk.c
r17498 | r17499 | |
178 | 178 | { |
179 | 179 | public: |
180 | 180 | cybertnk_state(const machine_config &mconfig, device_type type, const char *tag) |
181 | | : driver_device(mconfig, type, tag) , |
| 181 | : driver_device(mconfig, type, tag), |
182 | 182 | m_spr_ram(*this, "spr_ram"), |
183 | 183 | m_tilemap0_vram(*this, "tilemap0_vram"), |
184 | 184 | m_tilemap1_vram(*this, "tilemap1_vram"), |
r17498 | r17499 | |
186 | 186 | m_tilemap0scroll(*this, "tilemap1_scroll"), |
187 | 187 | m_tilemap1scroll(*this, "tilemap1_scroll"), |
188 | 188 | m_tilemap2scroll(*this, "tilemap2_scroll"), |
189 | | m_roadram(*this, "roadram"){ } |
| 189 | m_roadram(*this, "roadram") |
| 190 | { } |
190 | 191 | |
191 | 192 | tilemap_t *m_tilemap0_tilemap; |
192 | 193 | tilemap_t *m_tilemap1_tilemap; |
r17498 | r17499 | |
330 | 331 | |
331 | 332 | Z = zoom * = alt zoom? (ok for roadside, but 00 for player tank etc?) |
332 | 333 | C = colour |
| 334 | E = sprite enabled |
333 | 335 | +word offset |
334 | | CCCC CCCC #### @ooo 0x0 # bits are often set too? @ is set at the very end of spriteram |
| 336 | CCCC CCCC #### Eooo 0x0 # bits are often set too? |
335 | 337 | oooo oooo oooo oooo 0x1 |
336 | 338 | ---- ---- ---y yyyy 0x2 |
337 | 339 | ---- ---- ---- ---- 0x3 (always has a value here, gets set to FFFF on some cleared sprites?) |
r17498 | r17499 | |
422 | 424 | |
423 | 425 | if (dot != 0) |
424 | 426 | { |
425 | | //dot|= col_bank<<4; |
426 | | |
427 | 427 | int xx = (x+xz)+screen_shift; |
428 | 428 | if ((xx>=minx) && (xx<=maxx)) |
429 | 429 | { |
430 | | //if (dot != 0xe) |
431 | | dest[xx] = paldata[col_bank << 4 | dot]; |
| 430 | dest[xx] = paldata[col_bank << 4 | dot]; |
432 | 431 | } |
433 | | |
434 | | //CYBERTNK_DRAWPIXEL |
435 | 432 | } |
436 | 433 | xf+=zoom; |
437 | 434 | if(xf >= 0x100) |
r17498 | r17499 | |
464 | 461 | } |
465 | 462 | } |
466 | 463 | } |
467 | | |
468 | | // if (state->m_spr_ram[0xff0/2] == 0x0008) |
469 | | // memset(state->m_spr_ram, 0x00, 0xff0); |
470 | | |
471 | 464 | } |
472 | 465 | |
473 | 466 | |
r17498 | r17499 | |
566 | 559 | READ8_MEMBER( cybertnk_state::cybertnk_mux_r ) |
567 | 560 | { |
568 | 561 | const char *const innames[] = { "TRAVERSE", "ELEVATE", "ACCEL", "HANDLE" }; |
569 | | return ioport(innames[(m_mux_data & 0x60) >> 5])->read();; |
| 562 | return ioport(innames[(m_mux_data & 0x60) >> 5])->read(); |
570 | 563 | } |
571 | 564 | |
572 | 565 | /* Amusingly the data written here is pretty weird, it seems suited for an unused protection device (attract = coin count, in-game = return status of some inputs) */ |