Subversion Repositories pentevo

Rev

Rev 796 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. #ifndef DEBUG_H
  2. #define DEBUG_H
  3.  
  4. #define regs_x 1
  5. #define regs_y 1
  6.  
  7. #define stack_x 72
  8. #define stack_y 12
  9. #define stack_size 10
  10.  
  11. #define ay_x  31
  12. #define ay_y  28
  13.  
  14. #define time_x 1
  15. #define time_y 28
  16.  
  17. #define copy_x 1
  18. #define copy_y 28
  19.  
  20. #define banks_x 72
  21. #define banks_y 22
  22.  
  23. #define ports_x 72
  24. #define ports_y 1
  25.  
  26. #define dos_x 72
  27. #define dos_y 6
  28. #define trace_size 21
  29. #define trace_x 1
  30. #define trace_y 6
  31.  
  32. #define wat_x 34
  33. #define wat_y 1
  34. #define wat_sz 13
  35.  
  36. #define mem_size 12
  37. #define mem_x 34
  38. #define mem_y 15
  39.  
  40. #define W_SEL      0x17
  41. #define W_NORM     0x07
  42. #define W_CURS     0x30
  43. #define BACKGR     0x50
  44. #define FRAME_CURS 0x02
  45. #define W_TITLE    0x59
  46. #define W_OTHER    0x40
  47. #define W_OTHEROFF 0x47
  48. #define BACKGR_CH  0xB1
  49. #define W_AYNUM    0x4F
  50. #define W_AYON     0x41
  51. #define W_AYOFF    0x40
  52. #define W_BANK     0x40
  53. #define W_BANKRO   0x41
  54. #define W_DIHALT1  0x1A
  55. #define W_DIHALT2  0x0A
  56. #define W_TRACEPOS 0x70
  57. #define W_INPUTCUR 0x60
  58. #define W_INPUTBG  0x40
  59. #define W_48K 0x20
  60. #define W_DOS 0x20
  61.  
  62. #define W_TRACE_JINFO_CURS_FG   0x0D
  63. #define W_TRACE_JINFO_NOCURS_FG 0x02
  64. #define W_TRACE_JARROW_FOREGR   0x0D
  65.  
  66. #define FRAME         0x01
  67. #define FFRAME_FRAME  0x04
  68.  
  69. #define FFRAME_INSIDE 0x50
  70. #define FFRAME_ERROR  0x52
  71. #define FRM_HEADER    0xD0
  72.  
  73. #define MENU_INSIDE   0x70
  74. #define MENU_HEADER   0xF0
  75.  
  76. #define MENU_CURSOR   0xE0
  77. #define MENU_ITEM     MENU_INSIDE
  78. #define MENU_ITEM_DIS 0x7A
  79.  
  80. enum DBGWND
  81. {
  82.    WNDNO, WNDMEM, WNDTRACE, WNDREGS
  83. };
  84.  
  85. enum { ED_MEM, ED_PHYS, ED_LOG, ED_CMOS, ED_NVRAM, ED_COMP_PAL, ED_MAX };
  86.  
  87. class TCpuMgr
  88. {
  89.     static const unsigned Count;
  90.     static Z80* Cpus[];
  91.     static TZ80State PrevCpus[];
  92.     static unsigned CurrentCpu;
  93. public:
  94.     static Z80 &Cpu() { return *Cpus[CurrentCpu]; }
  95.     static Z80 &Cpu(u32 Idx) { return *Cpus[Idx]; }
  96.     static TZ80State &PrevCpu(u32 Idx) { return PrevCpus[Idx]; }
  97.     static TZ80State &PrevCpu() { return PrevCpus[CurrentCpu]; }
  98.     static void SwitchCpu();
  99.     static unsigned GetCurrentCpu() { return CurrentCpu; }
  100.     static void SetCurrentCpu(u32 Idx) { CurrentCpu = Idx; }
  101.     static void CopyToPrev();
  102.     static unsigned GetCount() { return Count; }
  103. };
  104.  
  105. extern TCpuMgr CpuMgr;
  106. extern DBGWND activedbg;
  107. extern unsigned dbg_extport;
  108. extern unsigned char dbg_extval; // extended memory port like 1FFD or DFFD
  109.  
  110. extern unsigned mem_sz;
  111. extern unsigned mem_disk;
  112. extern unsigned mem_track;
  113. extern unsigned mem_max;
  114.  
  115. extern unsigned char mem_dump;
  116. extern unsigned show_scrshot;
  117. extern unsigned char editor;
  118. extern unsigned char mem_ascii;
  119. extern unsigned char mem_dump;
  120.  
  121. extern unsigned ripper; // ripper mode (none/read/write)
  122.  
  123. extern unsigned user_watches[3];
  124. extern unsigned regs_curs;
  125.  
  126. extern unsigned char trace_labels;
  127.  
  128. unsigned char isbrk(const Z80 &cpu); // is there breakpoints active or any other reason to use debug z80 loop?
  129. void debugscr();
  130. void debug_events(Z80 *cpu);
  131. #endif
  132.