libmsx
C library for MSX
Loading...
Searching...
No Matches

Joystick / Joypad interface. More...

+ Collaboration diagram for Joystick / Joypad:

Functions

uint8_t msx_GTSTCK (const uint8_t a)
 MSX BIOS : GTSTCK (00D5H / MAIN)
 
uint8_t msx_GTTRIG (const uint8_t a)
 MSX BIOS : GTTRIG (00D8H / MAIN)
 

Detailed Description

Joystick / Joypad interface.

Function Documentation

◆ msx_GTSTCK()

uint8_t msx_GTSTCK ( const uint8_t  a)

MSX BIOS : GTSTCK (00D5H / MAIN)

Get the status of the eight-way lever on the joystick or the arrow keys on the keyboard.

Parameters
ajoystick number
  • 0 : keyboard (the arrow keys)
  • 1 : joystick #1
  • 2 : joystick #2
Returns
status of the eight-way lever or the arrow keys.
  • 0 : center
  • 1 : north
  • 2 : north east
  • 3 : east
  • 4 : south east
  • 5 : south
  • 6 : south west
  • 7 : west
  • 8 : north west
See also
joypad_get_state()

◆ msx_GTTRIG()

uint8_t msx_GTTRIG ( const uint8_t  a)

MSX BIOS : GTTRIG (00D8H / MAIN)

Get the status of the trigger button on the joystick or the SPACE key on the keyboard.

Parameters
atrigger button number
  • 0 : keyboard (the SPACE key)
  • 1 : trigger button #1 of the joystick #1
  • 2 : trigger button #1 of the joystick #2
  • 3 : trigger button #2 of the joystick #1
  • 4 : trigger button #2 of the joystick #2
Returns
status of the trigger button or the SPACE key.
  • 0x00 : released
  • 0xFF : pressed
See also
joypad_get_state()