37#include "pico9918_build_config.h"
41#if !PICO9918_BUILD_DEBUG_API
42#error "this library was built without PICO9918_DEBUG_API"
51#define PICO9918_DEBUG_READABLE 0x01
52#define PICO9918_DEBUG_WRITABLE 0x02
53#define PICO9918_DEBUG_REGISTERS 0x04
54#define PICO9918_DEBUG_STATUS 0x08
55#define PICO9918_DEBUG_PALETTE 0x10
212#if PICO9918_BUILD_LAYER_MASK
325#if PICO9918_BUILD_STEP_CALLBACK
348void pico9918_debug_set_step_callback(
PICO9918_INST_ARG pico9918_gpu_step_fn cb,
void* userdata);
358pico9918_gpu_step_fn pico9918_debug_step_callback(
PICO9918_INST_ARG void** userdata);
pico9918-core - GPU Interface
pico9918-core - core interface
#define PICO9918_INST_ARG
declare the instance ahead of other parameters
#define PICO9918_INST_ONLY_ARG
declare the instance as the only parameter
#define PICO9918_DLLEXPORT
the linkage every public entry point carries - see LINKAGE MODES above
bool pico9918_debug_status_write(pico9918_t *tms9918, uint8_t reg, uint8_t value)
a status byte, stored where its number says, with no device behaviour
uint32_t pico9918_debug_region(uint32_t addr, uint32_t *end)
what the byte at addr is, and how far that stays true
bool pico9918_debug_gpu_step_n(pico9918_t *tms9918, uint32_t instructions, pico9918_gpu_step_fn cb, void *userdata)
pico9918_gpu_step_n() with a look at every instruction before it runs
uint8_t pico9918_debug_reg(pico9918_t *tms9918, uint8_t reg)
a register, as the register file actually holds it
bool pico9918_debug_gpu_armed(pico9918_t *tms9918)
whether a GPU program is waiting to run
size_t pico9918_debug_write(pico9918_t *tms9918, uint32_t addr, const uint8_t *in, size_t len)
a span of the map, written without the machine noticing
bool pico9918_debug_gpu_set_wp(pico9918_t *tms9918, uint16_t wp)
move the GPU's workspace, the way an LWPI would
uint16_t pico9918_debug_palette(pico9918_t *tms9918, uint8_t index)
a live palette entry, in host byte order
void pico9918_debug_gpu_set_pc(pico9918_t *tms9918, uint16_t pc)
move the GPU's PC without starting it
void pico9918_debug_gpu_set_status(pico9918_t *tms9918, uint16_t st)
type into the GPU's status register
size_t pico9918_debug_read(pico9918_t *tms9918, uint32_t addr, uint8_t *out, size_t len)
a span of the map, without disturbing anything
bool pico9918_debug_reg_write(pico9918_t *tms9918, uint8_t reg, uint8_t value)
a register, stored where its number says, with no device behaviour
void pico9918_debug_gpu_set_reg_value(pico9918_t *tms9918, uint8_t reg, uint16_t value)
type into the GPU's R0-R15
uint16_t pico9918_debug_vram_address(pico9918_t *tms9918)
where the next guest access would land