News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

MultiPlay MX4 Expansion

Started by TotO, 18:29, 15 May 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TotO

Quote from: zhulien on 15:28, 26 June 16
Hi. Have you sent my order yet? Seems all email attempts to contact you have bounced recently. Julian
Yes, it was sent. Please, don't send any email to the "centpourcent" domains name... Only use the paypal address or the contact form.
Thanks.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

TotO

Here, some informations as I have not the time to create a Wiki page for the board...  :(


MULTIPLAY V1.5:
===============


PORTS
-----

F990 = Port A Actions bits
F991 = Port B Actions bits
F992 = Port A Mouse POS-X value
F993 = Port A Mouse POS-Y value
F994 = Port B Mouse POS-X value
F995 = Port B Mouse POS-Y value


ACTION BITS
-----------

bit0: Up
bit1: Down
bit2: Left
bit3: Right
bit4: 1st fire or LMB
bit5: 2nd fire or RMB
bit6: 3rd fire or MMB
bit7: 0


MOUSE BITS
----------

bit0-2: value
bit3-7: sign (all 0 or 1)


MOUSE RESOLUTION
----------------

200 DPI (1 inch move = 200 pixels move)

        ________          ________
A _____|        |________|        |________
            ________          ________       
B _________|        |________|        |________

200DPI |1  |2   |3  |4   |5  |6   |7  |8                                   
50DPI |1                |2


MOUSE ACCURACY
--------------

4 bit with sign extended to 8bit (-8 to +7). Mouse register X/Y return the offset since the last read.
Value will saturate if not read for a long time or if the movement is too fast. It will not overflow or wrap.

From a software point of view, just read the port and add its value to your position variable.
- Reading from BASIC with 50Hz interrupt is fine to handle a fast char pointer with acceleration.
- Reading from ASM with 300Hz interrupt is fine to handle a fast pixel pointer with acceleration.


MOUSE NOTE
----------

Proportional Amiga mouse are required to use ports F992 to F995. (switch set on AMI)
Ports F990, F991 are used for the buttons. Other bits will return useless coded quadrature.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

||C|-|E||

I have just received mine!  :D

TotO

Great to ear that. :)
Please, take care to not force when you plug a controller into it...
(hold the connector between the fingers and down twist to remove)

For information, the Rhino's Perfect Pixel software is compatible using the AMI switch with Amiga mouse.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

||C|-|E||

Do not worry, I am going to use an expansion cable with it!  :D On the other hand, I plan to connect an Amiga USB mouse adapter and give it a try with my Logitech optical mouse. I am the first one doing this?  :)

TotO

I don't know... I'm so angry because many boards sent the the two last months without tracking was simply lost.
And, actually I'm not able to build replacement boards as I own 20 PCB waiting for never reiceved CPLD...  :-X
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

||C|-|E||

Well, that is really bad  :(

robcfg

Sorry to hear that!


I do really prefer to pay more to get it tracked, precisely to avoid this kind of situtations.

dxs

Yeah well trouble is that having tracking won't prevent people from stealing your stuff during shipping, and most of the time they won't even give a penny (or cent, or pesos, or ... ;-) ) back when you tell them your stuff has been "lost".

TotO

Quote from: dxs on 18:04, 22 July 16
Yeah well trouble is that having tracking won't prevent people from stealing your stuff during shipping, and most of the time they won't even give a penny (or cent, or pesos, or ... ;-) ) back when you tell them your stuff has been "lost".
With Registered mail you are insured and refund for the chosen value. No problem with that.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

dxs

Indeed but using tracked mail (not registered) they will only refund 3x times the shipping cost, that is: not much.

robcfg

At least in Spain you can insure the shipment. The only shipments I lost weren't tracked.

TotO

Quote from: dxs on 09:39, 23 July 16
Indeed but using tracked mail (not registered) they will only refund 3x times the shipping cost, that is: not much.
Sure. It is why I don't use tracked mail. Registered cost not too much more.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

TFM

#88
How much money was lost? We should make a fundraiser to compensate for the lost cards (I didn't get one either).  :)




Quote from: dxs on 18:04, 22 July 16
Yeah well trouble is that having tracking won't prevent people from stealing your stuff during shipping, and most of the time they won't even give a penny (or cent, or pesos, or ... ;-) ) back when you tell them your stuff has been "lost".


