mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-08-08 16:48:17 +00:00
overkill sio cruft, not keeping.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user