megadrive_test2

view src/debug.c @ 12:54caa2b214ca

TMSS code
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 26 Dec 2018 04:39:09 +0200
parents 403367d5df5a
children
line source
1 #include "debug.h"
2 #include "dbgfont.h"
3 #include "vdp.h"
5 static uint16_t dbgpal[] = {
6 VDP_PACK_RGB(0, 0, 0), VDP_PACK_RGB(7, 0, 0),
7 VDP_PACK_RGB(0, 7, 0), VDP_PACK_RGB(0, 0, 7),
8 VDP_PACK_RGB(7, 7, 0), VDP_PACK_RGB(7, 0, 7),
9 VDP_PACK_RGB(0, 7, 7), VDP_PACK_RGB(7, 7, 7),
10 VDP_PACK_RGB(0, 0, 0), VDP_PACK_RGB(3, 0, 0),
11 VDP_PACK_RGB(0, 3, 0), VDP_PACK_RGB(0, 0, 3),
12 VDP_PACK_RGB(3, 3, 0), VDP_PACK_RGB(3, 0, 3),
13 VDP_PACK_RGB(0, 3, 3), VDP_PACK_RGB(3, 3, 3)
14 };
16 void dbg_init(void)
17 {
18 int i;
19 /* TODO allocate tiles, prepare palette etc */
21 vdp_begin_palette(DBG_PALIDX, 0);
22 for(i=0; i<16; i++) {
23 VDP_PORT_DATA = dbgpal[i];
24 }
25 }
27 void dbg_print(const char *s)
28 {
29 }