Skip to content

Commit

Permalink
add floppsy support - working!
Browse files Browse the repository at this point in the history
```
greaseweazle>python3 gw read --device COM15 --format ibm.1440 ouuut.img
*** WARNING: Optimised data routines not found: Run scripts/setup.sh
Reading c=0-79:h=0-1 revs=2
Format ibm.1440
T0.0: IBM MFM (18/18 sectors) from Raw Flux (179537 flux in 402.62ms)
T0.1: IBM MFM (18/18 sectors) from Raw Flux (185345 flux in 402.67ms)
T1.0: IBM MFM (18/18 sectors) from Raw Flux (160448 flux in 402.30ms)
T1.1: IBM MFM (18/18 sectors) from Raw Flux (149618 flux in 402.15ms)
T2.0: IBM MFM (18/18 sectors) from Raw Flux (150098 flux in 402.17ms)
T2.1: IBM MFM (18/18 sectors) from Raw Flux (149949 flux in 402.14ms)
T3.0: IBM MFM (18/18 sectors) from Raw Flux (150636 flux in 402.15ms)
```
  • Loading branch information
ladyada committed Mar 2, 2024
1 parent dd8789f commit 267e3e0
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions examples/greaseweazle/greaseweazle.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
#define READ_PIN 9 // IDC 30
#define SIDE_PIN 8 // IDC 32
#define READY_PIN 7 // IDC 34
#ifndef USE_TINYUSB
#error "Please set Adafruit TinyUSB under Tools > USB Stack"
#endif
#elif defined(ARDUINO_RASPBERRY_PI_PICO)
#define DENSITY_PIN 2 // IDC 2
#define INDEX_PIN 3 // IDC 8
Expand All @@ -45,13 +42,15 @@
#define READ_PIN 12 // IDC 30
#define SIDE_PIN 13 // IDC 32
#define READY_PIN 14 // IDC 34
#ifndef USE_TINYUSB
#error "Please set Adafruit TinyUSB under Tools > USB Stack"
#endif
#elif defined(ARDUINO_ADAFRUIT_FLOPPSY_RP2040)
// Yay built in pin definitions!
#else
#error "Please set up pin definitions!"
#endif

#ifndef USE_TINYUSB
#error "Please set Adafruit TinyUSB under Tools > USB Stack"
#endif

#if defined (ARDUINO_ADAFRUIT_FEATHER_RP2040)
// jepler's prototype board, subject to change
Expand Down Expand Up @@ -165,6 +164,14 @@ bool setbustype(int bustype) {
void setup() {
Serial.begin(115200);
Serial1.begin(115200);

#if defined(FLOPPY_DIRECTION_PIN)
pinMode(FLOPPY_DIRECTION_PIN, OUTPUT);
digitalWrite(FLOPPY_DIRECTION_PIN, HIGH);
#endif

delay(100);

//while (!Serial) delay(100);
Serial1.println("GrizzlyWizzly");

Expand Down Expand Up @@ -675,4 +682,4 @@ needfloppy:
Serial.write(reply_buffer, 2);

//Serial1.println("cmd complete!");
}
}

0 comments on commit 267e3e0

Please sign in to comment.