megadrive_test2

annotate src/debug.c @ 10:ca7108a82867

fixed gamepad input on real megadrive
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 Jun 2017 02:33:52 +0300
parents 403367d5df5a
children
rev   line source
nuclear@8 1 #include "debug.h"
nuclear@8 2 #include "dbgfont.h"
nuclear@10 3 #include "vdp.h"
nuclear@8 4
nuclear@10 5 static uint16_t dbgpal[] = {
nuclear@10 6 VDP_PACK_RGB(0, 0, 0), VDP_PACK_RGB(7, 0, 0),
nuclear@10 7 VDP_PACK_RGB(0, 7, 0), VDP_PACK_RGB(0, 0, 7),
nuclear@10 8 VDP_PACK_RGB(7, 7, 0), VDP_PACK_RGB(7, 0, 7),
nuclear@10 9 VDP_PACK_RGB(0, 7, 7), VDP_PACK_RGB(7, 7, 7),
nuclear@10 10 VDP_PACK_RGB(0, 0, 0), VDP_PACK_RGB(3, 0, 0),
nuclear@10 11 VDP_PACK_RGB(0, 3, 0), VDP_PACK_RGB(0, 0, 3),
nuclear@10 12 VDP_PACK_RGB(3, 3, 0), VDP_PACK_RGB(3, 0, 3),
nuclear@10 13 VDP_PACK_RGB(0, 3, 3), VDP_PACK_RGB(3, 3, 3)
nuclear@10 14 };
nuclear@8 15
nuclear@10 16 void dbg_init(void)
nuclear@8 17 {
nuclear@10 18 int i;
nuclear@8 19 /* TODO allocate tiles, prepare palette etc */
nuclear@10 20
nuclear@10 21 vdp_begin_palette(DBG_PALIDX, 0);
nuclear@10 22 for(i=0; i<16; i++) {
nuclear@10 23 VDP_PORT_DATA = dbgpal[i];
nuclear@10 24 }
nuclear@8 25 }
nuclear@8 26
nuclear@8 27 void dbg_print(const char *s)
nuclear@8 28 {
nuclear@8 29 }