🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.misc
Article #9620

Re: letting keypress always gen interrupt

#9620
From: Alex Nicolaou
Date: Wed, 01 May 1991 13:30
32 lines
2205 bytes
In article <9819@star.cs.vu.nl> mgvalen@cs.vu.nl (Valent MG) writes:
>	Hold down a key. You will see it's scancode being printed 
>	continuously. Now, while holding the key, press another and kee
>	it pressed also. This latter keypress will take over and
>	it's scancode will be printed. Till so far, ok. Now release
>	the key you have pressed down last. It's (release) scancode
>	will be printed as expected, but after this, NO MORE printing
>	(even though you're still holding down the key you pressed
>	first !). This is my problem; I want to see the printing of

 ** I've run into this problem before, but I don't think that there is
a software solution. IF anyone knows of one, post it, don't use mail...
>
>PS1: I know there must be an efficient way, because check out (almost)
>any action game. In such a game, it is
>possible for the player to move to left/right, in between firing by 
>pressing the firekey (while keeping the 'move to the left/right' 
>pressed). This gives the effect as if moving to the left/right and 
>firing happen simultaneous.)
>
 ** Now this is not a problem if my memory serves me correctly. When 
you release the key you should still get an interrupt even though it 
wasn't generating interrupts by being held down. So, when the key goes
down, you set the status such that `player is moving left'. Regardless 
of whether the key repeats, the player keeps moving left until you get
the interrupt saying the key was released, at which time you set the 
player to `player is not moving left'. The in-between interrupts caused
by the key being held can be safely ignored - or if you like, you can 
just continually set the appropriate flag - setting the flag is probably
less work than checking to see if it is already set.

alex
Technical Details
Message-ID: <1991May1.133055.23606@watcgl.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watcgl!anicolao
References: <9819@star.cs.vu.nl>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.ibm.pc.misc,rec.games.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watcgl!anicolao
From: anicolao@watcgl.waterloo.edu (Alex Nicolaou)
Subject: Re: letting keypress always gen interrupt
Message-ID: <1991May1.133055.23606@watcgl.waterloo.edu>
Keywords: keyboard, interrupt
Organization: University of Waterloo
References: <9819@star.cs.vu.nl>
Date: Wed, 1 May 1991 13:30:55 GMT
Lines: 32