Port-amiga archive

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

Re: Keyboard lockup with NetBSD5



Was this inadvertent fallout from the timer updates?


On Wed, 11 Nov 2009, Frank Wille wrote:

Date: Wed, 11 Nov 2009 22:07:08 +0100
From: Frank Wille <frank%phoenix.owl.de@localhost>
To: Alexander Coers <Alexander.Coers%gmx.de@localhost>
Cc: port-amiga%NetBSD.org@localhost
Subject: Re: Keyboard lockup with NetBSD5

Alexander Coers wrote:

Indeed. That's interesting. The keyboard will do that when it didn't
receive
the expected handshaking pulse. Maybe there is a handshaking
problem? And
those 2000us look quite suspiscous to me.


After reading the keyboard chapter of Amiga Intern (I know, sometimes
it is really bad, but it
covers nearly all aspects of OCS/ECS Amigas),

Yes, I admit that I have one too. ;)

But the parts which are good are just copied and translated from the
hardware reference manual.


I am quite sure that my
keyboard has a sync problem.
After sync loss the keyboard sends '1' until sync is recovered
(correct handshake). This is the 0xff value seen in the capture.

Correct. I realized that too, after reading this paragraph once again.


What puzzles me is that I didn't find any code to setup the CIA-A
timer A.
The timer has to run in continuous mode for keyboard handshaking.
[...]

Strange. I thought an OS sets all registers necessary without making
assumptions
what a bootrom did before.

That's not the only point where NetBSD/amiga relies on AmigaOS.


Can you check the handshaking timing somehow?

Yes, there is definitely a problem! CIAA timer A is used to clock out the
handshake pulse (KDAT), after switching the serial keyboard port into
output mode.

But, timer A is frozen under NetBSD! I checked it.

Under AmigaOS, it seems to run in one-shot mode, and has to be restarted
continuously (don't know who does that). When NetBSD has booted, the timer
is still in one-shot mode, but nobody restarts it.

In the latest test kernel,
 ftp://ftp.netbsd.org/pub/NetBSD/misc/phx/kbdtest4.tar.gz
I'm configuring CIAA timer A into continuous runmode, so it is running now.
I also decreased the ridiculous large 2000us handshake delay to the normal
85us.

Works fine for my A3000. Please give it a test on your A1200.

--
   _  Frank Wille (frank%phoenix.owl.de@localhost)
_ //  http://sun.hasenbraten.de/~frank/
\X/   Phx @ #AmigaGer



Home | Main Index | Thread Index | Old Index