#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_ */