Re: Mouse Extension v1.0 So generally speaking currently there are three methods:
1) SID card and connect to is an Amiga mouse or a Commodore 1351 mouse
2) Build the RS232 interface and connect an original, preferably non-wheel Microsoft RS232 mouse. Issues: -I ordered a batch of Max238 IC, never arrived -Original RS232 Microsoft mouses. Rather expensive in Eruope, cheaper in US, but expensive shipping. -Logitech, and especially Genius mouses use a different protocol and not compatible with the current driver
Upcoming: Built the version suggested by George, accept an USB mouse with Rasberry PI (pioco) is in progress. Hopefully the complete circuit will not cost a kidney. and everyone has a free USB mouse It will requiere USB mouse and more affordable than the above ones.
Re: Mouse Extension v1.0 The mice of that era had all different protocols. Some mice need to be waked up with a character before they send data. So stick with the standard Microsoft Protokoll (other mouse). The mouse topic is not trivial as you can read here, but if you want to dive in, we probably cannot help, because we probaly don't have the same hardware-
Re: Mouse Extension v1.0 The mice of that era had all different protocols. Some mice need to be waked up with a character before they send data. So stick with the standard Microsoft Protokoll (other mouse). The mouse topic is not trivial as you can read here, but if you want to dive in, we probably cannot help, because we probaly don't have the same hardware-
Re: Mouse Extension v1.0 I verified that the mouse works with a PC, so the problem is with the Plus4's adapter hardware.
I checked with a multimeter that the mouse gets power and connected the Rx pin and tried to send a byte to the mouse before reading the mouse (hoping that would wake it up) but it had no effect.
Re: Mouse Extension v1.0 unfortunately I can't help more, from here.. You should check the connections, or try another mouse.. Ask another mouse from somebody, to test it.. maybe..
I'm planning to make an usb to serial converter.. but the ordered things comes slow.. and I have to write software too.. so.. it is time..
Re: Mouse Extension v1.0 @Spektro I have checked your program ... and I wrote a better version. So you can test it with this:
The working test example in basic, that handles the mouse in commodore plus4 rs-232:
10 open2,2,2,chr$(56)+chr$(1) 20 get#2,a$: print asc(a$) 3ö get a$:if len((a$)>0 then 50 40 goto 20 50 close2
It has to pay attention for the delay, because the bytes comes from the buffer, and the basic is a little bit slow. So you have to wait the 0 if you don't touch it.
Re: Mouse Extension v1.0 @Spektro: The logitecj, anf microsoft mouse differences are in the sent pckages. Ms use 3 byte, but the Logitech uses 4 bytes. https://bencsikszilveszter.hu/plus4/pc/pcegerdoc.htm I made my driver with a logitech mouse, but it send just 3 byte when I don't push the middle button. I don't know, why doesn't work some logitech mouse with. I don't have these type of mouse.
Maybe in this weekend I can check your basic program. And, Those values are corrects!
@Sukkopera Thank you the suggestions, and check my code! I'll work on it, if I'll have time for it!
Re: Mouse Extension v1.0 I wrote the following Basic program to test Logitech mouse: 10 rem --- control register --- 20 bd=8:rem baud: 1200 30 db=32:rem 7 data bits 40 sb=0:rem 1 stop bit 50 rem --- command register --- 60 dt=1:rem data terminal ready 70 tr=4:rem rts low, transmitter on 80 pa=0:rem no parity 90 trap150 100 rem --- open rs232 port --- 110 open1,2,0,chr$(bd+db+sb)+chr$(dt+tr+pa) 120 rem --- read port --- 130 get#1,a$:printasc(a$):goto130 140 rem --- close port --- 150 close 1
I'm not sure if I'm using the right values for the control and command registers because the program reads nothing but zeros from the RS232 port when I move the mouse. I assume these are the correct settings for the mouse:
Re: Mouse Extension v1.0 IMHO, someone should send a Logitech mouse to the driver developer. I have an idea that maybe the Logitech mouse uses 3 buttons by default while the Microsoft mouse uses two.
Re: Mouse Extension v1.0 Hi, I've built an RS232 mouse adapter following the BSZGG & MMS's adapter building instructions. I used the following parts: a Max232 board, a user port connector, and a DB9 gender changer. To my disappointment I have no mouse movement
Led lights up in the Max232 board so it's working. Board's Tx pin is connected to the user port's C pin but the mouse driver doesn't receive anything. I'm using a Logitech serial mouse.
What could be wrong? Does the driver support Logitech serial mice?
Re: Mouse Extension v1.0 The situation is that unless you have clear documentation or at least some simple code to read, no one will understand how to use this thing and no one will use it. That's why I am insisting on this point, I would really like to see people make use of your effort and start releasing more programs that use the mouse.
Thanks for the info on how to build the different ROM versions. I have no idea what ROM2/3 mean but I will find out.
If you use ACME, you can pass the romkonfig number on the command line, so you would be able to build all 4 versions without any changes in the source.
Also, the PRG version becomes much easier, since you could do something like this:
; This is the address the driver will run from baseInit = $f270
!word nextln, 2025 ; Second word is line number !byte $9e ; SYS !pet "4109" ; Address (in string format) !byte 0 ; End of instruction nextln: !byte 0, 0 ; End of program
* = 4109
jmp startCop ;-------------------------------
;------------------------------- ; Copy the code to the final destination ;-------------------------------
from_ptr = $d0 to_ptr = $d2
startCop: SEI
; Set Basic end LDA # STA $37 LDA #>baseInit STA $38
; Prepare to copy the payload to the destination address lda # sta from_ptr lda #>payload_start sta from_ptr + 1 lda # sta to_ptr lda #>baseInit sta to_ptr + 1
; Do the copy (could probably be optimized) copy_begin: ldy #0 - lda (from_ptr),y sta (to_ptr),y iny bne - lda from_ptr + 1 cmp #>payload_end beq copy_done inc from_ptr + 1 inc to_ptr + 1 jmp -
copy_done: STA $FF3F
; place of jsr that run JSR baseInit STA $FF3E
JMP $800a
;-------------------------------
payload_start: !pseudopc baseInit { ; Your code here } payload_end:
!if baseInit + (payload_end - payload_start) > $fcff { !error "Program is too large, please move baseIinit back" }
All the code under !pseudopc would be assembled as if it was placed at $f270 (or wherever you want, it's sufficient to change that in ONE single place, if you want), so it can just be copied there without any processing. In fact, this single file produces a fully working PRG in one go, without all that additional effort.
Maybe you can do something similar with your assembler, i don't know, but I think it's worth exploring other ones, since with a LITTLE time spent learning something different, you can save MUCH MORE time.
What do you mean that my board is licensed? It uses a rather open license that only prohibits commercial usage. But actually, all I care for is that if the board is modified, the modifications are shared back to the community. If you want to be able to use it commercially I will give you the right to do so.
I can send you a ReSeed and a 16UP and anything else for free, you give me your address.
The situation is that either someone will use this, and then they won't need the source code, or they will have their own program where they will take over the interrupt for music and other reasons, and then they will handle it themselves.
My plan is to separate the mouse driver into a routine that someone can copy and put into their program. This would make it easier for the few people who would still start working on this.
About the repository: One file has been properly released, and that is:
Everything else is just coincidental. I'm still working on the rest.
So the source files: #mouse_ext_r01.asm - mouse extension rom v01 In this file you can find the 220 th, and 221 th row.
This is ROM2 (you can test in yape) .romkonfig =#$01 ; romkonfig $01, vagy $02 ; You can set the id of rom bank here .toIncl1Kernal =$fdd1 ; includeROM+Kernal - ROM -ra kapcsolás -- fdd0 +.romkonfig ; You can set the id of rom bank here
This is ROM3 (you can test in yape) .romkonfig =#$02 ; .toIncl1Kernal =$fdd2 ;
This is ROM3 (you can test in yape) .romkonfig =#$03 ; .toIncl1Kernal =$fdd3 ;
The yape version is on the other branch, named yape
#mouse_ext_p01.asm - is the prg version. But it has to be builded to $f270 line 277: baseInit = $6000 ; $f270 and after somehow need a basic loader (one basic line) and a transform routin, that can move from the driver from loadad place to $f270 to run it. These 3 part is the program, but I didn't feel like doing it. .. Chest la vie... I'll do it in the future. In that time you can use the last bugfixed (not the latest) prg, that I linked in the forum earlier
I will not change the IDE. sorry. I don't want to learn again the usages.. :/ ,or I if I do it, not today..
The reason is, we have to make our RTC, because Your is licensed. The software part is need more time than the hardware, so I develop better the community to make free software to free hardware.
I'm glad I have a reseed card., I plan to buy it.. Can You mad me? IT will be better for me to can test it.
You should send me a 16UP card. How much? Can I use my plus4 somehow? (As I think yes. I can modify my driver to other address to test it.)
Pls, We discussed later the "restructure code". I don't know the assembly programing, I just do it.
I'm on 2 project too, so I have much time.
Thank you to checking my repository, and the testing too! I appreciate it!
Re: Mouse Extension v1.0 I have downloaded the 1.1 files from Mouse Extension but I have noticed that the ROM and CRT link to the same file. @Luca can you please have a look?
I have also managed to build some stuff from the GitLab sources. @bszggg, let me tell you: you are working at a nice project, but you should really try to explain things better and be more tidy. The sources are a mess! It seems like you are assuming that whoever wants to use this thing already knows how it works! This is not the case, you should invest some time in good documentation or no one will pick up your job and it will be wasted, which would clearly be a pity.
So let me help you: The mouse driver can be loaded in different ways: 1. As a ROM on a cartridge: this can be built from mouse_ext_b01.asm. 2. I think this can also be put on a ROM replacing the +4 function ROMs, but it is not clear to me how to generate this or which file from the bin download I should use. UPDATE: Oh, maybe it's the .romkonfig setting? It doesn't really help that most comments are in Hungarian as Google Translate doesn't seem to do great with it :(. 3. As a resident driver that can be loaded from disk: this can be built from mouse_ext_p01.prg but the procedure is complicated since it needs to be assembled at $f270 but then it must be copied there by a loader: such a loader seems to be included in loader.asm but that does NOT work correctly. 4. There is also a mouse_ext_r01.asm file whose purpose is currently unknown to me. Maybe it's the YAPE version?
I went with option 3 and managed to load the driver on my C16: a serial mouse through a 16UP V2 board still does NOT work, while a 1351 through a ReSeed board works to some extent: if the mouse is moved rapidly, the cursor will not move continuously but it will jump back and forth.
How do you bring the BAS programs to the actual machine? I tried petcat but it fails with sequential_file_editor.bas and tiles_exam.bas: by the way, what are these files for?
Anyway I managed to play MouseHammer and it was fun!
These is also a mouse_driver_for_basic.asm among the sources, whose purpose is again unclear to me, as that was not necessary for playing MouseHammer.
On a side note, my recommendation is to switch to a different assembler: I converted your sources to ACME and that helps a lot, since its !source, !if, !if(n)def and !pseudopc statements can simplify the code significantly (no need for manually patching load addresses, no need to repeat code - how can you handle that? Whenever you want to make a change you have to do it 3 times!). I plan to restructure the whole thing a bit and then release it, so that maybe you can keep working on it.
Re: Mouse Extension v1.0 @SukkoPera Well, it should have been logical to me due to the limited data lines it has. I need to admit I have very small knowledge on these issues, simply because I did not spent time on theM in the last 30 years. I am just a user, and we are really thankful if the matters you already helped us.
Re: Mouse Extension v1.0 Well, the RTC you linked is an i2c peripheral, how do you plan to read it? By bitbanging the i2c protocol through the userport? Doable, but then if you have a Pico, you can let it handle i2c and provide the data in some other way?
Anyway, working on building the mouse driver sources. I think a more detailed ReadMe would be a good idea, since it's just a bunch of asm and bas files thrown there, it's difficult to understand the purpose of everything...
Re: Mouse Extension v1.0 @Sukkopera nice, thank you for the info, unfortunately I did not realize. Sorry, but I did not go deeper on that card, and I may not use the i2C bus for my things, but I am sure someone else will do.
My idea, as the mouse driver became a thing, and we will have a small box on the user port for USB Mouse, we may update the GEOS too to use the USB mouse (seems to be the cheapest and coolest solution) , then the RTC is a real good update to the package, as GEOS can use it at the startup.
And if I also go after the Magic Desk +4 (a good candidate for mouse use too), the actual Date and time could be also used from the RTC when opened. (we may swap the 3+1 ROM to something more useful and impressive? Certainly this one is just a mockup / concept art)
Re: Mouse Extension v1.0 @MMS : He-he.. igen.. ezen is gondolkoztam, de azt meg be kéne rakni szoftveresen induláskor a ti$ helyére
A "Raspberry Pi Pico 2 W" -n van wifi adapter is. későbbre a párhuzamos portot lehetne etetni vele..
@ALL:
De ami még fontosabb, hogy a felesleges portjaira megcsinálható lenne, hogy annyi ideig ad jelet, amennyi az elmozdulás mértéke... És azt meg bekötni a JOY portra. És akkor mindegyik olyan program automatikusan egér kompatibiilissé válna, amelyik joy-jal egérkurzort vitt. (a gyorsaság meg esetleg állítható lenne) Ez lenne az igazi zsenialitás! A szoftver a pi-be nem lenne gond szerintem.
Mindegy.. egyelőre maradjunk annál, hogy a miostani dolgok legyenek.. aztán majd meglátjuk az ötletelés hogy futja ki magát....
Re: Mouse Extension v1.0 @MMS: He-he.. yes.. I've thought about this too, but it should be placed in the software at startup instead of ti$.
The "Raspberry Pi Pico 2 W" has a Wi-Fi adapter. Later on, the parallel port could be fed with it.
@ALL:
But more importantly, the unused ports could be programmed to give signals for as long as the movement distance is... And that could be connected to the JOY port. Then every program that uses a joystick to move the mouse cursor would automatically become mouse-compatible. (the speed could potentially be adjustable as well). This would be true genius! I don't think the software for the Pi would be a problem.
Anyway... for now, let's stick to the current tasks... and then we'll see how the brainstorming unfolds...
Re: Mouse Extension v1.0 I really like the idea to use cheap BLACK USB mouse for Plus/4 instead of the non-working and expensive beige RS-232 mouse
@George: how big flash the Pico type needs? I suppose 4MB should be more than enough for this code, right? would tah be enough? "Raspberry Pi Pico RP204 (4MB flash usb-c)" (it could be micro-usb too) (unfortunately your video disappeared...)
I think the voltage converter linked by George is pretty neat and cheap. Raspberry Pico is also pretty cheap.
@bszggg yeah, sure I will help in that! The scene needs mouse, and it should be cheap and affordable, and easily available. I may support the bulk purchases of components, but I am not experienced in making a PCBA design and produce it. It is a shame, as I work at one of the biggest EMS supplier within Europe (mabye top four or three)
I mean we need an integrated small box, the Pico and voltage converter on a small pcb, all within a small box, connected to Userport and USB socket on the other side. I think we need a 400 hole breadboard, the one with 170 holes look too small.
BTW if we already designing a User port little box and integrating circuits into one complex unit, why we do not add a new function, a battery powered Real Time Clock too? :-) (it is on my desk, do you need one? :-) )
The easy RTC worked out by Timo V. on C64,but it should work almost the same way on +4 too https://sites.google.com/site/dividedbit/home/c64-projects/ds1307-rtc
Re: Mouse Extension v1.0 @bszggg It costs 1,60 EUR: https://www.ebay.de/itm/166715696299 here are the schematics : https://www.youtube.com/watch?v=hAB_X5EBtyU
Re: Mouse Extension v1.0 @George Your idea is good to makd a cheaper serial mouse to plus4 than find in the market. So I checked the rasberry pico, 2500ft/db And after I try to find a voltage converter, but it is a horrible cost: A395 Logic Level Converter TXB0108 4500Huf/Db Maybe, If we can handle the voltage converter cheaper, we can made the little converter to use the USB mouse in RS232 port in Plus4. Another found is the "seeed studio xiao" that is cheeper. But it seed a voltage converter. So, wich one do you use?
@MMS Do you think, we made somehow a converter more than one? I can do the programming side I think, that is simple.
the Shufflepuck Cafe is a great idea.. It needs to handle the graphic in assemlby.. that is not my cup of tea.
If somebody interested is any mouse softvare to write, I can help the assembly driver for handling it. I have a GIT repo, and I can fill out just the the driver for that! I can share My experience!
Re: Mouse Extension v1.0 Well, there is one specific game in my mind since years that could be realized only with a mouse: the classic Shufflepuck Cafe!
It could also well utilize the DAC sound we recently got, Sukkopera's great 1 channel (cheaper) and 4 channel DAC output or even Digiblaster. NST's SID card or ReSeed from @SukkoPera would be ideal for this game, as they provide the necessary mouse port and the necessary digi sound playback too, and available for C16 owners too. The other digital sound cards will require the RS232 (or @George's USB) mouse on User Port.
It was a great game, even with black&white (but sharp) graphics it was great fun on Macintosh. Certainly the Aaiga and Atari ST versions were much better.
To be realistic, the CPC version is the closest thing we may get.
About Mouse Hammer: - what did you mean with "kill mouse with mouse"? Are the "bubbles" the mouse itself? - set a game's genre, I've choosen Game/Action - upload a thumbnail too, thumbs and main are what's needed, title is optional - set the minimum memory required, this is for 16kB
The multiple ROM BANK version is helps as to use somehow in the c16 too. There is ACIA adapter for serial mouse. but I don't know, how to put some rom into the machine. Maybe it will be some solution..
It contains a lot of bugfixes. - Fix unneeded jumping as it possible (serial, and 1351 mouse) - Updates cursor smoothness (serial, and 1351 mouse) - Different ROM BANK versions - Yape versions for earlier emulator
The different ROM version helps us to use the driver cartridge with other extensions (3-plus-1 and Basic V7.0) Maybe it helps to let the C16 owners to use it somehow, with a cartridge, and a serial adapter
# Normal version
The uploaded zip contains 3 types of cartridge rom, 00 basic kernal 01 3+1 -> mouse_extension_v1_1_bank01.bin 02 -> mouse_extension_v1_1_bank02.bin 03 Basic7 -> mouse_extension_v1_1_bank03.bin
# The "Y" Version: 1.1Y is a yape version, you can try it at ROM _BANK 02
The Yape version because of the Y axis handled wrong direction. So in this ROM image helps us to use in the Yape. So we can try other softwares too, that written with this driver
@Luca I made a new program with 114866 id, and I upload the mouse_extension_v1_1_crt.zip but I can't fiind, where will be the result.
I try to this urls: h...s://plus4world.powweb.com/dl/utils/m/mouse_extension_v1_1_crt.zip h...s://plus4world.powweb.com/dl/mouse_extension_v1_1_crt.zip but these doesn't works..
I would like to do that with my hands, where can I find the file, and how can I push into the software page. So you don't do it, just write it, how I can do it.
mouse_extension_v1_1yape_early.zip is a yape early version - we can use in yape If it contains Y axis bug. (Later version maybe will fixed) mouse_extension_v1_1_crt.zip (Last uploaded) is th version 1.1
---------- FYI: The "b" ->boot version unfortunatelly doesn't works with 3+1 ROM, so I'll do some fix in the futute.
Re: Mouse Extension v1.0 @MMS The old versions are handling the rs232 mouses too. The bigger problem was in the old version of driver with the simple sidcard with 1351 mouse. And the new version contains more smoothness for rs232 and 1351 too
Thank you for the nice words. This solution works really smooth!
1) Yes. A Pico should work! The pi is overkill. 2) You don't need a Max232. I use a levelshifter here 3.3V to 5V. In theory you can leave this out too uns connet directly to the pi.
Re: Mouse Extension v1.0 @bszggg : thank you for the new version! As I see, George tested the USB mouse with the V1.0, not with the latest version? So it will also work? Just because @YTM's TCBM2SD devices have EEPROMs were loaded with your v1.0 Mouse driver. So it means even without upgrade they could be all right with George's solution?
@George Yeah, this is great news, and thank you for sharing this success. I have the same bloody Genius mouse, even more I own two of them :-)
I was fond of this project originally (maybe 10 years ago?) as the 1351 mouse and the SID card was pretty expensive together, while the MAX232 converter circuit and the RS232 mouses were both really cheap. Yeah, the situation changed a little. While the Max232 circuit is still cheap, the old RS232 mouses because pretty expensive, especially the Microsoft and Logitech ones (seems the others use different protocols, does not help here)
So The Rasperrby PI + USB mouse + Max 232 circuit combination is the easiest and most simple way now to get a working mouse on Plus/4. Thank you for your efforts!
Questions: 1) Do you think the Rasperry PI Pico would be enough for the task? It is pretty cheap and small to even integrate it into a common housing with Max 232 circuit (also not too big)
2) As we see now the mouse works perfectly, could you tell me, which signal you use for the mouse from the Max 232 circuit? The Tx (as I documented) to be connected to User port C pin, or the Rx signal of the Max232 circuit need to be used for the task? (as you remember I made the documentation from memory asI lost my card during my relocation)
I finalized the version 1.1 cartridges. How Can I upload? Add release? Maybe it better to just eliminate the "v1.0" in the name.. And after how can I upload the new versions in download section?
There is a new catridge, - Version with a lot of updates and fixes. Marked as: v1.1 - and a yape version. Marked as: v1.1Y - and a surprise version. Marked as: v1.1B -> (that is a driver with machine auto boot)
We discussed some things with @George , so I don't answer here now. @George ? It it ok?
and Last One an anniversary: I'm happy to write the more than 100th answer to my topic. :)
Re: Mouse Extension v1.0 @bszggg: i tested the aa.prg. It does not work.
Question to @all:
I managed to convert the USB Mouse Protocoll via Python into the Microsoft Serial Mouse Protocol on a Raspi 4b. The serial data com out from the GPIO P I connected PIN 8 (Rxd Pi, 3.3 V) to Pin C (Userport, +4, 5V) and Pin6 (GND Pi, 3.3 V) to PIN N (Userport, +4, 5V)
GPT says this could work, but it doesn't. I am no electonics expert, so i would apreciate some ideas how to proceed furter. The materails i have here arelimited.
I tested the outcoming data from RXD via input loop TXD on the pi. Datas are correct.
Edit 2025-01-29: I bought a Level-Shifter and configured the Userport to the right Parameters (OPEN Command)r, And it works now. I can transfer bytes to the Plus/4.
I simulate the Microsoft Serial Mouse Protocoll, (3bytes) but the Mouse-Driver does not react. Question: How do i have to send the Mouse-Data to the Plus/4 over Userport? Which Protocolls are also supported? Any help apreciated..:)
Re: Mouse Extension v1.0 Some feedback: I bought a new Maxx232 and wired it correctly (3 wires) and tried out with this serial Genius Maus: (Link: http://www.tcocd.de/Pictures/Peripheral/Genius/easymouseproserial.shtml ). Got the same behaviour as @Andras. The cursor also jumpes around when i put my hand near or touch, move the wires 20cm (magnetic induction pehaps). I guess this mouse uses another protocoll.
Has somebody tried a blue Microsoft Home Serial Mouse like the one in the documentation of @MMS? Otherwise i would wait until the new driver is ready and i would prefer to hook up an USB mouse with adapter.
Re: Mouse Extension v1.0 @Sukkopera sounds great, thank you for your efforts! Skipping and swapping the non available ports to existing ones may extend the lifetime of the machine.
Re: Mouse Extension v1.0 @MMS: Right, but Solder used 50-pin connectors with 2.54mm pitch, which are no longer common. The only common connector of that type that is still easy to find is the 44-pin version, which is the same one used on the C64.
So yes, we need to drop 6 pins and I already spent a lot of time on that problem, for which I think I found a good solution: I already have a working expander very similar to Solder's and some modified boards that work very well in it, including a new and more powerful OpenC16Cart and a ReSeed card.
But we'll discuss about this in the future, let me release L16 V4 first (it is now imminent, probably next weekend!).
Re: Mouse Extension v1.0 Yepp, a very similar method worked out by Solder too, because seems this C16 connector (despite the old PC PCI connectors) does not exist at the shops, while the C64 expansion port connector is easily available. Even with the PCI connector manual crafting is necessary, I heard it is troublesome.
The question which lines we need to drop I see 3 NCs, but there are several duplicated GND and 5V lines
I had a similar question to myself, I was thinking few years ago an external expansion box, and I though it would be great to lead all the signals with a good quality cable to an external box with card fixation pointa. The SCSI2 Half Pitch was 50 pins, so each pin (even the NCs) could be connected...
Re: Mouse Extension v1.0 @ytm: Heh, this would deserve a dedicated topic. It was my intention to open it in the future, because even if I already made the adapter for my own usage, I haven't released it yet and I'm open to discussions before I make it public. But before we get to that I wanted to release LittleSixteen V4 and the mechanical keyboard.
But I'll send you an email .
@bszggg: So you needed a userport splitter, not an expansion port splitter...
The problem with the Expansion port splitter is that the +4 connector is nowhere to be found. I have made my own splitter but it has 44-pin C64-style connectors. Of course I have redesigned some boards so that they plug in there, but not yet 16UP.
It is not mandatory to use it. If it is, it can be configured to work differently. Booting is a good thing, but it is not always necessary. It may depend on the way it is used. It may also be that someone wants to boot from 8 because they need a game launcher because they want to play games, but I want to boot from 9, because I have a lot of games there, but I interrupt it because I want to programming, and I use the 8 for current developments. Or I need to boot, but not with a mouse, because it is not compatible with everything. And I don't want to press buttons for this, while switching between current modes. For me i can take several weeks in one mode.
Everything will work without it.. you can also change the card.. it this hardware is absolutely not necessary.. It is just an extra.
and I don't want it to mess with the wifi network card / modem in the future, because of this it should release the user port a few seconds after the machine starts.
Re: Mouse Extension v1.0 Just a question: I suppose a "normal" C64 User Port splitter could do the job.
There are some projects there, and because the ground, the voltages are at the same place and the rest are just signals they should work without problem (in fact, preferable both splitter should have an external 5V power source, I think 9V is hardly used).
At the same time I have to mention, that I could not find any with DIP switches, and frankly speaking, it is beyond me (despite the explanation) why it is required. Or the other devices would do weirdo things as no addressing is possible otherwise?
Re: Mouse Extension v1.0 Great, I have been learning some assembly, so if you share the code I'm sure I can get serial mouse working properly on 16UP. I think 1351 was working fine on ReSeed the last time I tested.
The problem with the Expansion port splitter is that the +4 connector is nowhere to be found. I have made my own splitter but it has 44-pin C64-style connectors. Of course I have redesigned some boards so that they plug in there, but not yet 16UP.
I think I can help with the other piece of HW you're asking. Give me some time .
Re: Mouse Extension v1.0 @bszggg: Some mice work by first sending an identification string when they are "switched on", and only then do they start sending movement data. Since the power is taken from one of the serial port signals, the driver can turn the peripheral off/on. So the computer can access the identification string with a mouse power off/on, but there is still no data sent to the mouse.
"However, the mouse never receives any data from the computer!" Actually it ispossible in some case, because the plug&play in windows do it.. I read it somewhere. I made the decision I'll not write it in my driver code.
"BTW, are the driver sources available?" Yes. it is open, and I 'll upload the new-est driver too. Unfortunately at moment the new things in it a half of done, but In February I'll plan finalize and pack a new version from it.
In the pipe there is a new driver version. It close to fine. That will contains lot of bugfix and some changes. There will be ROM versions too, and a BOOT ROM that can load a prg after start.
@everybody
I'll need two new hardver. 1:- expansion port splitter (I have some bad base panel with the expansion ports) 2:- an user port extension, where I can set a byte with dip switch. And the first 2 sec, after boot, it can readable from the 6529b IC. After that it can be let it go, to can use the 6529b to other functions. It need to an other side where I can plug another extension too.
The 2. hardver is need because we can set the driver autostart, and boot properties. (do it or not, and which drive to use the boot)
Re: Mouse Extension v1.0 @MMS Ha lesz készre forrasztott paneled, szólj és egérrel együtt elviszem. Túl sok energiát fektettem bele. Tudni kell feladni
Re: Mouse Extension v1.0 @MMS If you have a fully soldered panel, let me know and I'll take it, along with the mouse. I put too much energy into this already. You have to know when to give up
Re: Mouse Extension v1.0 Sorry i confused the userport with the expansion-port, because i was also looking at a Expansionport-project. Everything is ok.
Re: Mouse Extension v1.0 Actually you should ask @bszgggg, he's the author of the driver. I didn't have much luck with the two mice I have, but I should try again.
Re: Mouse Extension v1.0 @George A bővítőport rajza elölről nézve van. El kell képzelned a csatlakozó forrasztásához ezt. @SukkoPera Köszönöm. Először szerzek még egy soros egeret. Van ajánlott típus? @MMS Ha lesz kész táblád, szólsz? És tőled ugyanezt kérdezem. Van ajánlott egértípus? Sanszos, hogy az egér nem működik együtt a Plus/4-el
Re: Mouse Extension v1.0 @George The expansion port's drawing is shown from the front. You will need to imagine this when soldering the connector. @SukkoPera Thank you. I'm going to get another mouse first. Is there a recommended model? @MMS When you have your board ready, will you let me know? And I'll ask you the same thing. Is there a recommended mouse type? Chances are, the mouse doesn't work with the Plus/4.
Re: Mouse Extension v1.0 Hi, my batch is in preparation, the RS232 Max interfaces are ready, but still the 64K RAM upgrades are in preparation. I will let you know when my DHL started
@George: as on the assembly picture: I made the picture about the User connector in the way as you need to assemble it (from the back side), so looking to the Plus/4 User port from outside (on the picture you see the assembly side of the user port connector you need to plus to the Plus/4)
Re: Mouse Extension v1.0 I think i soldered the mouse adapter in the wrong way..finding contraticting pinlayouts of the expansion port. When i look from behind on the Plus/4 - Expansion port, where is Pin1? (on the c64 its top right)
Re: Mouse Extension v1.0 @Andras: I can send you a PCB but you would have to buy the components and solder them. PM your address if that's fine for you.
In alternative, maybe you can get a ready-made board from @MMS as soon as they are available?
Re: Mouse Extension v1.0 @SukkoPera I'm giving up on the project. The panel is ready. The mouse cursor starts at the first start. It bounces back and forth across the screen. After that it stops and no matter how much I restart it, it doesn't do anything anymore. Please contact me by email.
Re: Mouse Extension v1.0 I understand what you're saying and I'm not arguing with you. I just don't understand why if I go to the Highlands or Vienna to shop, there's not 27% VAT on the stuff. I'd like to pay more tax. :D :D :D
Re: Mouse Extension v1.0 it could be valid only if they imported the goods from China (place of production after the order). Maybe it is not produced within EU (to save cost), just they are not fully tranparent.
Re: Mouse Extension v1.0 @SukkoPera I have a sick brain. I am attracted to the challenge and learned a lot from this conversation. But if I am not happy with the soldering, I will accept your offer with thanks :) @MMS Vigasztalódj, a C64 Ultimate2+ crt-re is ráraktak a hollandok 27%VAT-ot, a magyar szabályoknak megfelelően. Nem értem miért. Ha kimegyek Hollandiába és megveszem személyesen, alacsonyabb lenne rá az adó.
Re: Mouse Extension v1.0 Hi, thanks for the hint. I ALMOST ordered 10 V2 yesterday, but somehow it became too pricy, so I have up yesterday till I found the cause. Today I think I found it.
The Plus/4 User Port adapter by default uses HALS finishing with lead, while the C16 V2 with built in RS232 has ENIG (Immersion Gold. ENIG finishing results double price! So If I switch back to HASL, I get 30 USD for 20 pcs, certainly assembled.
I do not mind a little lead, I always wash my hands before eating.
Funny thing, that Immersion Tin (IT) is more expensive than Immersion Gold (20 pcs with ENIG is $66USD, while IT in $88)
Update: why they add Hungarian (highest on the world) 27% VAT to shipping too? I need to consider and ask this.
Re: Mouse Extension v1.0 I think the mouse will work on the C16 with the 16UP V2 board without any changes in the driver (it's pure serial communication), but my recommendation would be to use 16UP V3 + the normal Plus4Serial adapter board.
Re: Mouse Extension v1.0 @SukkoPera Certainly I bought the fully assembled version. My plan is a givaway action to gain market share for the new important mouse standard
Yeah, I read the C16 versions difference. I suppose it will require driver change too... The HW modification listed sound is important
Re: Mouse Extension v1.0 @Andras: As I see it, not being proficient in electronics would be a good reason to do the simplest thing possible, which in this case would be to get a ready-made known-working PCB and solder the components on it. If you asked for one I would have even sent it to you for free. I can still do that by the way .
Re: Mouse Extension v1.0 It would help to recommend the specific products you succesfully tested with the plus/4. The specific adapter and model of the mouse that worked for you. Otherwise its always try and error.
Re: Mouse Extension v1.0 @SukkoPera I read what you wrote. Although you didn't address me, you wrote about me. I'll explain it to you. I didn't know that you could buy a ready-made circuit on the Ali Express website. That's why I bought the components and the test panel for pennies in the city where I live. The circuit diagram in the PDF is wrong. I'm not an electrical engineer. But I'm excited by the challenge and I want to improve in this field. What is clear to you, I only find out after asking questions.
Re: Mouse Extension v1.0 @MMS: May I ask if you bought those assembled or just PCBs? But anyway you are right: that adapter implements the same circuit as the mouse document and I have tested serial communication in both directions and all the signals individually. It is also definitely able to power a mouse correctly. PCB and components are cheap, so I really don't know why someone would take the trouble of building something else and not even look at the schematics, but well...
Be careful with the 16UP with the integrated serial port: the RTS/CTS/DTR/DSR/DCD signals are controlled by the serial port and are not exposed on the userport connector. Some hardware for the userport requires those and thus won't work correctly. That's why I came up with 16UP V3 + Plus4Serial. I would have some ideas to get everything working on a single board but... maybe in the future .
Does the capacitor C3 in the PDF have to be connected to +5V? The picture you shared in the forum shows otherwise.
The cropped image includes a note that reads: "C3 can be connected to Vcc or GND."
Should I build it according to the picture (positive pin to pin 2 of MAX232, negative pin to pin N of the User port) or according to the pdf (negative pin to +5V, positive pin to pin 2 of MAX)?
Both versions are correct according to the documentation. (The negative pin of the capacitor should be connected to either GND or Vcc.)
I just ordered few days ago 20pcs, if you will be interested later. buying more at the same time significantly reduces the assembly cost and the transportation cost (per piece).I ordered it with DHL I suppose I will have them within this year. I think it will be perfect for the job.
The big benefit of SukkoPera solution, that it already has the male DB9 connector, you can directly connect the mouse to Sukko's solution, not to mention the User port connector you need to search and buy otherwise.. The below listed Max232 Circuits all uses female DB9 connector, so I needed a DB9 Male to Male interface (as you could see on the picture below) to able to connect RS232 mouse that had female connector.
For the C16 and C116 owners (my main platform due to PSU issues) SukkoPera designed a UserPort + BUILT IN RS232! Wow! https://www.pcbway.com/project/shareproject/16UP_User_Port_Cartridge_for_the_Commodore_16_116_and_Plus_4_2d0ad268.html
I suppose SukkoPera could have been really rich in the 80s with all these cards he designed Too bad I cannot make it granted for now, he would deserve it.
An other almost ready solution (still need more parts and some soldering skills, DuPont cables) is the ready Max232 Citruit shown on the picture, and referred in the document. Funny, but the whole circuit with all the other components, RS232 connector and PCB sometimes costs less thjan if you just buy a Max232 IC. So worth to consider: https://www.ebay.com/itm/254996908410
Re: Mouse Extension v1.0 @BSZ Thanks for the information. You are right, the User port is not RS232C. It looks like it, but it's not, sorry for the mistake.
Last question. Does the capacitor C3 in the PDF have to be connected to +5V? The picture you shared in the forum shows otherwise. Should I build it according to the picture (positive pin to pin 2 of MAX232, negative pin to pin N of the User port) or according to the pdf (negative pin to +5V, positive pin to pin 2 of MAX)?
I have a User port test panel, I want to build it on it. If it works, I'll share the wiring diagram with you. Thanks for all the help Ps... https://www.theengineeringprojects.com/2017/07/introduction-to-max232.html
Re: Mouse Extension v1.0 @BSZ: I fully agree, Plus/4 has TTL level signals, that's why the Max232 IC needed
Others: I suppose we should not mix here the REAL RS232 mouses and the PS/2 serial mouses. despite the PS/2 mouse cam emulate the RS232 mouse protocol (that's why a lot has such an interface and it works) , the PS/2 mouse could have three different protocols, and communicate much more and much different than an RS232 mouse.
Using a PS/2 mouse witha converter may lead to communication issues and frustration.
so we need pure RS232 mouse here with DB9 connector, as seen on the picture.
Re: Mouse Extension v1.0 There is a lot of nonsense on the internet about serial port RxD/TxD. I'm not even going to get into this topic, I'll stick to the serial mouse.
The serial mouse is a stupid animal, you can't talk to it. When something changes (moves, button changes), it sends the new state to the computer via the TxD line. This TxD line is output on mice, and is of course connected to the RxD line of the computer, which is the input. (In the case of plus/4, you need an interface circuit between the two devices, this is done by MAX232. And here I would also ask everyone: nobody should call the signals on the plus/4 USER port RS232. If it were RS232, there would be no need for the level-converter.)
However, the mouse never receives any data from the computer! The computer's TxD line therefore does not need to be connected. But... The mouse's RxD line (which could be controlled by the computer's TxD line) is used occasionally, and some serial mice get their power from this line. (Other serial mice are not.) In the linked documentation, you can see that the mouse connector has the RxD + TxD line connected to the MAX232, but only the mice's TxD line connected to the computer's RxD line.
Please let me know if you find any bug in the documentation linked. I am not a HW guru, and admit I culd make mistakes. There were some disputes on the Tx and Rx usage at different places. There are some C64 circuits, using these ports differently.
According to my memory (several years ago when I built the interface) and BSZGG's nonexisting documentation (before this this was created) logically the "sending data" (Tx) need to be connected to the Plus/4 "receiving data" (Rx) input, like in case of null-modems.
I bought complete Max232 circuit from Aliexpress (very cheap), so you have all the RS232 connector and the input and output lines (Tx,Rx) next to the ground and +5V connection you can use with DuPont cables.
So in the documentation the Max232 circuit's Tx (Transmit) signal connected to the User Port's Rx (C Pin). It is quite logical, but please tell me if I was wrong, and it works inm the opposite way.
Re: Mouse Extension v1.0 @BSZ Köszönöm a választ. Kezd fény gyúlni az agyamban. Továbbra sem tudom viszont, hogy a Plus4 S232 portjának melyik labára kell kötni a Max232 IC 12.lábát... Ha a Tx az RxD-re megy, akkor az Rx az M (TxD)-re kell legyen kötve?
Re: Mouse Extension v1.0 @BSZ Thanks for the answers. It's starting to make sense to me. But I still don't know which pin of the Plus4 S232 port the Max232 IC pin 12 should be connected to... If Tx goes to RxD, then Rx should be connected to M (TxD)?
Re: Mouse Extension v1.0 You can find answers to these questions in the MAX232 datasheet, but I have copied a part of it:
Which pins of the MAX232 IC should capacitors c1-c5 be connected to?
1, 2, 3, 4, 5, 6, 16, see above.
Is the part of the capacitors marked in black the positive leg?
Maybe, but not for sure. The sure thing is the datasheet.
Should the positive leg of the capacitor c3 be connected to +5V?
The mouse interface hardware description says: yes.
Can the ground of the capacitors c5 and c6 and the leg 5 of the dsub be connected to the N leg of the RS232?
This question is not fully understood, but yes, the listed pins are all GND.
Should the leg 12 of the MAX232 IC be connected to the C leg of the RS232 port?
The above drawing (mouse interface hardware description) seems to be wrong: the MAX232 pin 12 is TTL output, this should be connected to the RxD input of the USER port, I think.
Should +5V be connected to pin 2 of the MAX232 IC?
No! Pin 16 is +5V, see the drawing above.
Edit: I have never used the above mouse interface electronics, however, I have used the MAX232 a lot. To me, the schematic in the linked documentation seems too simple. One problem with serial mice is the power supply, there were several ways of doing this in the past. For this reason, it is possible that an "any" mouse will not work even if the interface is otherwise good.
My questions: Which pins of the MAX232 IC should capacitors c1-c5 be connected to? Is the part of the capacitors marked in black the positive leg? Should the positive leg of the capacitor c3 be connected to +5V? Can the ground of the capacitors c5 and c6 and the leg 5 of the dsub be connected to the N leg of the RS232? Should the leg 12 of the MAX232 IC be connected to the C leg of the RS232 port? Should +5V be connected to pin 2 of the MAX232 IC? Sorry if I ask a lot of questions. I have little knowledge about reading wiring diagrams.
Re: Mouse Extension v1.0 Hi all, I got an interface from MMS and did the wirering according to the manual. I have this mouse here. Should this mouse work? (because it doesn't) Any general ideas what i can try out to track down the error? Link: http://www.tcocd.de/Pictures/Peripheral/Genius/easymouseproserial.shtml
I think you're talking about the /CTS bug mentioned by @TLC here: https://plus4world.powweb.com/forum/45374
Yep, looks like that indeed.
The 6551 and it's descendants used to have a couple of nasty bugs, but the ugliest one is clearly this "transmitter is immediately shut down upon CTS going inactive" thing. The guys have worked it around in the Plus/4 design for a reason.
but anyway I don't think mice use flow control signals
They don't, I mean other than drawing supply current from the port. I used to be playing with this as well (had a somewhat working HID library maybe two years ago), I have tested both Microsoft and Mouse Systems derivatives during the work, and they all worked off from a stock VIC-1011A interface cartridge + a gender changer, and also a late VIC-1011A compatible regular User Port RS-232 interface, just by setting up the port the right way. Maybe one specialty, AFAIR one of the supply voltages is supplied by DTR (can't really recall), and this appears to also have a special function on Microsoft Mouse derivatives: upon toggling it on first, the mouse spits out a PnP identification string, before it'd enter "regular" mode. (The identification mode can be repeatedly activated by toggling the control line off, and on after some time.)
Re: Mouse Extension v1.0 I'll be happy if @Sukkopera, or somebody else test it in reseed, and works well. I can let it go the c16up. I'll be happy to know there is one type mouse that can be use on c16(64k)
Re: Mouse Extension v1.0 I think you're talking about the /CTS bug mentioned by @TLC here: https://plus4world.powweb.com/forum/45374
That was already worked around by Commodore by permanently connecting the ACIA /CTS pin to ground and handling the userport signal in software. 16UP does exactly the same, but anyway I don't think mice use flow control signals, I will check ASAP (I'm currently trying to fix an A4000 with the oddest video issue ever: red and green swapped...).
Re: Mouse Extension v1.0 Well, just my 2c, although I am really not a HW guy: as far as I know, that the MOS6551 ACIA has a hardware bug, and does not work according to the specification sheet in all cases.
I am not a big expert of the matter, but I member may Roberto mentioned, that the old Commodore 2400 baud modems also worked with the Plus/4, but only if they insulated a certain pin on the user port. I mean a bit in the handshake did not work as expected and blocked the communiation, it should be kept always 0.
I found a video, stating it is only the WDC6551, but AFAIK the MOS6551 had the same bug. The explanation starts somewhere at 15:00, and how to circumwent this from SW. https://www.youtube.com/watch?v=CnA8nG3zYHw
But my original RS232 mouse +MAX232 worked with bszggg's ancient code, and his code also worked for him too. so maybe the code became more sophisticated on the RS232 and may cause that specific bug, really linked to byte transmit protocol.
I am not sure if it is reallylinked, but I hope you can use this info (if was not known yet)
(no topic) Habár nem vagyok járatos a HW cuccokban, úgy rémlik, hogy a 6551-nek van egy hardver hibája, ami állítólag jól ismert és jól dokumentált. A soros kommunikációval kapcsolatos. A csatolt videóban a 15.perc környékétől magyarázzák el az adott regiszter működése miképp blokkolja az adatátvitelt és miképp kell megkerülni.
Természetesen nem tudom, hogy tényleg köze van-e ennek az RS232 problémához, remélem valami használható hozzászólást küldtem, nem valami teljesen evidens dolgot. A régi (ősi) kóddal $4000-en egyébként jól működött az RS232 egér + Max232 kombó.
I correct a lot of little things. restructured part of code.. I tested with CAE in solder emulation mode. (It works in yape too, but the Y coordinate is changed in yape)
#ACIA side: I don't have any idea what is the problem. in the acia expansion on c16
I tested it more than 1 plus4. I can't use any ACIA detection just the initialisation..
aciaInit LDA #$00 ; Init the acia chip for serial mosuse 7bit + 1stopbit, incoming STA .aciastatus LDA #$01 ; 05 volt régen, de az akkor kell, ha küldünk is STA .aciacommand LDA #$38 STA .aciacontrol RTS
And after just waiting the incoming bytes.. in the interrupt
LDA #$80 BIT .aciastatus ; check acia interrupt (bejövő RS232 egér adat) BPL contx ; egér bájtot berakni a saját pufferünkbe addPuffer LDA .aciadata ; ACIA INCOMING BYTE LDY .pufferstart INY CPY #$09 ; pufferlength BPL contx ; ha a pufferstart kisebb vagy egyenlő pufferlength-nél, akkor nem tesszük le STY .pufferstart STA .pufferstart,y ; save to puffer
Nothing else.. So I don't have any idea, what is the problem in my code.. Why is not working with the 16up. If you have Tell me..
I think we can ignore JiffyDOS for the moment. Knowing that the driver is not compatible with it is probably enough for now.
Yes, those schematics are for the original SIDcard by Solder, which is what ReSeed is based upon, but you can also take a direct look at the ReSeed project design files since it's a totally open project.
Anyway it works the same as Solder's SIDcard, which in turn should be the same as CAE/NAE in "basic" mode, i.e.: SID registers are mapped to $FD40-$FD5F (and additionally to $FE80-$FE9F) but you are already reading these correctly since the mouse moves well when I hold the left mouse button. The joystick interface, which you need to read for the buttons, is mapped at $FD8x, you just read that and the lowest 5 bits will report the status of UP (bit 0)/DOWN (bit 1)/LEFT (2)/RIGHT (3)/FIRE (4), with 0 meaning pressed and 1 meaning released.
The 16UP card was designed to be fully compatible with the +4 userport, meaning that when it is plugged in a C16 it will be able to run all the +4 software using it (except for this issue, which has larger implications anyway, as you will notice). The ACIA is available at $FD00-$FD03 and the parallel port is at $FD10, just like a standard Plus/4. There might be issues if you use other addresses from the $FD1x range but that is because my machine also has a 256k Hannes-style RAM expansion, so please stick to $FD10 only. If you want to send me a program that just does the ACIA detection, I will test it.
16UP is also an open project BTW, all design files are available here.
I think I have been trying to collaborate enough, as I'd really like to get this working on the C16. I can also arrange to send you some cards but that will take some time.