comparison bindings.c @ 2243:0d1d5dccdd28

Initial implementation of oscilloscope debug view
author Michael Pavone <pavone@retrodev.com>
date Tue, 22 Nov 2022 17:57:02 -0800
parents 0c723b8b637c
children 3ef80963c2a7
comparison
equal deleted inserted replaced
2240:8e8db9141209 2243:0d1d5dccdd28
40 UI_VGM_LOG, 40 UI_VGM_LOG,
41 UI_EXIT, 41 UI_EXIT,
42 UI_PLANE_DEBUG, 42 UI_PLANE_DEBUG,
43 UI_VRAM_DEBUG, 43 UI_VRAM_DEBUG,
44 UI_CRAM_DEBUG, 44 UI_CRAM_DEBUG,
45 UI_COMPOSITE_DEBUG 45 UI_COMPOSITE_DEBUG,
46 UI_OSCILLOSCOPE_DEBUG,
46 } ui_action; 47 } ui_action;
47 48
48 typedef struct { 49 typedef struct {
49 uint8_t bind_type; 50 uint8_t bind_type;
50 uint8_t subtype_a; 51 uint8_t subtype_a;
430 break; 431 break;
431 case UI_PLANE_DEBUG: 432 case UI_PLANE_DEBUG:
432 case UI_VRAM_DEBUG: 433 case UI_VRAM_DEBUG:
433 case UI_CRAM_DEBUG: 434 case UI_CRAM_DEBUG:
434 case UI_COMPOSITE_DEBUG: 435 case UI_COMPOSITE_DEBUG:
435 if (allow_content_binds) { 436 case UI_OSCILLOSCOPE_DEBUG:
437 if (allow_content_binds && current_system->toggle_debug_view) {
438 current_system->toggle_debug_view(current_system, binding->subtype_a - UI_PLANE_DEBUG + DEBUG_PLANE);
439 /*
436 vdp_context *vdp = NULL; 440 vdp_context *vdp = NULL;
437 if (current_system->type == SYSTEM_GENESIS || current_system->type == SYSTEM_SEGACD) { 441 if (current_system->type == SYSTEM_GENESIS || current_system->type == SYSTEM_SEGACD) {
438 genesis_context *gen = (genesis_context *)current_system; 442 genesis_context *gen = (genesis_context *)current_system;
439 vdp = gen->vdp; 443 vdp = gen->vdp;
440 } else if (current_system->type == SYSTEM_SMS) { 444 } else if (current_system->type == SYSTEM_SMS) {
450 case UI_CRAM_DEBUG: debug_type = VDP_DEBUG_CRAM; break; 454 case UI_CRAM_DEBUG: debug_type = VDP_DEBUG_CRAM; break;
451 case UI_COMPOSITE_DEBUG: debug_type = VDP_DEBUG_COMPOSITE; break; 455 case UI_COMPOSITE_DEBUG: debug_type = VDP_DEBUG_COMPOSITE; break;
452 default: return; 456 default: return;
453 } 457 }
454 vdp_toggle_debug_view(vdp, debug_type); 458 vdp_toggle_debug_view(vdp, debug_type);
455 } 459 }*/
456 break; 460 break;
457 } 461 }
458 } 462 }
459 break; 463 break;
460 } 464 }
669 *subtype_a = UI_VRAM_DEBUG; 673 *subtype_a = UI_VRAM_DEBUG;
670 } else if (!strcmp(target + 3, "cram_debug")) { 674 } else if (!strcmp(target + 3, "cram_debug")) {
671 *subtype_a = UI_CRAM_DEBUG; 675 *subtype_a = UI_CRAM_DEBUG;
672 } else if (!strcmp(target + 3, "compositing_debug")) { 676 } else if (!strcmp(target + 3, "compositing_debug")) {
673 *subtype_a = UI_COMPOSITE_DEBUG; 677 *subtype_a = UI_COMPOSITE_DEBUG;
678 } else if (!strcmp(target + 3, "oscilloscope")) {
679 *subtype_a = UI_OSCILLOSCOPE_DEBUG;
674 } else { 680 } else {
675 warning("Unreconized UI binding type %s\n", target); 681 warning("Unreconized UI binding type %s\n", target);
676 return 0; 682 return 0;
677 } 683 }
678 return BIND_UI; 684 return BIND_UI;