Skip to content

Commit

Permalink
changed GPIOs of joystick input to better pins
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Oliver Moll committed Mar 28, 2021
1 parent 3f50f67 commit 85b701b
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 54 deletions.
4 changes: 2 additions & 2 deletions CDTV/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define PIN_CDTV_JOY_DOWN A1 /* DB9 pin 2 */
#define PIN_CDTV_JOY_LEFT A2 /* DB9 pin 3 */
#define PIN_CDTV_JOY_RIGHT A3 /* DB9 pin 4 */
#define PIN_CDTV_JOY_A A4 /* DB9 pin 6 */
#define PIN_CDTV_JOY_B A5 /* DB9 pin 9 */
#define PIN_CDTV_JOY_A (7) /* DB9 pin 6 */
#define PIN_CDTV_JOY_B (8) /* DB9 pin 9 */

#endif
4 changes: 2 additions & 2 deletions CDTV_FF/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#define PIN_CDTV_JOY_DOWN A1 /* DB9 pin 2 */
#define PIN_CDTV_JOY_LEFT A2 /* DB9 pin 3 */
#define PIN_CDTV_JOY_RIGHT A3 /* DB9 pin 4 */
#define PIN_CDTV_JOY_A A4 /* DB9 pin 6 */
#define PIN_CDTV_JOY_B A5 /* DB9 pin 9 */
#define PIN_CDTV_JOY_A (7) /* DB9 pin 6 */
#define PIN_CDTV_JOY_B (8) /* DB9 pin 9 */

/* pin configuration for controlling flashfloppy */
#define PIN_FF_NEXT (4)
Expand Down
8 changes: 0 additions & 8 deletions Modules/amiga_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ void outputY()

