Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Keyboard lockup with NetBSD5



On Thu, 12 Nov 2009, Frank Wille wrote:

I would have assumed that delay() works, because the rest of the system
seems to function correctly. But now as you mention it, I had a closer look

  Probably in most cases, a small error in the actual delay isn't going to
cause problems.

on delay(). And after a few minutes I came to the conclusion that either I
don't understand the routine, or there is something wrong with it:
...
Seems that the author of the delay() function had a decreasing tick counter
in mind...

When I am right that this here is wrong, it would explain the keyboard
timing problems partly. ;)

Since the timecounter code (mostly) worked when I was testing it, I didn't look at the delay() code other than to note that it had been significantly redone. Everything else seemed to work, so there wasn't
a need to verify it.

   Re that 2000 usec delay used apparently came from me when the Amiga
   1200 support was added.  Presumably that was needed to make the 1200
I had access to at the time,

Did you ever find out why it was necessary? In the AmigaOS source a
handshaking delay of 85us is used, as recommended in the Hardware Reference
Manual, and it works fine for all A1200 models.

I don't remember much at all about what the problem was back then (that was 15 years ago). From trying to look at the history of DELAY(), it might be that it was inaccurate enough at the time that the 2000 was needed, but DELAY() was later recalibrated and might have been more accurate, but the 2000 didn't cause problems. When the delay routine was rewritten for timecounters (obviously wrong), then it became an issue for the 1200 keyboard.

I would suggest fixing delay() to work properly, and see if the 1200 keyboard works, and what delay() value it will work properly at. From the CVS history, even the delay(85) wasn't sufficient for some keyboards and was changed to delay(200). [And it appears that the comment about that wasn't changed when the A1200 support was added :)]

--
Michael L. Hitch                        mhitch%montana.edu@localhost
Computer Consultant
Information Technology Center
Montana State University        Bozeman, MT     USA


Home | Main Index | Thread Index | Old Index