HID Shared Memory: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
No edit summary  | 
				|||
| Line 14: | Line 14: | ||
|-  | |-  | ||
| 0x34  | | 0x34  | ||
| This stores circle-pad info: the low s16 is the X coordinate, the high s16 is the Y coordinate.  | | This stores circle-pad info: the low s16 is the X coordinate, the high s16 is the Y coordinate. The circle-pad center is ~0 for these fields. The range for these fields is approximately: -0x9C(top/left) - 0x9C(bottom/right).  | ||
|-  | |-  | ||
| 0x38  | | 0x38  | ||
| Line 20: | Line 20: | ||
|-  | |-  | ||
| 0x44  | | 0x44  | ||
|   | | Second circle-pad info word.  | ||
|-  | |-  | ||
| 0x48  | | 0x48  | ||
| Line 26: | Line 26: | ||
|-  | |-  | ||
| 0x54  | | 0x54  | ||
|   | | Third circle-pad info word.  | ||
|-  | |-  | ||
| 0x58  | | 0x58  | ||
| Line 32: | Line 32: | ||
|-  | |-  | ||
| 0x64  | | 0x64  | ||
|   | | Fourth circle-pad info word.  | ||
|-  | |-  | ||
| 0x68  | | 0x68  | ||
| Line 38: | Line 38: | ||
|-  | |-  | ||
| 0x74  | | 0x74  | ||
|   | | Fifth circle-pad info word.  | ||
|-  | |-  | ||
| 0x78  | | 0x78  | ||
| Line 44: | Line 44: | ||
|-  | |-  | ||
| 0x84  | | 0x84  | ||
|   | | Sixth circle-pad info word.  | ||
|-  | |-  | ||
| 0x88  | | 0x88  | ||
| Line 50: | Line 50: | ||
|-  | |-  | ||
| 0x94  | | 0x94  | ||
|   | | Seventh circle-pad info word.  | ||
|-  | |-  | ||
| 0x98  | | 0x98  | ||
| Same as 0x1C?  | | Same as 0x1C?  | ||
|}  | |}  | ||
The info for each circle-pad word is originally read by HID module at different times per frame.  | |||
=Offset 0xC0=  | =Offset 0xC0=  | ||
Revision as of 19:25, 16 August 2013
This page describes the format of the HID shared memory.
Offset 0x0
| Relative offset | Description | 
|---|---|
| 0x1C | PAD state. Bit set = button pressed, bit clear = button not pressed. | 
| 0x28 | Same as 0x1C? | 
| 0x34 | This stores circle-pad info: the low s16 is the X coordinate, the high s16 is the Y coordinate. The circle-pad center is ~0 for these fields. The range for these fields is approximately: -0x9C(top/left) - 0x9C(bottom/right). | 
| 0x38 | Same as 0x1C? | 
| 0x44 | Second circle-pad info word. | 
| 0x48 | Same as 0x1C? | 
| 0x54 | Third circle-pad info word. | 
| 0x58 | Same as 0x1C? | 
| 0x64 | Fourth circle-pad info word. | 
| 0x68 | Same as 0x1C? | 
| 0x74 | Fifth circle-pad info word. | 
| 0x78 | Same as 0x1C? | 
| 0x84 | Sixth circle-pad info word. | 
| 0x88 | Same as 0x1C? | 
| 0x94 | Seventh circle-pad info word. | 
| 0x98 | Same as 0x1C? | 
The info for each circle-pad word is originally read by HID module at different times per frame.
Offset 0xC0
This 0x48-byte region stores entries for touch-screen position info. Each entry is 0x8-bytes, there's a total of 9 entries. Normally the last 8 entries contain the same data. When the touch-screen is not being touched, this region is all-zero.
The last 8 entries contain the pixel coordinates, while the first entry seems to contain the raw coordinate data prior to being converted to pixel coordinates.
Entry format
| Relative offset | Size | Description | 
|---|---|---|
| 0x0 | 0x2 | X coordinate. | 
| 0x2 | 0x2 | Y coordinate. | 
| 0x4 | 0x4 | This is 0x0 when this entry doesn't contain any actual data, value 0x1 indicates that this entry contains actual data. |