WonderWitch/FreyaBIOS/Key: Difference between revisions
From WSdev Wiki
Jump to navigationJump to search
(Created page with "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. <pre> 15 bit 8 7 bit 0 ---- ---- ---- ---- .... 4321 4321 bas. |||| |||| ||| |||| |||| ||+- Start |||| |||| |+-- A |||| |||| +--- B |||| ++++----- X1/X2/X3/X4 ++++----------- Y1/Y2/Y3/Y4 </pr...") |
mNo edit summary |
||
Line 33: | Line 33: | ||
=== INT $11/AH=$02 - key_wait === | === INT $11/AH=$02 - key_wait === | ||
* AH = $ | * AH = $02 | ||
Return: | Return: | ||
Line 58: | Line 58: | ||
=== INT $11/AH=$05 - key_hit_check_with_repeat === | === INT $11/AH=$05 - key_hit_check_with_repeat === | ||
* AH = $ | * AH = $05 | ||
Return: | Return: |
Latest revision as of 16:08, 24 July 2024
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 = $02
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 = $05
Return:
- AX = A bitmask containing the newly pressed keys, if any.
For this call, the repeat delay/rate configuration is taken into account.