X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdebug.h;h=ed458025bc5716d99c16047753ac62653c446691;hb=e2ed633cc1ea03fcc73d862adfc154cbfb3a537c;hp=41f2a23402417335e10f3dabdf7f1dcd1b78a721;hpb=4f58871ec2e25fb8cd7dfc19d1e4999453cf9555;p=gbajam21 diff --git a/src/debug.h b/src/debug.h index 41f2a23..ed45802 100644 --- a/src/debug.h +++ b/src/debug.h @@ -1,6 +1,25 @@ #ifndef DEBUG_H_ #define DEBUG_H_ +extern uint16_t vblperf_color[]; +uint16_t *vblperf_palptr; +int vblperf_count; + +void vblperf_start(int palidx); +void vblperf_stop(void); + +#define vblperf_begin() \ + do { \ + *vblperf_palptr = 0; \ + vblperf_count = 0; \ + } while(0) + +#define vblperf_end() \ + do { \ + *vblperf_palptr = vblperf_color[vblperf_count]; \ + vblperf_count = 0; \ + } while(0) + void emuprint(const char *fmt, ...); #endif /* DEBUG_H_ */