CPCWiki forum

General Category => Technical Support => Topic started by: khaz on 22:28, 04 March 16

Title: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: khaz on 22:28, 04 March 16
Following the excellent suggestion in another thread, I used the second port of my Joystick splitter to remap all the inputs in Chase HQ so I could be able to use both buttons on an unpatched game. At the remap screen, you can press either ( ] r t f g or the corresponding Joystick buttons and directions, and use either to control the car ingame.

But why can't I do it with the first controller port? The direction cross may be different, but the buttons show Z and X when pressed in AMSDOS, yet I can never remap the second button in any game. Why is that?
Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: EgoTrip on 22:45, 04 March 16
The keys and the joystick 0 have different mappings. However joystick 1 has the same key numbers as keys on the keyboard which is why.
Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: ZbyniuR on 05:24, 06 March 16
Nice picture, but miss few details.
Caps Lock (70)  have codes 253,253,254 and can be changed like any other key, exept Shift (21) and Ctrl (23).
Fire3 in joy0 is number 78 and default have no codes.
Fire3 in joy1 is number 54 the same like key B on keyboard. :)
Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: arnoldemu on 11:47, 06 March 16
Following the excellent suggestion in another thread, I used the second port of my Joystick splitter to remap all the inputs in Chase HQ so I could be able to use both buttons on an unpatched game. At the remap screen, you can press either ( ] r t f g or the corresponding Joystick buttons and directions, and use either to control the car ingame.

But why can't I do it with the first controller port? The direction cross may be different, but the buttons show Z and X when pressed in AMSDOS, yet I can never remap the second button in any game. Why is that?
Most games only use first controller port and have menu selection for joystick. The code in the game to redefine the keys ignores the first joystick because it is in the menu. It is treated as a special case.

On most cpcs the second joystick is not used because you need to use a joystick splitter to use it.

The second joystick shares some keys on the keyboard so can't be ignored in the redefine keys code so it can be used.
Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: EgoTrip on 12:18, 06 March 16
I never made that picture, its a screen grab from a PDF I downloaded from somewhere (Cant remember) years ago.

Just checked, it was made by someone called Bert Post Uiterweer
Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: arnoldemu on 12:54, 06 March 16
I never made that picture, its a screen grab from a PDF I downloaded from somewhere (Cant remember) years ago.

Just checked, it was made by someone called Bert Post Uiterweer
It is on cpctech website. I'll mention the updates to Bert.
Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: dragon on 13:59, 06 March 16
Many games use their own build of ascii code relationship with the keys.

But if you know where is the ascii code in the game depending of the game, you can assing the buttons to the letter you want diplay in text.

Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: Bryce on 15:20, 06 March 16
I believe this was mentioned in one the the Amstrad / Alan Sugar books or reports, that Alan tried out the computer and complained that there was no visual feedback that the Joystick was doing anything, so he instructed whoever was responsible for this to make sure that moving the joystick produced something on the screen.

Bryce.
Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: Gryzor on 12:00, 07 March 16
I didn't remember that story, but it makes total Sugar sense.


It's strange, though, if it's true, why didn't they make it just move the cursor around like with the similar story with the cursor keys?
Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in gam
Post by: freemac on 18:00, 15 March 16
I didn't remember that story, but it makes total Sugar sense.


It's strange, though, if it's true, why didn't they make it just move the cursor around like with the similar story with the cursor keys?
a$=INKEY:if a$="<=" :)

[attachimg=1]
Title: Re: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?
Post by: Gryzor on 21:21, 16 March 16
This should be part of the firmware and do away with Logo :D