flat assembler
Message board for the users of flat assembler.

Index > DOS > How to detect multiple keys at the same time?

Author
Thread Post new topic Reply to topic
A$M



Joined: 29 Feb 2012
Posts: 94
A$M 28 Feb 2013, 19:36
How to detect multiple keys at the same time? I need it for a little game I'm doing.
But I'm using Japhet's DOS Extender. I'll probably need to replace the interrupt 0x08, is not it? But how do I replace and by what do I replace? Question Rolling Eyes
Post 28 Feb 2013, 19:36
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1659
Location: Toronto, Canada
AsmGuru62 28 Feb 2013, 21:16
INT 8h is a timer.

Try Google for "hooking int 9h".
I never did it myself, however.
Also, check out some gaming sources - some of them are released.
Like, as an example Duke Nukem 3D source may be released and it should
contain the hook for INT 9H.
Post 28 Feb 2013, 21:16
View user's profile Send private message Send e-mail Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 01 Mar 2013, 00:00
If you would of taken my advice, theres a built in gaming keyboard to take multi key press Wink
Post 01 Mar 2013, 00:00
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4352
Location: Now
edfed 01 Mar 2013, 02:33
the only cool and good way is to replace the int9 handler by one that sets bytes in a 128 bytes tables.
one key = one byte

just read the byte to know the state of the key.

but some multiple keys are just impossible due to hardware under the buttons on the keyboard.

you will have to try a lot.

you can try it also http://board.flatassembler.net/topic.php?p=66344#66344
Post 01 Mar 2013, 02:33
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 18 May 2013, 22:15
IIRC, there was an old DOS TASM example for int9 from the demogroup VLA:

http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/programming/vla/int9.zip

Anyways, most people just use HLL libraries for such things, e.g. libkb or Allegro. You could check what those do.

Or just look at FD KEYB sources or similar (mKEYB).

Probably they just use the BIOS, e.g. int 16h or whatever.

IIRC, I also remember reading somewhere (Atari800 emulator?) that most PC keyboards can't handle more than five keys at once. Just FYI (as the architecture originally wasn't really meant for gaming).
Post 18 May 2013, 22:15
View user's profile Send private message Visit poster's website Reply with quote
Just4fasm



Joined: 20 May 2012
Posts: 60
Location: OuterSpace
Just4fasm 19 May 2013, 19:35
Multiple key is unavailable! You only got maximum 5 keys at same time!. Today's keyboard technology is too obsolete!!! Because of stupid people like you! The Internationally United States of Apes greedily stealing your moneys! They selling old cheap keyboard technology on high prices!!!. And you morons purchasing high priced keyboards!. $8-$15 is quite expensive for these old standard Intel8030 keyboard technology!.
Today you can buy in $5 mp3 player!. That means Today's poorest technology keyboard can be at least every button (analogue 8bit) press sensitive and independent all of 104 buttons!. Actual price is $2 for such keyboard!. If such keyboard exist they sell over $100!!!.
Post 19 May 2013, 19:35
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1178
Location: Unknown
HaHaAnonymous 19 May 2013, 19:57
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 20:25; edited 1 time in total
Post 19 May 2013, 19:57
View user's profile Send private message Reply with quote
Just4fasm



Joined: 20 May 2012
Posts: 60
Location: OuterSpace
Just4fasm 19 May 2013, 20:08
Quote:

I think $2 wouldn't pay the costs of its material (plastic, iron, silicon, leds and etc...) and resources used to make it.

In mass production! US $2 is quite enough even exceeded!!!.
Post 19 May 2013, 20:08
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1178
Location: Unknown
HaHaAnonymous 19 May 2013, 20:16
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 20:25; edited 1 time in total
Post 19 May 2013, 20:16
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4060
Location: vpcmpistri
bitRAKE 19 May 2013, 21:14
Friend of mine worked for Logitech for several years. He said their cost is over $5 before distribution within the US at quantities of 100k+, for the cheapest keyboard. That doesn't include software, advertising, transport, nor storage within the US. Just adding an aluminum metal back-plate can bump that cost by a dollar.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 19 May 2013, 21:14
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.