News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_redbox

Scanning GX4000 Joypad buttons

Started by redbox, 11:48, 20 May 13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

redbox

On the GX4000 joypad, can anyone tell me what the A and B buttons relate to?

I'm assuming it's JOY1 FIRE (bitline &49, bit 4) and JOY2 FIRE (bitline &46, bit 4)...?  But also don't know which way round the A and B are...?


ralferoo

#1
IIRC, the one that's labelled 1 is connected to the FIRE2 signal and vice versa, but I've confused myself now so I'd have to double check to be sure...  ???

If you have a normal CPC, it's easy to check - just plug it in and if you get X when you press the button that's FIRE2 and if you get Z then it's FIRE1.

EDIT: Oh, and the buttons for a particular controller are FIRE1/FIRE2 on the same joystick, so they'd be bits 4 and 5 of the same port.

redbox

Thanks for this, I asked because am not near my real CPC at the moment so couldn't test it.

Infact, my routine doesn't like scanning bitline &49 (for JOY1) at the moment, is there any obvious reason for this (key clashes with the CURSOR or something) or do I need to go bug hunting?

redbox

Quote from: redbox on 17:16, 20 May 13
Infact, my routine doesn't like scanning bitline &49 (for JOY1) at the moment, is there any obvious reason for this (key clashes with the CURSOR or something) or do I need to go bug hunting?

Okay, I am getting some sort of keyboard clash when scanning JOY1 along with the Q key.

I see from the bitlines that they're next to each other so could this be the problem?

And is the only way to avoid this to scan the whole matrix into a buffer and check that (at the moment I'm just checking the scanlines I want to)...?

ralferoo

Quote from: redbox on 10:13, 21 May 13
Okay, I am getting some sort of keyboard clash when scanning JOY1 along with the Q key.

I see from the bitlines that they're next to each other so could this be the problem?
It sounds like you're actually describing the "infamous" keyboard clash, whereby you're pressing Q and using the joystick at the same time, in which case YES! This is a known problem.

Take the grid of keys and check where each "key" is located on that grid. If 3 corners of any square are pressed, the fourth will also appear pressed due to short circuits. This problem can only be resolved by having a diode on each key, which isn't done for cost reasons. So joysticks made specifically for the Amstrad (especially those that have a pass through socket for a second joystick) will tend to have this solution applied for the joysticks, but obviously that doesn't help with clashes where the keyboard causes interference on the joystick, but it might improve the issue for joystick affecting the keyboard.

The only solution is to choose keys that don't conflict with the joystick (which is hard) or try to design the game so that the conflicts are unlikely at the same time.

Powered by SMFPacks Menu Editor Mod