Welcome, Guest. Please login or register.

Author Topic: Amiga keyboard - reset / out of sync  (Read 2019 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline ejstansTopic starter

  • Newbie
  • *
  • Join Date: Jun 2009
  • Posts: 48
    • Show only replies by ejstans
Amiga keyboard - reset / out of sync
« 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?
"It is preferable not to travel with a dead machine."

A500 1.3 / 512KiB slowmem / GVP HD8 w/ 8MiB fastmem & 52MB HDD
A600 2.05 / 1GB SSD
A1200 3.0 / Blizzard 1200/4 w/ 68882 @ 33MHz / 1GB SSD
A1200T 3.0 / Apollo 1260 w/ 68EC060 @ 50MHz & 16 MiB fastmem / 4GB SSD
 

Offline Jope

Re: Amiga keyboard - reset / out of sync
« Reply #1 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.
« Last Edit: January 04, 2010, 06:57:47 PM by Jope »
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Amiga keyboard - reset / out of sync
« Reply #2 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.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Amiga keyboard - reset / out of sync
« Reply #3 on: January 04, 2010, 06:59:59 PM »
Quote from: Jope;536284

This is for big box machines.

A1200 has it, too.
 

Offline ejstansTopic starter

  • Newbie
  • *
  • Join Date: Jun 2009
  • Posts: 48
    • Show only replies by ejstans
Re: Amiga keyboard - reset / out of sync
« Reply #4 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?
"It is preferable not to travel with a dead machine."

A500 1.3 / 512KiB slowmem / GVP HD8 w/ 8MiB fastmem & 52MB HDD
A600 2.05 / 1GB SSD
A1200 3.0 / Blizzard 1200/4 w/ 68882 @ 33MHz / 1GB SSD
A1200T 3.0 / Apollo 1260 w/ 68EC060 @ 50MHz & 16 MiB fastmem / 4GB SSD
 

Offline ejstansTopic starter

  • Newbie
  • *
  • Join Date: Jun 2009
  • Posts: 48
    • Show only replies by ejstans
Re: Amiga keyboard - reset / out of sync
« Reply #5 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.
"It is preferable not to travel with a dead machine."

A500 1.3 / 512KiB slowmem / GVP HD8 w/ 8MiB fastmem & 52MB HDD
A600 2.05 / 1GB SSD
A1200 3.0 / Blizzard 1200/4 w/ 68882 @ 33MHz / 1GB SSD
A1200T 3.0 / Apollo 1260 w/ 68EC060 @ 50MHz & 16 MiB fastmem / 4GB SSD
 

Offline Lockon_15

  • Sr. Member
  • ****
  • Join Date: Jan 2006
  • Posts: 304
    • Show only replies by Lockon_15
Re: Amiga keyboard - reset / out of sync
« Reply #6 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...
A500+/KS3.1/GVPA530/2MbChipRam+8MbFastRAM 2GbCF/YAMAHA CDRW
 

Offline Jope

Re: Amiga keyboard - reset / out of sync
« Reply #7 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. :-)
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Amiga keyboard - reset / out of sync
« Reply #8 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 ;-)
 

Offline ejstansTopic starter

  • Newbie
  • *
  • Join Date: Jun 2009
  • Posts: 48
    • Show only replies by ejstans
Re: Amiga keyboard - reset / out of sync
« Reply #9 on: January 04, 2010, 08:10:09 PM »
Hmm, why do you have A500 keyboards in A1200? :)
"It is preferable not to travel with a dead machine."

A500 1.3 / 512KiB slowmem / GVP HD8 w/ 8MiB fastmem & 52MB HDD
A600 2.05 / 1GB SSD
A1200 3.0 / Blizzard 1200/4 w/ 68882 @ 33MHz / 1GB SSD
A1200T 3.0 / Apollo 1260 w/ 68EC060 @ 50MHz & 16 MiB fastmem / 4GB SSD