Port-amiga archive

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

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,
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

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