summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2015-11-06 11:44:51 -0800
committerMichael Pavone <pavone@retrodev.com>2015-11-06 11:44:51 -0800
commit60f60cd2c5236b0ba5654174c5faeb4a2d218fc9 (patch)
tree190db69cae5e45edda2d226280ad63426d638d9a /debug.c
parent7f6f656a622c0fb0de10273a6e476b1545a17b96 (diff)
Allow 68K debug print to read from arbitrary memory regions
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug.c b/debug.c
index 29b4ae6..3406fd6 100644
--- a/debug.c
+++ b/debug.c
@@ -123,7 +123,8 @@ void debugger_print(m68k_context *context, char format_char, char *param)
genesis_context * gen = context->system;
value = vdp_hv_counter_read(gen->vdp);
} else {
- value = read_dma_value(p_addr/2);
+ uint16_t *word = get_native_pointer(p_addr & 0xFFFFFE, (void **)context->mem_pointers, &context->options->gen);
+ value = *word;
}
} else {
fprintf(stderr, "Unrecognized parameter to p: %s\n", param);