Login
Back to forumReply to this topicGo to last reply

Posted By

bszggg
on 2023-12-24
12:37:30
 Plus4 mouse (driver) for BASIC

Hi!

I wrote driver for mouse for Plus4 BASIC.
It is one driver that handles the ACIA serial mouse and also the AMIGA mouse on BSZ's SID card (I choose the digital mode for 2 buttons)

That is downloadable from here:
https://bencsikszilveszter.hu/plus4/plus4/plus4.htm
PLS: choose the left side menu -> "Egér (mouse)"

for English, you can copy this direct url to a translator (without html frame): https://bencsikszilveszter.hu/plus4/plus4/eger.htm

I wrote some test basic programs too.
I will be happy if somebody can test it.
THX!
--------------------------
Later I will publish the source code as a free software, and I will be happy to be lot of software that handle mouse on plus4

My ideas:
-write not just the test version that runs at $6000 -> need to move to upper memory area
-maybe handle the 1531 mouse .. Maybe .. :/ but rather not, because it is a little hell
-Write software that use it. , not for just test. THX!
-keep the compatibility with OCTASOFT BASIC 7.0

AND if you have some idea for it, just write me!

 Plus4 egér (driver meghajtóprogram) BASIC számára

Sziasztok!

Írtam egérvezérlőt a Plus4 BASIC-hez.
Ez egy driver, ami kezeli az ACIA soros egeret és a BSZ SID kártyáján lévő AMIGA egeret is (digitális módban a 2 gomb kezeléséhez)

Letölthető:
https://bencsikszilveszter.hu/plus4/plus4/plus4.htm
A bal oldali menüből klikk a -> "Egér (egér)"

fordításhoz ezt a közvetlen url-t másolhatod ki (html keret nélkül): https://bencsikszilveszter.hu/plus4/plus4/eger.htm

Írtam néhány alap tesztprogramot is.
Örülnék, ha valaki kipróbálná.
KÖSZI!
--------------------------
Később a forráskódot ingyenes szoftverként fogom közzétenni, és szívesen látnék sok olyan szoftvert, amely kezeli az egeret plus4-en

Az én ötleteim:
-nem csak a $6000 -ről futó tesztverziót írni -> mozgatni kell a felső memóriaterületre
-talán kezelje az 1531-es egeret .. Talán .. :/ de inkább ne, mert az egy kis pokol
-Írni szoftvert, amely használja. , nem csak tesztre. KÖSZI!
-OCTASOFT BASIC 7.0 kompatibilitás megtartása

ÉS ha van valami ötleted, írj!


Posted By

Csabo
on 2023-12-24
12:50:25
 Re: Plus4 mouse (driver) for BASIC

Great effort, thank you for sharing! Comments sent via PM wink

Posted By

BSZ
on 2023-12-24
17:55:05
 Re: Plus4 mouse (driver) for BASIC

Great! I hope there will be lots of programmes! If the gameport is already there, let it be used! happy

Posted By

bszggg
on 2023-12-27
20:42:57
 Re: Plus4 mouse (driver) for BASIC

Here is the source code of the working driver:

https://gitlab.com/bszggg/plus4mouse

Please use it for other softwares free! happy

This is my first assembly code, so please be patient. wink
I tried to write a lot of comments for that.

Posted By

MMS
on 2023-12-28
14:44:12
 Re: Plus4 mouse (driver) for BASIC

A working mouse on Plus/4 was a long term dream of mine.
It is great, that such a simple Max232 ciruit could be supported with a driver to have RS232 mouse, not to mention, we now we have that User Port for C16 too.

Within 1 year (as I calculate) we finally have a real use of SID card's Joystick port, New hardwares for the User port, and even User Port for C16.
What a year!

Thinking about bszggg's concept, next to the great use of mouse in eg. Arkanoid, the much easier editing and handling of GUI.

Don't take me wrong, GEOS is great, but simply still too slow, and only 1551 compatible. Cannot run from SD2IEC or SD/1541/II. What a missed opportunity.

