Skip to content

Commit 35292f8

Browse files
committed
Added gamecube device documentation + let psx and keyboard/ps2 mode work as input on this mode
1 parent 5f0385a commit 35292f8

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PicoGamepadCoverter is a project designed for RP2040 or Raspberry Pi Pico and va
1010
- Read input from USB and Bluetooth controllers.
1111
- Read inputs from no USB peripherals.
1212
- Web interface to choose between modes.
13-
- Different out modes (Dinput, Xinput, Switch, Bluetooth, PS1/PS2, WII)
13+
- Different out modes (Dinput, Xinput, Switch, Bluetooth, PS1/PS2, Gamecube, WII)
1414
- Easy to use, no overcomplicated options.
1515

1616
---
@@ -117,6 +117,18 @@ To get started with PicoGamepadConverter, follow the steps below:
117117

118118
- On PS1/PS2 device mode, the alternative connection for PS1/PS2 controllers are on **5 GPIO** for **COMMAND PIN**, **6 GPIO** for **CLOCK PIN**, **7 GPIO** for **ATTENTION PIN** and **8 GPIO** for **DATA PIN**.
119119

120+
### Gamecube
121+
122+
- The connection for Gamecube device mode is **19 GPIO** for **DATA PIN**.
123+
124+
![gamecube_device_connection](./docs/Gamecube_pinout.png)
125+
126+
- On Gamecube device mode, the host connection is on **native usb female connector on the microcontroller**.
127+
128+
- On Gamecube device mode, the alternative connection for Keyboard PS/2 are on **5 GPIO** for **DATA PIN** and **6 GPIO** for **CLOCK PIN**.
129+
130+
- On Gamecube device mode, the alternative connection for PS1/PS2 controllers are on **5 GPIO** for **COMMAND PIN**, **6 GPIO** for **CLOCK PIN**, **7 GPIO** for **ATTENTION PIN** and **8 GPIO** for **DATA PIN**.
131+
120132
---
121133
## Modes
122134
Exist two parameter to choose on web interface, **host** and **device**. The first is the input and another one the output.
@@ -145,6 +157,7 @@ Exist two parameter to choose on web interface, **host** and **device**. The fir
145157

146158
#### SPECIAL MODES
147159
- PS1/PS2: Emulation of a PS1 or PS2 controller.
160+
- Gamecube: Emulation of a Gamecube controller.
148161

149162
---
150163
## Features
@@ -251,8 +264,9 @@ cp PicoGamepadConverter.uf2 d:
251264
- [dotcypress](https://github.com/dotcypress/ula) for the Logic Analyzer compatible with PulseView. Was very useful for PS1 controller part.
252265
- [usedbytes](https://github.com/usedbytes/picow_ds4) for ps4 bluetooth example.
253266
- [dangiu](https://github.com/dangiu/PicoMemcard) for `psxSPI.pio` program from PicoMemcard project.
254-
- [TonyMacDonald1995](https://github.com/TonyMacDonald1995/DS4toPS2) for PS2 controller simulation example.
267+
- [TonyMacDonald1995](https://github.com/TonyMacDonald1995/DS4toPS2) for PS2 controller emulation example.
255268
- [rnconrad](https://github.com/rnconrad/WiimoteEmulator) for the wiimote emulator project.
269+
- [PhobGCC](https://github.com/PhobGCC/PhobGCC-SW) for the joybus pio program (original from [JulienBernard3383279](https://github.com/JulienBernard3383279/pico-rectangle)).
256270

257271

258272
## License

docs/Gamecube_pinout.png

243 KB
Loading

src/main.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ void core1_main() {
162162
if(DEVICE == PSX){
163163
psx_device_main();
164164
}
165+
else if(DEVICE == GC){
166+
// Gamecube device
167+
gc_device_main(1, &gcReport, GC_DAT_GPIO);
168+
}
165169

166170
switch (HOST) {
167171
case KBD_PS2:
@@ -182,7 +186,6 @@ void core1_main() {
182186
default:
183187
switch (DEVICE) {
184188
case WII:
185-
case GC:
186189
case BLUETOOTH:
187190
//Wifi chip use pio, that cause problems
188191
//init host stack for native usb (roothub port0)
@@ -277,9 +280,8 @@ int main(void) {
277280
#endif
278281
break;
279282
case GC:
280-
// Gamecube device
281-
gc_device_main(1, &gcReport, GC_DAT_GPIO);
282-
break;
283+
//This core is for device modes, but I need gc can use keyboard_ps2 and psx controller on host
284+
// as psx device mode do it
283285
case PSX:
284286
//This core is for device modes but PS1/PS2 MODE need reboot the core1
285287
switch(HOST){

0 commit comments

Comments
 (0)