Skip to content

Commit a839e24

Browse files
committed
increase duration of WriteGate detection for DD
*increase duration of WriteGate detection for DD *add more options to CI script
1 parent 6f8d858 commit a839e24

File tree

2 files changed

+33
-18
lines changed

2 files changed

+33
-18
lines changed

.github/workflows/build-firmware.yml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,45 @@ jobs:
2121
- uses: actions/checkout@v2
2222
- name: install submodules (u8glib & lufa)
2323
run: git submodule update --init --recursive
24-
#atmega328p-single
25-
- name: build atmega328p-single
24+
#atmega328p-single-debug
25+
- name: build atmega328p-single-debug
2626
run: make MCU=atmega328p GUI=1 SERIAL=1 DUAL=0 VFFS=0 DEBUG=1 FLIP=0
27-
- name: Copy atmega328p-single
28-
run: mv fddEMU.hex ./atmega328p-single.hex
27+
- name: Copy atmega328p-single-debug
28+
run: mv fddEMU.hex ./atmega328p-single-debug.hex
2929
- name: make clean
3030
run: make MCU=atmega328p clean
31-
#atmega328p-dual
32-
- name: build atmega328p-dual
31+
#atmega328p-dual-debug
32+
- name: build atmega328p-dual-debug
3333
run: make MCU=atmega328p GUI=1 SERIAL=1 DUAL=1 VFFS=0 DEBUG=1 FLIP=0
34-
- name: Copy atmega328p-dual
35-
run: mv fddEMU.hex ./atmega328p-dual.hex
34+
- name: Copy atmega328p-dual-debug
35+
run: mv fddEMU.hex ./atmega328p-dual-debug.hex
3636
- name: make clean
3737
run: make MCU=atmega328p clean
38-
#atmega32u4-single
39-
- name: build atmega32u4-single
40-
run: make MCU=atmega32u4 GUI=1 SERIAL=1 DUAL=0 VFFS=1 DEBUG=0
41-
- name: Copy atmega32u4-single
42-
run: mv fddEMU.hex ./atmega32u4-single.hex
38+
#atmega328p-single-flipped
39+
- name: build atmega328p-single-flipped
40+
run: make MCU=atmega328p GUI=1 SERIAL=1 DUAL=0 VFFS=0 DEBUG=0 FLIP=1
41+
- name: Copy atmega328p-single-flipped
42+
run: mv fddEMU.hex ./atmega328p-single-flipped.hex
43+
- name: make clean
44+
run: make MCU=atmega328p clean
45+
#atmega328p-dual-flipped
46+
- name: build atmega328p-dual-flipped
47+
run: make MCU=atmega328p GUI=1 SERIAL=1 DUAL=1 VFFS=0 DEBUG=0 FLIP=1
48+
- name: Copy atmega328p-dual-flipped
49+
run: mv fddEMU.hex ./atmega328p-dual-flipped.hex
50+
- name: make clean
51+
run: make MCU=atmega328p clean
52+
#atmega32u4-single-flipped
53+
- name: build atmega32u4-single-flipped
54+
run: make MCU=atmega32u4 GUI=1 SERIAL=1 DUAL=0 VFFS=1 DEBUG=0 FLIP=1
55+
- name: Copy atmega32u4-single-flipped
56+
run: mv fddEMU.hex ./atmega32u4-single-flipped.hex
4357
- name: make clean
4458
run: make MCU=atmega32u4 clean
45-
#atmega32u4-dual
46-
- name: build atmega32u4-dual
47-
run: make MCU=atmega32u4 GUI=1 SERIAL=1 DUAL=1 VFFS=1 DEBUG=0
48-
- name: Copy atmega32u4-dual
59+
#atmega32u4-dual-flipped
60+
- name: build atmega32u4-dual-flipped
61+
run: make MCU=atmega32u4 GUI=1 SERIAL=1 DUAL=1 VFFS=1 DEBUG=0 FLIP=1
62+
- name: Copy atmega32u4-dual-flipped-flipped
4963
run: mv fddEMU.hex ./atmega32u4-dual.hex
5064
- name: make clean
5165
run: make MCU=atmega32u4 clean

src/FloppyDrive.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ void FloppyDrive::run()
246246
static uint8_t side=0;
247247
static uint8_t sector=0;
248248
static int lba;
249+
uint8_t writeGateWait = (bitLength == 16) ? 20:40;
249250

250251
if (isChanged())
251252
{
@@ -289,7 +290,7 @@ void FloppyDrive::run()
289290
sector_start(bitLength);
290291
if (IS_TRACKCHANGED()) continue; //if track changed skip rest of the loop
291292
//check WriteGate
292-
for (int i=0; i<20; i++) //wait and check for WRITEGATE
293+
for (int i=0; i<writeGateWait; i++) //wait and check for WRITEGATE
293294
if (IS_WRITE() ) break;
294295
if (IS_WRITE() ) //write gate on
295296
{

0 commit comments

Comments
 (0)