News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_MacDeath

[GX4000/Plus] Analog joystick port

Started by MacDeath, 12:41, 01 February 10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

Quote from: nocash on 00:27, 12 February 10
The Digital Joystick Port is interesting, too. According to the schematics, Fire3 is not connected. And, the Y-cable-style diodes are implemented only in the direction lines, not in the fire button lines. That's funny, the CPC+ was shipped with 2-button gamepad, but actually, it seems to be incompatible with 2-player 2-button games :-) Is that a known problem?
True fire3 isn't connected. It is mentioned in other sources (grimware and quazar online).

Why would there be a problem if the fire buttons are not dioded?

The problem has always been the keyboard clash, but this comes into play when 3 out of 4 keys are pressed within a virtual "rectangle" which you can visualise from the keyboard matrix.

If the directions are all dioded, then clash will not be caused by up/down/left/right.. the only way to cause clash comes from using keys on the keyboard.. ? So diodes on the fire buttons are not important because these would be generated as phantoms?

It is interesting though and something which I never thought to test on my cpc+...


(My understanding of electronics is limited, but this is what I think may happen).
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: nocash on 22:57, 09 February 10
Many thanks for the CPC plus schematics! Viewing them as gif/jpgs is 1000 times faster, and more comfortable anyways.

Couldn't leave my fingers of the files, and made an edited version, re-arranged them a little to eliminate the blank space. Resolution is only half as good, but still okay. Uploaded them to the schematics page, too. Maybe they are useful for somebody.
Looking at the Plus schematics and comparing GX4000 to 464Plus I can see a difference in the ADC inputs. It seems the ASIC uses them for sensing the computer configuration (RAM, Disc drive etc). All of these are missing on the GX4000.

I have also updated the Plus documents to reflect the differences between 464Plus/6128Plus and GX4000.

It simply notes the missing connections, and also the difference in main clock (39.9825Mhz compared to 40Mhz).
The official docs stated this is to give a better picture. So the GX4000 is 0.25% slower than the Plus.

Tip for programmers, make sure you take this into account when writing Plus games ;)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

MacDeath

#52
QuoteSo the GX4000 is 0.25% slower than the Plus.
Yet as it is a lite Plus, lacking the Extensions port, Keyboards and Drives...
Less stuff to work with, this may explain the slower setting.

The question : are cartridges games on PLUS computer faster than on GX4000 ?


Of course, 0.25% is not a great loss of speed. ;D

Yet the "better picture" excuse maykes cense :
the GX4000 was designed to run on TV.
TV were often inferior  to a proper monitor (despite Amstrad's ones being cheap junk...sort of) when rendering for a pseudo computer..

a bit more blurred.


Bryce

The option resistors (R128 - R130) weren't needed on the GX4000 board, so obviously they'll be missing. They don't effect the function of the ADC in any way though, so the Joystick functionality would be identical. The different crystal frequency is possibly a closer match to the TV scanning frequency when divided down and hence gives a better picture, but I haven't checked, that's just a guess.

Bryce.

nocash

#54
Hey, Bryce, why are you permanently doing this "you don't know nothing at all thing" to me, did I do anything to piss you off? If I may give that back to you, reading your posts, I couldn't get around to notice that you lack a basic understanding of electronics. Same goes for basic understanding of posts from other people.

It looks as if you aren't interested in posted information, not to mention in answering detailed questions. Aside from ignoring and/or putting down my information, you only shout "super cool DIY project" once and when to other people. Otherwise you didn't contribute anything useful yet. Except for the schematics, that's been great, and I hoped you'd have stopped your anti-nocash campaign when uploading them.

> There's no "negative" 5V rail in the CPC, just a 5V and a 0V.
> (or did you mean negative as in unwanted?)
No, not as in unwanted. As in electrons flowing in wrong direction. As in plus and minus exchanged. As in difference 5V-0V=+5V and 0V-5V=-5V.

If you know a better word than negative for it - is that really important? Even if you know much less about electronics than you claim - I think (hope) you understood what I meant when saying negative.

NB. to be honest, I couldn't imagine a better word than negative for it.

> 2) Putting a resitor in line... Now some theory...
> See attached picture... ratio is 50/50... is exactly 2.5V
Congrats. You've solved it! Wins you a prize for understanding how the potentiometer works. Took some days, but you got it. Now maybe you allow to go on with more technical things.

