News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_mr_lou

4-player adapter? // MultiPlay MX4 Expansion

Started by mr_lou, 11:36, 29 June 15

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

KaosOverride

I think I can give CapriceRPI2 the Joy 3 and 4 option also.

Because GP2x version used an 8 dir joystick, I used a matrix to do the conversion. I'm recycling this for RPI. The advantage is that I just "ask" the matrix for what is pressed, but the matrix can be updated from different sources (Real Joystick or keyboard emulation)

And also the matrix can be checked from different sides, for keyboard scan and from some I/O port.

By default I will make the joy 3 and 4 scan keyboard but when I/O access is detected from the expansion port Joy 3 and 4, key scan will be deactivated for joysticks 3 4 to avoid keyboard clash.

Anyway, which I/O ports are used for expansion board??
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

gerald

Quote from: TFM on 21:56, 30 June 15

Oh you think about adding 10 and 11. I thought you would use two additional out of 0-9, so that the new controllers actually map to the keyboard.
Well, this is really something to be considered, as indeed we could use them if the game allow key remapping. We just need to avoid line with special keys like shift/ctrl/esc  ;D

arnoldemu

#77
Quote from: gerald on 20:28, 02 July 15
Well, this is really something to be considered, as indeed we could use them if the game allow key remapping. We just need to avoid line with special keys like shift/ctrl/esc  ;D
I think games would ignore other keyboard lines. I am sure they mostly read 0-9.
With patches, and some space to put the larger keyboard buffer they could read the extra lines.

If you do keep it within the existing keyboard matrix that would be better, potentially no game needs to be patched if they provide a keyboard redefine.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

Quote from: gerald on 20:28, 02 July 15
Well, this is really something to be considered, as indeed we could use them if the game allow key remapping. We just need to avoid line with special keys like shift/ctrl/esc  ;D


Yes. Special keys wouldn't even be that big of a problem. Maybe Shift and Control are not so good as you told, but ESC is imho fine. I mean isn't DEL with Joystick 0 (line 9 from 0-9) and Joystick 1 is at line 6.


So for two more joysticks the lines 4 and 7 (contain only letters and numbers) could be used. :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

mr_lou

My apologies if this has been mentioned already, but:

Regardless of however the adapter is made, is it correctly observed that it won't be usable on the GX4000?

KaosOverride

The expansion port ones yes, you should forgot, if you not rebuild the expansion por taking signals from Z80 and a few more from ASIC...

