trunk/src/mame/includes/legionna.h
| r32344 | r32345 | |
| 19 | 19 | m_oki(*this, "oki"), |
| 20 | 20 | m_gfxdecode(*this, "gfxdecode"), |
| 21 | 21 | m_palette(*this, "palette"), |
| 22 | | m_wordswapram(*this, "wordswapram") |
| 22 | m_wordswapram(*this, "wordswapram"), |
| 23 | m_raiden2cop(*this, "raiden2cop") |
| 23 | 24 | { |
| 24 | 25 | memset(scrollvals, 0, sizeof(UINT16)*6); |
| 25 | 26 | } |
| r32344 | r32345 | |
| 87 | 88 | required_device<gfxdecode_device> m_gfxdecode; |
| 88 | 89 | required_device<palette_device> m_palette; |
| 89 | 90 | optional_shared_ptr<UINT16> m_wordswapram; |
| 91 | optional_device<raiden2cop_device> m_raiden2cop; |
| 90 | 92 | |
| 91 | 93 | }; |
| 92 | 94 | |
trunk/src/mame/video/legionna.c
| r32344 | r32345 | |
| 490 | 490 | |
| 491 | 491 | draw_sprites(screen,bitmap,cliprect); |
| 492 | 492 | |
| 493 | if (machine().input().code_pressed_once(KEYCODE_Z)) |
| 494 | if (m_raiden2cop) m_raiden2cop->dump_table(); |
| 493 | 495 | |
| 494 | 496 | return 0; |
| 495 | 497 | } |
| r32344 | r32345 | |
| 510 | 512 | |
| 511 | 513 | draw_sprites(screen,bitmap,cliprect); |
| 512 | 514 | |
| 515 | if (machine().input().code_pressed_once(KEYCODE_Z)) |
| 516 | if (m_raiden2cop) m_raiden2cop->dump_table(); |
| 517 | |
| 518 | |
| 513 | 519 | return 0; |
| 514 | 520 | } |
| 515 | 521 | |
| r32344 | r32345 | |
| 534 | 540 | |
| 535 | 541 | draw_sprites(screen,bitmap,cliprect); |
| 536 | 542 | |
| 543 | if (machine().input().code_pressed_once(KEYCODE_Z)) |
| 544 | if (m_raiden2cop) m_raiden2cop->dump_table(); |
| 545 | |
| 537 | 546 | return 0; |
| 538 | 547 | } |
trunk/src/mame/machine/raiden2cop.c
| r32344 | r32345 | |
| 10 | 10 | #include "emu.h" |
| 11 | 11 | #include "raiden2cop.h" |
| 12 | 12 | |
| 13 | // use Z to dump out table info |
| 14 | //#define TABLE_DUMPER |
| 15 | |
| 13 | 16 | const device_type RAIDEN2COP = &device_creator<raiden2cop_device>; |
| 14 | 17 | |
| 15 | 18 | raiden2cop_device::raiden2cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| r32344 | r32345 | |
| 248 | 251 | } |
| 249 | 252 | } |
| 250 | 253 | |
| 254 | void raiden2cop_device::dump_table() |
| 255 | { |
| 256 | #ifdef TABLE_DUMPER |
| 257 | printf("table dump\n"); |
| 258 | |
| 259 | int command; |
| 260 | |
| 261 | printf("## - trig (masked) : (sq0, sq1, sq2, sq3, sq4, sq5, sq6, sq7) valu mask\n"); |
| 262 | |
| 263 | for (command = 0; command < 0x20; command++) |
| 264 | { |
| 265 | if (cop_func_trigger[command] != 0x0000) |
| 266 | { |
| 267 | int maskout = 0x0080; |
| 268 | |
| 269 | printf("%02x - %04x (%04x ) : ", command, cop_func_trigger[command], cop_func_trigger[command] & ~maskout); |
| 270 | |
| 271 | printf("("); |
| 272 | int seqpos; |
| 273 | for (seqpos = 0; seqpos < 8; seqpos++) |
| 274 | { |
| 275 | printf("%03x", cop_program[command * 8 + seqpos]); |
| 276 | if (seqpos < 7) |
| 277 | printf(", "); |
| 278 | } |
| 279 | printf(") "); |
| 280 | |
| 281 | printf("%01x ", cop_func_value[command]); |
| 282 | printf("%04x ", cop_func_mask[command]); |
| 283 | |
| 284 | |
| 285 | printf("\n"); |
| 286 | } |
| 287 | } |
| 288 | #endif |
| 289 | } |
| 290 | |
| 251 | 291 | WRITE16_MEMBER(raiden2cop_device::cop_pgm_addr_w) |
| 252 | 292 | { |
| 253 | 293 | assert(ACCESSING_BITS_0_7 && ACCESSING_BITS_8_15); |