From b60d5d6a75e76ec4c769c2165549aec87ba2a986 Mon Sep 17 00:00:00 2001 From: Patrick Moessler Date: Mon, 23 Aug 2021 20:56:08 +0200 Subject: [PATCH] Add first HW findings --- hardware.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 hardware.md diff --git a/hardware.md b/hardware.md new file mode 100644 index 0000000..5e3601f --- /dev/null +++ b/hardware.md @@ -0,0 +1,62 @@ +# Game HAT hardware + +## ICs + +| Type | Usage | +| ----------- | ----- | +| RTD2660H | Main display controller, HDMI input, ADC for joystick | +| SW6106 | Power control, battery charging, power state LEDs | +| APA2068 | Audio amplifier | +| 25D80 ? | 1Mbit SPI Flash, RTD2660 firmware & config | +| CS4334K | I²S DAC | +| unmarked SOIC8 | ? possibly Audio?, Power? near headphone jack and byttery switch | + +## IO Hardware + +- 6 Buttons, tactile, 12mm x 12mm x 3mm case, square stem 4mm high. + - Select, Start, A, B, X, Y + - Button cap diameter 11.5mm, 13mm brim. + - Total height button+cap: 12.4mm + - Pad layout: 5.5m +- 0.75mm x 14.5mm +- 1.25mm +- 2 Buttons, right angle micro button, square stem +- Analog joystick with middle button. Typical XBox/PS style. + +The buttons can be used directly with mk_arcade_joystick_rpi, available from RetroPie-Setup. +Use this `/etc/modprobe.d/mk_arcade_joystick_rpi.conf` (note: no support for middle button yet, see below): + +```conf +options mk_arcade_joystick_rpi map=5 gpio=5,6,13,19,21,4,26,12,23,20,16,18 +``` + +## Other Knowledge + +- The RTD2660H is used to translate the joystick X/Y analog axis into four distinct L/R/U/D GPIOs to the Pi. + - Pin 50/51, A-ADC0/1 is used on the RTD2660H + - Joystick middle button is connected to Pi Pin 5 (IO 03) vs Gnd (active low). +- Power is broken when switching between battery and USB + +## Display + +Seems to be 3:2, 480x320 native. Setting this via HDMI in raspbian is difficult. +Default config proposed by WaveShare is 800x600@60 + +### Display EDID + +```hex +00 FF FF FF FF FF FF 00 4A 8B 54 4C 01 00 00 00 +0C 11 01 03 81 46 27 78 8A A5 8E A6 54 4A 9C 26 +12 45 46 AF CF 00 95 00 95 0F 95 19 01 01 01 01 +01 01 01 01 01 01 01 1D 00 72 51 D0 1E 20 6E 28 +55 00 B9 88 21 00 00 1E 8C 0A D0 8A 20 E0 2D 10 +10 3E 96 00 B9 88 21 00 00 18 00 00 00 FD 00 32 +4B 18 3C 0B 00 0A 20 20 20 20 20 20 00 00 00 FC +00 33 32 56 33 48 2D 48 36 41 0A 20 20 20 01 29 +02 03 21 71 4E 06 07 02 03 15 96 11 12 13 04 14 +05 1F 90 23 09 07 07 83 01 00 00 65 03 0C 00 10 +00 8C 0A D0 90 20 40 31 20 0C 40 55 00 B9 88 21 +00 00 18 01 1D 80 18 71 1C 16 20 58 2C 25 00 B9 +88 21 00 00 9E 01 1D 80 D0 72 1C 16 20 10 2C 25 +80 B9 88 21 00 00 9E 01 1D 00 BC 52 D0 1E 20 B8 +28 55 40 B9 88 21 00 00 1E 02 3A 80 D0 72 38 2D +40 10 2C 45 80 B9 88 21 00 00 1E 00 00 00 00 D0 +```