From c33b9bc0bbf7498b4f43d235efafcbe22e1d9824 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Fri, 9 Nov 2018 20:16:09 -0800 Subject: Added VRAM debug window --- bindings.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'bindings.c') diff --git a/bindings.c b/bindings.c index 8ab1b61..00019d2 100644 --- a/bindings.c +++ b/bindings.c @@ -37,7 +37,8 @@ typedef enum { UI_SMS_PAUSE, UI_SCREENSHOT, UI_EXIT, - UI_PLANE_DEBUG + UI_PLANE_DEBUG, + UI_VRAM_DEBUG } ui_action; typedef struct { @@ -388,6 +389,20 @@ void handle_binding_up(keybinding * binding) } break; } + case UI_VRAM_DEBUG: { + vdp_context *vdp = NULL; + if (current_system->type == SYSTEM_GENESIS) { + genesis_context *gen = (genesis_context *)current_system; + vdp = gen->vdp; + } else if (current_system->type == SYSTEM_SMS) { + sms_context *sms = (sms_context *)current_system; + vdp = sms->vdp; + } + if (vdp) { + vdp_toggle_debug_view(vdp, VDP_DEBUG_VRAM); + } + break; + } } break; } @@ -593,7 +608,9 @@ int parse_binding_target(int device_num, char * target, tern_node * padbuttons, *subtype_a = UI_EXIT; } else if (!strcmp(target + 3, "plane_debug")) { *subtype_a = UI_PLANE_DEBUG; - } else { + } else if (!strcmp(target + 3, "vram_debug")) { + *subtype_a = UI_VRAM_DEBUG; + } else { warning("Unreconized UI binding type %s\n", target); return 0; } -- cgit v1.2.3