diff options
author | Bad Diode <bd@badd10de.dev> | 2023-08-31 12:58:08 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-08-31 12:58:08 +0200 |
commit | cfc60ba401b9ca46c981f902512eb1f2cc07995f (patch) | |
tree | 19423692345c9def52c47e52f7ed42ee4d9f67da /src/profiling.c | |
parent | e7c567fcb695722b9e88866bf4216ff425daac9a (diff) | |
download | uxngba-cfc60ba401b9ca46c981f902512eb1f2cc07995f.tar.gz uxngba-cfc60ba401b9ca46c981f902512eb1f2cc07995f.zip |
Make sure keyboard is consistently colored
Diffstat (limited to 'src/profiling.c')
-rw-r--r-- | src/profiling.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/profiling.c b/src/profiling.c index 9817eb1..2d230df 100644 --- a/src/profiling.c +++ b/src/profiling.c | |||
@@ -39,7 +39,29 @@ | |||
39 | #define PROF_SHOW() \ | 39 | #define PROF_SHOW() \ |
40 | do { \ | 40 | do { \ |
41 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ | 41 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ |
42 | txt_printf("N CYCLES: %.8lu\n", eval_cycles);\ | 42 | txt_printf("INPUT %.8lu\n", avg_input_cycles);\ |
43 | txt_printf("EVAL %.8lu\n", avg_eval_cycles);\ | ||
44 | txt_printf("VIDEO\n");\ | ||
45 | txt_printf(">PIX %.8lu\n", avg_ppu_pixel_cycles);\ | ||
46 | txt_printf(">FILL %.8lu\n", avg_ppu_fill_cycles);\ | ||
47 | txt_printf(">1BPP %.8lu\n", avg_ppu_icn_cycles);\ | ||
48 | txt_printf(">2BPP %.8lu\n", avg_ppu_chr_cycles);\ | ||
49 | txt_printf(">FLIP %.8lu\n", avg_flip_cycles);\ | ||
50 | txt_printf("AUDIO %.8lu\n", avg_mix_cycles);\ | ||
51 | txt_printf("TOTAL %.8lu\n", avg_frame_cycles);\ | ||
52 | u32 frame_time =\ | ||
53 | FP_DIV(\ | ||
54 | FP_NUM(avg_frame_cycles + 1, 2),\ | ||
55 | FP_NUM(2809, 2),\ | ||
56 | 2) * 166;\ | ||
57 | u32 fps =\ | ||
58 | FP_DIV(\ | ||
59 | FP_NUM(280896 * 60, 2),\ | ||
60 | FP_NUM(avg_frame_cycles + 1, 2),\ | ||
61 | 2);\ | ||
62 | txt_printf("TIME %.8lu\n", frame_time >> 2);\ | ||
63 | txt_printf("FPS %.8lu\n", (fps >> 2) + 1);\ | ||
64 | screen_fill(BG_BACK, 0, 0, 8 * 16, 8 * 12, 2);\ | ||
43 | } while (0) | 65 | } while (0) |
44 | 66 | ||
45 | static u32 prof_frame_counter = 0; | 67 | static u32 prof_frame_counter = 0; |