No, forget about it. I won't go on. Just you, go back, read my previous post. Hint: There are two voltages used on the comparator, the one from the joystick (which you now seem to know how it works), compared with the voltage from the D/A converter (which you seem to have missed).

> If things are blowing in a non-compatible joystick,
> then only the Auto-fire circuit,
Exactly! Stay there, you got it! Of course, there are few more things, like electrolyte capacitors on supply pins, or digital joysticks that emulate analogue signals, fairly useless on a cpc with digital joystick port, but if you'd have spent time on reading posts from other people, you'd have noticed that 1-2 guys tried to use a competition pro.

> the CPC would die first (unfortunately).
No idea what you are talking about here.

nocash

Hi arnoldemu.

> True fire3 isn't connected. It is mentioned in other sources
Missed them so far.

> Why would there be a problem if the fire buttons are
> not dioded?
Same as usually with keyboard etc. Yes, like a in a "rectangle". Let's say,
  player1 presses fire1+fire2.
  player2 presses fire1.
Since player1 has shortcut the fire buttons with each other, the hardware will act as if player2 pressed BOTH buttons.

> My understanding of electronics is limited,
At least we have the basic understanding thing, and that's much better than Mister "I worked in the Industry" that's sure :-)

Bryce

#56
Hi nocash,
          firstly, I apologise if you took my post the wrong way. I wasn't trying to put you down or ignore your information and I don't have any personal vendetta against you. There were some inaccuracies in your understanding of particular circuits in the past that led me to believe that you are possibly someone who has a real interest in electronics but with only a basic knowledge, because of this I tried to better explain some of the details. If you do not wish to hear my opinions then I'll refrain from answering anything directly that you write, I will however continue to correct incorrect electronic information in any post (not just yours), because incorrect information doesn't help anyone. As I have previously mentioned in the past, I am an absolute beginner when it comes to programming the CPC, and am more than happy when someone corrects me or helps me understand something better. That's the only way I'll learn it properly and I hope I can return the favour by helping others better understand the electronics part.

Regarding the function of the comparator and your statement "compared with the voltage from the D/A converter (which you seem to have missed)", I think you'll find I didn't miss it, in fact I described this function in detail in an earlier post in this very thread on the 4th of February.

Regarding the negative voltage, I now understand what you mean. But the word negative has a very defined meaning in electronics, which is why it was confusing, this would normally be referred to a reversed polarity.

When I said "The CPC would die first", I was referring to the fact that a short-circuit in Joystick would overload and possibly damage the 5V regulator circuit if left connected, this could certainly be described as the CPC dying. No?

As far as wiki contribution is concerned, firstly it's not a competition to see who can add the most, quality is better than quantity when it comes to information and I think you'll find that I have contributed more than just one DIY project and several others will follow.

Again I apologise if you took my posts the wrong way, it wasn't intentional. And remember my replies aren't only meant for you, there are lots of others out there who may know very little about electronics and will hopefully profit from explanations of even the simplest of electronic theory.

Bryce.

dragon

Besides the tennis game.There is another cartridge that uses the analog joystick.The rp11 used to test it.

In case you have not occurred.

http://www.kjthacker.f2s.com/download/rp11src.zip

Look at the source code of analogue.s

Bryce

One other thing, that hasn't been mentioned up to now (I don't think) is that althought the CPC is expecting values between 0 and 180K, the pot found in the Joystick will be of a higher value, because the pot normally has a total movement of around 270°, but a joystick normally only has a movement of about 90° at most. So only a small part of the pot is actually being used.

Bryce.

nocash

> There is another cartridge that uses the
> analog joystick.The rp11 used to test it.

Perfect. Then you won't even need to write a test proggy.
Just burn the rp11 eprom, attach a potentiometer, and use a multimeter to measure the min/max values in ohms. Ahmmm, I am afraid that typical cpc+ owners don't have any of that equipment :-/ really wished I'd have a gx4000 for testing such things at home :-)

> I described this function in detail in an earlier post
> in this very thread on the 4th of February.

That was in detail? Must have missed something :-) the schematics don't say anything about the exact voltages on the 6 ASIC pins, so you can't calculate the exact voltage passed (from the ASIC, via resistors) to the comparator, no chance.

