| Post Your Message | |
| |
| Previous Messages | Posted By
KiCHY on 2016-06-13 15:09:42
| Re: Mouse for Plussy
I concluded that the fastest way is to use NAE card with a 1351 mouse. We have all the HW requirements: NAE card with c64 joy I/O exists, the 1351 mouse also. Too bad neither of plus4 emulators supports these hardwares completely. VICE can emulate the NAE card with joy I/O, but it can't grab the mouse events and map to NAE registers. I don't have any real hardware and I don't plan to invest. I think I skip mouse support for a while.
|
|
Posted By
MMS on 2016-05-22 04:36:58
| Re: Mouse for Plussy
@gerliczer 1) the name corrected at once 2) I do not say it cannot work, but may need extra attenion. As you could see from the RS232 mouse protocol, in the first byte and the XY addresses and mouse buttons are coded together. So the complexity of the RS232 mouse handling comes from original RS232 design, and not from ours.
Sorry, but I cannot take responsibility for some guys' 35 years old crazy byte saving scottish protocol (eg, -if they would use 8 bits and not 7, then maybe 7 bits would be enough for the movement recognition (not 8), except very fast movements. -Or if they would send 4 bytes packahge io. current 3 byte package, then it would be much simplier to get the positions and mouse button status. The two button status could be on the upper 4 bits (Left) and lower 4 bits (Right). The X6-X7 could be on the Bit 3 and Bit 2 (on lower 4 bits) of the 4th byte in package and Y6-Y7 on the Bit6 and Bit 5 on higher 4 bits of the 4th byte, and with few ROL you can get the final position)
We just try to manage the available protocol in a way. The only problem is that if too many info packed into one byte, and the upper value position bits stored on the LOWER bits, then you need to do a lot of shifting and bitbanging. We have nno problem with Byte 2 and Byte3, but handling of Byte1 really takes processor time.
The decoding in C is available there, maybe a well made and translated C routine will make it simpler. I had no real success with CC65, but you know I am lame :-)
Or maybe someone can do a brilliant and compact code in ASM may help too (I was never been really good with mathematics)
But the original PC or PCJr (8088 at 4.77Mhz) could manage it, so we are not SOOOO far from that, they have only 3x faster CPUs
OK, here is the first draft, just the HW part (and still without the protocol, photo about the final stuff, driver, etc. a lot of work to be done): 20160521_Plus4_RS232mouse_documentation_DRAFT_V1.pdf
I will check what TLC wrote, that a C64 module can do the same. It would be the easiest if they really connect the right User Port pins.
|
|
Posted By
gerliczer on 2016-05-21 04:35:04
| Re: Mouse for Plussy
@MMS There's no problem with trying to find cheap solutions. The problem is when that cheapness comes at the expense of usability.
And if you scroll back to TLC's post you'll see that he already wrote five years ago that 1350 mode won't work.
Finally, a remark. Although it has extremely close ties with my name, my handle starts with a lower case g. Not that it'd be too important, but I'd like to see it written that way.
|
|
Posted By
MMS on 2016-05-20 18:09:45
| Re: Mouse for Plussy
Dear Patrick, It is a very nice offer from you! I do not know, how tigh the cover is, but if you could open it, and could make a photoe, it would be great.
As per my best knowledge, Plus/4 cannot get proper mouse handling via it's din port, as no analog PotX and PotY signals exist on TED. (So, the shape of the connector does not play a role here.)
it may happen, that the mouse movement converted to directions (like a joystick) by this adaptor, but C=1350 and 1351 mouses both have joystick modes (exactly the same as a jystick, just gives directions), no theroretically NO converter needed for that, just a usual Joy adapter (lthough, I do not know, what it may cause to TED on a long term).
|
|
Posted By
MMS on 2016-05-20 18:09:44
| Re: Mouse for Plussy
Dear Patrick, It is a very nice offer from you! I do not know, how tigh the cover is, but if you could open it, and could make a photoe, it would be great.
As per my best knowledge, Plus/4 cannot get proper mouse handling via it's din port, as no analog PotX and PotY signals exist on TED. (So, the shape of the connector does not play a role here.)
it may happen, that the mouse movement converted to directions (like a joystick) by this adaptor, but C=1350 and 1351 mouses both have joystick modes (exactly the same as a jystick, just gives directions), no theroretically NO converter needed for that, just a usual Joy adapter (lthough, I do not know, what it may cause to TED on a long term).
|
|
Posted By
Patrick on 2016-05-20 16:35:26
| Re: Mouse for Plussy
Is it not possible to use the mouse converter? I bought one many years ago on eBay. never used it, so if someone want to have a look at it. You're welcome!
|
|
Posted By
MMS on 2016-05-21 06:01:38
| Re: Mouse for Plussy
Hi SVS,
The documentation is not completely clear here, I mean the naming and the description do not match here. I think it is an area for improvement, as it has no real business with the JOY status at all (more in what mode the mouse is), and even has no linkage to any X or Y coordinates (as I see, but I am not the developer to know the final status ).
As written, if the mouse is in Analog mode , then these two bits return 1, otherwise in digital mouse mode shows MIDDLE and RIGHT mouse button status. As the 0 is the active mode, in case you check it with 1351, it will never be active.
Dear gerliczer, if you check, how old is this post (5 years now), and when the first time the mouse topic popped up (without real life solution), I treat it as one of the long term "holy grails" on Plussy. I try to work out together with BSZGG a feasible and cheap solution. It will be not perfect, but may cover 60-70% of the needs. For 10% solution there is the more expensive way. In fact (if you read my previous posts) I did not want to compete with the SID card, but as no proper driver created yet, I try to do mine. (And I found 1351 little too expensive and too rare)
Holy grails: -Nice music without heavy CPU load? Solved with SID card -Fast drives: JiffyDOS is available -Nice modern GUI? GEOS -Big storage capacity? SD2IEE. And I am also testing IEE2IEC with SDF1001 (needs major head cleaning) -Sprites? More or less is is clear now, that with wise color selection (background and color 3) two colored main sprite is possible -Nice pictures? Great FLI tools and crossplatform tools created with fantastic (close to Amiga) results -Mouse? SID Card (or maybe mine RS232 later) -More memory? Erhm, we have no external memory expansion at all, just internal wiring ones. Soooo...
|
|
Posted By
SVS on 2016-05-20 14:44:31
| Re: Mouse for Plussy
@MMS: what stand for "PotX" and "PotY"? Thank you.
|
|
Posted By
gerliczer on 2016-05-20 14:10:37
| Re: Mouse for Plussy
OK. So, as I understand, you say that anything that could be used to make a program running on plus/4s really appealing is out of question when a serial mouse is in use. (Please, correct me if I'm wrong.) Wouldn't you say that in this case using a serial mouse is wasting resources? Just like wave converters, no matter how good their sound is.
|
|
Posted By
MMS on 2016-05-20 15:02:01
| Re: Mouse for Plussy
OK, let's summazize: -FLI: closed out (I cannot guarantee, that the IRQ and the 3 bytes do not come during visible raster lines. so it may cause gliches as very precise timing is crucial here. BTW with some smarter programming the three bytes can be read and stored temporarily, and the bitbanging could happen when we have borderlines ) -Digi SID Emu: closed out already too heavy overload on CPU -Heavy raster demos very exact timing. Hard to manage convert to real coordinates in case tight rastertimes
Probably can use RS232 mouse without major issues: -Native SID playback, like SID trackers -Utilities, eg. disc managers -CAD programs (AutoCAD 2016 +4 LOL) -GUIs (GEOS) -BASIC programs Austrospeed copiled ones could have some troubles, I guess...
|
|
Posted By
gerliczer on 2016-05-20 07:01:26
| Re: Mouse for Plussy
Oh, so you say that anything requiring interrupt handling is ruled out as an area of usage for mouse control. Or you say that you could do e.g. an FLI editor, like the one TLC made, that works with your serial mouse without any kind of graphical and handling glitches.
|
|
Posted By
MMS on 2016-05-20 02:53:00
| Re: Mouse for Plussy
OK, but IRQ is there, when mouse status change happens. You do not need to read out status continuously. What is resource waste with that?
Anyhow, SID card is 60€ (and not available for the most new users, maybe for the forum members), an 1351 mouse is 25-40€ (when available).
RS232 mouse with MAX232 circuitry comes out from 10€.
When my PDF (I uploaded yesterday) becomes active, then I can put all these details into the post, though I am not ready yet with the full documentation, and especially the resident driver required for the BASIC staff (and to finally standardize the X,Y, Mouse button status addresses)
About the handling of mouse: -If you write an assembly PRG, then it is just one additional thing to be checked in your routine. Usually not the heavy rasterloaded demos with digi SID music will use the mouse, but maybe some drawing programs and GEOS (even for the 1351 an available C64 GEOS driver is there, I need to check the addresses it uses) or other utilities. These programs do not have "SID is eating my rastertime" -If you use it in BASIC, then the resident driver will do all the nasty things in the background, you just need to read out and use the coordinates and check mouse button status with peeks. Taking out the 2-2 upper bits for the position and adding to thew 2 byte long X-Y coordinates that takes the CPU time, but Plus/4 is better equipped for that, than C64 (more raw power)
|
|
Posted By
gerliczer on 2016-05-20 01:35:23
| Re: Mouse for Plussy
OFF @Csabo: What are you saying? Searching by themselves are only for the weak. Tough guys never try to do it, they always ask. It would cost them valuable 10s of seconds to locate such ridiculous things like a search box or link. (And I wouldn't even dare to think they would ever humiliate themselves by using something esoteric like search_term site:plus4world.com in google.) /OFF
@RS232 mouse I think, even though the plus/4 has usable hardware support for it, connecting a serial mouse directly is even more of a waste of resources than reading a 1351 mouse with SID. SID AD conversion needs 2000 around cycles, IIRC, but at least you don't have to poll it and surely won't mess up you IRQ scheme.
|
|
Posted By
MMS on 2016-05-19 17:17:06
| Re: Mouse for Plussy
Yes the two options are right, in fact these two are three
1) The NST BSZ SID Card can support in it's latest revision on it's joy port A) analog Commodore 1351 mouse B) digital ATARI ST/AMIGA mouse. There is a proper documentation about that, how you can read the data out.
I try to make PDF out of the original document I received for my SID Card, documenting these registers.
2) With the help of easily available MAX232 circuit on User Port, connected to an RS232 serial PC mouse. I work on this with BSZGG. Definitely the HW is ready, and pretty simple and cheap to build (maybe from 6-10 € you have everything, but you can get the mouse free or cheap from local used HW shop)
But I have troubles to compress the driver somewhere useful for the BASIC too (sorry, my lameness, I wanted to use it in my adventure too and both projects are waiting to the other one), and also there was a bug inside the driver.
So there is a PDF about HOW to build, and I just started to write about the RS232 protocol, and how to handle it via USER Port. Today I upload the first draft in PDF (but I am not a HW professional, haha!)
How it will work? Actually the mouse sends 3 bytes after the IRQ, in a rather strange structure 1) one byte contains the button status and the minority upper bytes of coordinates 2) majority of X coordinates 3) majority of Y coordinates
We did not finish to finalize where we want to store the X, Y coordinates and the mouse Button status D6 D5 D4 D3 D2 D1 D0 1st byte 1 LB RB Y7 Y6 X7 X6 2nd byte 0 X5 X4 X3 X2 X1 X0 3rd byte 0 Y5 Y4 Y3 Y2 Y1 Y0
http://paulbourke.net/dataformats/serialmouse/
In C the decoding:
void DecodeMouse(unsigned char *s,int *button,int *x,int *y) { *button = 'n'; /* No button - should only happen on an error */ if ((s[0] & 0x20) != 0) *button = 'l'; else if ((s[0] & 0x10) != 0) *button = 'r'; *x = (s[0] & 0x03) * 64 + (s[1] & 0x3F); if (*x > 127) *x = *x - 256; *y = (s[0] & 0x0C) * 16 + (s[2] & 0x3F); if (*y > 127) *y = *y - 256; }
Or in a little more detailed form from http://www.cpcwiki.eu/index.php/Serial_RS232_Mouse:
"Standard Serial Mouse (most common)
A serial mouse should be read at 1200 bauds, 7 data bits, no parity, 1 stop bit (7N1) with DTR and RTS on. For best compatibility, the mouse should output 2 stop bits (so it could be alternately also read as 7N2 or 8N1). When the mouse gets moved, or when a button gets pressed/released, the mouse sends 3 or 4 characters: __First Character____________________ 6 First Character Flag (1) 5 Left Button (1=Pressed) 4 Right Button (1=Pressed) 2-3 Upper 2bit of Vertical Motion 0-1 Upper 2bit of Horizontal Motion __Second Character___________________ 6 Non-first Character Flag (0) 5-0 Lower 6bit of Horizontal Motion __Third Character____________________ 6 Non-first Character Flag (0) 5-0 Lower 6bit of Vertical Motion __Fourth Character (if any)__________ 6 Non-first Character Flag (0) 5 Middle Button (1=Pressed) 4 Unused ??? 3-0 Wheel ???"
|
|
Posted By
Csabo on 2016-05-19 14:00:37
| Re: Mouse for Plussy
Here it is! GEOS 3.5 (Tip: you can just type "GEOS" into the search box and it will come right up.)
|
|
Posted By
MIRKOSOFT on 2016-05-19 13:49:40
| Re: Mouse for Plussy and GEOS
Hi!
I'm beginner. GEOS for Plussy was version 3.5? Anyway, where to get diskimage, no matter of format, but ideal is D81 for write image to diskette. Thank you very much. Miro
|
|
Posted By
SVS on 2016-05-19 12:55:34
| Re: Mouse for Plussy
Anyway on GEOS for Plus4, the joystick acts as a mouse and works as well both on moving and sensibility.
|
|
Posted By
siz on 2016-05-19 07:11:30
| Re: Mouse for Plussy
As far as I know there are two options: 1351 on a SID Card (+ Amiga/Atari mice on BSz SID Card emulate 1351) and serial mouse with voltage level converter. (RS-232 is 12V)
|
|
Posted By
KiCHY on 2016-05-19 05:14:17
| Re: Mouse for Plussy
I'm thinking on mouse support in my prog. What are the current possibilities? 1531 mouse with SID card? And very important for me: I have no real hardware, must find a way to emulate the mouse
|
|
Posted By
MMS on 2011-08-26 14:10:46
| Re: Mouse for Plussy
I think this point is discussed since years here, and I have never thoguh, that the solutiuon could be so "simple". I mean no SID card or very special microcontroller need, just a voltage regulator
|
|
Posted By
TLC on 2011-08-26 03:17:09
| Re: Mouse for Plussy
None of the C64 specific solutions (option 1 and 2) would work with the Plus/4 (not even those that mimic a 1350 mouse) unless the joystick adapter was an active device (something that could "gate" the joystick lines to the joystick inputs, driven by the select' output of the port).
Option 3 is fully possible. It'd work with any standard user port to RS-232 converters (even the classic VIC-1011A cartridge, once equipped with a gender changer).
|
|
Posted By
siz on 2011-08-25 15:24:45
| Re: Mouse for Plussy
Option 1 or 2 *MAY* work with a plus/4 as the 1351 has a 1350 mode which is basically joystick emulation and Micromys also supports this mode. The only task is providing proper ground and power lines for these devices.
|
|
Posted By
MMS on 2011-08-25 08:48:41
| Re: Mouse for Plussy
wow, not bad at all. But Vesalia does not help on us, as Plus/4 is missing the analog inputs on the Joy socket
An other calculation: 1) C= 1351 mouse on ebay in 30€+postage 2) Vesalia adapter (30€ + postage) + a PS/2 mouse (5€) to have proper PC mouse for C=64 3) BSZGG version: an RS232 mouse (on Vatera and ebay.de), almost new Microsoft: 2€ ( on USA ebay such an old Microsoft mouse costs 13-40USD+horror postage )
BSZGG adapter for the Userport (cheap components+work): maybe 10€ + postage (could be cheaper or more expensive)
Although the 3rd option is the cheapest, only that one may work for Plussy. 1 or 2 will NOK on Plussy despite higher cost.
On C=64 only 1 or 2 can work, but on the same price you may get an original C=1351 mouse too (although rare), maybe a little old fashoned and not optical mouse, but looks better on the desk, than this big Vesalia brick (despite is is a nice development, knowing how the PS/2 protocol works, not to forget USB and wireless support)
I am considering now to buy right now a Microsoft serial mouse in almost new status on Vatera (400Ft = 1.5€ + postage) and try to order one converter from BGSSZ. Comment: maybe Microsoft Home mouse fits the best for Plussy, as being a dark blue mouse, not white. I could not find any old fashioned RS232 mouse in black.
Question: how I may modify Multibotticelli to able to draw with this mouse on the real HW? will the irq driver stays in memory and run in the background?
(maybe the IRQ driver can write the mouse click as Joy Fire into memory. but how you may simulate the faster movement/acceleration of the mouse? or it will work like when 1351 simulates joystick? Rather limited, but for 45° movement may better work than joystick, I can hardly emulate well in Plus4Emu... On the other hand, GEOS expert could write a proper driver for this device, even laser printers or IBM inkjet printers could be managed in the past, not to mention the memory expanions )
|
|
Posted By
MIK on 2011-08-25 04:46:05
| Re: Mouse for Plussy
Don't know if this is of any interest.
I won't be getting one, I was just snooping around and run across this the other day... PC mouse on Amiga & Atari ST adaptor, but it also supports C64 and other 8bits.
Link: http://www.vesalia.de/e_micromys[5879].htm
|
|
Posted By
SVS on 2011-08-25 03:33:29
| Re: Mouse for Plussy
I'm not sure (almost sure, many years passed...) but Solder at time had inserted in one of his electronic cards the ability of mouse management. Maybe in 256K expansion on in Joys-protection.
|
|
Posted By
George on 2011-08-24 19:01:21
| Re: Mouse for Plussy
Sorry, my Hungarian is a little rusty...:=)
|
|
Posted By
MMS on 2011-08-24 17:16:47
| Re: Mouse for Plussy
No problem, I was just surprised
REVISION to the below: I found BSZGG in the Member list as an active member. So PROBABLY this mouse was already discussed here,but in the last 3 years I did not read any comment related to a real working mouse, so topic is up to the HW guys...
Back to my original post:
Recently I found an interesting link, I could not find any reference to it here yet. If it was already discussed here, or the developer is already reading this forum, please correct me
It describes a working mouse for Plus/4, made from a normal (old) RS232 mouse connected to Userport. http://www.amiga.hu/amigos/plus4/plus4/plus4.htm
Ahh, forgot to mention please go to Fejlesztesek area (that area has no direct link, bah)
The description is in Hungarian, but there is a beta driver, and a BASIC program able to read the certian memory addresses and draw with the mouse. (there is a screenshot about a drawing made by an Amiga port of a Plus/4 emulator, so it probably really works) Though the panel description is missing, there are a lot of hints and pictures about parts and way of connection.
In fact it seems NOT an 1351 compatible device, but if it has a driver working with IRQ, it may also do the work to transfer and map the signal to a proper place sounds more "compatible". On the other hand I am not aware of any Plus/4 program expecting 1351 to be connected (no analog input) even GEOS it not written like this.
Actually I tried to find out who is this guy, but had no time yet to write him There is two mail addresses, but those names ping nothing in my mind, maybe you find his nicknames more familiar: bszggg(at)amiga.hu veszti(at)freemail.hu anyhow, congrat to the developer! Hopefully a more competent guy (expert) may comment this new finding, how it could be transferred into an 1351 compatible device (even if required at all, or maybe this mouse could be THE mouse standard for Plus/4 )
|
|
Posted By
Csabo on 2011-08-24 14:45:22
| Re: Mouse for Plussy
The phrase that triggered the spam filter was "about me".
The list is unintersting, it's mostly pills and other random URLs and nonsense words. It catches a lot more than what gets through. The stuff that does get through, I block them by IP and add the URL to the list. I think there was some link to that domain (http://about.me), but I forgot that in the regex "." will match any character.
Anyway, I removed it, you can repost. Sorry for the hassle!
|
|
Posted By
MMS on 2011-08-24 14:14:59
| Mouse for Plussy
Hey guys, I made a summary and a link to a seems to working Plussy mouse (together with an IRQ driver and BASIC simple drawer program), but the Forum do not accept my message as it declares it as SPAM. Could you give me the list of words it is looking for? I could not find any of my words "wrong", but I will surely censure my text if I know what words I should prevent to use, like "the", "Plus/4", etc. Till that time, you should wait for that link
|
|
| |
Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon |