Amiga.org

Amiga computer related discussion => Amiga Hardware Issues and discussion => Topic started by: ejstans on January 04, 2010, 06:34:04 PM

Title: Amiga keyboard - reset / out of sync
Post by: ejstans on January 04, 2010, 06:34:04 PM
Hello,

I'm reading my Amiga Hardware Reference Manual where it describes the keyboard. It says that some A1000 and A2000 keyboards provide a reset warning.

When the user presses CTRL + the two AMIGA keys, the keyboard responds by syncing up any pending transmission, then it sends a reset warning code to the Amiga, which can respond to this to gain up to 10 seconds of extra time in order to finish any pending operations.

But what happens if the keyboard/Amiga are experiencing the "Out-of-sync" condition? Particularly since the acknowledgement sent from the Amiga to the keyboard is under software control? Imagine that software has taken over the machine and disabled the interrupt handler for the keyboard. The Amiga will stop sending acknowledgements, but according to the manual, the keyboard must continue to try to establish synchronisation until successful.

What happens if the reset keys are pushed under such a circumstance? Will the keyboard break out of the fruitless synchronisation loop, or will it hang there forever and thus causing the reset request to be ignored?
Title: Re: Amiga keyboard - reset / out of sync
Post by: Jope on January 04, 2010, 06:53:55 PM
There is no synchronization. The keyboard toggles the clock line, and circuitry inside the Amiga detects this long clock pulse and asserts _kbdreset.

If the machine doesn't do anything, the keyboard gets reset (the caps lock led blinks) and continues working as normal. Naturally in this case the computer probably won't respond to any of your keypresses, but the keyboard actually sends keycods as usual during this time.

The keyboard is not really synced in normal use either. It spits out a clock signal whenever it has data to send and the computer reads the data line according to the clock pulses. Each keycode transmission is a unique event.

If no-one answers the reset warning, the machine will reboot itself.

This is for big box machines. In the small keyboard style machines, the keyboard controller asserts _kbdreset itself, so the machine has no time to react before it gets reset.
Title: Re: Amiga keyboard - reset / out of sync
Post by: Piru on January 04, 2010, 06:54:32 PM
Quote from: ejstans;536276
Hello,

I'm reading my Amiga Hardware Reference Manual where it describes the keyboard. It says that some A1000 and A2000 keyboards provide a reset warning.

When the user presses CTRL + the two AMIGA keys, the keyboard responds by syncing up any pending transmission, then it sends a reset warning code to the Amiga, which can respond to this to gain up to 10 seconds of extra time in order to finish any pending operations.

But what happens if the keyboard/Amiga are experiencing the "Out-of-sync" condition? Particularly since the acknowledgement sent from the Amiga to the keyboard is under software control? Imagine that software has taken over the machine and disabled the interrupt handler for the keyboard. The Amiga will stop sending acknowledgements, but according to the manual, the keyboard must continue to try to establish synchronisation until successful.

What happens if the reset keys are pushed under such a circumstance? Will the keyboard break out of the fruitless synchronisation loop, or will it hang there forever and thus causing the reset request to be ignored?

AFAIK there's an internal watchdog timer in the keyboard logic. If nothing happens within 10 seconds the system will reset anyway.
Title: Re: Amiga keyboard - reset / out of sync
Post by: Piru on January 04, 2010, 06:59:59 PM
Quote from: Jope;536284

This is for big box machines.

A1200 has it, too.
Title: Re: Amiga keyboard - reset / out of sync
Post by: ejstans on January 04, 2010, 07:01:29 PM
Quote from: Jope;536284
There is no synchronization. The keyboard toggles the clock line, and circuitry inside the Amiga detects this long clock pulse and asserts _kbdreset.

If no-one answers the reset warning, the machine will reboot itself.

This is for big box machines. In the small keyboard style machines, the keyboard controller asserts _kbdreset itself, so the machine has no time to react before it gets reset.

Well, I'm talking about what happens before the keyboard asserts "hard reset". If the Amiga has stopped sending acknowledgements and the keyboard thus is in the resynchronisation phase, what happens when the reset keys are pushed? Does the keyboard break out of the synchronisation loop? Does it send the reset warning or does it go directly to hard reset?
Title: Re: Amiga keyboard - reset / out of sync
Post by: ejstans on January 04, 2010, 07:04:40 PM
Quote from: Piru;536285
AFAIK there's an internal watchdog timer in the keyboard logic. If nothing happens within 10 seconds the system will reset anyway.
Ah ok. The manual does talk about hard reset being asserted after 10s even if the Amiga fails to pull KDAT high, but this is after the reset warning has been sent, and as far as I can see nothing about a definite 10s rule applying all the time.
Title: Re: Amiga keyboard - reset / out of sync
Post by: Lockon_15 on January 04, 2010, 07:16:39 PM
@Jope
AFAIK, timer 555 is crucial for passing through KBDRESET (logic level control), on big-box Amigas it's located on motherboard, while i.e A500 have it on small PCB connected via pin#3.
 
I'm wondering if some keyboard schematics were ever released to public...
Title: Re: Amiga keyboard - reset / out of sync
Post by: Jope on January 04, 2010, 08:00:16 PM
Quote from: Piru;536287
A1200 has it, too.


Oh yeah, mine doesn't because it has an A500 keyboard in it. :-)
Title: Re: Amiga keyboard - reset / out of sync
Post by: Piru on January 04, 2010, 08:04:54 PM
Quote from: Jope;536302
Oh yeah, mine doesn't because it has an A500 keyboard in it. :-)

Well, same here. But stock A1200 does have it ;-)
Title: Re: Amiga keyboard - reset / out of sync
Post by: ejstans on January 04, 2010, 08:10:09 PM
Hmm, why do you have A500 keyboards in A1200? :)