The voltage should be ranging from 0.0V to 2.5V, yes. But I think it's quite possible that amstrad implemented something else, which is only more or less close to that should-be voltages. And then the POT would need to be matched to the actual voltages, not the should-be voltages.

> the pot normally has a total movement of around 270°

If the pot does have an rotation axis at all. Which I guess, some do. But my Quickshot DS-113 doesn't:

Its containing "shifting" or "sliding" potentiometers (or whatever they are called in english), they can slide back/forth, but don't rotate clockwise/anticlockwise. So for the Quickshot thing, it'd be rather difficult to find/buy 180K pots that match the joysticks mechanics.

Bryce

Interesting, I've never seen a Joystick that uses sliding pots, the ones I had all had rotating pots. How much of the slider is used for a full left to right movement? The whole thing or just a portion?

I assumed the 6 ASIC pins were digital outputs, so they could only supply 0 or 5V.

Like I said before, it's difficult to guage other readers/users experience, so for some people it would be too much detail and for others too little. I don't have a GX or CPC+, but I can simulate that section of the PCB if you like and work out the exact voltages produced by the ASIC (assuming they are digital).

Bryce.

Bryce.

nocash

> How much of the slider is used for a full left to right
> movement? The whole thing or just a portion?
Hard to say. The joystick can move it by 14mm or so (+/-7mm). But the mechanical calibration can move it, too. The total range is around 35mm. And to make it most confusing, most of that range isn't usable, the outer-most parts seem to be all 0 ohm on one end, and all 300k on the other (see the table from 3 february).

I have only that one analog joystick. So I've no idea how PC joysticks are usually built, whether they tend to use sliding/rotating pots, statistically.

> I assumed the 6 ASIC pins were digital outputs, so they could only supply 0 or 5V.
Yes, unless amstrad had access to alien technology - I assume that they are digital outputs, too. What I was talking about is that valid TTL HIGH levels can be anything above 3V. Maybe it outputs 5V, maybe only 4.7V,  maybe something else - nobody knows. That blows any calculations and simulations.

Bryce

Oh, ok I see what you mean, I usually put an exact 5V in the simulation (it makes the maths easier too :) ) even though the real-world values will vary even from machine to machine.

Bryce.

TFM

Quote from: MacDeath on 00:21, 02 February 10
All right, yet I see no point having an analogue joystick in an OS...
Games may be suitable, perhaps some 3D construction applications too...
But an OS...a mouse would be more usefull...lol.

Hehehe, and if you now can proove that a analogue joystick and a mouse is not nearly the same I will call you god ;-)

In case your lines haven't been as humoristic as I think... People with a CPC6128 Plus usually have no mouse, but a built in analogue joystick port. The PC joystick is connectect quick and without a problem. And it works as good as a mouse, further you don't need the space of the mouse pad. Just check it out with a real Plus.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

nocash

> The PC joystick is connectect quick and without a problem.
Without a problem? I thought everybody agreed that PC joysticks aren't compatible with the cpc+ in 99% of all cases, wasn't that correct?

arnoldemu

Quote from: TFM/FS on 23:41, 22 February 10
Hehehe, and if you now can proove that a analogue joystick and a mouse is not nearly the same I will call you god ;-)

In case your lines haven't been as humoristic as I think... People with a CPC6128 Plus usually have no mouse, but a built in analogue joystick port. The PC joystick is connectect quick and without a problem. And it works as good as a mouse, further you don't need the space of the mouse pad. Just check it out with a real Plus.
TFM which joystick do you use?
I haven't been successful with PC gamepads :(
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

MacDeath

#66
Well, in my mind analogue joy normally come back to middle when released, as I mostly used them in games like Wing Commander or X-Wing vs Tie Fighter on PC.. So I was wrong obviously and failed to remember I also used Analog joystick as a Digital-like one when playing atomic Bomberman with friends...

But of course you can use it differently so the analogue part enable multiple speed for the pointer, while digital Joystick is sluggish and pain in the @$$.

If Analogue Joy and Mouse are the same then a Mouse adapter using the analogue port (or a trackball if you prefer as it uses less place on the desk) may be sweet to design, because, you know...some peoples prefer mouse or Trackballs to Joysticks when dealing with a GUI-like.


