Previous 199869 Revisions Next

r32345 Wednesday 24th September, 2014 at 10:06:36 UTC by David Haywood
debug aid (nw)
[src/mame/drivers]raiden2.c
[src/mame/includes]legionna.h
[src/mame/machine]raiden2cop.c raiden2cop.h
[src/mame/video]legionna.c

trunk/src/mame/includes/legionna.h
r32344r32345
1919      m_oki(*this, "oki"),
2020      m_gfxdecode(*this, "gfxdecode"),
2121      m_palette(*this, "palette"),
22      m_wordswapram(*this, "wordswapram")
22      m_wordswapram(*this, "wordswapram"),
23      m_raiden2cop(*this, "raiden2cop")
2324   {
2425      memset(scrollvals, 0, sizeof(UINT16)*6);
2526   }
r32344r32345
8788   required_device<gfxdecode_device> m_gfxdecode;
8889   required_device<palette_device> m_palette;
8990   optional_shared_ptr<UINT16> m_wordswapram;
91   optional_device<raiden2cop_device> m_raiden2cop;
9092
9193};
9294
trunk/src/mame/video/legionna.c
r32344r32345
490490
491491   draw_sprites(screen,bitmap,cliprect);
492492
493   if (machine().input().code_pressed_once(KEYCODE_Z))
494      if (m_raiden2cop) m_raiden2cop->dump_table();
493495
494496   return 0;
495497}
r32344r32345
510512
511513   draw_sprites(screen,bitmap,cliprect);
512514
515   if (machine().input().code_pressed_once(KEYCODE_Z))
516      if (m_raiden2cop) m_raiden2cop->dump_table();
517
518
513519   return 0;
514520}
515521
r32344r32345
534540
535541   draw_sprites(screen,bitmap,cliprect);
536542
543   if (machine().input().code_pressed_once(KEYCODE_Z))
544      if (m_raiden2cop) m_raiden2cop->dump_table();
545
537546   return 0;
538547}
trunk/src/mame/drivers/raiden2.c
r32344r32345
584584   if (!(raiden2_tilemap_enable & 16))
585585      blend_layer(bitmap, cliprect, sprite_buffer, cur_spri[4]);
586586
587   if (machine().input().code_pressed_once(KEYCODE_Z))
588      if (m_raiden2cop) m_raiden2cop->dump_table();
587589
588590   return 0;
589591}
trunk/src/mame/machine/raiden2cop.c
r32344r32345
1010#include "emu.h"
1111#include "raiden2cop.h"
1212
13// use Z to dump out table info
14//#define TABLE_DUMPER
15
1316const device_type RAIDEN2COP = &device_creator<raiden2cop_device>;
1417
1518raiden2cop_device::raiden2cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
r32344r32345
248251   }
249252}
250253
254void 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
251291WRITE16_MEMBER(raiden2cop_device::cop_pgm_addr_w)
252292{
253293   assert(ACCESSING_BITS_0_7 && ACCESSING_BITS_8_15);
trunk/src/mame/machine/raiden2cop.h
r32344r32345
204204   UINT8 LEGACY_cop_calculate_collsion_detection();
205205
206206
207
208   // DEBUG
209   void dump_table();
210
207211protected:
208212   // device-level overrides
209213   virtual void device_start();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team