Mouse Support Over the COM2 Port in PCXT Core

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by spark2k06 »

Hodor wrote: Tue Oct 11, 2022 9:56 am Does the mouse work out of the box or need some driver installation? Sorry for asking, but core´s readme doesn´t show any info yet.
Information added to README, thank you!

https://github.com/MiSTer-devel/PCXT_MiSTer#readme
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by Caldor »

Hodor wrote: Tue Oct 11, 2022 9:56 am Does the mouse work out of the box or need some driver installation? Sorry for asking, but core´s readme doesn´t show any info yet.
You need to use a mouse driver. CTMouse should work I think.
somhi
Posts: 88
Joined: Mon Jul 18, 2022 4:37 pm
Has thanked: 25 times
Been thanked: 25 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by somhi »

kitune-san wrote: Fri Oct 07, 2022 4:09 am Could you confirm that the irq signal on the uart goes low each time one byte of data is read?
Or could you check if the irq signal goes low when the mouse hangs up?

I remember that pcxt bios was set to accept interrupts on the rising edge.
If irq does not go low until fifo is empty, then there may be a problem with uart interrupt.
PLEASE follwing tests are done in the NON MISTER PORTS which still have problems with the mouse hunging.
As a side note but may be related, the new UART 16750 does not work properly as serdrive cannot load any hdd image.

picture 1. When I open NC it stops responding IRQ
picture 2. Here is the screenshot when the mouse is working properly: for each serial transmission, the IORQ signal goes high and goes low again
picture 3. Here you can see what happens with IRQ when I open Norton, the IRQ signal stays high and the mouse no longer works.

Hope this gives you a hint of what could be happening with the direct ports (Non MiSTer).
Attachments
3.jpg
3.jpg (96.95 KiB) Viewed 8576 times
2.jpg
2.jpg (126.9 KiB) Viewed 8576 times
1.jpg
1.jpg (125.56 KiB) Viewed 8576 times
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kitune-san »

I assume that data cannot be retrieved from uart when more than 2 bytes of data enter the FIFO.

I think I need to set irq low for every 1 byte read.

Older designs seem to use out1,2 signals(or IER)...software(bios?) needs to support this.
jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by jordi »

Hodor wrote: Tue Oct 11, 2022 9:56 am Does the mouse work out of the box or need some driver installation? Sorry for asking, but core´s readme doesn´t show any info yet.
Like in old dos times
Any serial mouse driver will do the job (eg. Ctmouse)
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kitune-san »

somhi wrote: Wed Oct 12, 2022 10:03 pm As a side note but may be related, the new UART 16750 does not work properly as serdrive cannot load any hdd image.
Have you tried to change uart.v?
https://github.com/spark2k06/PCXT_MiSTe ... 84c1309670
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kitune-san »

I have come up with a way to force IRQ to LOW every time accessing UART. However, side effects may occur.
If you would like, please give it a try.
2022-10-13 233543.png
2022-10-13 233543.png (58.44 KiB) Viewed 8442 times
somhi
Posts: 88
Joined: Mon Jul 18, 2022 4:37 pm
Has thanked: 25 times
Been thanked: 25 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by somhi »

kitune-san wrote: Thu Oct 13, 2022 1:17 pm
somhi wrote: Wed Oct 12, 2022 10:03 pm As a side note but may be related, the new UART 16750 does not work properly as serdrive cannot load any hdd image.
Have you tried to change uart.v?
https://github.com/spark2k06/PCXT_MiSTe ... 84c1309670
Yes, that change was already done when I took the uart folder from MiSTer core.

I'll try the IRQ change and report back.
somhi
Posts: 88
Joined: Mon Jul 18, 2022 4:37 pm
Has thanked: 25 times
Been thanked: 25 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by somhi »

kitune-san wrote: Thu Oct 13, 2022 2:51 pm I have come up with a way to force IRQ to LOW every time accessing UART. However, side effects may occur.
If you would like, please give it a try.
It works! Have been testing for a while and haven't found any fault after your change. Tested on two different FPGAS cyc1000 and Deca.

