overkill sio cruft, not keeping.

This commit is contained in:
ed
2026-08-03 10:12:06 -04:00
parent 9eb696ece8
commit 8282f8e902
7 changed files with 958 additions and 37 deletions
+14
View File
@@ -63,3 +63,17 @@ WORD_COUNT(mac_put_disp_env, 15)
, mac_gcmd_push(gp0_word_nop(), reg_transfer, reg_base, port)
WORD_COUNT(mac_put_draw_env, 48)
#define mac_pad_sio_write_pad_state(status_val, state_ptr_reg, scratch_reg) \
add_ui(scratch_reg, R_0, status_val) \
, store_word(scratch_reg, state_ptr_reg, O_(PadState,status)) /* FIX 2026-08-02: buttons = 0x0000FFFF = "no buttons pressed" in
* libetc convention. Build it with LUI + ORI so addiu does not
* sign-extend 0xFFFF to 0xFFFFFFFF. */ \
, load_upper_i(scratch_reg, 0x0000) \
, or_i(scratch_reg, scratch_reg, 0xFFFF) \
, store_word(scratch_reg, state_ptr_reg, O_(PadState,buttons)) \
, add_ui(scratch_reg, R_0, 0x80808080) \
, store_word(scratch_reg, state_ptr_reg, O_(PadState,left_x)) \
, add_ui(scratch_reg, R_0, 0) \
, store_word(scratch_reg, state_ptr_reg, O_(PadState,attempt))
WORD_COUNT(mac_pad_sio_write_pad_state, 9)