From 4f8621eede521fe6b11794975af80e39b8c6a8a0 Mon Sep 17 00:00:00 2001 From: Oxore Date: Sun, 8 Dec 2024 17:31:12 +0300 Subject: Add CRAM tracing expression --- vdp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 5a90e8b..fbda8f8 100644 --- a/vdp.c +++ b/vdp.c @@ -835,6 +835,22 @@ static void write_cram(vdp_context * context, uint16_t address, uint16_t value) context->output[(context->hslot - BG_START_SLOT)*2 + 1] = color; } } + if (0) { + printf("CRAM\n"); + for (size_t i = 0; i < CRAM_SIZE; i++) { + printf("%04x ", context->cram[i]); + if (i % 16u == 15u) { + printf("\n"); + } + } + for (size_t i = 0; i < CRAM_SIZE; i++) { + printf("%06x ", context->colors[i] & 0xffffff); + if (i % 8u == 7u) { + printf("\n"); + } + } + printf("\n"); + } } static void vdp_advance_dma(vdp_context * context) -- cgit v1.2.3