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


Forums > C64 Coding > Kayboard scan without disturbance of Joystick #1
2016-12-07 07:59
Didi

Registered: Nov 2011
Posts: 234
Kayboard scan without disturbance of Joystick #1

Hi Coders,
is there a way to scan keyboard without being disturbed by joystick #1? For Shotgun X-Mas Edition [2in1] +1KD I picked keys from the upper 3 lanes of DC01 to achieve that but I did not find a way to ignore the lower 5 bits to get a proper keyboard scan if something happens on joystick #1. Am I right that this is impossible the way C64 works?
2016-12-07 08:25
oziphantom

Registered: Oct 2014
Posts: 99
what is you reverse the keyboard input/output for those keys?

So do
DC00 inputs
DC01 outputs
then do a
DC00 outputs
DC01 inputs
?
2016-12-07 12:20
Groepaz

Registered: Dec 2001
Posts: 7888
BOTH should be set to input when reading joysticks.

however, that does not remove the problem completely - what i do is first checking joystick, and when any joystick bits are 0 then skip the keyboard scanner for that frame. if you want keyboard input for sth like a third player, you'll have to pick keys that are from the already mentioned 3 rows.
2016-12-07 17:24
Skate

Registered: Jul 2003
Posts: 458
I'm afraid we're unable to detect if the bit is set by the joystick or the keyboard at programming side. so, you should definitely go for the safe keyboard matrix rows.
2016-12-07 23:49
TWW

Registered: Jul 2009
Posts: 373
That is not fully accurate, we can with full certainly tell when joystick port #1 is receiving input (the full column is set to '0'). What we can not be sure of is if there is any key-presses happening at the same time on any of the keys in the column(s) used by the joystick. I.e. use safe columns or the method GPZ is mentioning (although not sure if it would be any good).

Why not make your game work with this fancy port doubler I saw for sale allowing up to 4 joysticks being used?
2016-12-09 11:16
Didi

Registered: Nov 2011
Posts: 234
@TWW: The game was made to be played with a 4-player adapter. I just added keyboard controls for the people who do not have such fancy hardware. ;)
2016-12-09 14:07
TWW

Registered: Jul 2009
Posts: 373
Ah, should have checked before suggesting ;-)

Although I did think of another (innovative?) idea... Please consider the following:

You allow interference from the joystick port to a certain degree and also vice versa, from a safe keyboard column towards the joystick input in equal measure. Meaning you can sabotage the input for the other player(s) but off course also hempering your own movement in doing so. This way it adds a cheating feature which I don't think I saw before...

Anyway it's Friday and I'm just full of good ideas 8D
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
Bitbreaker/Oxyron/*
TheRealWanderer
St0rmfr0nt/ExCeSs
icon/The Silents, Sp..
Mermaid/Vision^G★P
Hydrogen/Glance
Truss/inZane
Groepaz/Hitmen
Parody/Hoaxers
Guests online: 44
Top Demos
1 Uncensored  (9.7)
2 The Shores of Reflec..  (9.7)
3 Edge of Disgrace  (9.7)
4 Coma Light 13  (9.6)
5 Lunatico  (9.6)
6 Comaland 100%  (9.6)
7 Neon  (9.6)
8 Incoherent Nightmare  (9.5)
9 Wonderland XII  (9.5)
10 Comaland  (9.5)
Top onefile Demos
1 Globe 2016 [reu]  (9.6)
2 Dawnfall V1.1  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Treu Love [reu]  (9.4)
5 Dawnfall  (9.3)
6 Tunnel Vision  (9.3)
7 One-Der  (9.2)
8 Goatbeard  (9.2)
9 Hardware Accelerated..  (9.2)
10 Safe VSP  (9.1)
Top Groups
1 Booze Design  (9.4)
2 Censor Design  (9.4)
3 Oxyron  (9.4)
4 Arsenic  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.5)
2 Peter  (9.4)
3 Newscopy  (9.4)
4 Remix  (9.3)
5 Tadpole  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2017
Page generated in: 0.507 sec.