From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Platform:Nintendo 64" |
|---|
| claim | "Joybus command 0x01 (read controller) returns 4 bytes: a big-endian 16-bit button word (A 0x8000, B 0x4000, Z 0x2000, Start 0x1000, D-up 0x0800, D-down 0x0400, D-left 0x0200, D-right 0x0100, reset flag 0x0080, L 0x0020, R 0x0010, C-up 0x0008, C-down 0x0004, C-left 0x0002, C-right 0x0001), then signed 8-bit stick X and stick Y." |
|---|
| scope | | level | "platform" |
|---|
| applies_to | "Platform:Nintendo 64" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "n64_controller_read_reply" |
|---|
| size | "0x4" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "buttons" |
|---|
| notes | "big endian" |
|---|
| bits | |
|
|
|
|
|
|
|
| bit | "7" |
|---|
| name | "RESET" |
|---|
| notes | "set when L+R+Start re-centred the stick" |
|---|
|
|
|
|
|
|
|
|
|---|
|
| offset | "0x2" |
|---|
| size | 1 |
|---|
| type | "int8_t" |
|---|
| name | "stick_x" |
|---|
|
| offset | "0x3" |
|---|
| size | 1 |
|---|
| type | "int8_t" |
|---|
| name | "stick_y" |
|---|
|
|
|---|
| endianness | "big" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "recv bitfields a, b, z, start, d_up, d_down, d_left, d_right, reset, (unused), l, r, c_up, c_down, c_left, c_right, stick_x:8, stick_y:8; GCC on big-endian MIPS allocates bitfields from the most significant bit" |
|---|
| repo | "https://github.com/DragonMinded/libdragon" |
|---|
| commit | "e356bf3f56f7afbf7e5246329562f145965cfdfc" |
|---|
| path | "src/joybus/joybus_commands.h" |
|---|
| lines | "373-404" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Controller read reply" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T04:47:11.889Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T17:32:12.880Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read joybus_cmd_n64_controller_read_port_t.recv in src/joybus/joybus_commands.h at the cited commit: 16 one-bit fields a, b, z, start, d_up, d_down, d_left, d_right, reset, unused, l, r, c_up, c_down, c_left, c_right, then signed stick_x:8, stick_y:8. Allocation from the MSB (A = 0x8000) is the fact's inference for big-endian GCC, not stated in the header." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:25:13.164Z" |
|---|
| summary | "Add data.endianness big (the fact only said so in a field note and the claim); the 16-bit button word is big-endian." |
|---|
| changed | |
|---|
|
|
|---|