WonderWitch/FreyaBIOS/Key
From WSdev Wiki
Jump to navigationJump to search
The Display interrupt provides helper functions for accessing the WonderSwan's keypad.
Interrupts
INT $11/AH=$00 - key_press_check
- AH = $00
Return:
- AX = A bitmask containing the currently held keys.
15 bit 8 7 bit 0 ---- ---- ---- ---- .... 4321 4321 bas. |||| |||| ||| |||| |||| ||+- Start |||| |||| |+-- A |||| |||| +--- B |||| ++++----- X1/X2/X3/X4 ++++----------- Y1/Y2/Y3/Y4
INT $12/AH=$01 - key_hit_check
- AH = $01
Return:
- AX = A bitmask containing the newly pressed keys, if any.
INT $11/AH=$02 - key_wait
- AH = $01
Return:
- AX = A bitmask containing the newly pressed keys.
This call blocks until a key is pressed.
INT $11/AH=$03 - key_set_repeat
- AH = $03
- BL = Key repeat delay, in frames
- BH = Key repeat rate, in frames
INT $11/AH=$04 - key_get_repeat
- AH = $04
Return:
- AL = Key repeat delay, in frames
- AH = Key repeat rate, in frames
INT $11/AH=$05 - key_hit_check_with_repeat
- AH = $01
Return:
- AX = A bitmask containing the newly pressed keys, if any.
For this call, the repeat delay/rate configuration is taken into account.