The problem (imho) is rather matial law than some guys stealing CPC stuff.  >:(
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

TFM

#89
Hey guys, can somebody please confirm that the MultiPlay Joystick can be used for FutureOS / GianaSisters / CyberChicken. Last update of the OS (in Spanish) can be found here:

http://www.cpcwiki.eu/forum/programming/futureos-corner/msg131388/#msg131388

Since I cannot test by myself (card never arrived) I would greatly appreciate any help. And it's easy. Just plug a joystick to the Multiplay, then install and start the OS. Now move the joystick and you should see that the mouse arrow can be moved in the Desktop.

Also CyberChicken and GianaSisters (free download on my homepage) can be used. Please check if they work too.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

zhulien

#90
For those having trouble with reading an Amiga mouse... here is a couple of small examples in BASIC (the same applies in assembly but with greater DPI as the docs say)...





TEXT CURSOR:


10 MODE 2:BORDER 0
20 s=1:'sensitivity can also be fractional
30 w=80:h=25
40 x=w*0.5:y=h*0.5
50 LOCATE x,y:PRINT"*":
60 xp=x:yp=y
70 xo=INP(&F994):yo=INP(&F995):a=INP(&F991)
80 IF xo>7 THEN xo=xo-255
90 IF yo>7 THEN yo=yo-255
100 x=x+xo*s
110 y=y+yo*s
120 LOCATE 1,1:IF a AND 16 THEN PRINT"LEFT  " ELSE IF a AND 32 THEN PRINT"RIGHT "ELSE IF a AND 64 THEN PRINT"MIDDLE" ELSE PRINT"      "
130 IF x<1 THEN x=1
140 IF x>w THEN x=w
150 IF y<1 THEN y=1
160 IF y>h THEN y=h
170 IF x<>xp OR y<>yp THEN FRAME:LOCATE xp,yp:PRINT" ";:LOCATE x,y:PRINT"*";
180 GOTO 60


GRAPHICS CURSOR:


10 MODE 2:BORDER 0
20 s=8:'sensitivity can also be fractional
30 w=640:h=400
40 x=w*0.5:y=h*0.5
50 TAG:MOVE x,h-y:PRINT"^";
60 xp=x:yp=y
70 xo=INP(&F994):yo=INP(&F995):a=INP(&F991)
80 IF xo>7 THEN xo=xo-255
90 IF yo>7 THEN yo=yo-255
100 x=x+xo*s
110 y=y+yo*s
120 TAGOFF:LOCATE 1,1:IF a AND 16 THEN PRINT"LEFT  " ELSE IF a AND 32 THEN PRINT"RIGHT "ELSE IF a AND 64 THEN PRINT"MIDDLE" ELSE PRINT"      "
130 IF x<1 THEN x=1
140 IF x>w THEN x=w
150 IF y<1 THEN y=1
160 IF y>h THEN y=h
170 IF x<>xp OR y<>yp THEN FRAME:TAG:MOVE xp,h-yp:PRINT" ";:MOVE x,h-y:PRINT"^";
180 GOTO 60





Hope we get more mouse support in software to come... also you can make a dual mouse game by reading both ports, now that will be interesting...

One thing to note, I treated the bits as a mouse 'speed', it is possible to treat it as a 'speed' or an 'acceleration' - it just depends on whether you cap the speed or not somewhere, i wrote the examples based on speed because when treating it as acceleration, it didn't seem to have a different reading moving the mouse at whatever speed other than slowing down.  Also as acceleration the mouse in graphics mode example, becomes too fiddly/eratic to target anywhere.

arnoldemu

I bet a lot of people didn't know how they process mouse input:

Mouse Ballistics

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

Bryce

I had to do a lot of tweaking in this regard when I designed the USB AMX Mouse. Firstly because the CPC resolution is rather low compared to modern screens, so a 1:1 Mickey to pixel ratio would have meant that a 5mm movement was all it took to move across the entire screen (not good). Secondly, tiny movements need to be filtered out to stop the mouse pointer from permanently jittering (also not good). A further problem is that the joystick port is not interrupt driven, it's being polled and the read rate is variable. It took a lot of trial and error to get the mouse feeling like it should be.

Bryce.

TFM

Quote from: Bryce on 10:13, 16 September 16
I had to do a lot of tweaking in this regard when I designed the USB AMX Mouse. Firstly because the CPC resolution is rather low compared to modern screens, so a 1:1 Mickey to pixel ratio would have meant that a 5mm movement was all it took to move across the entire screen (not good). Secondly, tiny movements need to be filtered out to stop the mouse pointer from permanently jittering (also not good). A further problem is that the joystick port is not interrupt driven, it's being polled and the read rate is variable. It took a lot of trial and error to get the mouse feeling like it should be.

Bryce.


In the German forum we had a discussion about this, your mouse behaves very slow compared to other joystick solutions. However if seems also to depend which software you're using. So I'm curious: What did you use as reference? (I ask because it may be good to have one reference in common for all mice).  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

zhulien

Im going to play around with the idea of using the max speed as an acceleration for the previous speed instead so that at slower speeds we can get pixel accuracy but faster speeds we can jump across the screen quickly... might not be practical but will see what happens.

TotO

You can increase the speed by using a 300Hz interrupt.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Bryce

Quote from: TFM on 15:28, 16 September 16

In the German forum we had a discussion about this, your mouse behaves very slow compared to other joystick solutions. However if seems also to depend which software you're using. So I'm curious: What did you use as reference? (I ask because it may be good to have one reference in common for all mice).  :)

Yes, it's deliberately slowed down. My (subjective) reference was OCP Art Studio and AMX Art. My mouse adapter can be sped up to ridiculous speeds (entire screen width with 2mm movement), but it's unusable then. My test was: What's the best speed to be able to draw accurately with these art packages and use the menus. The mouse speed also depends on how often the software is reading the port and how it interprets the pulses, so any joystick port mouse will vary depending on the software.

Bryce.

TFM

Sure, very interesting actually - so you can adapt your mouse to software. Nice feature.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

Quote from: TFM on 23:31, 17 September 16
Sure, very interesting actually - so you can adapt your mouse to software. Nice feature.  :)

Yes, in fact I was considering updating the firmware so that the sensitivity could be set by the user via the mouse.

Bryce.

TotO

The Multiplay is a cursed expansion.  :o

In May/June, I have built 20 boards and sent them.
12 was lost, 2 should return to me... And I'm not able to build more because in tree months:
- two 20pcs CPLD orders was lost
- one 20pcs PCB order was lost
- one 20pcs DB9 order was lost

I no more own it because I have sent mine to Rhino some months ago.
Definitively, if you have this board at home... Take care!  :-\
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Powered by SMFPacks Menu Editor Mod