File tree 5 files changed +37
-4
lines changed
5 files changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -62,12 +62,19 @@ write-protect = no
62
62
# Values: 0 <= N <= 255
63
63
side-select-glitch-filter = 0
64
64
65
- # Rotational offset of data after a track change
65
+ # Rotational offset of disk after a track change
66
66
# instant: No rotation during track change
67
67
# realtime: Emulate rotation of disk while track is changing
68
68
# Values: instant | realtime
69
69
track-change = instant
70
70
71
+ # Rotational offset of disk after draining a write to Flash
72
+ # instant: No rotation
73
+ # realtime: Disk rotates in real time during drain
74
+ # eot: Disk rotates to (near) end of track
75
+ # Values: instant | realtime | eot
76
+ write-drain = instant
77
+
71
78
# Index pulses suppressed when RDATA and WDATA inactive?
72
79
# Values: yes | no
73
80
index-suppression = yes
Original file line number Diff line number Diff line change @@ -155,6 +155,10 @@ struct packed ff_cfg {
155
155
#define DORD_row 7
156
156
#define DORD_double 8
157
157
uint16_t display_order ;
158
+ #define WDRAIN_instant 0
159
+ #define WDRAIN_realtime 1
160
+ #define WDRAIN_eot 2
161
+ uint8_t write_drain ;
158
162
};
159
163
160
164
extern struct ff_cfg ff_cfg ;
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ def main(argv):
25
25
val = "PIN_" + val
26
26
elif opt == "track-change" :
27
27
val = "TRKCHG_" + val
28
+ elif opt == "write-drain" :
29
+ val = "WDRAIN_" + val
28
30
elif opt == "host" :
29
31
val = "HOST_" + val
30
32
elif opt == "oled-font" :
Original file line number Diff line number Diff line change @@ -342,9 +342,21 @@ static void wdata_stop(void)
342
342
/* Drain out the DMA buffer. */
343
343
IRQx_set_pending (dma_wdata_irq );
344
344
345
- /* Restart read exactly where write ended.
346
- * No more IDX pulses until write-out is complete. */
347
- drive_set_restart_pos (drv );
345
+ switch (ff_cfg .write_drain ) {
346
+ case WDRAIN_instant :
347
+ /* Restart read exactly where write ended. No more IDX pulses until
348
+ * write-out is complete. */
349
+ drive_set_restart_pos (drv );
350
+ break ;
351
+ case WDRAIN_realtime :
352
+ /* Nothing to do. */
353
+ break ;
354
+ case WDRAIN_eot :
355
+ /* Position so that an INDEX pulse is quickly triggered. */
356
+ drv -> restart_pos = drv -> image -> stk_per_rev - stk_ms (20 );
357
+ drv -> index_suppressed = TRUE;
358
+ break ;
359
+ }
348
360
349
361
/* Remember where this write's DMA stream ended. */
350
362
write = get_write (image , image -> wr_prod );
@@ -359,6 +371,7 @@ static void wdata_stop(void)
359
371
IRQx_set_pending (FLOPPY_SOFTIRQ );
360
372
/* Position read head so it quickly triggers an INDEX pulse. */
361
373
drv -> restart_pos = drv -> image -> stk_per_rev - stk_ms (20 );
374
+ drv -> index_suppressed = TRUE;
362
375
}
363
376
#endif
364
377
}
Original file line number Diff line number Diff line change @@ -932,6 +932,13 @@ static void read_ff_cfg(void)
932
932
: TRKCHG_instant ;
933
933
break ;
934
934
935
+ case FFCFG_write_drain :
936
+ ff_cfg .write_drain =
937
+ !strcmp (opts .arg , "realtime" ) ? WDRAIN_realtime
938
+ : !strcmp (opts .arg , "eot" ) ? WDRAIN_eot
939
+ : WDRAIN_instant ;
940
+ break ;
941
+
935
942
case FFCFG_index_suppression :
936
943
ff_cfg .index_suppression = !strcmp (opts .arg , "yes" );
937
944
break ;
You can’t perform that action at this time.
0 commit comments