Performance profiling tools for SNES development. More...
#include <snes/types.h>Go to the source code of this file.
Macros | |
| #define | PROFILE_BLUE 2 |
| #define | PROFILE_CYAN 4 |
| #define | PROFILE_GREEN 1 |
| #define | PROFILE_MAGENTA 5 |
| #define | PROFILE_RED 0 |
| #define | PROFILE_WHITE 6 |
| #define | PROFILE_YELLOW 3 |
Functions | |
| void | profileColorEnd (void) |
| End a color-bar profiling section. | |
| void | profileColorStart (u16 color) |
| Start a color-bar profiling section. | |
| u16 | profileGetFrameCount (void) |
| Get total frame count since boot (wraps at 65535) | |
| u16 | profileGetLagFrames (void) |
| Get lag frame count since boot. | |
| u16 | profileGetScanline (void) |
| Get the current scanline number (0-261 NTSC, 0-311 PAL) | |
| void | profileInit (void) |
| Initialize the profiler. | |
| u16 | profileScanlineEnd (void) |
| End a scanline-based timing measurement. | |
| void | profileScanlineStart (void) |
| Start a scanline-based timing measurement. | |
Performance profiling tools for SNES development.
Provides scanline-based timing, visual color-bar profiling, and frame/lag counters.
Add profile to LIB_MODULES:
| #define PROFILE_BLUE 2 |
| #define PROFILE_CYAN 4 |
| #define PROFILE_GREEN 1 |
| #define PROFILE_MAGENTA 5 |
| #define PROFILE_RED 0 |
| #define PROFILE_WHITE 6 |
| #define PROFILE_YELLOW 3 |
| void profileColorEnd | ( | void | ) |
End a color-bar profiling section.
Clears the fixed color back to black.
| void profileColorStart | ( | u16 | color | ) |
Start a color-bar profiling section.
| color | One of the PROFILE_* color constants (0-6) |
| u16 profileGetFrameCount | ( | void | ) |
Get total frame count since boot (wraps at 65535)
| u16 profileGetLagFrames | ( | void | ) |
Get lag frame count since boot.
A lag frame occurs when main code doesn't finish before the next NMI.
| u16 profileGetScanline | ( | void | ) |
Get the current scanline number (0-261 NTSC, 0-311 PAL)
| void profileInit | ( | void | ) |
Initialize the profiler.
Enables color math so that profileColorStart/End produce visible color bars on the backdrop. Call once after consoleInit(), before setScreenOn().
Sets CGADSUB ($2131) to add fixed color to backdrop.
| u16 profileScanlineEnd | ( | void | ) |
End a scanline-based timing measurement.
| void profileScanlineStart | ( | void | ) |
Start a scanline-based timing measurement.