NetUSBee USB drivers download

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, Greenious, spiny, Moderator Team

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1335
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: NetUSBee USB drivers download

Postby TheNameOfTheGame » Mon Sep 02, 2019 12:04 pm

From the UIP thread:

Perdrix24 wrote:
sqward wrote:
Not sure what you mean. The only way to slow down transfere rate is to eat the CPU time. Not sure what the USB driver is doing but I'd guess it hooks itself up to VBL or 200Hz timer to periodically poll USB hardware.


I did some benchmarks, on 68000 the mouse driver takes 10% of the CPU time, while on the 68030 Falcon, it's 5%.

The worse case scenario is having the mouse and keyboard drivers, in addition to usbtool.acc, on a 68000, that resulted in a 21% slowdown of the CPU.


I have noticed slow down on my 68000 STE. I had no idea what was causing it, but I can know now it is likely the mouse driver. Is there any hope to reduce this slowdwon? 10% CPU usage is a lot for our old 68000 CPUs which already struggle at times. I won't even think about the keyboard driver lol, 21% slowdown would not be fun. :lol:

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1335
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: NetUSBee USB drivers download

Postby TheNameOfTheGame » Mon Sep 02, 2019 1:57 pm

Perdrix24 wrote:The mouse driver has been updated recently. I need to update the package. I've attached it, if you can try it.


Hello, I use this update on my STE quite nicely, but is there an updated 68020+ version of the mouse driver for my Falcon also?

Perdrix24
Atari maniac
Atari maniac
Posts: 84
Joined: Mon Feb 26, 2018 1:47 pm

Re: NetUSBee USB drivers download

Postby Perdrix24 » Mon Sep 02, 2019 11:42 pm

TheNameOfTheGame wrote:Ok, makes sense. Now, that leads to the question is there a way I can change it to double-click?

There is no way for now. Maybe later, I will do a configuration CPX or app, allowing users to map the mouse buttons, and adjust the wheel scrolling sensitivity (this was reported by another user).

What do people here think about this idea?

Perdrix24
Atari maniac
Atari maniac
Posts: 84
Joined: Mon Feb 26, 2018 1:47 pm

Re: NetUSBee USB drivers download

Postby Perdrix24 » Mon Sep 02, 2019 11:49 pm

TheNameOfTheGame wrote:From the UIP thread:

Perdrix24 wrote:
I did some benchmarks, on 68000 the mouse driver takes 10% of the CPU time, while on the 68030 Falcon, it's 5%.

The worse case scenario is having the mouse and keyboard drivers, in addition to usbtool.acc, on a 68000, that resulted in a 21% slowdown of the CPU.


I have noticed slow down on my 68000 STE. I had no idea what was causing it, but I can know now it is likely the mouse driver. Is there any hope to reduce this slowdwon? 10% CPU usage is a lot for our old 68000 CPUs which already struggle at times. I won't even think about the keyboard driver lol, 21% slowdown would not be fun. :lol:

This is due to polling the USB system each 20ms. If I call every 40ms, it takes half the CPU time, but mouse is too jerky. Keyboard is fine. For now I don't know how to improve this.

ThorstenOtto
Atari Super Hero
Atari Super Hero
Posts: 795
Joined: Sun Aug 03, 2014 5:54 pm

Re: NetUSBee USB drivers download

Postby ThorstenOtto » Tue Sep 03, 2019 1:00 am

Just an idea, but could it be that usb_bulk_msg() always tries to read the maximum possible packet size, and just times out if there is not enough data available? If that is the case, the mouse driver could maybe be more clever by only trying to read the expected number of bytes for a packet (ie. 3 for a mouse movement).

czietz
Hardware Guru
Hardware Guru
Posts: 1006
Joined: Tue May 24, 2016 6:47 pm

Re: NetUSBee USB drivers download

Postby czietz » Tue Sep 03, 2019 3:22 am

ThorstenOtto wrote:Just an idea, but could it be that usb_bulk_msg() always tries to read the maximum possible packet size, and just times out if there is not enough data available? If that is the case, the mouse driver could maybe be more clever by only trying to read the expected number of bytes for a packet (ie. 3 for a mouse movement).


It was one of the major improvements done to the Lightning VME drivers not to retry the USB transaction until the maximum number of bytes has been read or until timeout, but to return early with the few bytes one gets from a mouse. Before that change, the mouse driver was completely unusable on an 8 MHz machine.

Afaik, that change has been long backported into FreeMiNT. You have to bear in mind that USB is quite a complex protocol for a 1980s CPU. BTW: I find a 5-10% slowdown -- while of course not optimal -- to be only noticeable in benchmark programs, not in regular use of the machine.