Good old PS2/non-USB PCmouses mais then be well used and such adapter would perhaps not need that much complicated components as a USB mouse adapter would.
Only a proper software solution then.

The advantage is the Analogue port do actually have a +5V supply, such adapter may be usefull for digital joys too with extra features : more buttons or Autofire mostly.

And mostly no need to channel from the computer's power supply.

mmmh... would it be even possible to get vibration kit enabled ?
(don't remember if Joy enable some sort of output...)


Bryce

#67
The difference between really old RS232 Mice and PS/2 mice is so little that either mouse adapter would be equally complicated, neither need or could take advantage of the analogue inputs, except maybe using the analogue in a "pseudo-way" to represent speed of movement? Obviously the 5V pin on the analogue port is a big advantage, but I would still be inclined to use the digital inputs to feed the data to the CPC. Also because it keeps the compatibility to classic software and modern CPC OSs.

Did a mouse adapter for the analogue port ever exist?

As far as "vibration" is concerned (I assume you mean Force-Feedback/Retour de Force) , the port doesn't have any controllable output pins, so this wouldn't be possible without making use of a further port such as the printer port.

Bryce.

dragon

I read this in the arnold V especification:

"Unlike the existing CPC range, the size of dynamic RAM and whether or not a disk drive is installed are separately configurable options. It is therefore possible to produce a "4128" (128k diskless) or "664" (64k with disk) variant. Also, it is possible to increase the number of analogue input channels to eight."

So is posible increase the channels of analogic port?.

Also said to be pin-compatible with the PC 200.

TFM

#69
Quote from: arnoldemu on 10:47, 23 February 10
TFM which joystick do you use?
I haven't been successful with PC gamepads :(

Well, the only thing I can tell is that I bought a normal, cheap PC ananlogue joystick once and it worked (works still). Couple of month later I testet the PC stick of a friend, it worked also. But I've no experiences with gamepads. May the are different?

I like the use of the analogue joystick, because - in contrast to a mouse - it comes back to the center alone.

However I will probably soon get a new one, my PC joystick from 1993 is pretty done now and wasn't the best to get (but cheap).
Greets!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

#70
QuoteSo is possible increase the channels of analogic port?.
Well, as the analogue port (or Joyport) is some kind of Keyboard mod... well the full keyboard capacity may enable equivalent of much more analogue port ?

TFM/FS : got a picture of your Anal Joy ? (sorry for the bad pun)

PulkoMandy

Analog joysticks should work fine as long as they are simple standard 2 buttons 4 way analog things. Anything digital or involving any intelligent electronics will not. Gamepads usually go into this category. All these inteligent devices were designed with the pc port in mind, while the old simple ones followed the actual standard : 2 analog axis, 2 buttons.

nocash

> Analog joysticks should work fine as long as they are simple
> standard 2 buttons 4 way analog things. Anything digital or
> involving any intelligent electronics will not.

Yes-no. The problems are listed here,
http://cpcwiki.eu/index.php/Analog_Joysticks#Analog_CPC.2B_Joysticks

Don't know of any statistics for the pots, but I'd doubt that 180K ohm was a standard. Btw. did somebody meanwhile test if it's really exactly 0ohm=left/top-most and 180K=right/bottom-most ?

As for "no electronics" the PCB for my joystick is dated 1987 and has auto-fire, so I'd expect that one would need a VERY old joystick, much older than the CPC+ which was made in 1990. Don't have any statistics there, too. Maybe I am wrong, and joysticks without electronics were still sold in nineties ?

Bryce

There were "Cheap and nasty" analogue joysticks available right up to the end of the ninties (I'm the proud owner of such junk), they didn't have autofire or any fancy stuff and should theoretically work on a CPC plus without any modification. Haven't checked what value pot was used, but I can tear it open at the weekend and let you know, if it helps?

Bryce.

arnoldemu

http://www.epanorama.net/documents/joystick/pc_joystick.html

A link.

Ok, I'm happy to rip apart my analogue joypad to get it to work.
Maybe there is a way I can at least hack it....?
I did a search for analogue joystick and found one on e-bay... but i've no idea if it's too complicated or not :(
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Powered by SMFPacks Menu Editor Mod