mirror of
https://github.com/captain-amygdala/pistorm.git
synced 2026-01-28 20:41:08 +00:00
Add PiStorm API commands to toggle RTG FPS display/palette debug
This commit is contained in:
@@ -31,6 +31,8 @@ enum pistorm_dev_cmds {
|
||||
PI_CMD_COPYRECT = 0x0110, // [W] Generic memory copyrect with source and destination pitch.
|
||||
PI_CMD_COPYRECT_EX = 0x0112, // [W] Extended memory copyrect with additional source/destination X/Y coordinates.
|
||||
PI_CMD_MEMSET = 0x0114, // [W] Accelerated memset functionality to quickly clear a region of memory to a specific value.
|
||||
PI_CMD_SHOWFPS = 0x0118, // [W] Enable/disable RTG FPS display.
|
||||
PI_CMD_PALETTEDEBUG = 0x011A, // [W] Enable/disable RTG palette debug.
|
||||
|
||||
PI_CMD_QBASIC = 0x0FFC, // QBasic
|
||||
PI_CMD_NIBBLES = 0x0FFE, // Nibbles
|
||||
|
||||
@@ -289,6 +289,8 @@ void handle_pistorm_dev_write(uint32_t addr_, uint32_t val, uint8_t type) {
|
||||
}
|
||||
break;
|
||||
|
||||
case PI_CMD_SHOWFPS: rtg_show_fps((uint8_t)val); break;
|
||||
case PI_CMD_PALETTEDEBUG: rtg_palette_debug((uint8_t)val); break;
|
||||
case PI_CMD_RTGSTATUS:
|
||||
DEBUG("[PISTORM-DEV] Write to RTGSTATUS: %d\n", val);
|
||||
if (val == 1 && !rtg_enabled) {
|
||||
|
||||
@@ -400,3 +400,11 @@ void rtg_set_mouse_cursor_image(uint8_t *src, uint8_t w, uint8_t h) {
|
||||
update_mouse_cursor(src);
|
||||
}
|
||||
}
|
||||
|
||||
void rtg_show_fps(uint8_t enable) {
|
||||
show_fps = (enable != 0);
|
||||
}
|
||||
|
||||
void rtg_palette_debug(uint8_t enable) {
|
||||
debug_palette = (enable != 0);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ void rtg_set_mouse_cursor_pos(int16_t x, int16_t y);
|
||||
void rtg_set_cursor_clut_entry(uint8_t r, uint8_t g, uint8_t b, uint8_t idx);
|
||||
void rtg_set_mouse_cursor_image(uint8_t *src, uint8_t w, uint8_t h);
|
||||
|
||||
void rtg_show_fps(uint8_t enable);
|
||||
void rtg_palette_debug(uint8_t enable);
|
||||
|
||||
int init_rtg_data(struct emulator_config *cfg);
|
||||
void shutdown_rtg();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user