aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/main.c b/src/main.c
index 1dc5b5f..1193e9e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -37,8 +37,6 @@
37#define CONTROL_METHODS CONTROL_CONTROLLER,CONTROL_MOUSE,CONTROL_KEYBOARD 37#define CONTROL_METHODS CONTROL_CONTROLLER,CONTROL_MOUSE,CONTROL_KEYBOARD
38#endif 38#endif
39 39
40#define PROF_ENABLE 1
41
42#ifdef PROF_ENABLE 40#ifdef PROF_ENABLE
43#if PROF_ENABLE == 0 41#if PROF_ENABLE == 0
44#define TEXT_ENABLE 1 42#define TEXT_ENABLE 1
@@ -53,6 +51,7 @@
53#ifndef PROF_SHOW_Y 51#ifndef PROF_SHOW_Y
54#define PROF_SHOW_Y 0 52#define PROF_SHOW_Y 0
55#endif 53#endif
54/*
56// #define PROF_SHOW() \ 55// #define PROF_SHOW() \
57// do { \ 56// do { \
58// txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ 57// txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\
@@ -75,21 +74,19 @@
75// txt_position((PROF_SHOW_X), (PROF_SHOW_Y)+3);\ 74// txt_position((PROF_SHOW_X), (PROF_SHOW_Y)+3);\
76// txt_printf("FLIP: %lu ", flip_cycles);\ 75// txt_printf("FLIP: %lu ", flip_cycles);\
77// } while (0) 76// } while (0)
77// */
78#define PROF_SHOW() \ 78#define PROF_SHOW() \
79 do { \ 79 do { \
80 txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ 80 txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\
81 txt_printf("1BPP: %lu 2BPP: %lu", ppu_icn_cycles, ppu_chr_cycles);\ 81 txt_printf("1BPP: %lu 2BPP: %lu", ppu_icn_cycles, ppu_chr_cycles);\
82 } while (0) 82 } while (0)
83#define PROF_INIT() \ 83static u32 ppu_pixel_cycles = 0;
84 static u32 ppu_pixel_cycles = 0;\ 84static u32 ppu_chr_cycles = 0;
85 static u32 ppu_chr_cycles = 0;\ 85static u32 ppu_icn_cycles = 0;
86 static u32 ppu_icn_cycles = 0;\ 86static u32 flip_cycles = 0;
87 static u32 flip_cycles = 0;\ 87static u32 eval_cycles = 0;
88 static u32 eval_cycles = 0;\ 88static u32 input_cycles = 0;
89 static u32 input_cycles = 0;\ 89static u32 mix_cycles = 0;
90 static u32 mix_cycles = 0;
91
92 PROF_INIT();
93#else 90#else
94#define PROF(F,VAR) (F) 91#define PROF(F,VAR) (F)
95#define PROF_SHOW() 92#define PROF_SHOW()