English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 04 April 2023, 10:27   #21
a/b
Registered User

 
Join Date: Jun 2016
Location: europe
Posts: 893
Eh, CIA banging would work fine if he would add a handshake to prevent buffering (assuming interrupts are off, which should be true since he said it's a demo). All the extra console/system stuff is not needed.
Also, what happens if you press a bunch of (non-handshaked) keys during the demo and then when you want to exit you press ESC?

Why not simply use a left mouse button? This ain't no pc dos or C64 (spacebar) :P.

edit: Something like this:
Code:
; frame start
	move.b	($bfec01),d0
	beq.b	no_key
	bset	#6,($bfee01)
	st	(handshake)
	sf	($bfec01)
; process key/d0...
no_key


; do your stuff here


; frame end
	tst.b	(handshake)
	beq.b	no_shake
	bclr	#6,($bfee01)
	sf	(handshake)
no_shake

; back to frame start


handshake
	DC.B	0

Last edited by a/b; 04 April 2023 at 12:51.
a/b is offline  
Old 04 April 2023, 18:05   #22
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 52
Posts: 4,072
I was even more brutal sometimes..
Premise: PORT IRQ off and previous keycode flushed.

Code:
; frame start
	bclr	#6,($bfee01)
        btst	#3,($bfed01)
	beq.b	no_key
	move.b	($bfec01),d0
	bset	#6,($bfee01)
; process key/d0...
no_key
; do your stuff here
; back to frame start
ross is offline  
Old 04 April 2023, 18:15   #23
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 2,512
GetMsg() on the Window UserPort - even simpler, and without bad side effects.
Thomas Richter is offline  
Old 04 April 2023, 18:32   #24
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 52
Posts: 4,072
Quote:
Originally Posted by ross View Post
...and previous keycode flushed.
This probably isn't even necessary because from what I remember (but I could be wrong, I should double check it..) the kickstart uses a witless timed polling wait for the keyboard handshake, and so it's technically impossible to take-over the system when 'halfway'.

Usually when I use an IRQ to manage the keyboard I launch a timed IRQ for the handshake (at the exit of the previous CIA SP one) so as not to waste machine cycles.
ross 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
ESC key in Budokan on FS-UAE NetSlut support.WinUAE 2 05 April 2022 12:26
fault esc key smashngrab support.Other 8 27 March 2016 21:37
ESC Key AGS Coders. System 10 14 August 2014 17:15
Debian crashes with kernel 2.6.8 when key pressed mark_k support.WinUAE 1 27 September 2013 19:55
ESC key seems to crash Leslie Viljoen support.FS-UAE 1 17 December 2012 17:25

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 06:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Page generated in 0.06323 seconds with 14 queries