Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

is_gte_command

Function is_gte_command 

Source
pub const fn is_gte_command(word: u32) -> bool
Expand description

True when word is a GTE command (a COP2 cofun: opcode 0x12 with bit 25 set, so the top seven bits are 0100101). psx-spx’s test is (word & 0xFE00_0000) == 0x4A00_0000. GTE register moves (mfc2, mtc2, cfc2, ctc2), lwc2/swc2 and the bc2 branches are not commands: an interrupt on them is taken before they run.