Skip to content

Latest commit

 

History

History
84 lines (65 loc) · 2.94 KB

README-EN.md

File metadata and controls

84 lines (65 loc) · 2.94 KB

PiPico-Mame-Keyboard

A Keyboard USB HID implementation for the Raspberry Pi Pico using MAME's default key mappings


How to install:

  • Connect your PICO to your PC while holding the boot button down;
  • After a new removable drive appears, copy the "PiPico-Mame-Keyboard.uf2" file to the root of the drive.
  • That's it!

How to connect the buttons:

  • This setup follows the GPs from 0 to 28, skipping the missing 23, 24 and 25;
  • Each GP goes to one terminal of your button;
  • One common ground goes to another terminal of all the buttons.

KEY Pico Button
F2 GP0 SERVICE
9 GP1 TEST
5 GP3 COIN1
6 GP2 COIN2
1 GP4 P1 START
UP ARROW GP5 P1 UP
DOWN ARROW GP6 P1 DOWN
LEFT ARROW GP7 P1 LEFT
RIGHT ARROW GP8 P1 RIGHT
LEFT CTRL GP9 P1 Button 1
LEFT ALT GP10 P1 Button 2
SPACE GP11 P1 Button 3
LEFT SHIFT GP12 P1 Button 4
z GP13 P1 Button 5
x GP14 P1 Button 6
2 GP15 P2 START
r GP16 P2 UP
f GP17 P2 DOWN
d GP18 P2 LEFT
g GP19 P2 RIGHT
a GP20 P2 Button 1
s GP21 P2 Button 2
q GP22 P2 Button 3
w GP26 P2 Button 4
e GP27 P2 Button 5
h GP28 P2 Button 6


Encoder Support:

This code also supports an encoder for the Player 1 LEFT and RIGHT. Connect the encoder as follows:

Encoder Pico
CLK or A GP8
DT or B GP7
+/VCC: +3v3
GND: GND

To active the encoder, hold down (connect it to ground) GP28 at boot.

You can keep both the encoder and the buttons connected at the same time, it won't interfere with one another.


How to build the code with your own modifications: