diff --git a/CDTV/config.h b/CDTV/config.h index e948994..bc878b8 100644 --- a/CDTV/config.h +++ b/CDTV/config.h @@ -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 diff --git a/CDTV_FF/config.h b/CDTV_FF/config.h index a5a6391..ae54ff1 100644 --- a/CDTV_FF/config.h +++ b/CDTV_FF/config.h @@ -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) diff --git a/Modules/amiga_mouse.c b/Modules/amiga_mouse.c index dd15417..c2a2d56 100644 --- a/Modules/amiga_mouse.c +++ b/Modules/amiga_mouse.c @@ -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 ); diff --git a/documentation/Pins.md b/documentation/Pins.md index d41fd97..43a71ae 100644 --- a/documentation/Pins.md +++ b/documentation/Pins.md @@ -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: @@ -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: