Mercurial > repos > blastem
comparison bindings.c @ 1634:e397766c3028
Added VRAM debug window
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 09 Nov 2018 20:16:09 -0800 |
parents | c4ba3177b72d |
children | f27142c48567 |
comparison
equal
deleted
inserted
replaced
1633:9b7cba9ba541 | 1634:e397766c3028 |
---|---|
35 UI_SOFT_RESET, | 35 UI_SOFT_RESET, |
36 UI_RELOAD, | 36 UI_RELOAD, |
37 UI_SMS_PAUSE, | 37 UI_SMS_PAUSE, |
38 UI_SCREENSHOT, | 38 UI_SCREENSHOT, |
39 UI_EXIT, | 39 UI_EXIT, |
40 UI_PLANE_DEBUG | 40 UI_PLANE_DEBUG, |
41 UI_VRAM_DEBUG | |
41 } ui_action; | 42 } ui_action; |
42 | 43 |
43 typedef struct { | 44 typedef struct { |
44 uint8_t bind_type; | 45 uint8_t bind_type; |
45 uint8_t subtype_a; | 46 uint8_t subtype_a; |
383 sms_context *sms = (sms_context *)current_system; | 384 sms_context *sms = (sms_context *)current_system; |
384 vdp = sms->vdp; | 385 vdp = sms->vdp; |
385 } | 386 } |
386 if (vdp) { | 387 if (vdp) { |
387 vdp_toggle_debug_view(vdp, VDP_DEBUG_PLANE); | 388 vdp_toggle_debug_view(vdp, VDP_DEBUG_PLANE); |
389 } | |
390 break; | |
391 } | |
392 case UI_VRAM_DEBUG: { | |
393 vdp_context *vdp = NULL; | |
394 if (current_system->type == SYSTEM_GENESIS) { | |
395 genesis_context *gen = (genesis_context *)current_system; | |
396 vdp = gen->vdp; | |
397 } else if (current_system->type == SYSTEM_SMS) { | |
398 sms_context *sms = (sms_context *)current_system; | |
399 vdp = sms->vdp; | |
400 } | |
401 if (vdp) { | |
402 vdp_toggle_debug_view(vdp, VDP_DEBUG_VRAM); | |
388 } | 403 } |
389 break; | 404 break; |
390 } | 405 } |
391 } | 406 } |
392 break; | 407 break; |
591 *subtype_a = UI_SCREENSHOT; | 606 *subtype_a = UI_SCREENSHOT; |
592 } else if(!strcmp(target + 3, "exit")) { | 607 } else if(!strcmp(target + 3, "exit")) { |
593 *subtype_a = UI_EXIT; | 608 *subtype_a = UI_EXIT; |
594 } else if (!strcmp(target + 3, "plane_debug")) { | 609 } else if (!strcmp(target + 3, "plane_debug")) { |
595 *subtype_a = UI_PLANE_DEBUG; | 610 *subtype_a = UI_PLANE_DEBUG; |
596 } else { | 611 } else if (!strcmp(target + 3, "vram_debug")) { |
612 *subtype_a = UI_VRAM_DEBUG; | |
613 } else { | |
597 warning("Unreconized UI binding type %s\n", target); | 614 warning("Unreconized UI binding type %s\n", target); |
598 return 0; | 615 return 0; |
599 } | 616 } |
600 return BIND_UI; | 617 return BIND_UI; |
601 } else { | 618 } else { |