Hi!
cyco130, on Fri Dec 18, 2009 1:33 AM, said:
@a8isa1:
I have a cheap USB RS-232 adapter and it works with 1x speed. I don't know how it will do with better adapters but it should work because I use the "official" serial port APIs and I don't do any direct hardware access.
I have some Digitus DA-70146 adapters (using a FT232BM) and they worked fine at 56k with current svn version. But I only did a quick read and write test with TurboDos.
Quote
Revision 8 from the svn is now almost as fast as APE when reading in Linux. Writing in Linux and the whole Windows serial port code still needs a lot work though. But both are more reliable then before.
Thanks, I can confirm this! Really well done!
While testing I noticed 2 small issues:
When I unplugged the USB adapter and started aspeqt, it couldn't open /dev/ttyUSB0 (of course). Then I went to the options menu and set the port to /dev/ttyS4 but aspeqt didn't reopen the port and stayed at "Emulation disabled".
Using a serial card aspeqt uses 100% cpu time when idle, but when using the USB adapter the load is (almost) zero.
I have a Core2Duo 6750, and checked with cpufreq-info: using the serial port one of the cores was running at low frequency (active power saving), the other one at the high(est) frequency. Here's the output of "top":
top - 13:51:35 up 4 days, 18:23, 2 users, load average: 1.02, 0.68, 0.33
Tasks: 222 total, 1 running, 221 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.3%us, 46.8%sy, 0.0%ni, 47.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4045852k total, 3892752k used, 153100k free, 109636k buffers
Swap: 7807504k total, 71104k used, 7736400k free, 3064804k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16138 hias 40 0 180m 11m 9952 S 100 0.3 5:09.21 aspeqt
With the USB adapter both cores were at maximum power saving (low frequency). Again, the output of top:
top - 13:53:34 up 4 days, 18:25, 2 users, load average: 1.12, 0.76, 0.40
Tasks: 222 total, 1 running, 221 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.0%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Quote
In the long run, I will invetigate the possibilities for using a derivative of hiassoft's atarisio as an optional backend and maybe writing a similar driver for Windows.
I had the same idea a few days ago :-)
I guess it would be best if you could add support for the AtariSIO kernel driver, so people can easily switch between your and my software and simply select standard serial port access (useful for USB adapters, for example) and AtariSIO access in aspeqt.
The kernel driver handles most of the low-level stuff (like switching baudrates, waiting for a valid command frame etc.) and has a (quite) simple ioctl interface. In the user space app you basically just fetch the command frame, send ACKs/NAKs and transmit/receive data frames. Have a look at SIOWrapper.cpp/h, this is the C++ wrapper around the ioctl interface.
If you'd like to have some extensions in the kernel driver, just drop me a line.
so long,
Hias