Jump to content

Photo

SIO2BT


251 replies to this topic

#226 gargoyle OFFLINE  

gargoyle

    Chopper Commander

  • 185 posts

Posted Sun Jul 2, 2017 1:39 AM

On an SIO2PC even 4.2 kB/s is nowhere close to the theoretical throughput of of 57600bps (7200 kBs). I wonder why is that? what is the overhead on a hard wired serial port?



#227 mr-atari OFFLINE  

mr-atari

    Moonsweeper

  • 430 posts
  • Location:netherlands

Posted Sun Jul 2, 2017 2:33 AM

On an SIO2PC even 4.2 kB/s is nowhere close to the theoretical throughput of of 57600bps (7200 kBs). I wonder why is that? what is the overhead on a hard wired serial port?

57600 bps will yield 5.76 kB/s maximum, due to adding start/stop-bits.
You get 10 bits for every byte transmitted.

Beside that, you need to add host / device response time.
Command-time, idle-time, sending/receiving extra bytes like "Ack" "Cmpl"....
 

:-D



#228 greblus OFFLINE  

greblus

    Moonsweeper

  • 265 posts

Posted Sun Jul 2, 2017 3:29 AM

During my tests of AspeQt on Android I noticed that RWTEST results greatly depend on the "media" used to perform tests. Atr handling costs a lot.

 

See three attached pictures showing tests on my cheap Android device: 

 

- on the first one RWTEST is saving/reading data to/from an atr image (it's SIO2PC-USB @ 115200bps)

- the second one is on the same hardware but test is performed to/from a PCLINK directory

- the third one was using SIO2BT @57600 bps and RWTEST is performed on a PCLINK device.

 

SDX and PCLINK.SYS should be more praised and widely adopted ;)

 

W.

Attached Thumbnails

  • sio2pc_usb_hsindex0_atr.jpg
  • sio2pc_usb_hsindex0_pclink.jpg
  • sio2bt_57600_pclink.jpg


#229 gargoyle OFFLINE  

gargoyle

    Chopper Commander

  • 185 posts

Posted Sun Jul 2, 2017 2:32 PM

Looks like PCLink is buffering sectors.

 

Also in this case, it looks like Android is also a limiting factor because the same test as your first one (SIO2PC-USB @ 115000bps) gives me a DOS Average of 6111.85935 B/sek on a Windows PC. Hmmm, It would be interesting to see what kind of result i would get with PCLink on the same PC.


Edited by gargoyle, Sun Jul 2, 2017 2:43 PM.


#230 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 12,861 posts
  • Location:United Kingdom

Posted Sun Jul 2, 2017 2:44 PM

PCLink is a file handling protocol (there is no concept of sectors as such), so when the Atari wants - say - 20,000 bytes from the server, the server can burst a buffer 20,000 bytes long. That's why it's so fast.

#231 gargoyle OFFLINE  

gargoyle

    Chopper Commander

  • 185 posts

Posted Sun Jul 2, 2017 2:44 PM

57600 bps will yield 5.76 kB/s maximum, due to adding start/stop-bits.
You get 10 bits for every byte transmitted.

 

Of course, I totally forgot about that...  :thumbsup:



#232 gargoyle OFFLINE  

gargoyle

    Chopper Commander

  • 185 posts

Posted Sun Jul 2, 2017 2:47 PM

PCLink is a file handling protocol (there is no concept of sectors as such), so when the Atari wants - say - 20,000 bytes from the server, the server can burst a buffer 20,000 bytes long. That's why it's so fast.

 

So I suppose there is some kind of an Atari side driver for PCLink,  giving that the SIO protocol only deals with sectors when it comes to disk drives.



#233 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 12,861 posts
  • Location:United Kingdom

Posted Sun Jul 2, 2017 2:52 PM

Yes: PCLINK.SYS as shown in the screenshots.

#234 greblus OFFLINE  

greblus

    Moonsweeper

  • 265 posts

Posted Sun Jul 2, 2017 3:14 PM

Also in this case, it looks like Android is also a limiting factor because the same test as your first one (SIO2PC-USB @ 115000bps) gives me a DOS Average of 6111.85935 B/sek on a Windows PC. Hmmm, It would be interesting to see what kind of result i would get with PCLink on the same PC.

 

