Protocol per llençar una màquina
Contingut
- 1 Models
- 2 Protocol per configurar bé una màquina
- 3 Configuració de tecles
- 3.1 Bartop model Shinobi 1P
- 3.2 Minibartop model Metal Slug 1P (7 botons)
- 3.3 Minibartop model Metal Slug 2P (8 botons)
- 3.4 Arcade stick model Star Wars 1P
- 3.5 Bartop model Super Mario World 2P
- 3.6 Bartop model Super Mario World 2P simplificat (10 botons)
- 3.7 Arcade stick model Pole Position (driving)
- 3.8 Arcade Cocktail model fusta de pi
Models
- Bartop model Shinobi: 1 jugador, 6 botons, 1 emulador (mame4all)
- Minibartop model Metal Slug: 1 jugador, 7 botons, 4 emuladors (mame4all, neogeo, gba, megadrive)
- Arcade stick model Star Wars: 1 jugador, 3+6 botons, 5 emuladors (mame4all, neogeo, gba, megadrive, snes)
- Bartop model Super Mario World: 2 jugadors, 4+6+6 botons, 5 emuladors (mame4all, neogeo, gba, megadrive, snes)
Protocol per configurar bé una màquina
Abans de començar a jugar, amb la consola mirar si tots els botons donen la tecla correcta (segons la meva plantilla de la CPO i el fitxer pikeyd.conf)
- S'ha de tenir en compte de si és un jugador o dos jugadors
- tenir un joc de cada emulador que faci servir totes les tecles. Provar 1 i 2 jugadors
- Comprovar també el front-end: canvi categoria, favorit, emulador, consola i shut-down
- Per cada màquina tinc un layout per imprimir i enganxar a l'interior de la màquina
Configuració de tecles
- Layout del CPO, on digui cada botó quina tecla del teclat és
- S'ha de configurar cada emulador per assegurar-nos de què es correspon correctament amb el CPO
- Fitxer pikeyd.conf, on diu la tecla a quin pin del pinout es correspon
- Pinout de la RPi B+. Ja puc cablejar
Bartop model Shinobi 1P
GPIO pinout i pikeyd.conf
0 1 2 ESC Player1 COIN START 3 4 5 A B C FAV CAT EMU
fitxer pikeyd.conf:
#BARTOP 6 BOTONS (MODEL SHINOBI) (MAME4ALL) KEY_LEFT 4 KEY_RIGHT 17 KEY_UP 27 KEY_DOWN 22 KEY_0 10 KEY_1 9 KEY_2 11 KEY_3 23 KEY_4 24 KEY_5 25
I això en el pinout es tradueix:
3.3V *--* 5V *--* *--* GND L *--* *--* R *--* U *--* D *--* 3 *--* 4 0 *--* 1 *--* 5 2 *--* *--* ...
Resum layout per imprimir:
#BARTOP 6 BOTONS SHINOBI (MAME4ALL) * * * 0 1 2 * * * 3 4 5 0 1 2 ESC Player1 COIN START 3 4 5 A B C FAV CAT EMU 3.3 *--* 5V *--* *--* GND L *--* *--* R *--* U *--* D *--* 3 *--* 4 0 *--* 1 *--* 5 2 *--* *--*
GPIO pinout i pikeyd.conf v2 (deshabilitar I2C)
0 1 2 ESC Player1 COIN START 3 4 5 A B C FAV CAT EMU
fitxer pikeyd.conf:
#BARTOP 6 BOTONS (MODEL SHINOBI) (MAME4ALL) KEY_LEFT 0 KEY_RIGHT 1 KEY_UP 4 KEY_DOWN 17 KEY_0 27 KEY_1 22 KEY_2 10 KEY_3 14 KEY_4 15 KEY_5 18
I això en el pinout es tradueix:
3.3V *--* 5V L *--* R *--* GND U *--* 3 *--* 4 D *--* 5 0 *--* 1 *--* *--* 2 *--* ...
Resum layout per imprimir:
#BARTOP 6 BOTONS SHINOBI (MAME4ALL) * * * 0 1 2 * * * 3 4 5 0 1 2 ESC Player1 COIN START 3 4 5 A B C FAV CAT EMU 3.3 *--* 5V L *--* R *--* GND U *--* 3 *--* 4 D *--* 5 0 *--* 1 *--* *--* 2 *--*
Minibartop model Metal Slug 1P (7 botons)
GPIO pinout i pikeyd.conf
Aquesta informació es troba a [[Minibartop_Arcade_Cabinet#Disseny_CPO_.28Control_Panel.29._7_botons:_ESC_.2B_6_botons
0 1 2 ESC Player1 COIN START SELECT 3 4 5 6 A B C D FAV CAT EMU
fitxer pikeyd.conf:
#MINIBATOP 7 BOTONS (MODEL METAL SLUG) KEY_LEFT 4 KEY_RIGHT 17 KEY_UP 27 KEY_DOWN 22 KEY_0 10 KEY_1 9 KEY_2 11 KEY_3 23 KEY_4 24 KEY_5 25 KEY_6 8
I això en el pinout es tradueix:
3.3V *--* 5V *--* *--* GND L *--* *--* R *--* U *--* D *--* 3 *--* 4 0 *--* 1 *--* 5 2 *--* 6 *--* ...
Resum layout per imprimir:
MINIBATOP 7 BOTONS * * * 0 1 2 * * * * 3 4 5 6 0 1 2 ESC Player1 COIN START SELECT 3 4 5 6 A B C D FAV CAT EMU 3.3 *--* 5V *--* *--* GND L *--* *--* R *--* U *--* D *--* 3 *--* 4 0 *--* 1 *--* 5 2 *--* 6 *--*
GPIO pinout i pikeyd.conf (deshabilitar I2C)
Aquesta informació es troba a [[Minibartop_Arcade_Cabinet#Disseny_CPO_.28Control_Panel.29._7_botons:_ESC_.2B_6_botons
0 1 2 ESC Player1 COIN START SELECT 3 4 5 6 A B C D FAV CAT EMU
fitxer pikeyd.conf:
#MINIBATOP 7 BOTONS (MODEL METAL SLUG) KEY_LEFT 0 KEY_RIGHT 1 KEY_UP 4 KEY_DOWN 17 KEY_0 27 KEY_1 22 KEY_2 10 KEY_3 14 KEY_4 15 KEY_5 18 KEY_6 23
I això en el pinout es tradueix:
3.3V *--* 5V L *--* R *--* GND U *--* 3 *--* 4 D *--* 5 0 *--* 1 *--* 6 *--* 2 *--* ...
Resum layout per imprimir:
MINIBATOP 7 BOTONS * * * 0 1 2 * * * * 3 4 5 6 0 1 2 ESC Player1 COIN START SELECT 3 4 5 6 A B C D FAV CAT EMU 3.3 *--* 5V L *--* R *--* GND U *--* 3 *--* 4 D *--* 5 0 *--* 1 *--* 6 *--* 2 *--*
Minibartop model Metal Slug 2P (8 botons)
Els jocs de MAME són de dos jugadors, i comparteixen els mandos (primer juga un; després l'altre alternativament),
GPIO pinout i pikeyd.conf
Aquesta informació es troba a [[Minibartop_Arcade_Cabinet#Disseny_CPO_.28Control_Panel.29._7_botons:_ESC_.2B_6_botons
0 1 2 9 ESC Player1 COIN Player2 START SELECT 3 4 5 6 A B C D FAV CAT EMU
fitxer pikeyd.conf:
#MINIBATOP 7 BOTONS (MODEL METAL SLUG) KEY_LEFT 4 KEY_RIGHT 17 KEY_UP 27 KEY_DOWN 22 KEY_0 10 KEY_1 9 KEY_2 11 KEY_9 14 KEY_3 23 KEY_4 24 KEY_5 25 KEY_6 8
I això en el pinout es tradueix:
3.3V *--* 5V *--* *--* GND L *-- 9 *--* R *--* U *--* D *--* 3 *--* 4 0 *--* 1 *--* 5 2 *--* 6 *--* ...
Resum layout per imprimir:
MINIBATOP 8 BOTONS * * * * 0 1 2 9 * * * * 3 4 5 6 0 1 2 9 ESC Player1 COIN Player2 START SELECT 3 4 5 6 A B C D FAV CAT EMU
Arcade stick model Star Wars 1P
GPIO pinout i pikeyd.conf
Copio la informació que tinc escrita a [[Arcade_Stick#Configuraci.C3.B3_CPO]].
ESC P1 ST SEL COIN 0 1 2 * * * X Y R 6 7 8 * * * * * * A B L 3 4 5
pinheader BCM GPIO * * * * * * left-GPIO4 * * GPIO14-0 * * GPIO15-1 right-GPIO17 * * GPIO18-2 up-GPIO27 * * down-GPIO22 * * * * 3-GPIO10 * * 4-GPIO9 * * GPIO25-6 5-GPIO11 * * GPIO8-7 * * GPIO7-8
I el fitxer pikeyd.conf quedaria de la següent manera:
#1 PLAYER 9 BOTONS (ARCADE STICK MODEL STAR WARS) #joystick1 KEY_LEFT 4 KEY_RIGHT 17 KEY_UP 27 KEY_DOWN 22 #esc, P1 start, coin/sel KEY_0 14 KEY_1 15 KEY_2 18 #jugador 1 KEY_3 10 KEY_4 9 KEY_5 11 KEY_6 25 KEY_7 8 KEY_8 7
Resum layout a imprimir:
1 PLAYER 9 BOTONS ESC P1ST SEL-COIN 0 1 2 * * * X Y Z-R-D 6 7 8 * * * * * * A B C-L 3 4 5 3.3 *--* 5V *--* *--* GND L *--* 0 *--* 1 R *--* 2 U *--* D *--* *--* 3 *--* 4 *--* 6 5 *--* 7 *--* 8
Bartop model Super Mario World 2P
GPIO pinout i pikeyd.conf
Aquesta informació és la mateixa que: Bartop_multiemulador_2_jugadors#CPO.2C_configuraci.C3.B3.
# [keycode from /usr/include/linux/input.h] [whitespace] [GPIO pin no] # Not limited to a single key. A GPIO press will emit all defined keys in order. #2 PLAYER 16 BOTONS (MODEL SUPER MARIO WORLD) #joystick1 KEY_LEFT 4 KEY_RIGHT 17 KEY_UP 27 KEY_DOWN 22 #joystick1 KEY_J 14 KEY_L 15 KEY_I 18 KEY_K 23 #esc, P1 start, coin/sel, P2 Start KEY_0 24 KEY_1 25 KEY_2 8 KEY_9 7 #jugador 1 KEY_3 10 KEY_4 9 KEY_5 11 KEY_6 5 KEY_7 6 KEY_8 13 #jugador 2 KEY_A 12 KEY_B 16 KEY_C 20 KEY_D 21 KEY_E 19 KEY_F 26
I el pinout de la RPi B+:
pinheader BCM GPIO *--* *--* *--* left-GPIO4 *--* GPIO14-J *--* GPIO15-L right-GPIO17 *--* GPIO18-I up-GPIO27 *--* down-GPIO22 *--* GPIO23-K *--* GPIO24-0 3-GPIO10 *--* 4-GPIO9 *--* GPIO25-1 5-GPIO11 *--* GPIO8-2 *--* GPIO7-9 *--* 6-GPIO5 *--* 7-GPIO6 *--* GPIO12-A 8-GPIO13 *--* E-GPIO19 *--* GPIO16-B F-GPIO26 *--* GPIO20-C *--* GPIO21-D
Aquests de dalt són els pins que faré servir. Recordem però els pins GPIO disponibles: (GPIO2 i GPIO3 no es fan servir perquè són I2C, i es farien servir precisament si encara necessités més entrades I/O):
pinheader BCM GPIO *--* *--* *--* GPIO4 *--* GPIO14 *--* GPIO15 GPIO17 *--* GPIO18 GPIO27 *--* GPIO22 *--* GPIO23 *--* GPIO24 GPIO10 *--* GPIO9 *--* GPIO25 GPIO11 *--* GPIO8 *--* GPIO7 *--* GPIO5 *--* GPIO6 *--* GPIO12 GPIO13 *--* GPIO19 *--* GPIO16 GPIO26 *--* GPIO20 *--* GPIO21
Resum layout per imprimir:
2 PLAYER 16 BOTONS ESC P1ST SEL-COIN P2ST 0 1 2 9 * * * * X Y Z-R-D X Y Z-R-D 6 7 8 d e f * * * * * * * * * * * * A B C-L A B C-L 3 4 5 a b c J1: left, right, up, down J2: j, l, i, k 3.3 *--* 5V *--* *--* GND le *--* J *--* L ri *--* I up *--* do *--* K *--* 0 3 *--* 4 *--* 1 5 *--* 2 *--* 9 *--* 6 *--* 7 *--* A 8 *--* E *--* B F *--* C *--* D
Bartop model Super Mario World 2P simplificat (10 botons)
GPIO pinout i pikeyd.conf
# [keycode from /usr/include/linux/input.h] [whitespace] [GPIO pin no] # Not limited to a single key. A GPIO press will emit all defined keys in order. #2 PLAYER 10 BOTONS SIMPLIFICAT (MODEL SUPER MARIO WORLD) #joystick1 KEY_LEFT 4 KEY_RIGHT 17 KEY_UP 27 KEY_DOWN 22 #joystick1 KEY_J 14 KEY_L 15 KEY_I 18 KEY_K 23 #esc, P1 start, coin/sel, P2 Start KEY_0 24 KEY_1 25 KEY_2 8 KEY_9 7 #jugador 1 KEY_3 10 KEY_4 9 KEY_5 11 #jugador 2 KEY_A 12 KEY_B 16 KEY_C 20
I el pinout de la RPi B+:
pinheader BCM GPIO *--* *--* *--* left-GPIO4 *--* GPIO14-J *--* GPIO15-L right-GPIO17 *--* GPIO18-I up-GPIO27 *--* down-GPIO22 *--* GPIO23-K *--* GPIO24-0 3-GPIO10 *--* 4-GPIO9 *--* GPIO25-1 5-GPIO11 *--* GPIO8-2 *--* GPIO7-9 *--* *--* *--* GPIO12-A *--* *--* GPIO16-B *--* GPIO20-C *--*
Aquests de dalt són els pins que faré servir. Recordem però els pins GPIO disponibles: (GPIO2 i GPIO3 no es fan servir perquè són I2C, i es farien servir precisament si encara necessités més entrades I/O):
pinheader BCM GPIO *--* *--* *--* GPIO4 *--* GPIO14 *--* GPIO15 GPIO17 *--* GPIO18 GPIO27 *--* GPIO22 *--* GPIO23 *--* GPIO24 GPIO10 *--* GPIO9 *--* GPIO25 GPIO11 *--* GPIO8 *--* GPIO7 *--* *--* *--* GPIO12 *--* *--* GPIO16 *--* GPIO20 *--*
Resum layout per imprimir:
2 PLAYER 16 BOTONS ESC P1ST SEL-COIN P2ST 0 1 2 9 * * * * * * * * * * A B C-L A B C-L 3 4 5 a b c J1: left, right, up, down J2: j, l, i, k 3.3 *--* 5V *--* *--* GND le *--* J *--* L ri *--* I up *--* do *--* K *--* 0 3 *--* 4 *--* 1 5 *--* 2 *--* 9 *--* *--* *--* A *--* *--* B *--* C *--*
Arcade stick model Pole Position (driving)
GPIO pinout i pikeyd.conf
ESC P1 ST COIN 0 1 2 * * * * * * B1 B2 B3 3 4 5
pinheader BCM GPIO * * * * * * 0-GPIO4 * * 3-GPIO14 * * 4-GPIO15 1-GPIO17 * * 5-GPIO18 2-GPIO27 * * * * * * * * * * * * * *
I el fitxer pikeyd.conf quedaria de la següent manera:
#1 PLAYER 6 BOTONS (ARCADE STICK MODEL POLE POSITION) KEY_0 4 KEY_1 17 KEY_2 27 KEY_3 14 KEY_4 15 KEY_5 18
Resum layout a imprimir:
1 PLAYER 9 BOTONS ESC P1ST SEL-COIN 0 1 2 * * * * * * B1 B2 B3 3 4 5 3.3 *--* 5V *--* *--* GND 0 *--* 2 *--* 3 1 *--* 4 2 *--* *--* *--* *--* *--* *--* *--*
Arcade Cocktail model fusta de pi
GPIO pinout i pikeyd.conf
# [keycode from /usr/include/linux/input.h] [whitespace] [GPIO pin no] # Not limited to a single key. A GPIO press will emit all defined keys in order. #COCKTAIL 2 PLAYER 10 BOTONS (MODEL ...) #joystick1 KEY_LEFT 4 KEY_RIGHT 17 KEY_UP 27 KEY_DOWN 22 #joystick2 KEY_J 14 KEY_L 15 KEY_I 18 KEY_K 23 #esc, P1 start, Coin, P2 Start KEY_0 24 KEY_1 25 KEY_2 8 KEY_9 7 #jugador 1 KEY_3 10 KEY_4 9 KEY_5 11 #jugador 2 KEY_B 5 KEY_C 6 KEY_A 12
I el pinout de la RPi B+:
pinheader BCM GPIO *--* *--* *--* left-GPIO4 *--* GPIO14-J *--* GPIO15-L right-GPIO17 *--* GPIO18-I up-GPIO27 *--* down-GPIO22 *--* GPIO23-K *--* GPIO24-0 3-GPIO10 *--* 4-GPIO9 *--* GPIO25-1 5-GPIO11 *--* GPIO8-2 *--* GPIO7-9 *--* B-GPIO5 *--* C-GPIO6 *--* GPIO12-A
Aquests de dalt són els pins que faré servir. Recordem però els pins GPIO disponibles: (GPIO2 i GPIO3 no es fan servir perquè són I2C, i es farien servir precisament si encara necessités més entrades I/O):
pinheader BCM GPIO *--* *--* *--* GPIO4 *--* GPIO14 *--* GPIO15 GPIO17 *--* GPIO18 GPIO27 *--* GPIO22 *--* GPIO23 *--* GPIO24 GPIO10 *--* GPIO9 *--* GPIO25 GPIO11 *--* GPIO8 *--* GPIO7 *--* GPIO5 *--* GPIO6 *--* GPIO12
Resum layout per imprimir:
ESC P1ST COIN P2ST 0 1 2 9 * * * * * * * B1 B2 B3 3 4 5
* * * B1 B2 B3 A B C
3.3 *--* 5V *--* *--* GND le *--* J *--* L ri *--* I up *--* do *--* K *--* 0 3 *--* 4 *--* 1 5 *--* 2 *--* 9 *--* B *--* C *--* A
creat per Joan Quintana Compte, octubre 2015