1 #ifndef _INCLUDE_DEBUG_H 2 #define _INCLUDE_DEBUG_H 3 4 #include "pce.h" 5 #include "dis.h" 6 #include "optable.h" 7 // #include "osd_gfx.h" 8 9 #define MAX_BP 16 10 // Max number of breakpoints 11 12 #define MAX_USER_BP 14 13 // Max number of breakpoints user definabled 14 15 #define RESTORE_BP 14 16 // Place in the list of a pseudo-break point for internal usage 17 18 #define GIVE_HAND_BP 15 19 // Place in the list of the breakpoint used in stepping... 20 21 // Some defines for the flag value 22 #define NOT_USED 0 23 #define ENABLED 1 24 #define DISABLED 2 25 26 27 typedef struct 28 { 29 UInt16 position; 30 UChar flag; 31 UChar original_op; 32 } 33 Breakpoint; 34 35 extern UInt16 Bp_pos_to_restore; 36 // Used in RESTORE_BP to know where we must restore a BP 37 38 extern Breakpoint Bp_list[MAX_BP]; 39 // The list of all breakpoints 40 41 extern UChar save_background; 42 // Do we have to preserve the background 43 44 unsigned char Op6502 (unsigned int A); 45 46 void disass_menu (); 47 // Kind of front end for the true disassemble function 48 49 int toggle_user_breakpoint (UInt16); 50 // Toggle the breakpoint at the specified address 51 52 void display_debug_help (); 53 // Display a help screen 54 55 UInt32 cvtnum (char *string); 56 // Convert a hexa string into a number 57 58 void set_bp_following (UInt16 where, UChar nb); 59 // Set a bp at the location that follows a given address 60 61 UChar change_value (int X, int Y, UChar length, UInt32 * result); 62 // Wait for user to enter a value and display in on screen 63 64 #endif 65