English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 21 February 2019, 16:59   #1
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
Keyboard Reading

Is it possible to read KeyBoard whitout using interrupt vbr?
sandruzzo is offline  
Old 21 February 2019, 17:08   #2
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,599
VBR? That's the Vector Base Register. You probably mean VBL, but even that would be wrong. Keyboard interrupts are generated at CIA-A, which then assigns the level-2 interrupt line.

You can read keycodes and do the handshaking without establishing a level-2 interrupt handler, of course. Just poll the CIA-A ICR register and wait for the next SP interrupt. Then read the CIA's serial port data register for the keycode and do the handshaking afterwards.
phx is offline  
Old 21 February 2019, 17:09   #3
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
Quote:
Originally Posted by phx View Post
VBR? That's the Vector Base Register. You probably mean VBL, but even that would be wrong. Keyboard interrupts are generated at CIA-A, which then assigns the level-2 interrupt line.

You can read keycodes and do the handshaking without establishing a level-2 interrupt handler, of course. Just poll the CIA-A ICR register and wait for the next SP interrupt. Then read the CIA's serial port data register for the keycode and do the handshaking afterwards.
Thanks. I'm very bad on that stuff!
sandruzzo is offline  
Old 14 March 2019, 00:26   #4
Photon
Moderator

Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 4,818
If you handshake, process more than one keypress per frame to avoid buffering lag. You can also check for each specific key used without using interrupts. This works fine even on the bastard in the cabbage patch, the infamous Cherry-branded A2000 keyboard.
Photon 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
Reading the keyboard... DanScott Coders. Asm / Hardware 2 20 March 2016 12:57
Reading / writing files and the keyboard jimmy2x2x Coders. Asm / Hardware 3 07 December 2014 19:58
Reading Memory you8mysandwich support.WinUAE 10 26 January 2011 12:00
Reading Amiga CD on a PC AndersHP support.WinUAE 5 22 August 2010 18:21
About IPF reading... Hillsy_ project.SPS (was CAPS) 1 09 August 2004 19:56

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 21:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.07879 seconds with 15 queries