X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Fdebug.h;h=844b465771b87c027a82ddb5afcd736b1f29a24b;hb=fb94d0fa89684121874bb3a4b0cb51172cab4a90;hp=ed458025bc5716d99c16047753ac62653c446691;hpb=e2ed633cc1ea03fcc73d862adfc154cbfb3a537c;p=gbajam21 diff --git a/src/debug.h b/src/debug.h index ed45802..844b465 100644 --- a/src/debug.h +++ b/src/debug.h @@ -1,9 +1,14 @@ #ifndef DEBUG_H_ #define DEBUG_H_ +#include +#include "util.h" + +extern unsigned char font_8x8[]; + extern uint16_t vblperf_color[]; uint16_t *vblperf_palptr; -int vblperf_count; +volatile int vblperf_count; void vblperf_start(int palidx); void vblperf_stop(void); @@ -17,9 +22,15 @@ void vblperf_stop(void); #define vblperf_end() \ do { \ *vblperf_palptr = vblperf_color[vblperf_count]; \ - vblperf_count = 0; \ } while(0) + +void panic(uint32_t pc, const char *fmt, ...); + +void dbg_drawglyph(int x, int y, int c); +int dbg_drawstr(int x, int y, const char *fmt, ...); +int dbg_vdrawstr(int x, int y, const char *fmt, va_list ap); + void emuprint(const char *fmt, ...); #endif /* DEBUG_H_ */