But you have 3 select lines from keyboard if you forget of the ASIC pins... Joy 1, Joy 2 and the pause key (It's maped to P key). At least you could rebuild a 3rd joyport  as keyboard derivative, and use the analog port for the 4th...
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

mr_lou

I think people would want the "standard" expansion that everyone else is using.

@Bryce, @TotO, @gerald: How big a job would it be to mod a GX4000 to add the two extra joystick ports?
Which one would be easiest to add? TotO's version or gerald's version?

arnoldemu

Quote from: KaosOverride on 00:58, 06 July 15
The expansion port ones yes, you should forgot, if you not rebuild the expansion por taking signals from Z80 and a few more from ASIC...

But you have 3 select lines from keyboard if you forget of the ASIC pins... Joy 1, Joy 2 and the pause key (It's maped to P key). At least you could rebuild a 3rd joyport  as keyboard derivative, and use the analog port for the 4th...
The analogue joystick port uses the fire buttons from the digital joystick port!
I will double check, but I don't think analogue fire buttons are triggered independent of joystick port.

Ok, if you want to have 4 player movement only, but if fire is needed then you have to choose a different way.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

KaosOverride

#83
Oh yes, fires are common to digital ports. There is also both common 1 and 2 at the analog port...

Then a cheap but complicated way is to solder two wires to the ASIC and route to the Joyports pin 9 (Common 2 at classic CPC) then use two CPC joy splitters and have Joy 1 and 3 at port 1, and Joy 2 and 3 at port 2.

At GX4000 lines 4, 7 and 10 are used. 4 for P key (pause) 7 and 10 for Joy 2 and 1. The P key will collide with a direction bit, so my bet goes for lines 5 and 6, pure letters, no func keys. (Note: ASIC at service manual numerates 1-10, when many other docs numerate 0-9 the keyboard lines)

This is incompatible with Joys 3 and 4 at expansion port, but there is no expansion port at GX4000 :(

EDIT: The idea of Piotr's keyboard adapter can be a solution here for another keyboard based joystick adapter. It is placed at AY socket and takes few wires from Z80. No ASIC soldering.
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Bryce

I had a bit of a think about this problem and I may have a further possible solution that only needs access to the Joystick ports ie: would work on any CPC (including the GX4000) without any modification. It has some drawbacks, but then again all solutions up to now have certain drawbacks too. So here's the idea:

As those who know their CPC Hardware know, the COM line on the CPC joystick port (unlike other retro computers) is a pulsed signal and not a permanent GND. What if each of the COMs were multiplexed so that the first COM pulse was sent to Joy1 A and the second pulse sent to JOY1 B, the same for JOY2 A and JOY2 B. This would mean two things, the software would need to "calibrate" the sticks at the start to know which stick is which, but no new addresses would be needed, just the game needs to be patched (or written that way if it's a new game).
One obvious disadvantage is the joystick responsiveness is halved, but I think many games neither needed nor took advantage of the full joystick speed anyway.

Comments welcome.

Bryce.

TFM

So here's my comment:
That's a nice solution, but it lacks the part of "How to synchronize it". Of course I wouldn't be TFM if I wouldn't provide a solution[nb]instead of a religion, that's what other's do...[/nb]. So how to synchronize?
Use the spare signal! When Spare is "off" then Joy 1/2 (A) is used. And when Spare is "on" then the Joy 1/2 B is used. This way one still has fire 1 and 2.  ;)  Isn't that neat!  ;) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

Yeah, that's easy to implement. Great idea.

Bryce.

gerald

Quote from: KaosOverride on 12:12, 06 July 15
EDIT: The idea of Piotr's keyboard adapter can be a solution here for another keyboard based joystick adapter. It is placed at AY socket and takes few wires from Z80. No ASIC soldering.
Yes, the few logic required to emulate the PPI can be piggy packed on the PPI, but where do we put the additional joystick port ?

Quote from: Bryce on 20:48, 06 July 15
I had a bit of a think about this problem and I may have a further possible solution that only needs access to the Joystick ports ie: would work on any CPC (including the GX4000) without any modification. It has some drawbacks, but then again all solutions up to now have certain drawbacks too. So here's the idea:

As those who know their CPC Hardware know, the COM line on the CPC joystick port (unlike other retro computers) is a pulsed signal and not a permanent GND. What if each of the COMs were multiplexed so that the first COM pulse was sent to Joy1 A and the second pulse sent to JOY1 B, the same for JOY2 A and JOY2 B. This would mean two things, the software would need to "calibrate" the sticks at the start to know which stick is which, but no new addresses would be needed, just the game needs to be patched (or written that way if it's a new game).
One obvious disadvantage is the joystick responsiveness is halved, but I think many games neither needed nor took advantage of the full joystick speed anyway.
If we manage to power the logic that select the joystick, this can be done.
The only way to get power is to harvest it from the row (pulled up). CMOS logic has to be used.
The sync can be simple as delay (RC based) : when the line goes low, you can access one joystick, and after a properly defined time, the second.

Quote from: TFM on 20:54, 06 July 15
So here's my comment:
Use the spare signal! When Spare is "off" then Joy 1/2 (A) is used. And when Spare is "on" then the Joy 1/2 B is used. This way one still has fire 1 and 2.  ;)  Isn't that neat!  ;) :) :)
You mean that exact spare signal that is not wired on the Plus range ?

TFM

Quote from: gerald on 21:13, 06 July 15
You mean that exact spare signal that is not wired on the Plus range ?
Yes exactly that! The signal that every user can add to his/her Plus/GX with a simple piece of wire.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

gerald

Quote from: TFM on 21:19, 06 July 15
Yes exactly that! The signal that every user can add to his/her Plus/GX with a simple piece of wire.
to a 0.5mm pitch IC in the case of a GX4000

Bryce

Quote from: gerald on 21:29, 06 July 15
to a 0.5mm pitch IC in the case of a GX4000

Doh! Is the spare not connected on the GX4000?

What do you think of the rest of the idea?

Bryce.

gerald

Quote from: Bryce on 21:39, 06 July 15
Doh! Is the spare not connected on the GX4000?
It is not connected on the 6128/464plus either, but the keyboard connector provides an easy connection point

Quote from: Bryce on 21:39, 06 July 15

What do you think of the rest of the idea?

Doable, but tricky because of the power consideration.

We can also have a sync mechanism that assume that the joystick is scanned every frame.
- each time the line selection goes low, we toggle the joystick selection
- When the selection line is not low, we reset the toggle after a timeout (rc based)

So, if we scan the joysticks every frame (in fact it could be faster) we are sure we always start with the same joystick.
deselect/reselect the same line in a short time (faster than the timeout) and you get the other joystick.


TFM

Quote from: gerald on 21:29, 06 July 15
to a 0.5mm pitch IC in the case of a GX4000


So what? Even I could do it! If somebody is afraid of doing it please send my your hardware and I will do that for you free of cost.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

TFM

Quote from: gerald on 22:22, 06 July 15
We can also have a sync mechanism that assume that the joystick is scanned every frame.
- each time the line selection goes low, we toggle the joystick selection
- When the selection line is not low, we reset the toggle after a timeout (rc based)

So, if we scan the joysticks every frame (in fact it could be faster) we are sure we always start with the same joystick.
deselect/reselect the same line in a short time (faster than the timeout) and you get the other joystick.


How would you do that in hardware? You would need additional lines from EXP port, so an additional 50 pin connector.
And honestly a resolution of 25 mickeys is a nightmare!!!

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

CraigsBar

Quote from: TFM on 21:19, 06 July 15
Yes exactly that! The signal that every user can add to his/her Plus/GX with a simple piece of wire.
I wish someone would explain how. Then I would [emoji34]
IRC:  #Retro4All on Freenode

Bryce

Quote from: gerald on 22:22, 06 July 15
We can also have a sync mechanism that assume that the joystick is scanned every frame.
- each time the line selection goes low, we toggle the joystick selection
- When the selection line is not low, we reset the toggle after a timeout (rc based)

So, if we scan the joysticks every frame (in fact it could be faster) we are sure we always start with the same joystick.
deselect/reselect the same line in a short time (faster than the timeout) and you get the other joystick.

Is that not too slow to be scanning?

Bryce.

TFM

Yes it is. And a nightmare in software.


The "Spare pin" solution keeps the regular two joystick compatible. But this solution makes all of them incompatible, since old games do not scan the CLK pin or what ever he likes to use.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

mr_lou

A lot of tech stuff talk here that I have no clue about, but it's awesome that so many ideas are discussed.

I think it is ok that the adapter isn't compatible with existing games. That is not the case either for the Amiga 4-player adapter nor the C64 4-player adapter. Games has to be written (or patched) in order to use it. I don't see a problem with that.
(The CPC has very few 4-player games anyway).

My personal favourite is still TotO's idea.

       
  • It's simple
  • supported from BASIC without using RSX
  • going to be compatible with other modern hardware
  • does not require any soldering or modification on the majority of machines.
The only drawback I see, is that the GX4000 isn't supported, unless it gets some serious modification done to it. But that seems to be the case with other solutions too.

One could argue that BASIC support isn't important, since any 4-player game would require a speed BASIC doesn't offer anyway. I don't know. I certainly haven't had any luck obtaining the speed I want using BASIC myself.

I would prefer a solution that doesn't require me to unplug it in order to play existing 1-player games.

gerald

Quote from: Bryce on 22:32, 06 July 15
Is that not too slow to be scanning?

Bryce.
Not slower than the regular keyboard/joystick scan.
All you need is to select twice the line during the scan, with a unselected state in between (you can scan an other line during this time).
The only requirement is that the two selection of the line are closer that the reset timeout.

mr_lou

#99
I've just re-read this entire thread.
I'm curious to hear more about gerald's idea.
Some quotes from gerald:

Quote from: gerald on 11:34, 30 June 15
The only advantages over TotO's solution are :
  - No additional IO space required, we use an existing IO address
  - Access is method is identical to keyboard and joysticks0/1. Only 2 more lines to scan

But who said that my solution required the user to do any soldering ?
All can be done externally on a Mother4X board.

The extension itself will use the original joystick connector to get access to the keyboard matrix row.

The only drawback I can see, is that it can't be used from BASIC, but if we admit that BASIC is too slow anyway....


Quote from: Carnivac on 13:20, 29 June 15
Oh cool.  Where can I get a splitter for 464/6128 with diodes?

@Carnivac, I bought this now.
Amstrad CPC 464 664 6128 Two 2 x Joystick Game Port Y Adapter Cable | eBay
Says it's with diodes.

Powered by SMFPacks Menu Editor Mod