summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2014-06-17 19:01:01 -0700
committerMichael Pavone <pavone@retrodev.com>2014-06-17 19:01:01 -0700
commit6cd595a305c71f0540a3ecf4c4038891a7eba762 (patch)
tree6e55ba1c85305e68e67be08ec03745c700b1e68a /debug.c
parent8668ed398f50601c805f7e9fb629dec93e5a45f4 (diff)
Partially working switch to having a vcounter and hslot counter in the context rather than trying to derive them from the cycle count. This should allow for more accurate handling of mid screen mode switches. Interrupt timing is broken currently though
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/debug.c b/debug.c
index aa0cb7f..c9f9293 100644
--- a/debug.c
+++ b/debug.c
@@ -598,9 +598,14 @@ m68k_context * debugger(m68k_context * context, uint32_t address)
}
} else if(param[0] == 'c') {
value = context->current_cycle;
- } else if (param[0] == '0' && param[1] == 'x') {
- uint32_t p_addr = strtol(param+2, NULL, 16);
- value = read_dma_value(p_addr/2);
+ } else if ((param[0] == '0' && param[1] == 'x') || param[0] == '$') {
+ uint32_t p_addr = strtol(param+(param[0] == '0' ? 2 : 1), NULL, 16);
+ if ((p_addr & 0xFFFFFF) == 0xC00004) {
+ genesis_context * gen = context->system;
+ value = vdp_hv_counter_read(gen->vdp);
+ } else {
+ value = read_dma_value(p_addr/2);
+ }
} else {
fprintf(stderr, "Unrecognized parameter to p: %s\n", param);
break;