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: 2,281
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: 2,496
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: 2,281
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: 5,602
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 6 02 August 2023 14:34
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 23:13.

Top

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