How great would be mouse conbtrolled GUI to start from ROM?
It would be a great community effort to swap the integrated 3+1 package to something similar to the Commodore Magic Desk package, released for C64, but originally planned for Plus/4 too.
32KB is not so much, but still something. Should work with datasette too :-)
-Easyscript C64, one of the most complex and full featured text editor of it's time (with several thousand line long (even linked) documents), took on a floppy disk only 13KB.
-Herewith I also mention Litwr's great Notepad+, made fully in BASIC, after compilation it became a competent fast editor with a lot of formatting possibilities., took less than 10KB
-With the Plus/4 advanced windowing features it is easy to just move the editing area (freeze the top), but a further improvement could be the floating GUI on the top of 40x25 full editing area with the help of Extended Vertical Border, (40x36c) eg. to add +5 lines for the GUI on top (not possible to make on C64).

Without mouse and sprite, it would be cluncky to use a Magic Desk on Plus/4, but without that huge "hand" sprite, the full surface could be reshaped to someting modernish (less childish and less colorful) and simplier form, it could be easily handled with bszggg's mouse and a single character white cursor pointer, doing the automatic saving and recover of the hidden character.
BTW C= Magic Desk used a heavily modified charset, while the mockup below is fully based on legit original PETSCII charset (though for text editor we need small letter/Cap fontset to look professional, like the Berkelium 64 fontset)
http://toastytech.com/guis/magdesk.html

So I created a Magic Desk 2023 Mockup, inspired by PalmOS's Magic Cap utility, and few years ago I created a GeoWrite like PETSCII mockup how such a GUI imitating surface text editor could look like. I call it a mockup, but it could be a skeleton of a working GUI too.
Certainly it is not as great as a pixel exact nicely drawn real GUI, but hey, it is just a PETSCII :-)

You can see the main functions, the Calendar, Date and Time (can be set), link to a more serious Text editor (PC), a simple Notepad (sheet with a Pen) and the Calculator, also File Manager with the disc drives (directory, file, copy, etc).
-Two quick lauch app could be the drawers F1 and F2 buttons, like Calculator and Notepad
-At the bottom you can see 6 Application Launch icons (TBD), at the end the Exit.
-Door is also the Exit. Or it should be a Window? happy





Posted By

SukkoPera
on 2023-12-28
05:30:07
 Re: Plus4 mouse (driver) for BASIC

Good job! I'm looking forward to testing this with 16UP and ReSeed but there's no reason why it should not work.

Just one thought: supporting the 1351 should be very easy, as it's an "absolute" mouse. In particular if you managed to support the Amiga mouse already, that sounds much more difficult to me!

Posted By

bszggg
on 2023-12-29
12:16:58
 Re: Plus4 mouse (driver) for BASIC

#SukkoPera

If you promise, you will write and public one program that uses the mouse, that we can use it to something, I'll write the 1531 mouse handling too.

Posted By

SukkoPera
on 2023-12-30
09:27:49
 Re: Plus4 mouse (driver) for BASIC

I wish I could do that, but unfortunately I am no +4 developer sad.

Posted By

MMS
on 2023-12-30
17:54:08
 Re: Plus4 mouse (driver) for BASIC

@SukkoPera You are, but a HW developer and not a SW developer. I will do my best to satisfy @bszggg happy

Posted By

bszggg
on 2023-12-31
09:26:49
 Re: Plus4 mouse (driver) for BASIC

I have added the 1351 commodore mouse handling wink

It is a little bit hacky mouse.. I have to spend 2 more byte sad

Please test it.. because I have no real mouse. I had tested it my mouse transformer, that I buyed from Sodan.
https://sordan.ie/product/1298/tom-usb-hid-amiga-atari-c64-c128-mouse-joystick-gamepad-adapter/
Another one that is work in amiga mode (This one is smaller) :
https://sordan.ie/product/1510/tikus-black-amiga-db9-usb-adapter-tank-mouse-c64-atari-st-joypad/

Posted By

Litwr
on 2023-12-31
12:12:57
 Re: Plus4 mouse (driver) for BASIC

Fantastic! We have been deprived of this for 30 years.

Posted By

bszggg
on 2024-01-12
12:42:29
 Re: Plus4 mouse (driver) for BASIC