Have not seen any side effect.

Many thanks!!
User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

Hello,
I've just noticed a weird issue with the mouse.
I do not think that I did something wrong (but who knows :-) ), I'm using MS-DOS Version 5.0, Ctmouse v1.9 (ctmouse /s2) and once I've the ctmouse loaded, the EDIT command of MS-DOS freezes. When ctmouse is not loaded, EDIT works, I've tried with different IRQ just to see, but always the same issue. Is anyone of you already faced to this issue ?
Thanks in advance.

かすりん

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by jordi »

kathleen wrote: Fri Oct 14, 2022 12:57 pm Hello,
I've just noticed a weird issue with the mouse.
I do not think that I did something wrong (but who knows :-) ), I'm using MS-DOS Version 5.0, Ctmouse v1.9 (ctmouse /s2) and once I've the ctmouse loaded, the EDIT command of MS-DOS freezes. When ctmouse is not loaded, EDIT works, I've tried with different IRQ just to see, but always the same issue. Is anyone of you already faced to this issue ?
Thanks in advance.
Could you please try the same with three freedos image?

https://github.com/MiSTer-devel/PCXT_Mi ... _image.zip
User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

Thank you @jordi,
Just tried with the Freedos image and it works like a charm. No issue anymore with EDIT and Ctmouse.
Is this a well known issue under the DOS ?