Perdrix24
Atari maniac
Atari maniac
Posts: 84
Joined: Mon Feb 26, 2018 1:47 pm

Re: NetUSBee USB drivers download

Postby Perdrix24 » Tue Sep 03, 2019 6:50 pm

I'm not a hardware guy, but can the NetUSBee (or Lightning) IRQ line be used? So that only USB reports of a mouse change may be processed.

From NetUSBee documentation: Optional IRQ (interrupt) line to speed up transfers and give more CPU time to applications.

Galvez
Captain Atari
Captain Atari
Posts: 264
Joined: Fri Oct 19, 2007 7:49 am

Re: NetUSBee USB drivers download

Postby Galvez » Tue Sep 03, 2019 7:32 pm

If I remember correctly, it is possible to solder a wire from the NetUSBee that should go to some pin in the parallel port

User avatar
sqward
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 110
Joined: Wed Mar 12, 2008 4:47 pm
Location: London
Contact:

Re: NetUSBee USB drivers download

Postby sqward » Tue Sep 10, 2019 9:17 pm

How about some sort of adaptive polling interval? Let's say if the mouse is static polling interval is set to something large, when it's on the move it gets smaller. For other, less real-time, peripherals longer delay wouldn't be such an issue perhaps?

Perdrix24
Atari maniac
Atari maniac
Posts: 84
Joined: Mon Feb 26, 2018 1:47 pm

Re: NetUSBee USB drivers download

Postby Perdrix24 » Wed Sep 11, 2019 11:00 am

Something like that?

- Start with 'long' polling delay, eg. 100ms (5x less than normal, eg. about 2% CPU usage instead of 10% on ST).

- If mouse position changed, reduce polling to normal 20ms.

- If mouse position doesn't change after 100ms, return to polling at 100ms.

The storage and printer drivers don't take CPU time when idle, because they don't poll. I already reduced the printer driver down to 5% CPU usage, that will be in next update. Perhaps I can try to reduce it to 2% as well. For the upcoming tablet driver, I could use the mouse method if it works well.

Galvez
Captain Atari
Captain Atari
Posts: 264
Joined: Fri Oct 19, 2007 7:49 am

Re: NetUSBee USB drivers download

Postby Galvez » Wed Sep 11, 2019 2:51 pm

Perdrix24 wrote:The storage and printer drivers don't take CPU time when idle, because they don't poll
.

There is an exception in the storage driver, when a storage device with more than one LUN (like a card reader) is plugged there is a polling for cards hot-plugging.

Perdrix24 wrote: I already reduced the printer driver down to 5% CPU usage, that will be in next update. Perhaps I can try to reduce it to 2% as well.

Do you mean the keyboard driver here? :-)

Perdrix24
Atari maniac
Atari maniac
Posts: 84
Joined: Mon Feb 26, 2018 1:47 pm

Re: NetUSBee USB drivers download

Postby Perdrix24 » Thu Sep 12, 2019 1:31 am

Galvez wrote:
Perdrix24 wrote:The storage and printer drivers don't take CPU time when idle, because they don't poll
.

There is an exception in the storage driver, when a storage device with more than one LUN (like a card reader) is plugged there is a polling for cards hot-plugging.

Perdrix24 wrote: I already reduced the printer driver down to 5% CPU usage, that will be in next update. Perhaps I can try to reduce it to 2% as well.

Do you mean the keyboard driver here? :-)

Oops, yes :)

Perdrix24
Atari maniac
Atari maniac
Posts: 84
Joined: Mon Feb 26, 2018 1:47 pm

Re: NetUSBee USB drivers download

Postby Perdrix24 » Fri Sep 13, 2019 2:05 pm

sqward wrote:How about some sort of adaptive polling interval? Let's say if the mouse is static polling interval is set to something large, when it's on the move it gets smaller. For other, less real-time, peripherals longer delay wouldn't be such an issue perhaps?

Thank you for your suggestion. I implemented a cpu saver that reduces CPU usage of the mouse down to 3% on a normal ST, and 1% on a Falcon 030. I don't see any difference in usage, it's just as smooth as before, because polling is same as before while moving the mouse. The savings are when the mouse is idle. Even when moving the mouse from idle is smooth. But I'll send it to my beta testers to see what they think.

Perdrix24
Atari maniac
Atari maniac
Posts: 84
Joined: Mon Feb 26, 2018 1:47 pm

Re: NetUSBee USB drivers download

Postby Perdrix24 » Thu Sep 19, 2019 10:57 am

Anyone who wants to write a small text on STORAGE usage, I will include it in the next package of the drivers, that I plan to release next month.

What works and doesn't work, how do you partition, big dos, windows/mac compatibility...


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 6 guests