I'll look into it (atr performance on Android) if time permits, as it's quite interesting to see that PCLINK is even slightly faster on Android than on my Linux laptop:

 

http://atariage.com/...-4#entry3791522

 

:)


Edited by greblus, Sun Jul 2, 2017 3:17 PM.


#235 mr-atari OFFLINE  

mr-atari

    Moonsweeper

  • 430 posts
  • Location:netherlands

Posted Mon Jul 3, 2017 1:14 AM

Performance of PClink can't be true.
RWTEST uses the Atari's NMI-clock to count time, if disabled/altered by the driver you get these strange readings.

 

The highest data-rate I ever got was using synchronous clock.

300k TX and 175k RX (due to the resistor/caps-array on the serial-lines)

(My SIO2Arduino-project.)

Writing is slow due to the massive overhead on the arduino and SD-media.

 

Pokey can do 440k (4cl/bit), but without protection on the data-lines, not a good idea....

Also, you have to disable all.... NMI/IRQ/ANTIC.

Then with a extreme tight routine, you can pull-off 4cl/bit.

I called it warp-factor 4, 2 years ago, tested it on altirra with the help of Avery.
(He implemented a dev-device using external clocking)

It works, but hardware limitations stopped the project.

 

Anyhow, was fun digging this stuff up again.

 

 

Attached Thumbnails

  • naamloos.png


#236 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 12,861 posts
  • Location:United Kingdom

Posted Mon Jul 3, 2017 3:00 AM

Performance of PClink can't be true.
RWTEST uses the Atari's NMI-clock to count time, if disabled/altered by the driver you get these strange readings.


Using your own calculation:

57600 bps will yield 5.76 kB/s maximum, due to adding start/stop-bits.
You get 10 bits for every byte transmitted.


126000 / 10 = 12.6 KB/s (although admittedly IO was said to be running at 115 kb/s).

Beside that, you need to add host / device response time.
Command-time, idle-time, sending/receiving extra bytes like "Ack" "Cmpl"....


The only command-time, idle, ack, etc, overhead with PCLINK is the command frame which begins the IO, and a single transfer may be tens of kilobytes in size.

I'm not saying the benchmark is necessarily 100 per cent accurate, but it's pointless comparing PCLINK to any protocol which uses 128 or 256 byte sectors.

#237 TheMontezuma OFFLINE  

TheMontezuma

    Dragonstomper

  • Topic Starter
  • 565 posts
  • Location:Hildesheim, D / Kraków, PL

Posted Mon Jul 3, 2017 1:59 PM

You guys have done a terrific job with adding Hi-Speed support for SIO2BT (and PCLINK in AspeQt for Android) :thumbsup: :thumbsup:  :thumbsup:

Thank you for that :)

 

It is clear that we shouldn't compare benchmarks with sector based and file based approaches.

The most of the time PCLINK will be much faster. The only exception -> working with very small files (with size smaller than a sector size).



#238 Larry OFFLINE  

Larry

    River Patroller

  • 3,947 posts
  • Location:U.S. -- Midwest

Posted Sat Nov 18, 2017 7:35 AM

I thought I might give this another whirl since I've got a spare Android phone now.  My initial tests did not go particularly well, but that was a couple of years ago, I believe, so they may have been some progress.  I'll be using Mr-Atari's MyBios as the OS.

 

I have to buy a new module, having lost my original, and they seem to range from a little over $1 to about $15 or so.  Is there any difference -- do any modules work better than others?   I know that with regular BT audio, there can be a big difference in latency, so if you are watching TV, the sound is not in sync with the picture.  Anything like that that might affect use with the Atari?  I'd be happy to pay more if it will work better.

 

Anyway, if anyone has a suggestion of one that works really well, I'd live to hear about it.

 

Edit: I see that some of these are listed as HC05 and some as HC06.  Does this make any difference for our use?

 

Thanks,

Larry



#239 Larry OFFLINE  

Larry

    River Patroller

  • 3,947 posts
  • Location:U.S. -- Midwest

Posted Sat Nov 18, 2017 8:56 AM

Maybe a dumb question, but did anyone ever build a hardwired version of this to an Android phone?  Would use an SIO2PC-usb with a mini connector? Could use handshake and eliminate all the dropouts?

 

