English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 18 September 2011, 21:07   #21
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Quote:
Originally Posted by Toni Wilen View Post
Explained in previous reply. (No handshake quickly enough = next key code will be received) I think I'll change this, this behavior is from very early version of UAE, this really should be emulated better today
Ok that explains what I'm seeing here, thanks.
Leffmann is offline  
Old 09 July 2015, 12:03   #22
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Quote:
Originally Posted by Toni Wilen View Post
[...]
Check that CIA-A serial port (SP) interrupt is set (or use ports interrupt), if set, read SDR, then set bit 6 in CIA-A CRA, wait at least ~70us, clear bit 6. (this is one method to handle handshake, there is also another one)
I have question. I found in Hardware Manual that wait should be at least 85us (http://amigadev.elowar.com/read/ADCD.../node0198.html). Is it true or I'm missing something.
Asman is offline  
Old 11 July 2015, 11:13   #23
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Yes, it is true that some keyboards may need a slower handshake.

85us is from the HRM and I try to follow this recommendation. Although in the NetBSD kbd driver source they even use 200us with a comment about "bloody Cherry keyboards".
phx is offline  
Old 12 July 2015, 01:13   #24
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 840
Woa! I have one of those Cherrys and they are lovely.
Too many l33t haXXors coded key scans that plain didn't work with it.

I think the handshake wait needed is something like 4 scanlines.

Last edited by NorthWay; 12 July 2015 at 01:15. Reason: Timing
NorthWay is offline  
Old 12 July 2015, 13:22   #25
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Four scanlines on a PAL display are a little bit more than 200us. So it is confirmed: the recommended 85us are not sufficient for all keyboards.
phx is offline  
Old 12 July 2015, 21:16   #26
Jope
-
 
Jope's Avatar
 
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 43
Posts: 9,864
.. or we just forget all about that Philips controller in the A2000A keyboard, pretend it never happened. :-)
Jope is online now  
Old 14 July 2015, 11:30   #27
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Thanks for answers. I will stay with 85us.
Asman is offline  
Old 14 July 2015, 13:15   #28
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 840
I wont say for certain it was 4 scanlines - it has been decades since I coded it and I just followed the blue HRM spec. Bitrot and brainrot and all that...
NorthWay is offline  
Old 14 July 2015, 21:07   #29
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by NorthWay View Post
I wont say for certain it was 4 scanlines - it has been decades since I coded it and I just followed the blue HRM spec. Bitrot and brainrot and all that...
Well I have always used ~320us which (in my calculations, below) is 4 scanlines...

Code:
;  PAL
;  ===
;
;  50 VBLs / second = 0.02 seconds per VBL
;  250 scanlines per VBL = 0.00008 seconds per scanline
;  0.00008 seconds = 0.08 milliseconds (mS)= 80 micro seconds (uS)
... if my maths is off, please feel free to point it out
Lonewolf10 is offline  
Old 14 July 2015, 21:34   #30
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
250 scanlines? Even NTSC screen has more scanlines.

PAL scanline length is always 64us. Number of scanlines is normally 313 (Long field mode, 49.92Hz) or alternating 312/313 (interlace, 50.00Hz). 312 is also possible (without VPOSW tricks) but rarely used (Short field mode, 50.08Hz)
Toni Wilen is online now  
Old 15 July 2015, 21:27   #31
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
ok, thanks for the correction Toni
Lonewolf10 is offline  
Old 15 July 2015, 21:30   #32
UberFreak
Registered User
 
Join Date: Sep 2009
Location: the world
Posts: 439
Quote:
Originally Posted by phx View Post
Yes, it is true that some keyboards may need a slower handshake.

85us is from the HRM and I try to follow this recommendation. Although in the NetBSD kbd driver source they even use 200us with a comment about "bloody Cherry keyboards".
Ha, this might explain why I could never get my Elbox PC-Key 1200 to work with the old German A2000 keyboard!
It just goes unresponsive after a few key presses.

Works fine with later A2000, A3000 & A4000 keyboards.
UberFreak is offline  
Old 16 July 2015, 21:02   #33
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 840
I fired up WinUAE and found this that I used once:

Code:
	lea	$bfe001,a0
	rept	61		; PAL timing!
	tst.b	(a0)		; 8 cycles 68000, expanded to 10
	endr
Could be that I had subtracted some delays from register accesses I had already done.
NorthWay is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Netplay on real Amiga hardware? lesta_smsc support.Hardware 3 04 December 2018 08:03
Mediator A1200 "Hardware ID code missing..." Bamiga2002 support.Hardware 63 28 June 2013 20:30
Ambermoon Arcade - speed test (real hardware) viddi project.Amiga Game Factory 26 18 November 2009 17:06
NTSC minimg question, test on a real Amiga required ! FrenchShark Coders. General 5 25 December 2007 17:54
Problems with some installed games on real hardware Daniel support.Games 0 20 February 2006 14:05

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:46.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08526 seconds with 13 queries