mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
c264a704ec
Extract the useful diagnostic from PR #13 into an opt-in, title-agnostic boot write-range trace with TCP-queryable context. Co-authored-by: NyperYuhgard <93950153+NyperYuhgard@users.noreply.github.com>
31 lines
680 B
C
31 lines
680 B
C
#ifndef PSXRECOMP_DEBUG_TRACE_RANGES_H
|
|
#define PSXRECOMP_DEBUG_TRACE_RANGES_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct PSXDebugTraceRange {
|
|
uint32_t lo;
|
|
uint32_t hi;
|
|
} PSXDebugTraceRange;
|
|
|
|
/*
|
|
* Parse "lo,hi[;lo,hi...]" into masked-physical, half-open ranges.
|
|
*
|
|
* Returns the number of ranges, or -1 for malformed/reversed input and -2
|
|
* when the destination is too small. Callers must discard the output on any
|
|
* negative result.
|
|
*/
|
|
int psx_debug_parse_trace_ranges(const char *spec,
|
|
PSXDebugTraceRange *ranges,
|
|
int capacity);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|