8#ifndef __LIBDRAGON_RSPQ_INTERNAL_H
9#define __LIBDRAGON_RSPQ_INTERNAL_H
147#define rspq_int_write(cmd_id, ...) rspq_write(0, cmd_id, ##__VA_ARGS__)
161typedef struct rspq_block_s {
172typedef struct __attribute__((packed)) {
174 uint64_t combiner_mipmapmask;
175 uint32_t blend_step0;
176 uint32_t blend_step1;
177 uint64_t other_modes;
201typedef struct rspq_overlay_tables_s {
214typedef struct rsp_queue_s {
224 uint32_t rspq_rdp_buffers[2];
235#define RSPQ_DATA_ADDRESS 32
241static inline bool rspq_in_block(
void) {
A buffer that piggybacks onto rspq_block_t to store RDP commands.
Definition rdpq_internal.h:74
Low-level RSP hardware library.
rspq_block_t * rspq_block
Pointer to the current block being built, or NULL.
Definition rspq.c:328
Constants for the RSPQ subsystem.
#define RSPQ_OVERLAY_TABLE_SIZE
Number of overlay IDs (0-F)
Definition rspq_constants.h:16
#define RSPQ_OVERLAY_DESC_SIZE
Size of a single overlay descriptor.
Definition rspq_constants.h:17
#define RSPQ_MAX_BLOCK_NESTING_LEVEL
Maximum number of nested block calls.
Definition rspq_constants.h:30
#define RSPQ_MAX_OVERLAY_COUNT
Definition rspq_constants.h:20
uint32_t rspq_rdp_sentinel
Current RDP RDRAM end pointer (when rdp_current reaches this, the buffer is full)
Definition rspq_internal.h:221
uint32_t rspq_rdp_current
Current RDP RDRAM write pointer (normally DP_END)
Definition rspq_internal.h:225
uint32_t rspq_dram_highpri_addr
Address of the highpri queue (special slot in the pointer stack)
Definition rspq_internal.h:219
@ RSPQ_CMD_TEST_WRITE_STATUS
RSPQ Command: Test and write SP_STATUS register.
Definition rspq_internal.h:110
@ RSPQ_CMD_INVALID
RSPQ command: Invalid.
Definition rspq_internal.h:24
@ RSPQ_CMD_CALL
RSPQ command: Call a block.
Definition rspq_internal.h:51
@ RSPQ_CMD_DMA
RSPQ command: DMA transfer.
Definition rspq_internal.h:72
@ RSPQ_CMD_JUMP
RSPQ command: Jump to another buffer.
Definition rspq_internal.h:40
@ RSPQ_CMD_RDP_WAIT_IDLE
RSPQ command: Wait for RDP to be idle.
Definition rspq_internal.h:122
@ RSPQ_CMD_SWAP_BUFFERS
RSPQ Command: Swap lowpri/highpri buffers.
Definition rspq_internal.h:98
@ RSPQ_CMD_RDP_SET_BUFFER
RSPQ Command: send a new buffer to RDP and/or configure it for new commands.
Definition rspq_internal.h:135
@ RSPQ_CMD_RDP_APPEND_BUFFER
RSPQ Command: send more data to RDP (appended to the end of the current buffer)
Definition rspq_internal.h:143
@ RSPQ_CMD_NOOP
RSPQ command: No-op.
Definition rspq_internal.h:31
@ RSPQ_CMD_WRITE_STATUS
RSPQ Command: write SP_STATUS register.
Definition rspq_internal.h:80
@ RSPQ_CMD_RET
RSPQ command: Return from a block.
Definition rspq_internal.h:60
volatile int __rspq_syncpoints_done
ID of the last syncpoint reached by RSP.
Definition rspq.c:335
rspq_overlay_tables_t tables
Overlay table.
Definition rspq_internal.h:215
uint32_t rspq_dram_lowpri_addr
Address of the lowpri queue (special slot in the pointer stack)
Definition rspq_internal.h:218
uint8_t rdp_syncfull_ongoing
True if a SYNC_FULL is currently ongoing.
Definition rspq_internal.h:228
rdpq_block_t * rdp_block
Option RDP static buffer (with RDP commands)
Definition rspq_internal.h:163
uint8_t rdp_target_bitdepth
Current RDP target buffer bitdepth.
Definition rspq_internal.h:227
rspq_rdp_mode_t rdp_mode
RDP current render mode definition.
Definition rspq_internal.h:222
void rspq_block_run_rsp(int nesting_level)
Notify that a RSP command is going to run a block.
Definition rspq.c:1215
uint32_t rspq_dram_addr
Current RDRAM address being processed.
Definition rspq_internal.h:220
int16_t current_ovl
Current overlay index.
Definition rspq_internal.h:231
uint16_t code_size
Size of the code in bytes - 1.
Definition rspq_internal.h:187
uint32_t nesting_level
Nesting level of the block.
Definition rspq_internal.h:162
uint64_t rdp_scissor_rect
Current RDP scissor rectangle.
Definition rspq_internal.h:223
uint32_t data
Address of the overlay data in RDRAM.
Definition rspq_internal.h:185
uint32_t rdp_fill_color
Current RDP fill color.
Definition rspq_internal.h:226
uint32_t code
Address of the overlay code in RDRAM.
Definition rspq_internal.h:184
uint32_t state
Address of the overlay state in RDRAM (within data)
Definition rspq_internal.h:186
rsp_queue_t * __rspq_get_state(void)
Return a pointer to a copy of the current RSPQ state.
Definition rspq.c:735
uint16_t data_size
Size of the data in bytes - 1.
Definition rspq_internal.h:188
uint8_t rdpq_debug
Debug mode flag.
Definition rspq_internal.h:229
RSP Queue data in DMEM.
Definition rspq_internal.h:214
A rspq block: pre-recorded array of commands.
Definition rspq_internal.h:161
A RSPQ overlay ucode. This is similar to rsp_ucode_t, but is used internally to managed it as a RSPQ ...
Definition rspq_internal.h:183
The overlay table in DMEM.
Definition rspq_internal.h:201
RDP render mode definition.
Definition rspq_internal.h:172