-Larry



#240 vitoco OFFLINE  

vitoco

    Chopper Commander

  • 215 posts

Posted Sat Nov 18, 2017 11:37 AM

Maybe a dumb question, but did anyone ever build a hardwired version of this to an Android phone?  Would use an SIO2PC-usb with a mini connector? Could use handshake and eliminate all the dropouts?
 
-Larry

This is my hardwired version: http://www.vitoco.cl/atari/SIO2BT/
I use it with my Android phone, but I also used it with RespeQt in Windows.

#241 mr-atari OFFLINE  

mr-atari

    Moonsweeper

  • 430 posts
  • Location:netherlands

Posted Sun Nov 19, 2017 2:09 AM

Well, Larry triggered me to re-do some BT-investigations.

 

But:

Since my last update of the SIO2BT-app, I can not open any disk in RW mode.

Even when I press long, select RW, it only does R....

 

Any suggestions?

 

Grtz,

Sijmen.



#242 TheMontezuma OFFLINE  

TheMontezuma

    Dragonstomper

  • Topic Starter
  • 565 posts
  • Location:Hildesheim, D / Kraków, PL

Posted Sun Nov 19, 2017 2:28 AM

But:

Since my last update of the SIO2BT-app, I can not open any disk in RW mode.

Even when I press long, select RW, it only does R....

 

Any suggestions?

 

There were recently no changes related to R/RW handling in the app and it still works well here.

If the app has no write permisions to a file, it will be opened in Read only mode.

 

I don't know what exactly happened, but why don't you try to restart the phone?



#243 mr-atari OFFLINE  

mr-atari

    Moonsweeper

  • 430 posts
  • Location:netherlands

Posted Sun Nov 19, 2017 2:50 AM

I have a new phone, perhaps that is the issue?

 

Moto C+

Android 7

sio2bt-directory is on the extra MicroSD-slot.

 

I restart my phone each morning, so I guess that is OK.



#244 TheMontezuma OFFLINE  

TheMontezuma

    Dragonstomper

  • Topic Starter
  • 565 posts
  • Location:Hildesheim, D / Kraków, PL

Posted Sun Nov 19, 2017 6:52 AM

I have a new phone, perhaps that is the issue?

 

Moto C+

Android 7

sio2bt-directory is on the extra MicroSD-slot.

 

I restart my phone each morning, so I guess that is OK.

 

Could you please copy one atr file to the internal flash and give it a try?

I remember a similar issue reported by Tigerduck with his (Samsung?) phone.

