diff options
| author | 2013-01-11 07:32:46 +0000 | |
|---|---|---|
| committer | 2013-01-11 07:32:46 +0000 | |
| commit | 0e19f641d3186cdbf51f8ca857e2b07ab95779c2 (patch) | |
| tree | 234109de1123b13f217494af4b3f8efad346d5cc /src/emu/debug | |
| parent | 111157ca09a9ff60fe4a9ba49173c315e94314fa (diff) | |
Cleanups and version bumpmame0148
Diffstat (limited to 'src/emu/debug')
| -rw-r--r-- | src/emu/debug/debugcmd.c | 122 | ||||
| -rw-r--r-- | src/emu/debug/debugcmd.h | 2 | ||||
| -rw-r--r-- | src/emu/debug/debugcon.c | 69 | ||||
| -rw-r--r-- | src/emu/debug/debugcon.h | 70 | ||||
| -rw-r--r-- | src/emu/debug/debugcpu.c | 142 | ||||
| -rw-r--r-- | src/emu/debug/debugcpu.h | 168 | ||||
| -rw-r--r-- | src/emu/debug/debughlp.c | 11 | ||||
| -rw-r--r-- | src/emu/debug/debughlp.h | 2 | ||||
| -rw-r--r-- | src/emu/debug/debugvw.c | 58 | ||||
| -rw-r--r-- | src/emu/debug/debugvw.h | 116 | ||||
| -rw-r--r-- | src/emu/debug/dvdisasm.c | 38 | ||||
| -rw-r--r-- | src/emu/debug/dvdisasm.h | 32 | ||||
| -rw-r--r-- | src/emu/debug/dvmemory.c | 82 | ||||
| -rw-r--r-- | src/emu/debug/dvmemory.h | 46 | ||||
| -rw-r--r-- | src/emu/debug/dvstate.c | 22 | ||||
| -rw-r--r-- | src/emu/debug/dvstate.h | 34 | ||||
| -rw-r--r-- | src/emu/debug/dvtext.c | 6 | ||||
| -rw-r--r-- | src/emu/debug/dvtext.h | 6 | ||||
| -rw-r--r-- | src/emu/debug/express.c | 236 | ||||
| -rw-r--r-- | src/emu/debug/express.h | 86 | ||||
| -rw-r--r-- | src/emu/debug/textbuf.c | 22 | ||||
| -rw-r--r-- | src/emu/debug/textbuf.h | 2 |
22 files changed, 685 insertions, 687 deletions
diff --git a/src/emu/debug/debugcmd.c b/src/emu/debug/debugcmd.c index 3df869a3a69..ad9ff5f7e47 100644 --- a/src/emu/debug/debugcmd.c +++ b/src/emu/debug/debugcmd.c @@ -26,7 +26,7 @@ CONSTANTS ***************************************************************************/ -#define MAX_GLOBALS 1000 +#define MAX_GLOBALS 1000 @@ -36,39 +36,39 @@ struct global_entry { - void * base; - UINT32 size; + void * base; + UINT32 size; }; struct cheat_map { - UINT64 offset; - UINT64 first_value; - UINT64 previous_value; - UINT8 state:1; - UINT8 undo:7; + UINT64 offset; + UINT64 first_value; + UINT64 previous_value; + UINT8 state:1; + UINT8 undo:7; }; struct cheat_system { - char cpu; - UINT64 length; - UINT8 width; - cheat_map * cheatmap; - UINT8 undo; - UINT8 signed_cheat; - UINT8 swapped_cheat; + char cpu; + UINT64 length; + UINT8 width; + cheat_map * cheatmap; + UINT8 undo; + UINT8 signed_cheat; + UINT8 swapped_cheat; }; struct cheat_region_map { - UINT64 offset; - UINT64 endoffset; + UINT64 offset; + UINT64 endoffset; const char *share; - UINT8 disabled; + UINT8 disabled; }; @@ -176,9 +176,9 @@ INLINE UINT64 cheat_sign_extend(const cheat_system *cheatsys, UINT64 value) { switch (cheatsys->width) { - case 1: value = (INT8)value; break; - case 2: value = (INT16)value; break; - case 4: value = (INT32)value; break; + case 1: value = (INT8)value; break; + case 2: value = (INT16)value; break; + case 4: value = (INT32)value; break; } } return value; @@ -193,10 +193,10 @@ INLINE UINT64 cheat_byte_swap(const cheat_system *cheatsys, UINT64 value) { switch (cheatsys->width) { - case 2: value = ((value >> 8) & 0x00ff) | ((value << 8) & 0xff00); break; - case 4: value = ((value >> 24) & 0x000000ff) | ((value >> 8) & 0x0000ff00) | ((value << 8) & 0x00ff0000) | ((value << 24) & 0xff000000); break; - case 8: value = ((value >> 56) & U64(0x00000000000000ff)) | ((value >> 40) & U64(0x000000000000ff00)) | ((value >> 24) & U64(0x0000000000ff0000)) | ((value >> 8) & U64(0x00000000ff000000)) | - ((value << 8) & U64(0x000000ff00000000)) | ((value << 24) & U64(0x0000ff0000000000)) | ((value << 40) & U64(0x00ff000000000000)) | ((value << 56) & U64(0xff00000000000000)); break; + case 2: value = ((value >> 8) & 0x00ff) | ((value << 8) & 0xff00); break; + case 4: value = ((value >> 24) & 0x000000ff) | ((value >> 8) & 0x0000ff00) | ((value << 8) & 0x00ff0000) | ((value << 24) & 0xff000000); break; + case 8: value = ((value >> 56) & U64(0x00000000000000ff)) | ((value >> 40) & U64(0x000000000000ff00)) | ((value >> 24) & U64(0x0000000000ff0000)) | ((value >> 8) & U64(0x00000000ff000000)) | + ((value << 8) & U64(0x000000ff00000000)) | ((value << 24) & U64(0x0000ff0000000000)) | ((value << 40) & U64(0x00ff000000000000)) | ((value << 56) & U64(0xff00000000000000)); break; } } return value; @@ -284,10 +284,10 @@ void debug_command_init(running_machine &machine) debug_console_register_command(machine, "ignore", CMDFLAG_NONE, 0, 0, MAX_COMMAND_PARAMS, execute_ignore); debug_console_register_command(machine, "observe", CMDFLAG_NONE, 0, 0, MAX_COMMAND_PARAMS, execute_observe); - debug_console_register_command(machine, "comadd", CMDFLAG_NONE, 0, 1, 2, execute_comment); + debug_console_register_command(machine, "comadd", CMDFLAG_NONE, 0, 1, 2, execute_comment); debug_console_register_command(machine, "//", CMDFLAG_NONE, 0, 1, 2, execute_comment); - debug_console_register_command(machine, "comdelete", CMDFLAG_NONE, 0, 1, 1, execute_comment_del); - debug_console_register_command(machine, "comsave", CMDFLAG_NONE, 0, 0, 0, execute_comment_save); + debug_console_register_command(machine, "comdelete", CMDFLAG_NONE, 0, 1, 1, execute_comment_del); + debug_console_register_command(machine, "comsave", CMDFLAG_NONE, 0, 0, 0, execute_comment_save); debug_console_register_command(machine, "bpset", CMDFLAG_NONE, 0, 1, 3, execute_bpset); debug_console_register_command(machine, "bp", CMDFLAG_NONE, 0, 1, 3, execute_bpset); @@ -357,19 +357,19 @@ void debug_command_init(running_machine &machine) debug_console_register_command(machine, "source", CMDFLAG_NONE, 0, 1, 1, execute_source); - debug_console_register_command(machine, "map", CMDFLAG_NONE, AS_PROGRAM, 1, 1, execute_map); - debug_console_register_command(machine, "mapd", CMDFLAG_NONE, AS_DATA, 1, 1, execute_map); - debug_console_register_command(machine, "mapi", CMDFLAG_NONE, AS_IO, 1, 1, execute_map); - debug_console_register_command(machine, "memdump", CMDFLAG_NONE, 0, 0, 1, execute_memdump); + debug_console_register_command(machine, "map", CMDFLAG_NONE, AS_PROGRAM, 1, 1, execute_map); + debug_console_register_command(machine, "mapd", CMDFLAG_NONE, AS_DATA, 1, 1, execute_map); + debug_console_register_command(machine, "mapi", CMDFLAG_NONE, AS_IO, 1, 1, execute_map); + debug_console_register_command(machine, "memdump", CMDFLAG_NONE, 0, 0, 1, execute_memdump); - debug_console_register_command(machine, "symlist", CMDFLAG_NONE, 0, 0, 1, execute_symlist); + debug_console_register_command(machine, "symlist", CMDFLAG_NONE, 0, 0, 1, execute_symlist); - debug_console_register_command(machine, "softreset", CMDFLAG_NONE, 0, 0, 1, execute_softreset); - debug_console_register_command(machine, "hardreset", CMDFLAG_NONE, 0, 0, 1, execute_hardreset); + debug_console_register_command(machine, "softreset", CMDFLAG_NONE, 0, 0, 1, execute_softreset); + debug_console_register_command(machine, "hardreset", CMDFLAG_NONE, 0, 0, 1, execute_hardreset); - debug_console_register_command(machine, "images", CMDFLAG_NONE, 0, 0, 0, execute_images); - debug_console_register_command(machine, "mount", CMDFLAG_NONE, 0, 2, 2, execute_mount); - debug_console_register_command(machine, "unmount", CMDFLAG_NONE, 0, 1, 1, execute_unmount); + debug_console_register_command(machine, "images", CMDFLAG_NONE, 0, 0, 0, execute_images); + debug_console_register_command(machine, "mount", CMDFLAG_NONE, 0, 2, 2, execute_mount); + debug_console_register_command(machine, "unmount", CMDFLAG_NONE, 0, 1, 1, execute_unmount); machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(debug_command_exit), &machine)); @@ -440,10 +440,10 @@ static UINT64 global_get(symbol_table &table, void *ref) global_entry *global = (global_entry *)ref; switch (global->size) { - case 1: return *(UINT8 *)global->base; - case 2: return *(UINT16 *)global->base; - case 4: return *(UINT32 *)global->base; - case 8: return *(UINT64 *)global->base; + case 1: return *(UINT8 *)global->base; + case 2: return *(UINT16 *)global->base; + case 4: return *(UINT32 *)global->base; + case 8: return *(UINT64 *)global->base; } return ~0; } @@ -458,10 +458,10 @@ static void global_set(symbol_table &table, void *ref, UINT64 value) global_entry *global = (global_entry *)ref; switch (global->size) { - case 1: *(UINT8 *)global->base = value; break; - case 2: *(UINT16 *)global->base = value; break; - case 4: *(UINT32 *)global->base = value; break; - case 8: *(UINT64 *)global->base = value; break; + case 1: *(UINT8 *)global->base = value; break; + case 2: *(UINT16 *)global->base = value; break; + case 4: *(UINT32 *)global->base = value; break; + case 8: *(UINT64 *)global->base = value; break; } } @@ -691,9 +691,9 @@ static int mini_printf(running_machine &machine, char *buffer, const char *forma if (!c) break; switch (c) { - case '\\': *p++ = c; break; - case 'n': *p++ = '\n'; break; - default: break; + case '\\': *p++ = c; break; + case 'n': *p++ = '\n'; break; + default: break; } continue; } @@ -2078,18 +2078,18 @@ static void execute_cheatlist(running_machine &machine, int ref, int params, con switch (space->spacenum()) { default: - case AS_PROGRAM: spaceletter = 'p'; break; - case AS_DATA: spaceletter = 'd'; break; - case AS_IO: spaceletter = 'i'; break; + case AS_PROGRAM: spaceletter = 'p'; break; + case AS_DATA: spaceletter = 'd'; break; + case AS_IO: spaceletter = 'i'; break; } switch (cheat.width) { default: - case 1: sizeletter = 'b'; sizemask = 0xff; break; - case 2: sizeletter = 'w'; sizemask = 0xffff; break; - case 4: sizeletter = 'd'; sizemask = 0xffffffff; break; - case 8: sizeletter = 'q'; sizemask = U64(0xffffffffffffffff); break; + case 1: sizeletter = 'b'; sizemask = 0xff; break; + case 2: sizeletter = 'w'; sizemask = 0xffff; break; + case 4: sizeletter = 'd'; sizemask = 0xffffffff; break; + case 8: sizeletter = 'q'; sizemask = U64(0xffffffffffffffff); break; } /* write the cheat list */ @@ -2223,11 +2223,11 @@ static void execute_find(running_machine &machine, int ref, int params, const ch { switch (data_size[j]) { - case 1: match = ((UINT8)debug_read_byte(*space, i + suboffset, TRUE) == (UINT8)data_to_find[j]); break; - case 2: match = ((UINT16)debug_read_word(*space, i + suboffset, TRUE) == (UINT16)data_to_find[j]); break; - case 4: match = ((UINT32)debug_read_dword(*space, i + suboffset, TRUE) == (UINT32)data_to_find[j]); break; - case 8: match = ((UINT64)debug_read_qword(*space, i + suboffset, TRUE) == (UINT64)data_to_find[j]); break; - default: /* all other cases are wildcards */ break; + case 1: match = ((UINT8)debug_read_byte(*space, i + suboffset, TRUE) == (UINT8)data_to_find[j]); break; + case 2: match = ((UINT16)debug_read_word(*space, i + suboffset, TRUE) == (UINT16)data_to_find[j]); break; + case 4: match = ((UINT32)debug_read_dword(*space, i + suboffset, TRUE) == (UINT32)data_to_find[j]); break; + case 8: match = ((UINT64)debug_read_qword(*space, i + suboffset, TRUE) == (UINT64)data_to_find[j]); break; + default: /* all other cases are wildcards */ break; } suboffset += data_size[j] & 0x0f; } diff --git a/src/emu/debug/debugcmd.h b/src/emu/debug/debugcmd.h index 0944df45f89..058267622bb 100644 --- a/src/emu/debug/debugcmd.h +++ b/src/emu/debug/debugcmd.h @@ -27,7 +27,7 @@ void debug_command_init(running_machine &machine); /* ----- parameter validation ----- */ /* validates a number parameter */ -int debug_command_parameter_number(running_machine &machine, const char *param, UINT64 *result); +int debug_command_parameter_number(running_machine &machine, const char *param, UINT64 *result); /* validates a parameter as a cpu */ int debug_command_parameter_cpu(running_machine &machine, const char *param, device_t **result); diff --git a/src/emu/debug/debugcon.c b/src/emu/debug/debugcon.c index 846f54b5575..e51ec8d2eb8 100644 --- a/src/emu/debug/debugcon.c +++ b/src/emu/debug/debugcon.c @@ -24,11 +24,11 @@ CONSTANTS ***************************************************************************/ -#define CONSOLE_BUF_SIZE (1024 * 1024) -#define CONSOLE_MAX_LINES (CONSOLE_BUF_SIZE / 20) +#define CONSOLE_BUF_SIZE (1024 * 1024) +#define CONSOLE_MAX_LINES (CONSOLE_BUF_SIZE / 20) -#define ERRORLOG_BUF_SIZE (1024 * 1024) -#define ERRORLOG_MAX_LINES (ERRORLOG_BUF_SIZE / 20) +#define ERRORLOG_BUF_SIZE (1024 * 1024) +#define ERRORLOG_MAX_LINES (ERRORLOG_BUF_SIZE / 20) @@ -38,16 +38,16 @@ struct debug_command { - debug_command * next; - char command[32]; - const char * params; - const char * help; - void (*handler)(running_machine &machine, int ref, int params, const char **param); - void (*handler_ex)(int ref); - UINT32 flags; - int ref; - int minparams; - int maxparams; + debug_command * next; + char command[32]; + const char * params; + const char * help; + void (*handler)(running_machine &machine, int ref, int params, const char **param); + void (*handler_ex)(int ref); + UINT32 flags; + int ref; + int minparams; + int maxparams; }; @@ -296,20 +296,20 @@ static CMDERR internal_parse_command(running_machine &machine, const char *origi { switch (c) { - case '"': instring = TRUE; break; + case '"': instring = TRUE; break; case '(': case '[': - case '{': parens[parendex++] = c; break; - case ')': if (parendex == 0 || parens[--parendex] != '(') return MAKE_CMDERR_UNBALANCED_PARENS(p - command); break; - case ']': if (parendex == 0 || parens[--parendex] != '[') return MAKE_CMDERR_UNBALANCED_PARENS(p - command); break; - case '}': if (parendex == 0 || parens[--parendex] != '{') return MAKE_CMDERR_UNBALANCED_PARENS(p - command); break; - case ',': if (parendex == 0) params[paramcount++] = p; break; - case ';': if (parendex == 0) foundend = TRUE; break; - case '-': if (parendex == 0 && paramcount == 1 && p[1] == '-') isexpr = TRUE; *p = c; break; - case '+': if (parendex == 0 && paramcount == 1 && p[1] == '+') isexpr = TRUE; *p = c; break; - case '=': if (parendex == 0 && paramcount == 1) isexpr = TRUE; *p = c; break; - case 0: foundend = TRUE; break; - default: *p = tolower((UINT8)c); break; + case '{': parens[parendex++] = c; break; + case ')': if (parendex == 0 || parens[--parendex] != '(') return MAKE_CMDERR_UNBALANCED_PARENS(p - command); break; + case ']': if (parendex == 0 || parens[--parendex] != '[') return MAKE_CMDERR_UNBALANCED_PARENS(p - command); break; + case '}': if (parendex == 0 || parens[--parendex] != '{') return MAKE_CMDERR_UNBALANCED_PARENS(p - command); break; + case ',': if (parendex == 0) params[paramcount++] = p; break; + case ';': if (parendex == 0) foundend = TRUE; break; + case '-': if (parendex == 0 && paramcount == 1 && p[1] == '-') isexpr = TRUE; *p = c; break; + case '+': if (parendex == 0 && paramcount == 1 && p[1] == '+') isexpr = TRUE; *p = c; break; + case '=': if (parendex == 0 && paramcount == 1) isexpr = TRUE; *p = c; break; + case 0: foundend = TRUE; break; + default: *p = tolower((UINT8)c); break; } } } @@ -448,14 +448,14 @@ const char *debug_cmderr_to_string(CMDERR error) { switch (CMDERR_ERROR_CLASS(error)) { - case CMDERR_UNKNOWN_COMMAND: return "unknown command"; - case CMDERR_AMBIGUOUS_COMMAND: return "ambiguous command"; - case CMDERR_UNBALANCED_PARENS: return "unbalanced parentheses"; - case CMDERR_UNBALANCED_QUOTES: return "unbalanced quotes"; - case CMDERR_NOT_ENOUGH_PARAMS: return "not enough parameters for command"; - case CMDERR_TOO_MANY_PARAMS: return "too many parameters for command"; - case CMDERR_EXPRESSION_ERROR: return "error in assignment expression"; - default: return "unknown error"; + case CMDERR_UNKNOWN_COMMAND: return "unknown command"; + case CMDERR_AMBIGUOUS_COMMAND: return "ambiguous command"; + case CMDERR_UNBALANCED_PARENS: return "unbalanced parentheses"; + case CMDERR_UNBALANCED_QUOTES: return "unbalanced quotes"; + case CMDERR_NOT_ENOUGH_PARAMS: return "not enough parameters for command"; + case CMDERR_TOO_MANY_PARAMS: return "too many parameters for command"; + case CMDERR_EXPRESSION_ERROR: return "error in assignment expression"; + default: return "unknown error"; } } @@ -564,4 +564,3 @@ text_buffer *debug_errorlog_get_textbuf(void) { return errorlog_textbuf; } - diff --git a/src/emu/debug/debugcon.h b/src/emu/debug/debugcon.h index 9977a19b578..62161c133ee 100644 --- a/src/emu/debug/debugcon.h +++ b/src/emu/debug/debugcon.h @@ -19,26 +19,26 @@ CONSTANTS ***************************************************************************/ -#define MAX_COMMAND_LENGTH 512 -#define MAX_COMMAND_PARAMS 16 +#define MAX_COMMAND_LENGTH 512 +#define MAX_COMMAND_PARAMS 16 /* flags for command parsing */ -#define CMDFLAG_NONE (0x0000) -#define CMDFLAG_KEEP_QUOTES (0x0001) +#define CMDFLAG_NONE (0x0000) +#define CMDFLAG_KEEP_QUOTES (0x0001) /* values for the error code in a command error */ -#define CMDERR_NONE (0) -#define CMDERR_UNKNOWN_COMMAND (1) -#define CMDERR_AMBIGUOUS_COMMAND (2) -#define CMDERR_UNBALANCED_PARENS (3) -#define CMDERR_UNBALANCED_QUOTES (4) -#define CMDERR_NOT_ENOUGH_PARAMS (5) -#define CMDERR_TOO_MANY_PARAMS (6) -#define CMDERR_EXPRESSION_ERROR (7) +#define CMDERR_NONE (0) +#define CMDERR_UNKNOWN_COMMAND (1) +#define CMDERR_AMBIGUOUS_COMMAND (2) +#define CMDERR_UNBALANCED_PARENS (3) +#define CMDERR_UNBALANCED_QUOTES (4) +#define CMDERR_NOT_ENOUGH_PARAMS (5) +#define CMDERR_TOO_MANY_PARAMS (6) +#define CMDERR_EXPRESSION_ERROR (7) /* parameter separator macros */ -#define CMDPARAM_SEPARATOR "\0" -#define CMDPARAM_TERMINATOR "\0\0" +#define CMDPARAM_SEPARATOR "\0" +#define CMDPARAM_TERMINATOR "\0\0" @@ -47,18 +47,18 @@ ***************************************************************************/ /* command error assembly/disassembly macros */ -#define CMDERR_ERROR_CLASS(x) ((x) >> 16) -#define CMDERR_ERROR_OFFSET(x) ((x) & 0xffff) -#define MAKE_CMDERR(a,b) (((a) << 16) | ((b) & 0xffff)) +#define CMDERR_ERROR_CLASS(x) ((x) >> 16) +#define CMDERR_ERROR_OFFSET(x) ((x) & 0xffff) +#define MAKE_CMDERR(a,b) (((a) << 16) | ((b) & 0xffff)) /* macros to assemble specific error conditions */ -#define MAKE_CMDERR_UNKNOWN_COMMAND(x) MAKE_CMDERR(CMDERR_UNKNOWN_COMMAND, (x)) -#define MAKE_CMDERR_AMBIGUOUS_COMMAND(x) MAKE_CMDERR(CMDERR_AMBIGUOUS_COMMAND, (x)) -#define MAKE_CMDERR_UNBALANCED_PARENS(x) MAKE_CMDERR(CMDERR_UNBALANCED_PARENS, (x)) -#define MAKE_CMDERR_UNBALANCED_QUOTES(x) MAKE_CMDERR(CMDERR_UNBALANCED_QUOTES, (x)) -#define MAKE_CMDERR_NOT_ENOUGH_PARAMS(x) MAKE_CMDERR(CMDERR_NOT_ENOUGH_PARAMS, (x)) -#define MAKE_CMDERR_TOO_MANY_PARAMS(x) MAKE_CMDERR(CMDERR_TOO_MANY_PARAMS, (x)) -#define MAKE_CMDERR_EXPRESSION_ERROR(x) MAKE_CMDERR(CMDERR_EXPRESSION_ERROR, (x)) +#define MAKE_CMDERR_UNKNOWN_COMMAND(x) MAKE_CMDERR(CMDERR_UNKNOWN_COMMAND, (x)) +#define MAKE_CMDERR_AMBIGUOUS_COMMAND(x) MAKE_CMDERR(CMDERR_AMBIGUOUS_COMMAND, (x)) +#define MAKE_CMDERR_UNBALANCED_PARENS(x) MAKE_CMDERR(CMDERR_UNBALANCED_PARENS, (x)) +#define MAKE_CMDERR_UNBALANCED_QUOTES(x) MAKE_CMDERR(CMDERR_UNBALANCED_QUOTES, (x)) +#define MAKE_CMDERR_NOT_ENOUGH_PARAMS(x) MAKE_CMDERR(CMDERR_NOT_ENOUGH_PARAMS, (x)) +#define MAKE_CMDERR_TOO_MANY_PARAMS(x) MAKE_CMDERR(CMDERR_TOO_MANY_PARAMS, (x)) +#define MAKE_CMDERR_EXPRESSION_ERROR(x) MAKE_CMDERR(CMDERR_EXPRESSION_ERROR, (x)) /*************************************************************************** @@ -75,22 +75,22 @@ typedef UINT32 CMDERR; ***************************************************************************/ /* initialization */ -void debug_console_init(running_machine &machine); +void debug_console_init(running_machine &machine); /* command handling */ -CMDERR debug_console_execute_command(running_machine &machine, const char *command, int echo); -CMDERR debug_console_validate_command(running_machine &machine, const char *command); -void debug_console_register_command(running_machine &machine, const char *command, UINT32 flags, int ref, int minparams, int maxparams, void (*handler)(running_machine &machine, int ref, int params, const char **param)); -const char * debug_cmderr_to_string(CMDERR error); +CMDERR debug_console_execute_command(running_machine &machine, const char *command, int echo); +CMDERR debug_console_validate_command(running_machine &machine, const char *command); +void debug_console_register_command(running_machine &machine, const char *command, UINT32 flags, int ref, int minparams, int maxparams, void (*handler)(running_machine &machine, int ref, int params, const char **param)); +const char * debug_cmderr_to_string(CMDERR error); /* console management */ -void CLIB_DECL debug_console_printf(running_machine &machine, const char *format, ...) ATTR_PRINTF(2,3); -void CLIB_DECL debug_console_vprintf(running_machine &machine, const char *format, va_list args); -void CLIB_DECL debug_console_printf_wrap(running_machine &machine, int wrapcol, const char *format, ...) ATTR_PRINTF(3,4); -text_buffer * debug_console_get_textbuf(void); +void CLIB_DECL debug_console_printf(running_machine &machine, const char *format, ...) ATTR_PRINTF(2,3); +void CLIB_DECL debug_console_vprintf(running_machine &machine, const char *format, va_list args); +void CLIB_DECL debug_console_printf_wrap(running_machine &machine, int wrapcol, const char *format, ...) ATTR_PRINTF(3,4); +text_buffer * debug_console_get_textbuf(void); /* errorlog management */ -void debug_errorlog_write_line(running_machine &machine, const char *line); -text_buffer * debug_errorlog_get_textbuf(void); +void debug_errorlog_write_line(running_machine &machine, const char *line); +text_buffer * debug_errorlog_get_textbuf(void); #endif diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index dc649898ecd..d0db48c106b 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -57,7 +57,7 @@ CONSTANTS ***************************************************************************/ -#define NUM_TEMP_VARIABLES 10 +#define NUM_TEMP_VARIABLES 10 enum { @@ -77,28 +77,28 @@ struct debugcpu_private device_t *visiblecpu; device_t *breakcpu; - FILE * source_file; /* script source file */ + FILE * source_file; /* script source file */ - symbol_table * symtable; /* global symbol table */ + symbol_table * symtable; /* global symbol table */ - bool within_instruction_hook; - bool vblank_occurred; - bool memory_modified; - bool debugger_access; + bool within_instruction_hook; + bool vblank_occurred; + bool memory_modified; + bool debugger_access; - int execution_state; - device_t * m_stop_when_not_device; // stop execution when the device ceases to be this + int execution_state; + device_t * m_stop_when_not_device; // stop execution when the device ceases to be this - UINT32 bpindex; - UINT32 wpindex; + UINT32 bpindex; + UINT32 wpindex; - UINT64 wpdata; - UINT64 wpaddr; - UINT64 tempvar[NUM_TEMP_VARIABLES]; + UINT64 wpdata; + UINT64 wpaddr; + UINT64 tempvar[NUM_TEMP_VARIABLES]; - osd_ticks_t last_periodic_update_time; + osd_ticks_t last_periodic_update_time; - bool comments_loaded; + bool comments_loaded; }; @@ -199,8 +199,8 @@ void debug_cpu_configure_memory(running_machine &machine, symbol_table &table) void debug_cpu_flush_traces(running_machine &machine) { /* this can be called on exit even when no debugging is enabled, so - make sure the devdebug is valid before proceeding */ - device_iterator iter(machine.root_device()); + make sure the devdebug is valid before proceeding */ + device_iterator iter(machine.root_device()); for (device_t *device = iter.first(); device != NULL; device = iter.next()) if (device->debug() != NULL) device->debug()->trace_flush(); @@ -668,10 +668,10 @@ UINT64 debug_read_memory(address_space &space, offs_t address, int size, int app UINT64 result = ~(UINT64)0 >> (64 - 8*size); switch (size) { - case 1: result = debug_read_byte(space, address, apply_translation); break; - case 2: result = debug_read_word(space, address, apply_translation); break; - case 4: result = debug_read_dword(space, address, apply_translation); break; - case 8: result = debug_read_qword(space, address, apply_translation); break; + case 1: result = debug_read_byte(space, address, apply_translation); break; + case 2: result = debug_read_word(space, address, apply_translation); break; + case 4: result = debug_read_dword(space, address, apply_translation); break; + case 8: result = debug_read_qword(space, address, apply_translation); break; } return result; } @@ -875,10 +875,10 @@ void debug_write_memory(address_space &space, offs_t address, UINT64 data, int s { switch (size) { - case 1: debug_write_byte(space, address, data, apply_translation); break; - case 2: debug_write_word(space, address, data, apply_translation); break; - case 4: debug_write_dword(space, address, data, apply_translation); break; - case 8: debug_write_qword(space, address, data, apply_translation); break; + case 1: debug_write_byte(space, address, data, apply_translation); break; + case 2: debug_write_word(space, address, data, apply_translation); break; + case 4: debug_write_dword(space, address, data, apply_translation); break; + case 8: debug_write_qword(space, address, data, apply_translation); break; } } @@ -1633,28 +1633,28 @@ static UINT64 get_cpunum(symbol_table &table, void *ref) device_debug::device_debug(device_t &device) : m_device(device), - m_exec(NULL), - m_memory(NULL), - m_state(NULL), - m_disasm(NULL), - m_flags(0), - m_symtable(&device, debug_cpu_get_global_symtable(device.machine())), - m_instrhook(NULL), - m_dasm_override(NULL), - m_opwidth(0), - m_stepaddr(0), - m_stepsleft(0), - m_stopaddr(0), - m_stoptime(attotime::zero), - m_stopirq(0), - m_stopexception(0), - m_endexectime(attotime::zero), - m_pc_history_index(0), - m_bplist(NULL), - m_trace(NULL), - m_hotspots(NULL), - m_hotspot_count(0), - m_hotspot_threshhold(0) + m_exec(NULL), + m_memory(NULL), + m_state(NULL), + m_disasm(NULL), + m_flags(0), + m_symtable(&device, debug_cpu_get_global_symtable(device.machine())), + m_instrhook(NULL), + m_dasm_override(NULL), + m_opwidth(0), + m_stepaddr(0), + m_stepsleft(0), + m_stopaddr(0), + m_stoptime(attotime::zero), + m_stopirq(0), + m_stopexception(0), + m_endexectime(attotime::zero), + m_pc_history_index(0), + m_bplist(NULL), + m_trace(NULL), + m_hotspots(NULL), + m_hotspot_count(0), + m_hotspot_threshhold(0) { memset(m_pc_history, 0, sizeof(m_pc_history)); memset(m_wplist, 0, sizeof(m_wplist)); @@ -3138,11 +3138,11 @@ void device_debug::set_state(symbol_table &table, void *ref, UINT64 value) device_debug::breakpoint::breakpoint(symbol_table &symbols, int index, offs_t address, const char *condition, const char *action) : m_next(NULL), - m_index(index), - m_enabled(true), - m_address(address), - m_condition(&symbols, (condition != NULL) ? condition : "1"), - m_action((action != NULL) ? action : "") + m_index(index), + m_enabled(true), + m_address(address), + m_condition(&symbols, (condition != NULL) ? condition : "1"), + m_action((action != NULL) ? action : "") { } @@ -3189,14 +3189,14 @@ bool device_debug::breakpoint::hit(offs_t pc) device_debug::watchpoint::watchpoint(symbol_table &symbols, int index, address_space &space, int type, offs_t address, offs_t length, const char *condition, const char *action) : m_next(NULL), - m_space(space), - m_index(index), - m_enabled(true), - m_type(type), - m_address(space.address_to_byte(address) & space.bytemask()), - m_length(space.address_to_byte(length)), - m_condition(&symbols, (condition != NULL) ? condition : "1"), - m_action((action != NULL) ? action : "") + m_space(space), + m_index(index), + m_enabled(true), + m_type(type), + m_address(space.address_to_byte(address) & space.bytemask()), + m_length(space.address_to_byte(length)), + m_condition(&symbols, (condition != NULL) ? condition : "1"), + m_action((action != NULL) ? action : "") { } @@ -3246,12 +3246,12 @@ bool device_debug::watchpoint::hit(int type, offs_t address, int size) device_debug::tracer::tracer(device_debug &debug, FILE &file, bool trace_over, const char *action) : m_debug(debug), - m_file(file), - m_action((action != NULL) ? action : ""), - m_loops(0), - m_nextdex(0), - m_trace_over(trace_over), - m_trace_over_target(~0) + m_file(file), + m_action((action != NULL) ? action : ""), + m_loops(0), + m_nextdex(0), + m_trace_over(trace_over), + m_trace_over_target(~0) { memset(m_history, 0, sizeof(m_history)); } @@ -3365,9 +3365,9 @@ void device_debug::tracer::flush() device_debug::dasm_comment::dasm_comment(const char *text, offs_t address, rgb_t color, UINT32 crc) : m_next(NULL), - m_address(address), - m_color(color), - m_crc(crc), - m_text(text) + m_address(address), + m_color(color), + m_crc(crc), + m_text(text) { } diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h index 1805b8101d4..6ec0a080bb0 100644 --- a/src/emu/debug/debugcpu.h +++ b/src/emu/debug/debugcpu.h @@ -49,11 +49,11 @@ // CONSTANTS //************************************************************************** -const UINT8 WATCHPOINT_READ = 1; -const UINT8 WATCHPOINT_WRITE = 2; -const UINT8 WATCHPOINT_READWRITE = WATCHPOINT_READ | WATCHPOINT_WRITE; +const UINT8 WATCHPOINT_READ = 1; +const UINT8 WATCHPOINT_WRITE = 2; +const UINT8 WATCHPOINT_READWRITE = WATCHPOINT_READ | WATCHPOINT_WRITE; -const int COMMENT_VERSION = 1; +const int COMMENT_VERSION = 1; @@ -93,12 +93,12 @@ public: // internals bool hit(offs_t pc); - breakpoint * m_next; // next in the list - int m_index; // user reported index - UINT8 m_enabled; // enabled? - offs_t m_address; // execution address - parsed_expression m_condition; // condition - astring m_action; // action + breakpoint * m_next; // next in the list + int m_index; // user reported index + UINT8 m_enabled; // enabled? + offs_t m_address; // execution address + parsed_expression m_condition; // condition + astring m_action; // action }; // watchpoint class @@ -125,15 +125,15 @@ public: // internals bool hit(int type, offs_t address, int size); - watchpoint * m_next; // next in the list - address_space & m_space; // address space - int m_index; // user reported index - bool m_enabled; // enabled? - UINT8 m_type; // type (read/write) - offs_t m_address; // start address - offs_t m_length; // length of watch area - parsed_expression m_condition; // condition - astring m_action; // action + watchpoint * m_next; // next in the list + address_space & m_space; // address space + int m_index; // user reported index + bool m_enabled; // enabled? + UINT8 m_type; // type (read/write) + offs_t m_address; // start address + offs_t m_length; // length of watch area + parsed_expression m_condition; // condition + astring m_action; // action }; public: @@ -250,39 +250,39 @@ private: static void set_state(symbol_table &table, void *ref, UINT64 value); // basic device information - device_t & m_device; // device we are attached to - device_execute_interface *m_exec; // execute interface, if present - device_memory_interface *m_memory; // memory interface, if present - device_state_interface *m_state; // state interface, if present - device_disasm_interface *m_disasm; // disasm interface, if present + device_t & m_device; // device we are attached to + device_execute_interface *m_exec; // execute interface, if present + device_memory_interface *m_memory; // memory interface, if present + device_state_interface *m_state; // state interface, if present + device_disasm_interface *m_disasm; // disasm interface, if present // global state - UINT32 m_flags; // debugging flags for this CPU - symbol_table m_symtable; // symbol table for expression evaluation - debug_instruction_hook_func m_instrhook; // per-instruction callback hook + UINT32 m_flags; // debugging flags for this CPU + symbol_table m_symtable; // symbol table for expression evaluation + debug_instruction_hook_func m_instrhook; // per-instruction callback hook // disassembly - dasm_override_func m_dasm_override; // pointer to provided override function - UINT8 m_opwidth; // width of an opcode + dasm_override_func m_dasm_override; // pointer to provided override function + UINT8 m_opwidth; // width of an opcode // stepping information - offs_t m_stepaddr; // step target address for DEBUG_FLAG_STEPPING_OVER - int m_stepsleft; // number of steps left until done + offs_t m_stepaddr; // step target address for DEBUG_FLAG_STEPPING_OVER + int m_stepsleft; // number of steps left until done // execution information - offs_t m_stopaddr; // stop address for DEBUG_FLAG_STOP_PC - attotime m_stoptime; // stop time for DEBUG_FLAG_STOP_TIME - int m_stopirq; // stop IRQ number for DEBUG_FLAG_STOP_INTERRUPT - int m_stopexception; // stop exception number for DEBUG_FLAG_STOP_EXCEPTION - attotime m_endexectime; // ending time of the current execution + offs_t m_stopaddr; // stop address for DEBUG_FLAG_STOP_PC + attotime m_stoptime; // stop time for DEBUG_FLAG_STOP_TIME + int m_stopirq; // stop IRQ number for DEBUG_FLAG_STOP_INTERRUPT + int m_stopexception; // stop exception number for DEBUG_FLAG_STOP_EXCEPTION + attotime m_endexectime; // ending time of the current execution // history - offs_t m_pc_history[HISTORY_SIZE]; // history of recent PCs - UINT32 m_pc_history_index; // current history index + offs_t m_pc_history[HISTORY_SIZE]; // history of recent PCs + UINT32 m_pc_history_index; // current history index // breakpoints and watchpoints - breakpoint * m_bplist; // list of breakpoints - watchpoint * m_wplist[ADDRESS_SPACES]; // watchpoint lists for each address space + breakpoint * m_bplist; // list of breakpoints + watchpoint * m_wplist[ADDRESS_SPACES]; // watchpoint lists for each address space // tracing class tracer @@ -298,30 +298,30 @@ private: private: static const int TRACE_LOOPS = 64; - device_debug & m_debug; // reference to our owner - FILE & m_file; // tracing file for this CPU - astring m_action; // action to perform during a trace - offs_t m_history[TRACE_LOOPS]; // history of recent PCs - int m_loops; // number of instructions in a loop - int m_nextdex; // next index - bool m_trace_over; // true if we're tracing over - offs_t m_trace_over_target; // target for tracing over - // (0 = not tracing over, - // ~0 = not currently tracing over) + device_debug & m_debug; // reference to our owner + FILE & m_file; // tracing file for this CPU + astring m_action; // action to perform during a trace + offs_t m_history[TRACE_LOOPS]; // history of recent PCs + int m_loops; // number of instructions in a loop + int m_nextdex; // next index + bool m_trace_over; // true if we're tracing over + offs_t m_trace_over_target; // target for tracing over + // (0 = not tracing over, + // ~0 = not currently tracing over) }; - tracer * m_trace; // tracer state + tracer * m_trace; // tracer state // hotspots struct hotspot_entry { - offs_t m_access; // access address - offs_t m_pc; // PC of the access - address_space * m_space; // space where the access occurred - UINT32 m_count; // number of hits + offs_t m_access; // access address + offs_t m_pc; // PC of the access + address_space * m_space; // space where the access occurred + UINT32 m_count; // number of hits }; - hotspot_entry * m_hotspots; // hotspot list - int m_hotspot_count; // number of hotspots - int m_hotspot_threshhold; // threshhold for the number of hits to print + hotspot_entry * m_hotspots; // hotspot list + int m_hotspot_count; // number of hotspots + int m_hotspot_threshhold; // threshhold for the number of hits to print // comments class dasm_comment @@ -331,34 +331,34 @@ private: dasm_comment *next() const { return m_next; } - dasm_comment * m_next; // next comment in the list - offs_t m_address; // address in question - rgb_t m_color; // color to use - UINT32 m_crc; // CRC of code - astring m_text; // text + dasm_comment * m_next; // next comment in the list + offs_t m_address; // address in question + rgb_t m_color; // color to use + UINT32 m_crc; // CRC of code + astring m_text; // text }; - simple_list<dasm_comment> m_comment_list; // list of comments - UINT32 m_comment_change; // change counter for comments + simple_list<dasm_comment> m_comment_list; // list of comments + UINT32 m_comment_change; // change counter for comments // internal flag values - static const UINT32 DEBUG_FLAG_OBSERVING = 0x00000001; // observing this CPU - static const UINT32 DEBUG_FLAG_HISTORY = 0x00000002; // tracking this CPU's history - static const UINT32 DEBUG_FLAG_TRACING = 0x00000004; // tracing this CPU - static const UINT32 DEBUG_FLAG_TRACING_OVER = 0x00000008; // tracing this CPU with step over behavior - static const UINT32 DEBUG_FLAG_HOOKED = 0x00000010; // per-instruction callback hook - static const UINT32 DEBUG_FLAG_STEPPING = 0x00000020; // CPU is single stepping - static const UINT32 DEBUG_FLAG_STEPPING_OVER = 0x00000040; // CPU is stepping over a function - static const UINT32 DEBUG_FLAG_STEPPING_OUT = 0x00000080; // CPU is stepping out of a function - static const UINT32 DEBUG_FLAG_STOP_PC = 0x00000100; // there is a pending stop at cpu->breakpc - static const UINT32 DEBUG_FLAG_STOP_INTERRUPT = 0x00000400; // there is a pending stop on the next interrupt - static const UINT32 DEBUG_FLAG_STOP_EXCEPTION = 0x00000800; // there is a pending stop on the next exception - static const UINT32 DEBUG_FLAG_STOP_VBLANK = 0x00001000; // there is a pending stop on the next VBLANK - static const UINT32 DEBUG_FLAG_STOP_TIME = 0x00002000; // there is a pending stop at cpu->stoptime - static const UINT32 DEBUG_FLAG_LIVE_BP = 0x00010000; // there are live breakpoints for this CPU - - static const UINT32 DEBUG_FLAG_STEPPING_ANY = DEBUG_FLAG_STEPPING | DEBUG_FLAG_STEPPING_OVER | DEBUG_FLAG_STEPPING_OUT; - static const UINT32 DEBUG_FLAG_TRACING_ANY = DEBUG_FLAG_TRACING | DEBUG_FLAG_TRACING_OVER; - static const UINT32 DEBUG_FLAG_TRANSIENT = DEBUG_FLAG_STEPPING_ANY | DEBUG_FLAG_STOP_PC | + static const UINT32 DEBUG_FLAG_OBSERVING = 0x00000001; // observing this CPU + static const UINT32 DEBUG_FLAG_HISTORY = 0x00000002; // tracking this CPU's history + static const UINT32 DEBUG_FLAG_TRACING = 0x00000004; // tracing this CPU + static const UINT32 DEBUG_FLAG_TRACING_OVER = 0x00000008; // tracing this CPU with step over behavior + static const UINT32 DEBUG_FLAG_HOOKED = 0x00000010; // per-instruction callback hook + static const UINT32 DEBUG_FLAG_STEPPING = 0x00000020; // CPU is single stepping + static const UINT32 DEBUG_FLAG_STEPPING_OVER = 0x00000040; // CPU is stepping over a function + static const UINT32 DEBUG_FLAG_STEPPING_OUT = 0x00000080; // CPU is stepping out of a function + static const UINT32 DEBUG_FLAG_STOP_PC = 0x00000100; // there is a pending stop at cpu->breakpc + static const UINT32 DEBUG_FLAG_STOP_INTERRUPT = 0x00000400; // there is a pending stop on the next interrupt + static const UINT32 DEBUG_FLAG_STOP_EXCEPTION = 0x00000800; // there is a pending stop on the next exception + static const UINT32 DEBUG_FLAG_STOP_VBLANK = 0x00001000; // there is a pending stop on the next VBLANK + static const UINT32 DEBUG_FLAG_STOP_TIME = 0x00002000; // there is a pending stop at cpu->stoptime + static const UINT32 DEBUG_FLAG_LIVE_BP = 0x00010000; // there are live breakpoints for this CPU + + static const UINT32 DEBUG_FLAG_STEPPING_ANY = DEBUG_FLAG_STEPPING | DEBUG_FLAG_STEPPING_OVER | DEBUG_FLAG_STEPPING_OUT; + static const UINT32 DEBUG_FLAG_TRACING_ANY = DEBUG_FLAG_TRACING | DEBUG_FLAG_TRACING_OVER; + static const UINT32 DEBUG_FLAG_TRANSIENT = DEBUG_FLAG_STEPPING_ANY | DEBUG_FLAG_STOP_PC | DEBUG_FLAG_STOP_INTERRUPT | DEBUG_FLAG_STOP_EXCEPTION | DEBUG_FLAG_STOP_VBLANK | DEBUG_FLAG_STOP_TIME; }; @@ -388,7 +388,7 @@ device_t *debug_cpu_get_visible_cpu(running_machine &machine); int debug_cpu_within_instruction_hook(running_machine &machine); /* return TRUE if the current execution state is stopped */ -int debug_cpu_is_stopped(running_machine &machine); +int debug_cpu_is_stopped(running_machine &machine); diff --git a/src/emu/debug/debughlp.c b/src/emu/debug/debughlp.c index 12eeab5daa9..cf2eedf51a9 100644 --- a/src/emu/debug/debughlp.c +++ b/src/emu/debug/debughlp.c @@ -19,8 +19,8 @@ CONSTANTS ***************************************************************************/ -#define CONSOLE_HISTORY (10000) -#define CONSOLE_LINE_CHARS (100) +#define CONSOLE_HISTORY (10000) +#define CONSOLE_LINE_CHARS (100) @@ -30,8 +30,8 @@ struct help_item { - const char * tag; - const char * help; + const char * tag; + const char * help; }; @@ -640,7 +640,7 @@ static const help_item static_help_list[] = " gt[ime] <milliseconds>\n" "\n" "The gtime command resumes execution of the current code. Control will not be returned to the " - "debugger until a specified delay has elapsed. The delay is in milliseconds.\n" + "debugger until a specified delay has elapsed. The delay is in milliseconds.\n" "\n" "Example:\n" "\n" @@ -1319,4 +1319,3 @@ const char *debug_get_help(const char *tag) msglen += sprintf(&ambig_message[msglen], " help %s?\n", static_help_list[i].tag); return ambig_message; } - diff --git a/src/emu/debug/debughlp.h b/src/emu/debug/debughlp.h index d7ce2806320..b921e564b90 100644 --- a/src/emu/debug/debughlp.h +++ b/src/emu/debug/debughlp.h @@ -18,6 +18,6 @@ ***************************************************************************/ /* help management */ -const char * debug_get_help(const char *tag); +const char * debug_get_help(const char *tag); #endif diff --git a/src/emu/debug/debugvw.c b/src/emu/debug/debugvw.c index 9d6eb2008e9..88d57258f06 100644 --- a/src/emu/debug/debugvw.c +++ b/src/emu/debug/debugvw.c @@ -61,9 +61,9 @@ debug_view_source::debug_view_source(const char *name, device_t *device) : m_next(NULL), - m_name(name), - m_device(device), - m_is_octal(false) + m_name(name), + m_device(device), + m_is_octal(false) { device_execute_interface *intf; if (device && device->interface(intf)) @@ -92,9 +92,9 @@ debug_view_source::~debug_view_source() debug_view_source_list::debug_view_source_list(running_machine &machine) : m_machine(machine), - m_head(NULL), - m_tail(NULL), - m_count(0) + m_head(NULL), + m_tail(NULL), + m_count(0) { } @@ -206,24 +206,24 @@ const debug_view_source *debug_view_source_list::match_device(device_t *device) debug_view::debug_view(running_machine &machine, debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate) : m_next(NULL), - m_type(type), - m_source(NULL), - m_source_list(machine), - m_osdupdate(osdupdate), - m_osdprivate(osdprivate), - m_visible(10,10), - m_total(10,10), - m_topleft(0,0), - m_cursor(0,0), - m_supports_cursor(false), - m_cursor_visible(false), - m_recompute(true), - m_update_level(0), - m_update_pending(true), - m_osd_update_pending(true), - m_viewdata(NULL), - m_viewdata_size(0), - m_machine(machine) + m_type(type), + m_source(NULL), + m_source_list(machine), + m_osdupdate(osdupdate), + m_osdprivate(osdprivate), + m_visible(10,10), + m_total(10,10), + m_topleft(0,0), + m_cursor(0,0), + m_supports_cursor(false), + m_cursor_visible(false), + m_recompute(true), + m_update_level(0), + m_update_pending(true), + m_osd_update_pending(true), + m_viewdata(NULL), + m_viewdata_size(0), + m_machine(machine) { // allocate memory for the buffer m_viewdata_size = m_visible.y * m_visible.x; @@ -440,7 +440,7 @@ void debug_view::view_char(int chval) debug_view_manager::debug_view_manager(running_machine &machine) : m_machine(machine), - m_viewlist(NULL) + m_viewlist(NULL) { } @@ -562,10 +562,10 @@ debug_view *debug_view_manager::append(debug_view *view) debug_view_expression::debug_view_expression(running_machine &machine) : m_machine(machine), - m_dirty(true), - m_result(0), - m_parsed(debug_cpu_get_global_symtable(machine)), - m_string("0") + m_dirty(true), + m_result(0), + m_parsed(debug_cpu_get_global_symtable(machine)), + m_string("0") { } diff --git a/src/emu/debug/debugvw.h b/src/emu/debug/debugvw.h index b77f8eff607..cecc5adb7b0 100644 --- a/src/emu/debug/debugvw.h +++ b/src/emu/debug/debugvw.h @@ -72,29 +72,29 @@ enum debug_view_notification // attribute bits for debug_view_char.attrib -const UINT8 DCA_NORMAL = 0x00; // in Windows: black on white -const UINT8 DCA_CHANGED = 0x01; // in Windows: red foreground -const UINT8 DCA_SELECTED = 0x02; // in Windows: light red background -const UINT8 DCA_INVALID = 0x04; // in Windows: dark blue foreground -const UINT8 DCA_DISABLED = 0x08; // in Windows: darker foreground -const UINT8 DCA_ANCILLARY = 0x10; // in Windows: grey background -const UINT8 DCA_CURRENT = 0x20; // in Windows: yellow background -const UINT8 DCA_COMMENT = 0x40; // in Windows: green foreground +const UINT8 DCA_NORMAL = 0x00; // in Windows: black on white +const UINT8 DCA_CHANGED = 0x01; // in Windows: red foreground +const UINT8 DCA_SELECTED = 0x02; // in Windows: light red background +const UINT8 DCA_INVALID = 0x04; // in Windows: dark blue foreground +const UINT8 DCA_DISABLED = 0x08; // in Windows: darker foreground +const UINT8 DCA_ANCILLARY = 0x10; // in Windows: grey background +const UINT8 DCA_CURRENT = 0x20; // in Windows: yellow background +const UINT8 DCA_COMMENT = 0x40; // in Windows: green foreground // special characters that can be passed to process_char() -const int DCH_UP = 1; // up arrow -const int DCH_DOWN = 2; // down arrow -const int DCH_LEFT = 3; // left arrow -const int DCH_RIGHT = 4; // right arrow -const int DCH_PUP = 5; // page up -const int DCH_PDOWN = 6; // page down -const int DCH_HOME = 7; // home -const int DCH_CTRLHOME = 8; // ctrl+home -const int DCH_END = 9; // end -const int DCH_CTRLEND = 10; // ctrl+end -const int DCH_CTRLRIGHT = 11; // ctrl+right -const int DCH_CTRLLEFT = 12; // ctrl+left +const int DCH_UP = 1; // up arrow +const int DCH_DOWN = 2; // down arrow +const int DCH_LEFT = 3; // left arrow +const int DCH_RIGHT = 4; // right arrow +const int DCH_PUP = 5; // page up +const int DCH_PDOWN = 6; // page down +const int DCH_HOME = 7; // home +const int DCH_CTRLHOME = 8; // ctrl+home +const int DCH_END = 9; // end +const int DCH_CTRLEND = 10; // ctrl+end +const int DCH_CTRLRIGHT = 11; // ctrl+right +const int DCH_CTRLLEFT = 12; // ctrl+left @@ -113,8 +113,8 @@ typedef void (*debug_view_osd_update_func)(debug_view &view, void *osdprivate); // a single "character" in the debug view has an ASCII value and an attribute byte struct debug_view_char { - UINT8 byte; - UINT8 attrib; + UINT8 byte; + UINT8 attrib; }; @@ -124,8 +124,8 @@ class debug_view_xy public: debug_view_xy(int _x = 0, int _y = 0) : x(_x), y(_y) { } - INT32 x; - INT32 y; + INT32 x; + INT32 y; }; @@ -149,10 +149,10 @@ public: private: // internal state - debug_view_source * m_next; // link to next item - astring m_name; // name of the source item - device_t * m_device; // associated device (if applicable) - bool m_is_octal; // is view in octal or hex + debug_view_source * m_next; // link to next item + astring m_name; // name of the source item + device_t * m_device; // associated device (if applicable) + bool m_is_octal; // is view in octal or hex }; @@ -181,10 +181,10 @@ public: private: // internal state - running_machine & m_machine; // reference to our machine - debug_view_source * m_head; // head of the list - debug_view_source * m_tail; // end of the tail - UINT32 m_count; // number of items in the list + running_machine & m_machine; // reference to our machine + debug_view_source * m_head; // head of the list + debug_view_source * m_tail; // end of the tail + UINT32 m_count; // number of items in the list }; @@ -241,33 +241,33 @@ protected: protected: // core view data - debug_view * m_next; // link to the next view - debug_view_type m_type; // type of view - const debug_view_source *m_source; // currently selected data source - debug_view_source_list m_source_list; // list of available data sources + debug_view * m_next; // link to the next view + debug_view_type m_type; // type of view + const debug_view_source *m_source; // currently selected data source + debug_view_source_list m_source_list; // list of available data sources // OSD data - debug_view_osd_update_func m_osdupdate; // callback for the update - void * m_osdprivate; // OSD-managed private data + debug_view_osd_update_func m_osdupdate; // callback for the update + void * m_osdprivate; // OSD-managed private data // visibility info - debug_view_xy m_visible; // visible size (in rows and columns) - debug_view_xy m_total; // total size (in rows and columns) - debug_view_xy m_topleft; // top-left visible position (in rows and columns) - debug_view_xy m_cursor; // cursor position - bool m_supports_cursor; // does this view support a cursor? - bool m_cursor_visible; // is the cursor visible? + debug_view_xy m_visible; // visible size (in rows and columns) + debug_view_xy m_total; // total size (in rows and columns) + debug_view_xy m_topleft; // top-left visible position (in rows and columns) + debug_view_xy m_cursor; // cursor position + bool m_supports_cursor; // does this view support a cursor? + bool m_cursor_visible; // is the cursor visible? // update info - bool m_recompute; // does this view require a recomputation? - UINT8 m_update_level; // update level; updates when this hits 0 - bool m_update_pending; // true if there is a pending update - bool m_osd_update_pending; // true if there is a pending update - debug_view_char * m_viewdata; // current array of view data - int m_viewdata_size; // number of elements of the viewdata array + bool m_recompute; // does this view require a recomputation? + UINT8 m_update_level; // update level; updates when this hits 0 + bool m_update_pending; // true if there is a pending update + bool m_osd_update_pending; // true if there is a pending update + debug_view_char * m_viewdata; // current array of view data + int m_viewdata_size; // number of elements of the viewdata array private: - running_machine & m_machine; // machine associated with this view + running_machine & m_machine; // machine associated with this view }; @@ -295,8 +295,8 @@ private: debug_view *append(debug_view *view); // internal state - running_machine & m_machine; // reference to our machine - debug_view * m_viewlist; // list of views + running_machine & m_machine; // reference to our machine + debug_view * m_viewlist; // list of views }; @@ -326,11 +326,11 @@ private: bool recompute(); // internal state - running_machine & m_machine; // reference to the machine - bool m_dirty; // true if the expression needs to be re-evaluated - UINT64 m_result; // last result from the expression - parsed_expression m_parsed; // parsed expression data - astring m_string; // copy of the expression string + running_machine & m_machine; // reference to the machine + bool m_dirty; // true if the expression needs to be re-evaluated + UINT64 m_result; // last result from the expression + parsed_expression m_parsed; // parsed expression data + astring m_string; // copy of the expression string }; diff --git a/src/emu/debug/dvdisasm.c b/src/emu/debug/dvdisasm.c index 735a85d98be..eec6f4787bc 100644 --- a/src/emu/debug/dvdisasm.c +++ b/src/emu/debug/dvdisasm.c @@ -54,9 +54,9 @@ debug_view_disasm_source::debug_view_disasm_source(const char *name, device_t &device) : debug_view_source(name, &device), - m_device(device), - m_disasmintf(dynamic_cast<device_disasm_interface *>(&device)), - m_space(device.memory().space(AS_PROGRAM)) + m_device(device), + m_disasmintf(dynamic_cast<device_disasm_interface *>(&device)), + m_space(device.memory().space(AS_PROGRAM)) { } @@ -72,20 +72,20 @@ debug_view_disasm_source::debug_view_disasm_source(const char *name, device_t &d debug_view_disasm::debug_view_disasm(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate) : debug_view(machine, DVT_DISASSEMBLY, osdupdate, osdprivate), - m_right_column(DASM_RIGHTCOL_RAW), - m_backwards_steps(3), - m_dasm_width(DEFAULT_DASM_WIDTH), - m_last_direct_raw(NULL), - m_last_direct_decrypted(NULL), - m_last_change_count(0), - m_last_pcbyte(0), - m_divider1(0), - m_divider2(0), - m_divider3(0), - m_expression(machine), - m_allocated(0,0), - m_byteaddress(NULL), - m_dasm(NULL) + m_right_column(DASM_RIGHTCOL_RAW), + m_backwards_steps(3), + m_dasm_width(DEFAULT_DASM_WIDTH), + m_last_direct_raw(NULL), + m_last_direct_decrypted(NULL), + m_last_change_count(0), + m_last_pcbyte(0), + m_divider1(0), + m_divider2(0), + m_divider3(0), + m_expression(machine), + m_allocated(0,0), + m_byteaddress(NULL), + m_dasm(NULL) { // fail if no available sources enumerate_sources(); @@ -199,7 +199,7 @@ void debug_view_disasm::view_char(int chval) m_cursor.y = temp; break; - case DCH_HOME: // set the active column to the PC + case DCH_HOME: // set the active column to the PC { const debug_view_disasm_source &source = downcast<const debug_view_disasm_source &>(*m_source); offs_t pc = source.m_space.address_to_byte(source.m_device.safe_pc()) & source.m_space.logbytemask(); @@ -367,7 +367,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines) m_total.x = m_divider2 + 1 + char_num * maxbytes_clamped + (maxbytes_clamped / minbytes - 1) + 1; } else if (m_right_column == DASM_RIGHTCOL_COMMENTS) - m_total.x = m_divider2 + 1 + 50; // DEBUG_COMMENT_MAX_LINE_LENGTH + m_total.x = m_divider2 + 1 + 50; // DEBUG_COMMENT_MAX_LINE_LENGTH else m_total.x = m_divider2 + 1; diff --git a/src/emu/debug/dvdisasm.h b/src/emu/debug/dvdisasm.h index f7caac74c66..556e6907c7f 100644 --- a/src/emu/debug/dvdisasm.h +++ b/src/emu/debug/dvdisasm.h @@ -77,9 +77,9 @@ public: private: // internal state - device_t & m_device; // underlying device - device_disasm_interface *m_disasmintf; // disassembly interface - address_space & m_space; // address space to display + device_t & m_device; // underlying device + device_disasm_interface *m_disasmintf; // disassembly interface + address_space & m_space; // address space to display }; @@ -122,19 +122,19 @@ private: bool recompute(offs_t pc, int startline, int lines); // internal state - disasm_right_column m_right_column; // right column contents - UINT32 m_backwards_steps; // number of backwards steps - UINT32 m_dasm_width; // width of the disassembly area - UINT8 * m_last_direct_raw; // last direct raw value - UINT8 * m_last_direct_decrypted;// last direct decrypted value - UINT32 m_last_change_count; // last comment change count - offs_t m_last_pcbyte; // last PC byte value - int m_divider1, m_divider2; // left and right divider columns - int m_divider3; // comment divider column - debug_view_expression m_expression; // expression-related information - debug_view_xy m_allocated; // allocated rows/columns - offs_t * m_byteaddress; // addresses of the instructions - char * m_dasm; // disassembled instructions + disasm_right_column m_right_column; // right column contents + UINT32 m_backwards_steps; // number of backwards steps + UINT32 m_dasm_width; // width of the disassembly area + UINT8 * m_last_direct_raw; // last direct raw value + UINT8 * m_last_direct_decrypted;// last direct decrypted value + UINT32 m_last_change_count; // last comment change count + offs_t m_last_pcbyte; // last PC byte value + int m_divider1, m_divider2; // left and right divider columns + int m_divider3; // comment divider column + debug_view_expression m_expression; // expression-related information + debug_view_xy m_allocated; // allocated rows/columns + offs_t * m_byteaddress; // addresses of the instructions + char * m_dasm; // disassembled instructions // constants static const int DEFAULT_DASM_LINES = 1000; diff --git a/src/emu/debug/dvmemory.c b/src/emu/debug/dvmemory.c index c511e26cf3e..949bf71e995 100644 --- a/src/emu/debug/dvmemory.c +++ b/src/emu/debug/dvmemory.c @@ -74,37 +74,37 @@ const debug_view_memory::memory_view_pos debug_view_memory::s_memory_pos_table[9 debug_view_memory_source::debug_view_memory_source(const char *name, address_space &space) : debug_view_source(name, &space.device()), - m_space(&space), - m_memintf(dynamic_cast<device_memory_interface *>(&space.device())), - m_base(NULL), - m_length(0), - m_offsetxor(0), - m_endianness(space.endianness()), - m_prefsize(space.data_width() / 8) + m_space(&space), + m_memintf(dynamic_cast<device_memory_interface *>(&space.device())), + m_base(NULL), + m_length(0), + m_offsetxor(0), + m_endianness(space.endianness()), + m_prefsize(space.data_width() / 8) { } debug_view_memory_source::debug_view_memory_source(const char *name, memory_region ®ion) : debug_view_source(name), - m_space(NULL), - m_memintf(NULL), - m_base(region), - m_length(region.bytes()), - m_offsetxor(NATIVE_ENDIAN_VALUE_LE_BE(region.width() - 1, 0)), - m_endianness(region.endianness()), - m_prefsize(MIN(region.width(), 8)) + m_space(NULL), + m_memintf(NULL), + m_base(region), + m_length(region.bytes()), + m_offsetxor(NATIVE_ENDIAN_VALUE_LE_BE(region.width() - 1, 0)), + m_endianness(region.endianness()), + m_prefsize(MIN(region.width(), 8)) { } debug_view_memory_source::debug_view_memory_source(const char *name, void *base, int element_size, int num_elements) : debug_view_source(name), - m_space(NULL), - m_memintf(NULL), - m_base(base), - m_length(element_size * num_elements), - m_offsetxor(0), - m_endianness(ENDIANNESS_NATIVE), - m_prefsize(MIN(element_size, 8)) + m_space(NULL), + m_memintf(NULL), + m_base(base), + m_length(element_size * num_elements), + m_offsetxor(0), + m_endianness(ENDIANNESS_NATIVE), + m_prefsize(MIN(element_size, 8)) { } @@ -120,15 +120,15 @@ debug_view_memory_source::debug_view_memory_source(const char *name, void *base, debug_view_memory::debug_view_memory(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate) : debug_view(machine, DVT_MEMORY, osdupdate, osdprivate), - m_expression(machine), - m_chunks_per_row(16), - m_bytes_per_chunk(1), - m_reverse_view(false), - m_ascii_view(true), - m_no_translation(false), - m_maxaddr(0), - m_bytes_per_row(16), - m_byte_offset(0) + m_expression(machine), + m_chunks_per_row(16), + m_bytes_per_chunk(1), + m_reverse_view(false), + m_ascii_view(true), + m_no_translation(false), + m_maxaddr(0), + m_bytes_per_row(16), + m_byte_offset(0) { // fail if no available sources enumerate_sources(); @@ -181,10 +181,10 @@ void debug_view_memory::enumerate_sources() break; // add pretty much anything that's not a timer (we may wish to cull other items later) - // also, don't trim the front of the name, it's important to know which VIA6522 we're looking at, e.g. - if (strncmp(itemname, "timer/", 6)) + // also, don't trim the front of the name, it's important to know which VIA6522 we're looking at, e.g. + if (strncmp(itemname, "timer/", 6)) { - name.cpy(itemname); + name.cpy(itemname); m_source_list.append(*auto_alloc(machine(), debug_view_memory_source(name, base, valsize, valcount))); } } @@ -627,10 +627,10 @@ bool debug_view_memory::read(UINT8 size, offs_t offs, UINT64 &data) { switch (size) { - case 1: data = debug_read_byte(*source.m_space, offs, !m_no_translation); break; - case 2: data = debug_read_word(*source.m_space, offs, !m_no_translation); break; - case 4: data = debug_read_dword(*source.m_space, offs, !m_no_translation); break; - case 8: data = debug_read_qword(*source.m_space, offs, !m_no_translation); break; + case 1: data = debug_read_byte(*source.m_space, offs, !m_no_translation); break; + case 2: data = debug_read_word(*source.m_space, offs, !m_no_translation); break; + case 4: data = debug_read_dword(*source.m_space, offs, !m_no_translation); break; + case 8: data = debug_read_qword(*source.m_space, offs, !m_no_translation); break; } } return ismapped; @@ -674,10 +674,10 @@ void debug_view_memory::write(UINT8 size, offs_t offs, UINT64 data) { switch (size) { - case 1: debug_write_byte(*source.m_space, offs, data, !m_no_translation); break; - case 2: debug_write_word(*source.m_space, offs, data, !m_no_translation); break; - case 4: debug_write_dword(*source.m_space, offs, data, !m_no_translation); break; - case 8: debug_write_qword(*source.m_space, offs, data, !m_no_translation); break; + case 1: debug_write_byte(*source.m_space, offs, data, !m_no_translation); break; + case 2: debug_write_word(*source.m_space, offs, data, !m_no_translation); break; + case 4: debug_write_dword(*source.m_space, offs, data, !m_no_translation); break; + case 8: debug_write_qword(*source.m_space, offs, data, !m_no_translation); break; } return; } diff --git a/src/emu/debug/dvmemory.h b/src/emu/debug/dvmemory.h index 2436b1a6199..66aac33e8f3 100644 --- a/src/emu/debug/dvmemory.h +++ b/src/emu/debug/dvmemory.h @@ -60,13 +60,13 @@ public: address_space *space() const { return m_space; } private: - address_space *m_space; // address space we reference (if any) - device_memory_interface *m_memintf; // pointer to the memory interface of the device - void * m_base; // pointer to memory base - offs_t m_length; // length of memory - offs_t m_offsetxor; // XOR to apply to offsets - endianness_t m_endianness; // endianness of memory - UINT8 m_prefsize; // preferred bytes per chunk + address_space *m_space; // address space we reference (if any) + device_memory_interface *m_memintf; // pointer to the memory interface of the device + void * m_base; // pointer to memory base + offs_t m_length; // length of memory + offs_t m_offsetxor; // XOR to apply to offsets + endianness_t m_endianness; // endianness of memory + UINT8 m_prefsize; // preferred bytes per chunk }; @@ -126,31 +126,31 @@ private: void write(UINT8 size, offs_t offs, UINT64 data); // internal state - debug_view_expression m_expression; // expression describing the start address - UINT32 m_chunks_per_row; // number of chunks displayed per line - UINT8 m_bytes_per_chunk; // bytes per chunk - bool m_reverse_view; // reverse-endian view? - bool m_ascii_view; // display ASCII characters? - bool m_no_translation; // don't run addresses through the cpu translation hook - offs_t m_maxaddr; // (derived) maximum address to display - UINT32 m_bytes_per_row; // (derived) number of bytes displayed per line - UINT32 m_byte_offset; // (derived) offset of starting visible byte - astring m_addrformat; // (derived) format string to use to print addresses + debug_view_expression m_expression; // expression describing the start address + UINT32 m_chunks_per_row; // number of chunks displayed per line + UINT8 m_bytes_per_chunk; // bytes per chunk + bool m_reverse_view; // reverse-endian view? + bool m_ascii_view; // display ASCII characters? + bool m_no_translation; // don't run addresses through the cpu translation hook + offs_t m_maxaddr; // (derived) maximum address to display + UINT32 m_bytes_per_row; // (derived) number of bytes displayed per line + UINT32 m_byte_offset; // (derived) offset of starting visible byte + astring m_addrformat; // (derived) format string to use to print addresses struct section { bool contains(int x) const { return x >= m_pos && x < m_pos + m_width; } - INT32 m_pos; /* starting position */ - INT32 m_width; /* width of this section */ + INT32 m_pos; /* starting position */ + INT32 m_width; /* width of this section */ }; - section m_section[3]; // (derived) 3 sections to manage + section m_section[3]; // (derived) 3 sections to manage struct memory_view_pos { - UINT8 m_spacing; /* spacing between each entry */ - UINT8 m_shift[24]; /* shift for each character */ + UINT8 m_spacing; /* spacing between each entry */ + UINT8 m_shift[24]; /* shift for each character */ }; - static const memory_view_pos s_memory_pos_table[9]; // table for rendering at different chunk sizes + static const memory_view_pos s_memory_pos_table[9]; // table for rendering at different chunk sizes // constants static const int MEM_MAX_LINE_WIDTH = 1024; diff --git a/src/emu/debug/dvstate.c b/src/emu/debug/dvstate.c index 4882e7a9006..fafaefaa842 100644 --- a/src/emu/debug/dvstate.c +++ b/src/emu/debug/dvstate.c @@ -53,9 +53,9 @@ debug_view_state_source::debug_view_state_source(const char *name, device_t &device) : debug_view_source(name, &device), - m_device(device), - m_stateintf(dynamic_cast<device_state_interface *>(&device)), - m_execintf(dynamic_cast<device_execute_interface *>(&device)) + m_device(device), + m_stateintf(dynamic_cast<device_state_interface *>(&device)), + m_execintf(dynamic_cast<device_execute_interface *>(&device)) { } @@ -71,9 +71,9 @@ debug_view_state_source::debug_view_state_source(const char *name, device_t &dev debug_view_state::debug_view_state(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate) : debug_view(machine, DVT_STATE, osdupdate, osdprivate), - m_divider(0), - m_last_update(0), - m_state_list(NULL) + m_divider(0), + m_last_update(0), + m_state_list(NULL) { // fail if no available sources enumerate_sources(); @@ -361,10 +361,10 @@ void debug_view_state::view_update() debug_view_state::state_item::state_item(int index, const char *name, UINT8 valuechars) : m_next(NULL), - m_lastval(0), - m_currval(0), - m_index(index), - m_vallen(valuechars), - m_symbol(name) + m_lastval(0), + m_currval(0), + m_index(index), + m_vallen(valuechars), + m_symbol(name) { } diff --git a/src/emu/debug/dvstate.h b/src/emu/debug/dvstate.h index 406ce2c35c6..f47f51c5141 100644 --- a/src/emu/debug/dvstate.h +++ b/src/emu/debug/dvstate.h @@ -61,9 +61,9 @@ public: private: // internal state - device_t & m_device; // underlying device - device_state_interface *m_stateintf; // state interface - device_execute_interface *m_execintf; // execution interface + device_t & m_device; // underlying device + device_state_interface *m_stateintf; // state interface + device_execute_interface *m_execintf; // execution interface }; @@ -87,12 +87,12 @@ private: { state_item(int index, const char *name, UINT8 valuechars); - state_item * m_next; // next item - UINT64 m_lastval; // last value - UINT64 m_currval; // current value - int m_index; // index - UINT8 m_vallen; // number of value chars - astring m_symbol; // symbol + state_item * m_next; // next item + UINT64 m_lastval; // last value + UINT64 m_currval; // current value + int m_index; // index + UINT8 m_vallen; // number of value chars + astring m_symbol; // symbol }; // internal helpers @@ -101,16 +101,16 @@ private: void recompute(); // internal state - int m_divider; // dividing column - UINT64 m_last_update; // execution counter at last update - state_item * m_state_list; // state data + int m_divider; // dividing column + UINT64 m_last_update; // execution counter at last update + state_item * m_state_list; // state data // constants - static const int REG_DIVIDER = -10; - static const int REG_CYCLES = -11; - static const int REG_BEAMX = -12; - static const int REG_BEAMY = -13; - static const int REG_FRAME = -14; + static const int REG_DIVIDER = -10; + static const int REG_CYCLES = -11; + static const int REG_BEAMX = -12; + static const int REG_BEAMY = -13; + static const int REG_FRAME = -14; }; diff --git a/src/emu/debug/dvtext.c b/src/emu/debug/dvtext.c index 8e42b182f86..d8b216a19cb 100644 --- a/src/emu/debug/dvtext.c +++ b/src/emu/debug/dvtext.c @@ -54,9 +54,9 @@ debug_view_textbuf::debug_view_textbuf(running_machine &machine, debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate, text_buffer &textbuf) : debug_view(machine, type, osdupdate, osdprivate), - m_textbuf(textbuf), - m_at_bottom(true), - m_topseq(0) + m_textbuf(textbuf), + m_at_bottom(true), + m_topseq(0) { } diff --git a/src/emu/debug/dvtext.h b/src/emu/debug/dvtext.h index dcaa02eaa74..d46db988701 100644 --- a/src/emu/debug/dvtext.h +++ b/src/emu/debug/dvtext.h @@ -65,9 +65,9 @@ protected: private: // internal state - text_buffer & m_textbuf; /* pointer to the text buffer */ - bool m_at_bottom; /* are we tracking new stuff being added? */ - UINT32 m_topseq; /* sequence number of the top line */ + text_buffer & m_textbuf; /* pointer to the text buffer */ + bool m_at_bottom; /* are we tracking new stuff being added? */ + UINT32 m_topseq; /* sequence number of the top line */ }; diff --git a/src/emu/debug/express.c b/src/emu/debug/express.c index b9a0b15276f..196ce062f6f 100644 --- a/src/emu/debug/express.c +++ b/src/emu/debug/express.c @@ -68,7 +68,7 @@ DEBUGGING ***************************************************************************/ -#define DEBUG_TOKENS 0 +#define DEBUG_TOKENS 0 @@ -77,7 +77,7 @@ ***************************************************************************/ #ifndef DEFAULT_BASE -#define DEFAULT_BASE 16 // hex unless otherwise specified +#define DEFAULT_BASE 16 // hex unless otherwise specified #endif @@ -156,9 +156,9 @@ private: static void internal_setter(symbol_table &table, void *symref, UINT64 value); // internal state - symbol_table::getter_func m_getter; - symbol_table::setter_func m_setter; - UINT64 m_value; + symbol_table::getter_func m_getter; + symbol_table::setter_func m_setter; + UINT64 m_value; }; @@ -179,9 +179,9 @@ public: private: // internal state - UINT16 m_minparams; - UINT16 m_maxparams; - symbol_table::execute_func m_execute; + UINT16 m_minparams; + UINT16 m_maxparams; + symbol_table::execute_func m_execute; }; @@ -199,26 +199,26 @@ const char *expression_error::code_string() const { switch (m_code) { - case NOT_LVAL: return "not an lvalue"; - case NOT_RVAL: return "not an rvalue"; - case SYNTAX: return "syntax error"; - case UNKNOWN_SYMBOL: return "unknown symbol"; - case INVALID_NUMBER: return "invalid number"; - case INVALID_TOKEN: return "invalid token"; - case STACK_OVERFLOW: return "stack overflow"; - case STACK_UNDERFLOW: return "stack underflow"; - case UNBALANCED_PARENS: return "unbalanced parentheses"; - case DIVIDE_BY_ZERO: return "divide by zero"; - case OUT_OF_MEMORY: return "out of memory"; - case INVALID_PARAM_COUNT: return "invalid number of parameters"; - case UNBALANCED_QUOTES: return "unbalanced quotes"; - case TOO_MANY_STRINGS: return "too many strings"; - case INVALID_MEMORY_SIZE: return "invalid memory size (b/w/d/q expected)"; - case NO_SUCH_MEMORY_SPACE: return "non-existent memory space"; - case INVALID_MEMORY_SPACE: return "invalid memory space (p/d/i/o/r/m expected)"; - case INVALID_MEMORY_NAME: return "invalid memory name"; - case MISSING_MEMORY_NAME: return "missing memory name"; - default: return "unknown error"; + case NOT_LVAL: return "not an lvalue"; + case NOT_RVAL: return "not an rvalue"; + case SYNTAX: return "syntax error"; + case UNKNOWN_SYMBOL: return "unknown symbol"; + case INVALID_NUMBER: return "invalid number"; + case INVALID_TOKEN: return "invalid token"; + case STACK_OVERFLOW: return "stack overflow"; + case STACK_UNDERFLOW: return "stack underflow"; + case UNBALANCED_PARENS: return "unbalanced parentheses"; + case DIVIDE_BY_ZERO: return "divide by zero"; + case OUT_OF_MEMORY: return "out of memory"; + case INVALID_PARAM_COUNT: return "invalid number of parameters"; + case UNBALANCED_QUOTES: return "unbalanced quotes"; + case TOO_MANY_STRINGS: return "too many strings"; + case INVALID_MEMORY_SIZE: return "invalid memory size (b/w/d/q expected)"; + case NO_SUCH_MEMORY_SPACE: return "non-existent memory space"; + case INVALID_MEMORY_SPACE: return "invalid memory space (p/d/i/o/r/m expected)"; + case INVALID_MEMORY_NAME: return "invalid memory name"; + case MISSING_MEMORY_NAME: return "missing memory name"; + default: return "unknown error"; } } @@ -234,10 +234,10 @@ const char *expression_error::code_string() const symbol_entry::symbol_entry(symbol_table &table, symbol_type type, const char *name, void *ref) : m_next(NULL), - m_table(table), - m_type(type), - m_name(name), - m_ref(ref) + m_table(table), + m_type(type), + m_name(name), + m_ref(ref) { } @@ -262,27 +262,27 @@ symbol_entry::~symbol_entry() integer_symbol_entry::integer_symbol_entry(symbol_table &table, const char *name, symbol_table::read_write rw, UINT64 *ptr) : symbol_entry(table, SMT_INTEGER, name, (ptr == NULL) ? &m_value : ptr), - m_getter(internal_getter), - m_setter((rw == symbol_table::READ_ONLY) ? NULL : internal_setter), - m_value(0) + m_getter(internal_getter), + m_setter((rw == symbol_table::READ_ONLY) ? NULL : internal_setter), + m_value(0) { } integer_symbol_entry::integer_symbol_entry(symbol_table &table, const char *name, UINT64 constval) : symbol_entry(table, SMT_INTEGER, name, &m_value), - m_getter(internal_getter), - m_setter(NULL), - m_value(constval) + m_getter(internal_getter), + m_setter(NULL), + m_value(constval) { } integer_symbol_entry::integer_symbol_entry(symbol_table &table, const char *name, void *ref, symbol_table::getter_func getter, symbol_table::setter_func setter) : symbol_entry(table, SMT_INTEGER, name, ref), - m_getter(getter), - m_setter(setter), - m_value(0) + m_getter(getter), + m_setter(setter), + m_value(0) { } @@ -353,9 +353,9 @@ void integer_symbol_entry::internal_setter(symbol_table &table, void *symref, UI function_symbol_entry::function_symbol_entry(symbol_table &table, const char *name, void *ref, int minparams, int maxparams, symbol_table::execute_func execute) : symbol_entry(table, SMT_FUNCTION, name, ref), - m_minparams(minparams), - m_maxparams(maxparams), - m_execute(execute) + m_minparams(minparams), + m_maxparams(maxparams), + m_execute(execute) { } @@ -415,11 +415,11 @@ UINT64 function_symbol_entry::execute(int numparams, const UINT64 *paramlist) symbol_table::symbol_table(void *globalref, symbol_table *parent) : m_parent(parent), - m_globalref(globalref), - m_memory_param(NULL), - m_memory_valid(NULL), - m_memory_read(NULL), - m_memory_write(NULL) + m_globalref(globalref), + m_memory_param(NULL), + m_memory_valid(NULL), + m_memory_read(NULL), + m_memory_write(NULL) { } @@ -669,51 +669,51 @@ void parsed_expression::print_tokens(FILE *out) case parse_token::OPERATOR: switch (token->value.i) { - case TVL_LPAREN: fprintf(out, "(\n"); break; - case TVL_RPAREN: fprintf(out, ")\n"); break; - case TVL_PLUSPLUS: fprintf(out, "++ (unspecified)\n"); break; - case TVL_MINUSMINUS: fprintf(out, "-- (unspecified)\n"); break; - case TVL_PREINCREMENT: fprintf(out, "++ (prefix)\n"); break; - case TVL_PREDECREMENT: fprintf(out, "-- (prefix)\n"); break; - case TVL_POSTINCREMENT: fprintf(out, "++ (postfix)\n"); break; - case TVL_POSTDECREMENT: fprintf(out, "-- (postfix)\n"); break; - case TVL_COMPLEMENT: fprintf(out, "!\n"); break; - case TVL_NOT: fprintf(out, "~\n"); break; - case TVL_UPLUS: fprintf(out, "+ (unary)\n"); break; - case TVL_UMINUS: fprintf(out, "- (unary)\n"); break; - case TVL_MULTIPLY: fprintf(out, "*\n"); break; - case TVL_DIVIDE: fprintf(out, "/\n"); break; - case TVL_MODULO: fprintf(out, "%%\n"); break; - case TVL_ADD: fprintf(out, "+\n"); break; - case TVL_SUBTRACT: fprintf(out, "-\n"); break; - case TVL_LSHIFT: fprintf(out, "<<\n"); break; - case TVL_RSHIFT: fprintf(out, ">>\n"); break; - case TVL_LESS: fprintf(out, "<\n"); break; - case TVL_LESSOREQUAL: fprintf(out, "<=\n"); break; - case TVL_GREATER: fprintf(out, ">\n"); break; - case TVL_GREATEROREQUAL:fprintf(out, ">=\n"); break; - case TVL_EQUAL: fprintf(out, "==\n"); break; - case TVL_NOTEQUAL: fprintf(out, "!=\n"); break; - case TVL_BAND: fprintf(out, "&\n"); break; - case TVL_BXOR: fprintf(out, "^\n"); break; - case TVL_BOR: fprintf(out, "|\n"); break; - case TVL_LAND: fprintf(out, "&&\n"); break; - case TVL_LOR: fprintf(out, "||\n"); break; - case TVL_ASSIGN: fprintf(out, "=\n"); break; - case TVL_ASSIGNMULTIPLY:fprintf(out, "*=\n"); break; - case TVL_ASSIGNDIVIDE: fprintf(out, "/=\n"); break; - case TVL_ASSIGNMODULO: fprintf(out, "%%=\n"); break; - case TVL_ASSIGNADD: fprintf(out, "+=\n"); break; - case TVL_ASSIGNSUBTRACT:fprintf(out, "-=\n"); break; - case TVL_ASSIGNLSHIFT: fprintf(out, "<<=\n"); break; - case TVL_ASSIGNRSHIFT: fprintf(out, ">>=\n"); break; - case TVL_ASSIGNBAND: fprintf(out, "&=\n"); break; - case TVL_ASSIGNBXOR: fprintf(out, "^=\n"); break; - case TVL_ASSIGNBOR: fprintf(out, "|=\n"); break; - case TVL_COMMA: fprintf(out, ",\n"); break; - case TVL_MEMORYAT: fprintf(out, "mem@\n"); break; - case TVL_EXECUTEFUNC: fprintf(out, "execute\n"); break; - default: fprintf(out, "INVALID OPERATOR\n"); break; + case TVL_LPAREN: fprintf(out, "(\n"); break; + case TVL_RPAREN: fprintf(out, ")\n"); break; + case TVL_PLUSPLUS: fprintf(out, "++ (unspecified)\n"); break; + case TVL_MINUSMINUS: fprintf(out, "-- (unspecified)\n"); break; + case TVL_PREINCREMENT: fprintf(out, "++ (prefix)\n"); break; + case TVL_PREDECREMENT: fprintf(out, "-- (prefix)\n"); break; + case TVL_POSTINCREMENT: fprintf(out, "++ (postfix)\n"); break; + case TVL_POSTDECREMENT: fprintf(out, "-- (postfix)\n"); break; + case TVL_COMPLEMENT: fprintf(out, "!\n"); break; + case TVL_NOT: fprintf(out, "~\n"); break; + case TVL_UPLUS: fprintf(out, "+ (unary)\n"); break; + case TVL_UMINUS: fprintf(out, "- (unary)\n"); break; + case TVL_MULTIPLY: fprintf(out, "*\n"); break; + case TVL_DIVIDE: fprintf(out, "/\n"); break; + case TVL_MODULO: fprintf(out, "%%\n"); break; + case TVL_ADD: fprintf(out, "+\n"); break; + case TVL_SUBTRACT: fprintf(out, "-\n"); break; + case TVL_LSHIFT: fprintf(out, "<<\n"); break; + case TVL_RSHIFT: fprintf(out, ">>\n"); break; + case TVL_LESS: fprintf(out, "<\n"); break; + case TVL_LESSOREQUAL: fprintf(out, "<=\n"); break; + case TVL_GREATER: fprintf(out, ">\n"); break; + case TVL_GREATEROREQUAL:fprintf(out, ">=\n"); break; + case TVL_EQUAL: fprintf(out, "==\n"); break; + case TVL_NOTEQUAL: fprintf(out, "!=\n"); break; + case TVL_BAND: fprintf(out, "&\n"); break; + case TVL_BXOR: fprintf(out, "^\n"); break; + case TVL_BOR: fprintf(out, "|\n"); break; + case TVL_LAND: fprintf(out, "&&\n"); break; + case TVL_LOR: fprintf(out, "||\n"); break; + case TVL_ASSIGN: fprintf(out, "=\n"); break; + case TVL_ASSIGNMULTIPLY:fprintf(out, "*=\n"); break; + case TVL_ASSIGNDIVIDE: fprintf(out, "/=\n"); break; + case TVL_ASSIGNMODULO: fprintf(out, "%%=\n"); break; + case TVL_ASSIGNADD: fprintf(out, "+=\n"); break; + case TVL_ASSIGNSUBTRACT:fprintf(out, "-=\n"); break; + case TVL_ASSIGNLSHIFT: fprintf(out, "<<=\n"); break; + case TVL_ASSIGNRSHIFT: fprintf(out, ">>=\n"); break; + case TVL_ASSIGNBAND: fprintf(out, "&=\n"); break; + case TVL_ASSIGNBXOR: fprintf(out, "^=\n"); break; + case TVL_ASSIGNBOR: fprintf(out, "|=\n"); break; + case TVL_COMMA: fprintf(out, ",\n"); break; + case TVL_MEMORYAT: fprintf(out, "mem@\n"); break; + case TVL_EXECUTEFUNC: fprintf(out, "execute\n"); break; + default: fprintf(out, "INVALID OPERATOR\n"); break; } break; } @@ -1136,25 +1136,25 @@ void parsed_expression::parse_memory_operator(parse_token &token, const char *st expression_space memspace = EXPSPACE_INVALID; switch (space) { - case 'p': memspace = physical ? EXPSPACE_PROGRAM_PHYSICAL : EXPSPACE_PROGRAM_LOGICAL; break; - case 'd': memspace = physical ? EXPSPACE_DATA_PHYSICAL : EXPSPACE_DATA_LOGICAL; break; - case 'i': memspace = physical ? EXPSPACE_IO_PHYSICAL : EXPSPACE_IO_LOGICAL; break; - case '3': memspace = physical ? EXPSPACE_SPACE3_PHYSICAL : EXPSPACE_SPACE3_LOGICAL; break; - case 'o': memspace = EXPSPACE_OPCODE; break; - case 'r': memspace = EXPSPACE_RAMWRITE; break; - case 'm': memspace = EXPSPACE_REGION; break; - default: throw expression_error(expression_error::INVALID_MEMORY_SPACE, token.offset() + (string - startstring)); + case 'p': memspace = physical ? EXPSPACE_PROGRAM_PHYSICAL : EXPSPACE_PROGRAM_LOGICAL; break; + case 'd': memspace = physical ? EXPSPACE_DATA_PHYSICAL : EXPSPACE_DATA_LOGICAL; break; + case 'i': memspace = physical ? EXPSPACE_IO_PHYSICAL : EXPSPACE_IO_LOGICAL; break; + case '3': memspace = physical ? EXPSPACE_SPACE3_PHYSICAL : EXPSPACE_SPACE3_LOGICAL; break; + case 'o': memspace = EXPSPACE_OPCODE; break; + case 'r': memspace = EXPSPACE_RAMWRITE; break; + case 'm': memspace = EXPSPACE_REGION; break; + default: throw expression_error(expression_error::INVALID_MEMORY_SPACE, token.offset() + (string - startstring)); } // convert the size to flags int memsize; switch (size) { - case 'b': memsize = 0; break; - case 'w': memsize = 1; break; - case 'd': memsize = 2; break; - case 'q': memsize = 3; break; - default: throw expression_error(expression_error::INVALID_MEMORY_SIZE, token.offset() + (string - startstring) + length - 1); + case 'b': memsize = 0; break; + case 'w': memsize = 1; break; + case 'd': memsize = 2; break; + case 'q': memsize = 3; break; + default: throw expression_error(expression_error::INVALID_MEMORY_SIZE, token.offset() + (string - startstring) + length - 1); } // validate the name @@ -1210,7 +1210,7 @@ void parsed_expression::normalize_operator(parse_token *prevtoken, parse_token & case TVL_ADD: case TVL_SUBTRACT: // Assume we're unary if we are the first token, or if the previous token is not - // a symbol, a number, or a right parenthesis + // a symbol, a number, or a right parenthesis if (prevtoken == NULL || (!prevtoken->is_symbol() && !prevtoken->is_number() && !prevtoken->is_operator(TVL_RPAREN))) thistoken.configure_operator(thistoken.is_operator(TVL_ADD) ? TVL_UPLUS : TVL_UMINUS, 2); break; @@ -1268,8 +1268,8 @@ void parsed_expression::infix_to_postfix() stack.prepend(*token); // if the token is a closing parenthesis, pop all operators until we - // reach an opening parenthesis and append them to the result string, - // discaring the open parenthesis + // reach an opening parenthesis and append them to the result string, + // discaring the open parenthesis else if (token->is_operator(TVL_RPAREN)) { // loop until we find our matching opener @@ -1291,8 +1291,8 @@ void parsed_expression::infix_to_postfix() } // if the token is an operator, pop operators until we reach an opening parenthesis, - // an operator of lower precedence, or a right associative symbol of equal precedence. - // Push the operator onto the stack. + // an operator of lower precedence, or a right associative symbol of equal precedence. + // Push the operator onto the stack. else { int our_precedence = token->precedence(); @@ -1687,12 +1687,12 @@ UINT64 parsed_expression::execute_tokens() parsed_expression::parse_token::parse_token(int offset) : m_next(NULL), - m_type(INVALID), - m_offset(offset), - m_value(0), - m_flags(0), - m_string(NULL), - m_symbol(NULL) + m_type(INVALID), + m_offset(offset), + m_value(0), + m_flags(0), + m_string(NULL), + m_symbol(NULL) { } diff --git a/src/emu/debug/express.h b/src/emu/debug/express.h index 8b348c67ef0..f1c0d189a3b 100644 --- a/src/emu/debug/express.h +++ b/src/emu/debug/express.h @@ -110,7 +110,7 @@ public: // construction/destruction expression_error(error_code code, int offset = 0) : m_code(code), - m_offset(offset) { } + m_offset(offset) { } // operators operator error_code() const { return m_code; } @@ -122,8 +122,8 @@ public: private: // internal state - error_code m_code; - int m_offset; + error_code m_code; + int m_offset; }; @@ -161,11 +161,11 @@ public: protected: // internal state - symbol_entry * m_next; // link to next entry - symbol_table & m_table; // pointer back to the owning table - symbol_type m_type; // type of symbol - astring m_name; // name of the symbol - void * m_ref; // internal reference + symbol_entry * m_next; // link to next entry + symbol_table & m_table; // pointer back to the owning table + symbol_type m_type; // type of symbol + astring m_name; // name of the symbol + void * m_ref; // internal reference }; @@ -224,13 +224,13 @@ public: private: // internal state - symbol_table * m_parent; // pointer to the parent symbol table - void * m_globalref; // global reference parameter - tagged_list<symbol_entry> m_symlist; // list of symbols - void * m_memory_param; // callback parameter for memory - valid_func m_memory_valid; // validation callback - read_func m_memory_read; // read callback - write_func m_memory_write; // write callback + symbol_table * m_parent; // pointer to the parent symbol table + void * m_globalref; // global reference parameter + tagged_list<symbol_entry> m_symlist; // list of symbols + void * m_memory_param; // callback parameter for memory + valid_func m_memory_valid; // validation callback + read_func m_memory_read; // read callback + write_func m_memory_write; // write callback }; @@ -269,18 +269,18 @@ private: // operator flags enum { - TIN_OPTYPE_SHIFT = 0, // 8 bits (0-7) - TIN_OPTYPE_MASK = 0xff << TIN_OPTYPE_SHIFT, - TIN_RIGHT_TO_LEFT_SHIFT = 16, // 1 bit (16) - TIN_RIGHT_TO_LEFT_MASK = 1 << TIN_RIGHT_TO_LEFT_SHIFT, - TIN_FUNCTION_SHIFT = 17, // 1 bit (17) - TIN_FUNCTION_MASK = 1 << TIN_FUNCTION_SHIFT, - TIN_MEMORY_SIZE_SHIFT = 18, // 2 bits (18-19) - TIN_MEMORY_SIZE_MASK = 3 << TIN_MEMORY_SIZE_SHIFT, - TIN_MEMORY_SPACE_SHIFT = 20, // 4 bits (20-23) - TIN_MEMORY_SPACE_MASK = 0xf << TIN_MEMORY_SPACE_SHIFT, - TIN_PRECEDENCE_SHIFT = 24, // 8 bits (24-31) - TIN_PRECEDENCE_MASK = 0xff << TIN_PRECEDENCE_SHIFT + TIN_OPTYPE_SHIFT = 0, // 8 bits (0-7) + TIN_OPTYPE_MASK = 0xff << TIN_OPTYPE_SHIFT, + TIN_RIGHT_TO_LEFT_SHIFT = 16, // 1 bit (16) + TIN_RIGHT_TO_LEFT_MASK = 1 << TIN_RIGHT_TO_LEFT_SHIFT, + TIN_FUNCTION_SHIFT = 17, // 1 bit (17) + TIN_FUNCTION_MASK = 1 << TIN_FUNCTION_SHIFT, + TIN_MEMORY_SIZE_SHIFT = 18, // 2 bits (18-19) + TIN_MEMORY_SIZE_MASK = 3 << TIN_MEMORY_SIZE_SHIFT, + TIN_MEMORY_SPACE_SHIFT = 20, // 4 bits (20-23) + TIN_MEMORY_SPACE_MASK = 0xf << TIN_MEMORY_SPACE_SHIFT, + TIN_PRECEDENCE_SHIFT = 24, // 8 bits (24-31) + TIN_PRECEDENCE_MASK = 0xff << TIN_PRECEDENCE_SHIFT }; // types of tokens @@ -343,13 +343,13 @@ private: private: // internal state - parse_token * m_next; // next token in list - token_type m_type; // type of token - int m_offset; // offset within the string - UINT64 m_value; // integral value - UINT32 m_flags; // additional flags/info - const char * m_string; // associated string - symbol_entry * m_symbol; // symbol pointer + parse_token * m_next; // next token in list + token_type m_type; // type of token + int m_offset; // offset within the string + UINT64 m_value; // integral value + UINT32 m_flags; // additional flags/info + const char * m_string; // associated string + symbol_entry * m_symbol; // symbol pointer }; // an expression_string holds an indexed string parsed from the expression @@ -361,7 +361,7 @@ private: // construction/destruction expression_string(const char *string, int length = 0) : m_next(NULL), - m_string(string, (length == 0) ? strlen(string) : length) { } + m_string(string, (length == 0) ? strlen(string) : length) { } // operators operator const char *() { return m_string; } @@ -369,8 +369,8 @@ private: private: // internal state - expression_string * m_next; // next string in list - astring m_string; // copy of the string + expression_string * m_next; // next string in list + astring m_string; // copy of the string }; // internal helpers @@ -401,12 +401,12 @@ private: static const int MAX_STACK_DEPTH = 16; // internal state - symbol_table * m_symtable; // symbol table - astring m_original_string; // original string (prior to parsing) - simple_list<parse_token> m_tokenlist; // token list - simple_list<expression_string> m_stringlist; // string list - int m_token_stack_ptr; // stack pointer (used during execution) - parse_token m_token_stack[MAX_STACK_DEPTH]; // token stack (used during execution) + symbol_table * m_symtable; // symbol table + astring m_original_string; // original string (prior to parsing) + simple_list<parse_token> m_tokenlist; // token list + simple_list<expression_string> m_stringlist; // string list + int m_token_stack_ptr; // stack pointer (used during execution) + parse_token m_token_stack[MAX_STACK_DEPTH]; // token stack (used during execution) }; diff --git a/src/emu/debug/textbuf.c b/src/emu/debug/textbuf.c index 0721c75327f..4551de4e6cb 100644 --- a/src/emu/debug/textbuf.c +++ b/src/emu/debug/textbuf.c @@ -18,7 +18,7 @@ CONSTANTS ***************************************************************************/ -#define MAX_LINE_LENGTH 250 +#define MAX_LINE_LENGTH 250 @@ -28,16 +28,16 @@ struct text_buffer { - char * buffer; - INT32 * lineoffs; - INT32 bufsize; - INT32 bufstart; - INT32 bufend; - INT32 linesize; - INT32 linestart; - INT32 lineend; - UINT32 linestartseq; - INT32 maxwidth; + char * buffer; + INT32 * lineoffs; + INT32 bufsize; + INT32 bufstart; + INT32 bufend; + INT32 linesize; + INT32 linestart; + INT32 lineend; + UINT32 linestartseq; + INT32 maxwidth; }; diff --git a/src/emu/debug/textbuf.h b/src/emu/debug/textbuf.h index 86b66caa952..151a9b0c06c 100644 --- a/src/emu/debug/textbuf.h +++ b/src/emu/debug/textbuf.h @@ -53,4 +53,4 @@ UINT32 text_buffer_line_index_to_seqnum(text_buffer *text, UINT32 index); const char *text_buffer_get_seqnum_line(text_buffer *text, UINT32 seqnum); -#endif /* __TEXTBUF_H__ */ +#endif /* __TEXTBUF_H__ */ |
