English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 17 April 2023, 20:18   #1
iZero
Registered User
 
Join Date: Aug 2020
Location: Kokkola/Finland
Posts: 13
Keyboard controller emulation

Just a thought that came into my mind while trying to learn to code asm for Amiga. It seems that emulation of reading keyboard is very forgiving compared to real Amiga. At least timings of the handshake and resync state, could those be emulated so that it would be similar to real ones? (most likely optionally)

I've tried to write keyboard reading for a game and I think I'm currently on my third or fourth iteration. Each one has worked fine in emulation, but none properly with real Amiga (But I think I will get it working soon)
iZero is offline  
Old 17 April 2023, 20:50   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
There is already optional keyboard handshake timing debugging:

Quote:
- Added keyboard_handshake=<v> config file entry. If handshake time period (in CCKs, not milliseconds) was less than v, message gets logged.
No default value because required delay length is keyboard model specific.

Resync is already emulated. But I think this is also keyboard model specific.

Keyboard behavior is not (yet?) examined in detail (like many chipset features that have been checked for cycle accuracy recently), perhaps there is still something that is not accurate. (No, I am not going to emulate keyboard microcontroller because there are different controllers and higher level emulation should be more than accurate) If keyboard code still does not work and handshake logging says nothing: include code, even if it is ugly and bad, thanks

"Real" keyboard behavior is not emulated by default because it would break lots of programs. Sound emulation being "too good" when CPU is too fast (which can be disabled optionally) "solves" same problem: too many programs would break when using non-accurate modes and emulator would be blamed. ("It did work in previous version")

No keyboard handshake minimum time, sound emulation "too good", immediate blitter: lots of bad programs work without accurate emulation.
Toni Wilen is offline  
Old 17 April 2023, 22:35   #3
iZero
Registered User
 
Join Date: Aug 2020
Location: Kokkola/Finland
Posts: 13
Thanks, so this was rtfm after all. I will try my code trials and check what the log says.
iZero 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
Samsung keyboard controller PCB Rissy request.Other 0 22 April 2021 14:20
Amiga CD32 emulation How to setup controller..? spannernick support.Amiga Forever 4 24 May 2016 11:37
New to the Amiga Emulation scene (but not the Amiga or Emulation) - controller query mrvp Member Introductions 3 30 August 2015 20:57
a600 keyboard controller linux_geek support.Hardware 21 20 June 2012 19:13
What can you tell me about this keyboard controller? DDNI support.Hardware 3 06 April 2008 00:52

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 20:45.

Top

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