Skip to content

Commit

Permalink
fix to ps2 controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Loc15 committed Feb 21, 2024
1 parent e4f27b7 commit 65dc9bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Exist two parameter to choose on web interface, **host** and **device**. The fir

#### SPECIAL MODES
- Keyboard/PS2: Support keyboards with PS/2 connector.
- PS1/PS2: Support PS1 controllers (For now PS2 controller doesn't work well)
- PS1/PS2: Support PS1 and PS2 controllers. (_Put a pull-up resistor on data pin_)

### DEVICE
#### USB MODES
Expand Down Expand Up @@ -114,15 +114,15 @@ You can to set some additional configuration if you required:
Controllers that was tested on different host modes.

| Tested Controllers | Modes (Host) |
| ------------------ | -------------- |
| ------------------ | --- |
| Logitech F710 | Xinput, Dinput |
| 8BitDo Ultimate 2.4G | Xinput, Dinput, Bluetooth|
| 8BitDo Ultimate C 2.4G | **Doesn't work** |
| DualShock (PS1) | PS1/PS2 |
| DualShock 2 (PS2) | _Works weird_ |
| DualShock (PS1) | PS1/PS2 |
| DualShock 2 (PS2) | PS1/PS2 |
| DualShock 3 (PS3) | Dinput |
| DualShock 4 (PS4) | Dinput, Bluetooth|
| Keyboard HP KB-0316 | Keyboard PS/2 |
| Keyboard HP KB-0316 | Keyboard PS/2 |

---

Expand Down
2 changes: 2 additions & 0 deletions src/host_files/psx-lib/psx.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ void psx_init(uint pio, uint gpio_output, uint gpio_input, void (*fn)(uint32_t *
pio_gpio_init(psx_pio, gpio_output+2);
pio_gpio_init(psx_pio, gpio_input);
gpio_pull_up(gpio_input);
gpio_pull_up(gpio_output+1);
gpio_pull_up(gpio_output+2);
pio_sm_set_consecutive_pindirs(psx_pio, sm, gpio_output, 3, true);
pio_sm_set_consecutive_pindirs(psx_pio, sm, gpio_input, 1, false);
float div = (float)clock_get_hz(clk_sys) / (6 * 12500);
Expand Down

0 comments on commit 65dc9bc

Please sign in to comment.