megadrive_test2

view src/debug.c @ 11:302bcd73edc4

added 6button support
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 Jun 2017 03:47:37 +0300
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 }