EDIT : I did the same test with DOS 5.0 and Ctmouse loaded but in MDA mode instead of CGA and with this set up, everything work !
So it seems that there is a conflict somewhere with the CGA but why then with FreeDos it works ? :-(

かすりん

breiztiger
Top Contributor
Posts: 468
Joined: Sun May 24, 2020 7:17 pm
Has thanked: 35 times
Been thanked: 99 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by breiztiger »

just test with this driver : https://winworldpc.com/product/microsoft-mouse/4x

it's ok for EDIT launching but mouse stop responding after a few seconds

piano work well from system disk
CPC-Power Staff
User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

Thank you @breiztiger,

Just tried on my side, and same as you, EDIT opens, the mouse works but a few seconds :-( then the cursor freezes.

This is very strange.

EDIT: it seems to be quite random the freeze. Had no issue after 10' and a reboot later, it freeze after a couple of seconds.

@spark2k06,

Any idea where this issue comes from ?

かすりん

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by spark2k06 »

kathleen wrote: Mon Oct 17, 2022 3:41 pm Thank you @breiztiger,

Just tried on my side, and same as you, EDIT opens, the mouse works but a few seconds :-( then the cursor freezes.

This is very strange.

EDIT: it seems to be quite random the freeze. Had no issue after 10' and a reboot later, it freeze after a couple of seconds.

@spark2k06,

Any idea where this issue comes from ?
No idea, sorry :(
User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

Hello all,

Back to my concern with the use of the mouse with EDIT.
Actually I realized that EDIT needs QBASIC to work.
I then try to run QBASIC with the mouse and the same problem happens. Sometime QBASIC starts but freeze when I load a .bas file.
Sometime it even doesn't start at all.
Of course without the mouse driver (ctmouse ou mouse.com) everything works fine.

I've tried different versions of Qbasix from 1.0 to 4.5 and the same issue happened with all of them.
What is weird is when it works, it is always during a disk access that QBASIC (or EDIT) hangs.

Maybe it will help to understand the root cause (at least I hope so as I'm more using apps than games :-))

かすりん

somhi
Posts: 88
Joined: Mon Jul 18, 2022 4:37 pm
Has thanked: 25 times
Been thanked: 25 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by somhi »

It's very strange, but just for discarding it, you could try to resintetize the core with the change showed by kitune-san ten posts above.
file change is in file rtl/KFPC-XT/HDL/Peripherals.sv
User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

Thank you @somhi,
I've just tried it thanks to a friend who built the core for me with the Kitune-san's peripherals.sv and still the same issue.

かすりん

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by spark2k06 »

kathleen wrote: Sun Oct 23, 2022 11:34 am Thank you @somhi,
I've just tried it thanks to a friend who built the core for me with the Kitune-san's peripherals.sv and still the same issue.
Check to see if it is a conflict with the serial port between the mouse and serdrive.

To do this, try the following. Unmount any HDD image and boot MSDos with a floppy disk where you load the mouse driver and also have the EDIT application. Let us know the result.
User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

spark2k06 wrote: Mon Oct 24, 2022 3:39 pm
kathleen wrote: Sun Oct 23, 2022 11:34 am Thank you @somhi,
I've just tried it thanks to a friend who built the core for me with the Kitune-san's peripherals.sv and still the same issue.
Check to see if it is a conflict with the serial port between the mouse and serdrive.

To do this, try the following. Unmount any HDD image and boot MSDos with a floppy disk where you load the mouse driver and also have the EDIT application. Let us know the result.
Just did the test.
Same issue, edit or Qbasic freezes once the mouse driver is loaded.
What is also weird is that once frozen, sometimes the screen shows this :
20221024_190833.jpg
20221024_190833.jpg (3.22 MiB) Viewed 7777 times
while the screenshot taken at the same moment with the Mister (win+prt screen) shows this :
NODATE-screen_0001.jpg
NODATE-screen_0001.jpg (90.58 KiB) Viewed 7777 times

かすりん

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by spark2k06 »

kathleen wrote: Mon Oct 24, 2022 5:16 pm
spark2k06 wrote: Mon Oct 24, 2022 3:39 pm
kathleen wrote: Sun Oct 23, 2022 11:34 am Thank you @somhi,
I've just tried it thanks to a friend who built the core for me with the Kitune-san's peripherals.sv and still the same issue.
Check to see if it is a conflict with the serial port between the mouse and serdrive.

To do this, try the following. Unmount any HDD image and boot MSDos with a floppy disk where you load the mouse driver and also have the EDIT application. Let us know the result.
Just did the test.
Same issue, edit or Qbasic freezes once the mouse driver is loaded.
What is also weird is that once frozen, sometimes the screen shows this :
20221024_190833.jpg
while the screenshot taken at the same moment with the Mister (win+prt screen) shows this :
NODATE-screen_0001.jpg
There seems to be a fault when unmounting the image, because you can see that it keeps serdrive active. Once the image is unmounted, save configuration and reload the core... then try again, please.
User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

Thank you @spark2k06,

I did it following your recommendation and still same issue :-(
Attachments
2022-10-25.jpg
2022-10-25.jpg (89.71 KiB) Viewed 7697 times

かすりん

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by spark2k06 »

kathleen wrote: Tue Oct 25, 2022 3:50 pm Thank you @spark2k06,

I did it following your recommendation and still same issue :-(
Thank you! With this test at least we now know that it is not a COM port conflict.
User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

spark2k06 wrote: Tue Oct 25, 2022 3:57 pm
kathleen wrote: Tue Oct 25, 2022 3:50 pm Thank you @spark2k06,

I did it following your recommendation and still same issue :-(
Thank you! With this test at least we now know that it is not a COM port conflict.
You're welcome !

Thanks to @Tonton which advised me to try another bios than Juko, it appeared that this issue is not present with the IBM5150-5160 BIOS.
With this BIOS, everything works fine with or without Ctmouse installed.

There seems to be a conflict somewhere with the bios Juko then.

EDIT : With the Tandy Bios, it works also :-)

かすりん

User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

@spark2k06,
This week end, I tried several Bios from different motherboards to see if I could find a similar to the Juko in terms of smooth display while doing a DIR for instance, and which is compatible with the mouse driver + GWbasic. I've tested at least 15 different ones and none of them are showing this nice behavior (on the other side most of them I running fine / are compatible which is fantastic).
However, during my investigations, I found a different or newer I guess Juko bios (V3) which during the ram checking, shows that the PC has 1024kb instead of 640kb for all others. This version does not solve the mouse issue that I have but I thought that maybe this version could be interested to be shared, if yes, let me know I'll do it

かすりん

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by spark2k06 »

kathleen wrote: Wed Nov 02, 2022 5:58 am @spark2k06,
This week end, I tried several Bios from different motherboards to see if I could find a similar to the Juko in terms of smooth display while doing a DIR for instance, and which is compatible with the mouse driver + GWbasic. I've tested at least 15 different ones and none of them are showing this nice behavior (on the other side most of them I running fine / are compatible which is fantastic).
However, during my investigations, I found a different or newer I guess Juko bios (V3) which during the ram checking, shows that the PC has 1024kb instead of 640kb for all others. This version does not solve the mouse issue that I have but I thought that maybe this version could be interested to be shared, if yes, let me know I'll do it
Thank you. The truth is that there are many BIOSes that work fine, I don't know if the GitHub repository is the right place to host them. Maybe we should look for the best place and put a link to all of them. Regarding the speed and performance for PCXT, I like the one you have shared recently:

https://github.com/640-KB/GLaBIOS

If you haven't tried it yet, do it ;-)
User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

I've tried it, and I do confirm I like it as well :-)

EDIT 20221103 :

@spark2k06,

I've tested this nice GLaBIOS a bit deeper and I've faced to an issue with the program IBM LOGO.
Actually the program IBM LOGO crashs right after the logo prompt.
I've tried the same disk (*) under the IBM5150/60 BIOS downloaded from the Github and it works as it should.

So, this BIOS seems to have some incompatibility issues with some apps, at least with the one I tried (IBM LOGO), maybe others as well.
Like the JUKO, for an unknown reason, this BIOS has issue with the mouse driver + qbasic.

Your core is fantastic, and the fact that we can make trials errors by swapping different BIOSes is a great advantage. For sure now, when I have a compatibility issue with an application, I'll try several BIOSes to be sure that this doesn't come from there till I find my "favorite" BIOS :-)

(*) For the test I boot on the floppy of course not on the HDD

かすりん

640KB
Posts: 2
Joined: Wed Jan 04, 2023 10:51 pm
Has thanked: 1 time
Been thanked: 7 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by 640KB »

kathleen wrote: Wed Nov 02, 2022 5:14 pm

I've tested this nice GLaBIOS a bit deeper and I've faced to an issue with the program IBM LOGO.
Actually the program IBM LOGO crashs right after the logo prompt.
I've tried the same disk (*) under the IBM5150/60 BIOS downloaded from the Github and it works as it should.

So, this BIOS seems to have some incompatibility issues with some apps, at least with the one I tried (IBM LOGO), maybe others as well.
Like the JUKO, for an unknown reason, this BIOS has issue with the mouse driver + qbasic.

Hello. Author of GLaBIOS here! Would love to figure and get to the bottom of any software bugs!

There have been quite a few updates and fixes since Nov, so it's possible one of these may be fixed. There was a fix related to DOS EDIT/QBASIC in certain video modes in the Nov 7 update, which may actually have been the cause of both of those. I just downloaded and tested IBM LOGO 1.0 and it seems to be working for me.

If you have a chance, would you mind grabbing the latest version of GLaBIOS and try those again?

Thanks!

640KB

User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

@640KB,

Thanks you for your comment.
I'll try for sure the latest version of GLaBIOS on my setup and will keep you posted.
If those issues are solved it will be a very good news. Cannot wait to try.

Cheers.
Kathleen.

かすりん

User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Mouse Support Over the COM2 Port in PCXT Core

Unread post by kathleen »

640KB wrote: Wed Jan 04, 2023 11:05 pm

If you have a chance, would you mind grabbing the latest version of GLaBIOS and try those again?

Thanks!

640KB

Hello again @640KB,

I've just tested the latest GLaBIOS [Version 0.2.2 Release - 12/09/22] and I do confirm that now EDIT/Qbasic work both as they should !
Many thanks for your hard work and for this amazing bios !.

かすりん

Post Reply