Sziasztok.
Elkészült egy használható változat az egér driverből, ami az oprendszet is támogtja.
Ez egy Egér Driver, BASIC szoftver készítéséhez!
Bárhogy betölthető, és indítás után BASIC-ből elérhetővé válnak PEEK()-kel az egér kordinátái.
(osztott képernyőt nem támogat az ACIA miatt)

OS használata közben van egérkurzor,
- bal gombbal a karakteres kurzor áthelyezhető,
- jobb gombbal törölni lehet karaktereket.

Letölthető:
https://bencsikszilveszter.hu/plus4/plus4/plus4.htm
/egér
Mindhárom általam ismert egeret támogat (amiga, commodore, soros)

A driver Kezeli a 2 játékos egeret is: soros, <> SID

Litle video here:
https://bencsikszilveszter.hu/plus4/plus4/eger/document_5838996305061352268.mp4

Használjátok egészséggel!




addresses / címek :

; ## GAME POINTERS
.baseAddr = $0420 ; Indexelt regiszter elérésekhez - megegyezik az alábbi .MergeBtn-nel
; MOUSE MERGE 0-255 -re limitált!!
.MergeBtn = $0420 ; Buttons
.MerX = $0421 ; x
.MerY = $0422 ; y
; SID MOUSE 0-255 -re limitált!!
.SidBtn = $0423 ; Buttons SID
.SidX = $0424 ; x sid
.SidY = $0425 ; y sid
; RS-232 MOUSE 0-255 -re limitált!!
.Rs2Btn = $0426 ; Buttons RS-232
.Rs2X = $0427 ; x RS-232
.Rs2Y = $0428 ; y RS-232
; ## GAME POINTERS

; ## USER SOFTWARE POINTERS
; MERGED 180-as kurzor
.MerHiColX =$042d ; x 180 merge
; MERGED CHAR MOUSE POINTER
.MerCharX =$042e ; X 80 Karakteres egérkurzor
.MerCharY =$042f ; Y 40 Karakteres egérkurzor
; MERGED MOUSE POINTER - Limitalt MERGED 320-as kurzor
.MerLimBtn =$0430 ; Buttons 7-es bit bal, 6-middle, 5-right,
.MerLimXHi =$0431 ; x mergeHI
.MerLimX =$0432 ; x merge
.MerLimY =$0433 ; y merge
; STORED FOR BASIC - MERGED MOUSE POINTER
.MerLimXHiStor =$0434 ; x mergeHI stored
.MerLimXStor =$0435 ; x merge stored
.MerLimYStor =$0436 ; y merge stored
; ## USER SOFTWARE POINTERS

 Re: Plus4 mouse (driver) for BASIC

Hello.
A usable version of the mouse driver has been prepared, which also supports the operating system.
This is a Mouse Driver, for making BASIC software!
It can be loaded in any way, and after starting, the coordinates of the mouse become available from BASIC with PEEK().
(does not support split screen due to ACIA)

There is a mouse cursor while using the OS,
- the character cursor can be moved with the left button,
- you can delete characters with the right button.

Downloadable:
https://bencsikszilveszter.hu/plus4/plus4/plus4.htm
/mouse
It supports all three mice I know (Amiga, Commodore, Serial)

The driver also manages the 2-player mouse: serial, <> SID

Little video here:
https://bencsikszilveszter.hu/plus4/plus4/eger/document_5838996305061352268. mp4

Use it with health!

Posted By

BSZ
on 2024-01-12
16:08:11
 Re: Plus4 mouse (driver) for BASIC

I watched the video, it's quite interesting! Well done, congratulations!

Posted By

seff
on 2024-01-13
03:30:24
 Re: Plus4 mouse (driver) for BASIC

Nice. Is there any reference to the FAST1551 ROM image? Tx.

EDIT:
https://bencsikszilveszter.hu/plus4/plus4/plus4.htm

Posted By

SukkoPera
on 2024-01-13
12:50:22
 Re: Plus4 mouse (driver) for BASIC

I'm testing this driver.

With a 1351 it seems to work fine, except that I don't seem to be able to erase characters with the right button.

