Skip to content

Commit 9deb3b5

Browse files
committed
Improve code comments in update_amiga_id().
1 parent 8637c47 commit 9deb3b5

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/floppy.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,19 @@ static void update_amiga_id(struct drive *drv, bool_t amiga_hd_id)
154154
* every time the drive is selected. */
155155
update_SELA_irq(amiga_hd_id);
156156

157-
/* DD-ID: !!HACK!! We permanently assert pin 34, even when no disk is
158-
* inserted. Properly we should only do this when MTR is asserted. */
159-
/* HD ID: !!HACK!! Without knowledge of MTR signal we cannot synchronise
160-
* the HD-ID sequence 101010... with the host poll loop. It turns out that
161-
* starting with pin 34 asserted when the HD image is mounted seems to
162-
* generally work! */
163-
if (ff_cfg.motor_delay == MOTOR_ignore)
157+
if (ff_cfg.motor_delay == MOTOR_ignore) {
158+
/* Best-effort pin 34 handling:
159+
* DD-ID: We permanently assert pin 34, even when no disk is inserted.
160+
* Properly we should only do this when MTR is asserted.
161+
* HD-ID: Without knowledge of MTR signal we cannot synchronise the
162+
* HD-ID sequence 101010... with the host poll loop. It turns out that
163+
* starting with pin 34 asserted when the HD image is mounted seems to
164+
* generally work! (But see GitHub issue #354) */
164165
drive_change_pin(&drive, pin_34, TRUE);
166+
} else {
167+
/* Do nothing here. Pin 34 will be updated by IRQ_MOTOR() via
168+
* motor_chgrst_{insert,eject}(). */
169+
}
165170
}
166171

167172
void floppy_cancel(void)

0 commit comments

Comments
 (0)