void db9_mouse_init()
{
#if 0
// Disable the watchdog timer (if set in fuses)
MCUSR &= ~(1 << WDRF);
wdt_disable();
// Disable the clock divider (if set in fuses)
clock_prescale_set(clock_div_1);
#endif

outputX();
outputY();
weak_pullup( PIN_DB9_LB );
Expand Down
84 changes: 42 additions & 42 deletions documentation/Pins.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ pins on top.

CDTV
----
| Function | Pin | | Pin | Function |
|---------------:|:----|-|----:|:----------------------|
| Serial TX | 0 | | Vin | Power (+5V) |
| Serial RX | 1 | | GND | Ground |
| Reset (unused) | RST | | RST | Reset (unused) |
| Ground | GND | | VCC | +3.3V (not connected) |
| KB_CLK | 2 | | A3 | joystick input right |
| KB_DAT | 3 | | A2 | joystick input left |
| (FF next) | 4 | | A1 | joystick input down |
| (FF prev) | 5 | | A0 | joystick input up |
| CDTV_PRDT | 6 | | 13 | USB host SCK |
| | 7 | | 12 | USB host MISO |
| | 8 | | 11 | USB host MOSI |
| USB host INTR | 9 | | 10 | USB host SS |
| Function | Pin | | Pin | Function |
|---------------:|:----|---|----:|:----------------------|
| Serial TX | 0 | | Vin | Power (+5V) |
| Serial RX | 1 | | GND | Ground |
| Reset (unused) | RST | | RST | Reset (unused) |
| Ground | GND | | VCC | +3.3V (not connected) |
| KB_CLK | 2 | | A3 | joystick input right |
| KB_DAT | 3 | | A2 | joystick input left |
| (FF next) | 4 | | A1 | joystick input down |
| (FF prev) | 5 | | A0 | joystick input up |
| CDTV_PRDT | 6 | | 13 | USB host SCK |
| | 7 | | 12 | USB host MISO |
| | 8 | | 11 | USB host MOSI |
| USB host INTR | 9 | | 10 | USB host SS |

Pins inside the board:

Expand All @@ -34,38 +34,38 @@ Note: pins A4/A5 will be moved to 7/8 soon.

DB9 ("Big Box" Amigas)
----------------------
| Function | Pin | | Pin | Function |
|-----------------:|:----|-|----:|:----------------------|
| Serial TX | 0 | | Vin | Power (+5V) |
| Serial RX | 1 | | GND | Ground |
| Reset (unused) | RST | | RST | Reset (unused) |
| Ground | GND | | VCC | +3.3V (not connected) |
| KB_CLK | 2 | | A3 | (FF prev) |
| KB_DAT | 3 | | A2 | (FF next) |
| Mouse Y2 (DB9-1) | 4 | | A1 | Mouse MB (DB9-5) |
| Mouse X1 (DB9-2) | 5 | | A0 | Mouse RB (DB9-9) |
| Mouse Y1 (DB9-3) | 6 | | 13 | USB host SCK |
| Mouse X2 (DB9-4) | 7 | | 12 | USB host MISO |
| Mouse LB (DB9-6) | 8 | | 11 | USB host MOSI |
| USB host INTR | 9 | | 10 | USB host SS |
| Function | Pin | | Pin | Function |
|-----------------:|:----|---|----:|:----------------------|
| Serial TX | 0 | | Vin | Power (+5V) |
| Serial RX | 1 | | GND | Ground |
| Reset (unused) | RST | | RST | Reset (unused) |
| Ground | GND | | VCC | +3.3V (not connected) |
| KB_CLK | 2 | | A3 | (FF prev) |
| KB_DAT | 3 | | A2 | (FF next) |
| Mouse Y2 (DB9-1) | 4 | | A1 | Mouse MB (DB9-5) |
| Mouse X1 (DB9-2) | 5 | | A0 | Mouse RB (DB9-9) |
| Mouse Y1 (DB9-3) | 6 | | 13 | USB host SCK |
| Mouse X2 (DB9-4) | 7 | | 12 | USB host MISO |
| Mouse LB (DB9-6) | 8 | | 11 | USB host MOSI |
| USB host INTR | 9 | | 10 | USB host SS |


Amiga 500
---------
| Function | Pin | | Pin | Function |
|-----------------:|:----|-|----:|:----------------------|
| Serial TX | 0 | | Vin | Power (+5V) |
| Serial RX | 1 | | GND | Ground |
| Reset (unused) | RST | | RST | Reset (unused) |
| Ground | GND | | VCC | +3.3V (not connected) |
| KB_CLK | 2 | | A3 | |
| KB_DAT | 3 | | A2 | Mouse MB (DB9-5) |
| KB_RESET | 4 | | A1 | Mouse RB (DB9-9) |
| Mouse Y2 (DB9-1) | 5 | | A0 | Mouse LB (DB9-6) |
| Mouse X1 (DB9-2) | 6 | | 13 | USB host SCK |
| Mouse Y1 (DB9-3) | 7 | | 12 | USB host MISO |
| Mouse X2 (DB9-4) | 8 | | 11 | USB host MOSI |
| USB host INTR | 9 | | 10 | USB host SS |
| Function | Pin | | Pin | Function |
|-----------------:|:----|---|----:|:----------------------|
| Serial TX | 0 | | Vin | Power (+5V) |
| Serial RX | 1 | | GND | Ground |
| Reset (unused) | RST | | RST | Reset (unused) |
| Ground | GND | | VCC | +3.3V (not connected) |
| KB_CLK | 2 | | A3 | |
| KB_DAT | 3 | | A2 | Mouse MB (DB9-5) |
| KB_RESET | 4 | | A1 | Mouse RB (DB9-9) |
| Mouse Y2 (DB9-1) | 5 | | A0 | Mouse LB (DB9-6) |
| Mouse X1 (DB9-2) | 6 | | 13 | USB host SCK |
| Mouse Y1 (DB9-3) | 7 | | 12 | USB host MISO |
| Mouse X2 (DB9-4) | 8 | | 11 | USB host MOSI |
| USB host INTR | 9 | | 10 | USB host SS |

Pins inside the board:

Expand Down

0 comments on commit 85b701b

Please sign in to comment.