With an Amiga mouse I don't know... Is the mouse type detected automatically? Does the Amiga mouse only work on BSZ's SIDcard or does it work or any SIDcard (i.e.: Solder's/ReSeed)?

Posted By

bszggg
on 2024-01-14
09:26:34
 Re: Plus4 mouse (driver) for BASIC

bsz THX! We will see what will the next step. happy
Maybe it needs to do better by technically.. But now it is a usable thing

self I put a link to the "fejlesztések" page. But there were in the "ROM" menu. wink

Sukkopera
Is it totally not working, or do it, but left some black space?

Posted By

SukkoPera
on 2024-01-14
10:13:23
 Re: Plus4 mouse (driver) for BASIC

The delete function does not do anything at all.

And sorry to repeat the questions but I need to understand:
- Is the mouse type detected automatically? Do I have to do anything to tell the driver when I use an Amiga mouse?
- Do I need BSZ's SIDcard or will Solder's work too?

Posted By

bszggg
on 2024-01-14
12:26:16
 Re: Plus4 mouse (driver) for BASIC

SukkoPera "The delete function does not do anything at all."
Thank you for the testing. I checked here,, and it works for me.
I had a discuss with bsz and he told me, to You should try to push the right button without driver, and it needs to do same thing as a joystick up functionality. It checks the hardware to working

"- Is the mouse type detected automatically? Do I have to do anything to tell the driver when I use an Amiga mouse?"
The driver detects is automatically, on bsz sid card., And detect the mouse on your sid card too.
...If there is a readable port in $FD59 (Solder's PotX) and it is not $FF, that marks, there is some analog thing there, so it will work as an analogue commodore mouse
else switch to amiga mouse digital mode (That works with JUST BSZ sic card)
The acia is independent than sid card part

"- Do I need BSZ's SIDcard or will Solder's work too?""
- Solder's sid card works with just commodore mouse. (that is an analogue mode, not pixel exact, so it sometimes a little bit jumping, 1 pixel)
- BSZ's audio extension works with amiga mouse, or commodore mouse with auto detect (and if you switch it manually with a poke command, you can use atari mouse too)

...
Sometimes the clearing function contains bug. I will think, what is the problems.
But it doesn't connect to basic programs and the driver, it is just in the OS functionality.

The best user-experience comes with amiga mouse on "bsz audio extension".

Posted By

SukkoPera
on 2024-01-15
16:53:06
 Re: Plus4 mouse (driver) for BASIC

Thanks for the clarifications, I will test more and will let you know in detail.

UPDATE - TEST RESULTS
With BSZ's card with a SID 8580:
- 1351 OK-ish, sometimes cursor starts up in the top right area and won't move much.
- I don't currently have an original Amiga mouse, only a self-built adapter. This does not work because - I think - the software still thinks a 1351 is connected (my adapter might set POTX to 0).
- BUT if I remove the SID from the card, the mouse is detected and works very well!

With ReSeed with a SID 8580:
- Amiga mouse does not work (as expected).
- 1351: cursor moves only if I hold the left mouse button and bounces back to first line when I release it, so it's hard to test the delete function with the right button but it does not seem to work.

With ReSeed with a SID 6581:
- Amiga mouse does not work (as expected).
- 1351: does not work, not sure why.

I currently do not have a serial mouse unfortunately, so can't test with that.

As a final remark, the test programs do not always work. The "multi" in particular starts up correctly only a few times.

One more suggestion: you need to improve the instructions on how to use this. They mention some GRAPHICS command that do not seem really necessary and the first one is actually even incorrect (it's 1,1, not 1.1). Also, I think you need to translate the instructions to English if you want other people to start using it. And I really hope you do, because it's promising work! :)

Posted By

bszggg
on 2024-01-16
18:32:38
 Re: Plus4 mouse (driver) for BASIC

SukkoPera Thank you the testing.

If I will have some time for continue this project, I'll learn the interrupts and check the working of Acia interrupts.
If it will works better, I'll think the better cursor display routine.
After that, I'll update the documentation here too:
https://gitlab.com/bszggg/plus4mouse

- ReSeed testings: I'll talk with bsz what is possible the problem
All of your reSeed card's POTX address is same as in BSZ audio extension? $FD59

.. or maybe can you test your mouse with CAE_Test_Suite_V2_2 It is just a tip, to check is. I don't know it will work or not with ReSeed cards.




Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024