OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
profile.h
Go to the documentation of this file.
1
40
41#ifndef OPENSNES_PROFILE_H
42#define OPENSNES_PROFILE_H
43
44#include <snes/types.h>
45
46/* Removed on 2026-10-05 (1.0 plan, lot C): profileGetFrameCount.
47 * The replacements are in docs/UPGRADING.md; `make check-upgrade` names them. */
48
49/*============================================================================
50 * Color Constants for Visual Profiling
51 *
52 * Each constant is an index into the internal color table.
53 *============================================================================*/
54
55#define PROFILE_RED 0
56#define PROFILE_GREEN 1
57#define PROFILE_BLUE 2
58#define PROFILE_YELLOW 3
59#define PROFILE_CYAN 4
60#define PROFILE_MAGENTA 5
61#define PROFILE_WHITE 6
62
63/*============================================================================
64 * Initialization
65 *============================================================================*/
66
76void profileInit(void);
77
78/*============================================================================
79 * Visual Color-Bar Profiling
80 *
81 * Sets the fixed color (COLDATA $2132) to show colored bands on screen.
82 * The band width shows how much CPU time the section uses.
83 * Multiple sections can use different colors to identify bottlenecks.
84 *============================================================================*/
85
92
98void profileColorEnd(void);
99
100/*============================================================================
101 * Scanline-Based Timing
102 *============================================================================*/
103
108
118
126
127/*============================================================================
128 * Frame Counters
129 *============================================================================*/
130
137
138#endif /* OPENSNES_PROFILE_H */
static u16 color
Definition main.c:162
unsigned short u16
16-bit unsigned integer (0 to 65535)
Definition types.h:53
u16 profileGetLagFrames(void)
Get lag frame count since boot.
void profileScanlineStart(void)
Start a scanline-based timing measurement.
u16 profileGetScanline(void)
Get the current scanline number (0-261 NTSC, 0-311 PAL).
void profileColorStart(u16 color)
Start a color-bar profiling section.
u16 profileScanlineEnd(void)
End a scanline-based timing measurement.
void profileInit(void)
Initialize the profiler.
void profileColorEnd(void)
End a color-bar profiling section.
OpenSNES Standard Types.