22

The Amiga computers would by default automatically detect a disk being inserted and respond by reading from it and displaying its icon. Polling the drive(s) for a new disk would produce a clicking sound every 1-2s.

If one had more than one drive or used the computer hard drive only with no disk(s) inserted, the drive checking sound would keep going.

Patches existed to stop this without loss of the auto-detection of inserted disks - how did these work?

4 Answers 4

21

The sound came from the fact that drives would only report on the presence of a disk if the heads were moved. Thus by default, the OS would move the heads back and forth.

Alternatively, the heads could be moved fully to one side and then asked to step further to that side (by default the heads would be centered to minimise seek time or read the central rootblock immediately).

Most drives would then refuse to move the heads, but report on disk presence anyway. (Some older drives would not, therefore if a noise was still heard after trying the patch, it was time to reboot and not try again!)

3
  • So just to clarify, the trick that the "no disk click" patches was simply that it would tell the OS to move the drive heads all the way to the end/stop and then only tell it to try to move further into the stop, thus making it that they didn't move and thus didn't click. Correct?
    – bjb
    Aug 4, 2017 at 13:25
  • That is correct.
    – nsandersen
    Aug 5, 2017 at 18:32
  • 1
    This answer is incorrect, see mine for the actual method.
    – user
    Dec 26, 2020 at 20:46
14

Since at least Kickstart 2.0, the OS has built-in code that allows for drive checking without making the click noise. To enable it, just set the TDPB_NOCLICK flag in the tdu_PubFlags of trackdisk.device's unit structure (of type struct TDU_PublicUnit) for the drive you want to silence.

Don't know about earlier. I guess trackdisk.device was patched with custom code, as it may be that some of the internal functions of the device appear - undocumented - in the LVO table.

4
  • Ah, so newer noclick patches might just set that flag.
    – nsandersen
    Aug 16, 2016 at 5:52
  • Correct. The noclick tool in Commodore's development kit does just that.
    – user180940
    Aug 16, 2016 at 7:14
  • So at least later it was simply not enabled by default due to some drives not liking it - and it being impractical to change the ROM if the drives changed?
    – nsandersen
    Aug 16, 2016 at 7:49
  • 5
    Guess we will never know... According to comments by ex Commodore employees, Commodore liked to source floppy drives from multiple vendors as a cost-cutting measure, and the reason for the clicking behavior was due to some early sourced drives not sensing disk changes without the head being moved. How much "early" means I forgot. Maybe still in the 2.0 timeframe, and nobody ever changed the default later. Or maybe Commodore did use proper drives since after A1000, but third parties did not and there was no will to force them otherwise. Or just yet another quirk in the OS development process?
    – user180940
    Aug 16, 2016 at 8:46
2

Just a small addition from the technical department:

trackdisk.device (TDD) polls the disk status in regular intervalls. In order to detect a quick disk change in between two polls, the drive latches a DC status until the head is moved. So, TDD needs to move the head to update the status.

Moving the head outwards usually stops once track 0 is reached by gating the step pulse within the drive. However, some drives don't gate the outward step - so the head would hit the physical end stop endlessly, possibly disaligning the heads (remember the 1541?). Since C= sourced different types and there's no way for TDD to tell whether the head actually does try to step outwards from track 0, TDD steps outward until the end sensor triggers and then alternates between tracks 0 and 1. So, the clicking on an empty drive never stops. If you listen very closely (or open the drive) you can tell the two directions apart.

As already mentioned, the v33 trackdisk.device introduced the TDPB_NOCLICK flag that simply tells TDD to keep stepping outward, stopping the clicking - unless one of the non-gating drives is used. Then, a muffled click is heard and TDPB_NOCLICK should not be set for that drive.

-1

The sound is caused by the drive head hitting the backstop. By default trackdisk.device periodically steps it inwards, causing it to hit the backstop every time.

From version 33.7 of trackdisk.device an alternative method is available that steps the head out, and then in again alternately. That way it doesn't hit anything. Other utilities that do this either make use of that feature or patch trackdisk.device to add it.

From the trackdisk.device source code:

*       ;------ Step the drive.  We will recalibrate it eventually
*       ;------ anyway, so don't worry about where it is.
*       ;------ if noclickstart flag is set, always step out.
*       ;------ to save space, clear it then change it to set it.
*       ;------ D3 is a flag to tell if I changed direction.
    MOVEQ   #0,d3               ; assume changed (d3=0)
    BTST.B  #TDPB_NOCLICK,TDU_PUBFLAGS(A3)
    BEQ.S   CC_Click
    BCLR    #CIAB_DSKDIREC,TDU_6522(A3) ; will get changed!
    SNE d3              ; d3=1 if bit was 1
CC_Click:
    BCHG    #CIAB_DSKDIREC,TDU_6522(A3)

    MOVE.B  TDU_6522(A3),D0
    MOVE.B  D0,D1
    BCLR    #CIAB_DSKSTEP,D1
    MOVE.B  D1,(A2)
    MOVE.B  D0,(A2)
5
  • 1
    That is not correct, see the other answers. You can easily check by opening a drive and watching the head.
    – Zac67
    Dec 26, 2020 at 21:25
  • @Zac67 it's literally taken directly from the source code of trackdisk.device. I'll add it to the answer.
    – user
    Dec 28, 2020 at 12:16
  • 1
    I was referring to your first paragraph that is wrong. Just check the older trackdisk versions. They step between two tracks all the time, not hitting the backstop.
    – Zac67
    Dec 28, 2020 at 12:48
  • @Zac67 that's incorrect, and does not explain why the noclick action works.
    – user
    Dec 28, 2020 at 17:14
  • 1
    See my answer: the TDPB_NOCLICK option makes the head step outwards only where it eventually hits track 0 and stops there in spite of more stepping pulses - with almost all drives.
    – Zac67
    Dec 28, 2020 at 17:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .