hardware:gamepads
Table of Contents
Gamepad Ports
The front gamepad ports can be read at $2008 and $2009. Writing to these addresses will not do anything. A byte read from one of these locations will return 6 binary button states from the respective controller. Consecutive reads to the same port will toggle the “select” line on the controller port, causing the controller to change which six button states are being returned. More on reading gamepads can be found in its own article.
First read:
Button | Mask |
---|---|
A | 16 |
Start | 32 |
Up | 8 |
Down | 4 |
Second read:
Button | Mask |
---|---|
B | 16 |
C | 32 |
Left | 2 |
Right | 1 |
Up | 8 |
Down | 4 |
hardware/gamepads.txt · Last modified: 2025/09/20 02:38 by clyde