The ATRs on the external MicroSD card could only be opened in read only mode :(



#245 mr-atari OFFLINE  

mr-atari

    Moonsweeper

  • 430 posts
  • Location:netherlands

Posted Thu Nov 23, 2017 3:55 AM

OK, I'm not quick this time....

 

But I can not navigate to the internal memory.

When I select a disk and go back, back, back, the screen is blank (nothing to select, just a black screen).

Only option is the (BACK) key on my phone.

This brings me back to the SIO2BT overlay with D1..D4 etc.

When I select (again) a disk, I'm back in the folder on my external SD....

 

No idea, I'm better with 8bit computers I guess.



#246 TheMontezuma OFFLINE  

TheMontezuma

    Dragonstomper

  • Topic Starter
  • 565 posts
  • Location:Hildesheim, D / Kraków, PL

Posted Fri Nov 24, 2017 2:25 AM

But I can not navigate to the internal memory.
When I select a disk and go back, back, back, the screen is blank (nothing to select, just a black screen).

 
SIO2BT app uses the following API when started the first time.
https://developer.an...rageDirectory()
This is where you start to navigate to the folder with your ATR files. There is no restriction in the app to go up to the parent directories, as long as they are available.
 
Here is a nice article explaining how storage is organized in Android and how to use it:
http://codetheory.in...ternal-storage/
 
Short summary: each Android device has:
- internal storage - not accessible to the PC when a phone is connected via USB (that means actually not so interesting for us, since you can't copy ATR files there)
- external storage - accessible via USB - it is a little bit confusing, but even a part of an internal phone flash memory is considered as an "external storage" (this is what I meant to try it out). Also SD cards are visible as an external storage.
 
The access to the SD cards (seen as external storage) for the apps can be READ or READ/WRITE.
For WRITE access the App has to request it in the manifest, which SIO2BT app does (android.permission.WRITE_EXTERNAL_STORAGE).
However writing may still be restricted by the phone :(
 
Please look at the following article about SD cards usage since Android 6.0:
https://motorola-glo...p/30,6720,10211
Perhaps you can play around a little bit and find a solution that allows for WRITE access to your SD card?

Edited by TheMontezuma, Fri Nov 24, 2017 3:11 AM.


#247 mr-atari OFFLINE  

mr-atari

    Moonsweeper

  • 430 posts
  • Location:netherlands

Posted Fri Nov 24, 2017 4:50 AM

OK, I have no clue why I can not navigate to storage/emulated/0 when on my external memory....

 

So I have removed the app and re-installed it.

Now I can see the internal memory.

But when I use the app to look into the external, I can not go back, again I get the black screen.

Only the android-back key works, sending me back to the overlay.

Bus since I installed it new, the first folder it looks again in internal.

 

Shoot me, but now it works.

R and RW, from internal memory.

R only from external memory (No RW possible).

So I moved my ATR's to the internal....

 

And I am fucked again.

Once you open a single ATR from external SD, the navigator starts external.

No way to get back to storage/emulated/0

Sigh.... I just remove and install the app again.

 

So anybody with the same issue?

Just delete app and reinstall it.

 

BTW:

When I "TICK" the option deactivate animation to decrease the CPU load:

The animation is ON (not OFF).... That is, activity is shown with a green blinking floppy-middle.
Not a big issue, just something to report.

Keep up the great work!

Sijmen.



#248 TheMontezuma OFFLINE  

TheMontezuma

    Dragonstomper

  • Topic Starter
  • 565 posts
  • Location:Hildesheim, D / Kraków, PL

Posted Fri Nov 24, 2017 2:28 PM

Once you open a single ATR from external SD, the navigator starts external.

No way to get back to storage/emulated/0

Sigh.... I just remove and install the app again.

 

So anybody with the same issue?

Just delete app and reinstall it.

 

BTW:

When I "TICK" the option deactivate animation to decrease the CPU load:

The animation is ON (not OFF).... That is, activity is shown with a green blinking floppy-middle.
Not a big issue, just something to report.

Keep up the great work!

Sijmen.

 

Hi Sijmen,

Please update the app to the new version (2.83) via Google Play.

Now, while browsing files, you can long press "Up" item (I renamed "Back" item to "Up").

 

This will take you to the default storage location, so you don't need to reinstall the app every time.

 

Regarding the checkbox for SIO animation - it works well on my phone. If you switch it OFF and go back to the settings, is it persisted, or is it again ON in the settings?

Regards

Marcin



#249 mr-atari OFFLINE  

mr-atari

    Moonsweeper

  • 430 posts
  • Location:netherlands

Posted Sat Nov 25, 2017 1:24 AM

Hi Marcin,

 

Great, navigation now works.

Long UP brings me back to the internal, nice!

 

About the SIO animation:

I don't understand the tick-box I guess.

It reads: "Deactivate the animation to decrease CPU load"

So, for me, this means;

tick=Deactivation ON (no animation)

untick=Deactivation OFF (yes animation)

Correct?

 

When it is unticked, I have no animation.

When it is ticked, I have animation.

With animation I mean the center of the disk blinking green

 

Grtz,

Sijmen.


Edited by mr-atari, Sat Nov 25, 2017 1:25 AM.


#250 manterola OFFLINE  

manterola

    Space Invader

  • 39 posts

Posted Sat Nov 25, 2017 9:42 AM

Same problem here. I also have the problem in aspeqt for android. My workaround is to use sio2bt for external, since I cannot go back to /storage/emulated/0.. and use aspeqt for internal, and never go out of the internal storage since I know I cannot return to it.
Now I will try the long press.
I was thinking in changing permissions, or creating a link in the internal folder to the external sd.
Another idea for Marcin, could be the ability to write manually the path you want to go. So I'll be able write any location you want, egged if it is not listed. But I guess the long press solution is enough.
Do you know some trick to go back to the internal directory in aspeqt?

Edited by manterola, Sat Nov 25, 2017 9:44 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users