Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user eightbitswide ! (Registered 2024-12-24) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Detecting ctrl and shift pressed simultaniously
2006-03-04 08:03
Laxity

Registered: Aug 2005
Posts: 459
Detecting ctrl and shift pressed simultaniously

OK.. here goes.

I need to find out if it's possible to detect simultanious key presses of both Ctrl and shift (both left and or right). The code I've written for detecting this works nicely in Vice, but the question is if the key matrix of the real c64 hardware allows this?

Unfortunately my 64 is broken, so I'm unable to investigate this myself.
 
... 30 posts hidden. Click here to view all posts....
 
2006-03-06 13:22
WVL

Registered: Mar 2002
Posts: 902
Quote: @wvl: you can ofcourse also swap the two ports and use $dc00 as input and $dc01 as output. if you want a truely 100% scanner (which maybe should even still work together with joysticks) you might want to check both directions AND exploit the output/output thing too

urgh.. i have no idea :)

this is the routine i use for checking CERTAIN keys..

checkforkeys

        ldx #5            ;number of keys-1 to check
checkkeyloop
        lda keycolumn,x
        sta $dc00
        lda $dc01
        eor #$ff
        ldy keyindex,x
        and keyrow,x
        sta $00,y

        dex
        bpl checkkeyloop

keycolumn ;6 bytes
        .byte $7f,$fd,$bf,$7f,$bf,$df    ;runstop,lshift,/,space,poundkey,p
keyrow    ;6 bytes
        .byte $80,$80,$80,$10,$01,$02
keyindex  ;6 bytes
        .byte <exitkey,<leftflipper,<rightflipper,<tiltkey,<crsrdown,<pausekey


it will set the zp-adress for each key to 0 if it was not pressed, any other value means it is pressed.
2006-03-06 16:33
zdzisek
Account closed

Registered: Apr 2002
Posts: 33
Quote: Oh there are better ways to check for an emulator... ways that don't require user input :D

Anyways, i think you can never fix an emulator to emulate the keyboard 100% since the keyboard matrixes used nowadays should work a little different concerning short-circuits than the c64 one, since there are more lines and the keys are connected differently to that matrix.


http://www.hoxs64.com/ <- try out this one. It passes the Emu-Fuxx0r v1/v2 tests and SounDemon's Waveform Composer emulation detection. Any new test routines that can be used to further improve the emulation are very welcome. :)
2006-03-06 18:16
Krill

Registered: Apr 2002
Posts: 2980
zdzisek: you're not the authfor of hoxs, are you? i have some emu-checks up my sleeve but didnt care to hack them down so far.. :D
2006-03-06 18:33
zdzisek
Account closed

Registered: Apr 2002
Posts: 33
Quote: zdzisek: you're not the authfor of hoxs, are you? i have some emu-checks up my sleeve but didnt care to hack them down so far.. :D

No, I ain't the one behind Hoxs64 - I've been closely following the project since its emulation improved, and reported a couple of flaws to the author. I can pass the checks on to him (admittedly, I would like to have a peek myself ;-) if needed.
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Sulevi/Virtual Dreams
Fungus/Nostalgia
fieserWolF/Abyss-Con..
kbs/Pht/Lxt
Skate/Plush
Magic/Nah-Kolor
Guests online: 136
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 X-Mas Demo 2024  (9.5)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.035 sec.