Author Topic: Why are the joystick buttons shown as keyboard keys in AMSDOS but not in games?  (Read 1162 times)

0 Members and 1 Guest are viewing this topic.

Offline khaz

  • 464 Plus
  • *****
  • Posts: 490
  • Country: fr
  • Liked: 248
  • Likes Given: 68
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?

Offline EgoTrip

  • 6128 Plus
  • ******
  • Posts: 1.051
  • Country: gl
    • http://egochip.blogspot.co.uk/
  • Liked: 677
  • Likes Given: 294
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.
EgoTrip's Stuff
EgoTrip's Stuff

Offline ZbyniuR

  • 464 Plus
  • *****
  • Posts: 312
  • Country: pl
  • 6128 A1230 PSX Win7
    • Jedyne polskie forum o CPC. :)
  • Liked: 321
  • Likes Given: 141
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. :)
TREK is better than WARS.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
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.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline EgoTrip

  • 6128 Plus
  • ******
  • Posts: 1.051
  • Country: gl
    • http://egochip.blogspot.co.uk/
  • Liked: 677
  • Likes Given: 294
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
EgoTrip's Stuff
EgoTrip's Stuff

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
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.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.366
  • Country: es
  • Liked: 564
  • Likes Given: 480
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.

« Last Edit: 16:20, 06 March 16 by dragon »

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.906
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3842
  • Likes Given: 394
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.

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.977
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2949
  • Likes Given: 5121
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?

Offline freemac

  • 464 Plus
  • *****
  • Posts: 300
  • Country: 00
  • Liked: 237
  • Likes Given: 233
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]
« Last Edit: 14:02, 16 March 16 by freemac »

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.977
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2949
  • Likes Given: 5121
This should be part of the firmware and do away with Logo :D