Jump to content

SIO2Arduino


20 replies to this topic

#1  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Mon Jan 2, 2012 4:41 PM

Hi all,

I've decide to give the device I'm working on the very unimaginative name of SIO2Arduino. It currently supports reading/writing/formatting of SD/ED ATR and XFD images.

My test setup is an Arduino Mega 2560 with an Ethernet Shield. For debugging purposes, I'm currently changing disk images by hooking up a switch to Arduino pin 8. This will basically cycle between all the valid disk images at the root of the SD card (directory support will come a bit later).

I plan to add some sort of remote capability so the device can be controlled by the Atari and become more generally useful. I'm still deciding what the best solution for that is. Once that's complete, I can modify it to work with the less expensive Arduino Uno which should allow the device to run on much smaller hardware.

I basically figured now was a good milestone to start using source control and allow others to see it. The GPL'd code is available here:

https://github.com/w...are/SIO2Arduino

I will continue to work on enhancing it and hopefully you SIO experts out there can let me know if I'm doing anything terribly wrong in the code (quite likely). Just be gentle -- I'm still learning Arduino as well as Atari SIO :-)

Comments and feedback welcome!

->Dan

Edited by Farb, Mon Jan 2, 2012 4:54 PM.


#2  

    Star Raider

  • 75 posts
  • Joined: 12-September 07

Posted Mon Jan 2, 2012 5:00 PM

Very cool project!

I've seen the pre-Uno Arduinos used as an inexpensive sio-2-USB interface using its FT232 chip. This doesn't even use the Arduino's microcontroller. Haven't figured out yet how to do the same function with the UNO's different serial chip.

I thought it would be a great idea to make a device like this, but unfortunately it's a bit beyond me and staring really, really hard at my Arduino somehow just didn't make it happen. ;-) So I'm glad someone more capable is making the attempt.

#3 ONLINE  

    River Patroller

  • 2,069 posts
  • Joined: 29-October 09
  • lookin for bits, i like bits...
  • Location:in my cave of despair, surrounded by toys...

Posted Mon Jan 2, 2012 11:30 PM

I will definitely keep an eye on this, as it has interesting possibilities...

sloopy.

#4 ONLINE  

    Quadrunner

  • 9,840 posts
  • Joined: 29-September 05
  • Location:Australia

Posted Mon Jan 2, 2012 11:49 PM

What would be real cool is a SIO2SD device that piggybacks the display onto the existing one generated by GTIA.

Re ATRs and sizes. It's best not to lock into any legacy standard.
ATR is flexible in that you can have arbitrary # of sectors and 128, 256 or 512 (?) bytes/sector.

Also you need to cater for the higher densities doing short read/writes (ie 128 bytes). Unsure if that's only sector 1-3, first track or the entire disk.

Edited by Rybags, Mon Jan 2, 2012 11:59 PM.


#5 ONLINE  

    River Patroller

  • 2,069 posts
  • Joined: 29-October 09
  • lookin for bits, i like bits...
  • Location:in my cave of despair, surrounded by toys...

Posted Tue Jan 3, 2012 12:24 AM

View PostRybags, on Mon Jan 2, 2012 11:49 PM, said:

What would be real cool is a SIO2SD device that piggybacks the display onto the existing one generated by GTIA.

Re ATRs and sizes. It's best not to lock into any legacy standard.
ATR is flexible in that you can have arbitrary # of sectors and 128, 256 or 512 (?) bytes/sector.

Also you need to cater for the higher densities doing short read/writes (ie 128 bytes). Unsure if that's only sector 1-3, first track or the entire disk.

IIRC only sectors 1-3...

sloopy.

#6  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Tue Jan 3, 2012 2:26 PM

@eeun, @sloopy: Thanks, I hope people will find eventually find it useful and hopefully contribute to it since the hardware is so readily available.

@Rybags: Can SIO even alter the display at all? I haven't done anything with DD images yet. I will have to find (or make) a few and try it out.

#7 ONLINE  

    Quadrunner

  • 9,840 posts
  • Joined: 29-September 05
  • Location:Australia

Posted Tue Jan 3, 2012 7:21 PM

The OSD I suggested would be something generated by the device - no involvement from the computer itself, although it could be affected by what's going on, e.g. display command, aux data.

#8  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Wed Jan 4, 2012 1:57 AM

@Rybags: That would be pretty cool. However, at the moment I don't have the slightest idea how to even approach it :-)

Another update: I spent some time reverse engineering the PRO format and got a simple PRO disk image to boot. It doesn't support any copy protection yet, but I'll see what I can do. It seems like bad sectors and CRC errors shouldn't be too difficult to emulate... it's duplicate and phantom sectors that will probably be difficult.

#9 ONLINE  

    Quadrunner

  • 9,840 posts
  • Joined: 29-September 05
  • Location:Australia

Posted Wed Jan 4, 2012 2:03 AM

You'd possibly need to employ some sort of rotational algorithm and calculate delay and what sector should be presented (e.g. dup sector).

I'm not sure just how much effort it'd be worth, I doubt there's much out there that's not been cracked.

Edited by Rybags, Wed Jan 4, 2012 2:05 AM.


#10 ONLINE  

    Stargunner

  • 1,480 posts
  • Joined: 29-October 02
  • Location:Victoria, Canada

Posted Wed Jan 4, 2012 10:38 PM

you are probably better off trying to support the APX/VAPI format (see atarimania).


#11  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Thu Jan 5, 2012 1:18 AM

My problem with the VAPI format is I haven't seen a way to actually create images. I have a bunch of PRO images that I've created using ProSystem that I'd like to use outside of APE.

#12  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Thu Jan 5, 2012 5:09 PM

I've made an update to SIO2Arduino on GitHub that has partial support for PRO protected disk images. It can successfully boot 5 of the 6 PRO images that are included with APE.

Edited by Farb, Thu Jan 5, 2012 5:09 PM.


#13  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Tue Jan 10, 2012 5:43 PM

I've updated the firmware code and project page with support for the Arduino Uno as well as an optional LCD display to show the name of the currently mounted image.

It should now be possible to try some of the smaller Arduino boards that could easily fit inside an Atari case (although I probably won't be doing it myself anytime soon).

I've also got PRO image support working pretty well... it now boots all PRO images that I've tried so far.

Next up will hopefully be support for the SDRIVE control software :-D

Edited by Farb, Tue Jan 10, 2012 5:45 PM.


#14  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Wed Jan 11, 2012 12:47 AM

Here's a pic of SIO2Arduino running on the Arduino Uno with an LCD screen.

Attached Thumbnails

  • Attached Image: IMG_0029.jpg


#15  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Tue Jan 17, 2012 2:37 AM

After reviewing the documentation and running my SDrive device through a logic analyzer, I've managed to add very preliminary SDrive support to SIO2Arduino.

It is currently really basic and allows you to run the SDrive command program to see the first 20 files in the root of your SD card. Using the SDrive program to mount an image to any drive will mount it on drive 1.

There's still a lot about the SDrive command protocol I don't quite understand but this is at least a start :grin:

#16  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Mon Jan 23, 2012 1:56 AM

I just got the first ATX (Archon) to boot with SIO2Arduino!

ATX support will most likely only be supported with a Arduino Mega 2560 since file index data needs to be stored in SRAM and the Arduino Uno doesn't have enough (2k vs. 8k).

My ATX notes (thanks to ijor and phaeron for their contributions to it) are here: http://www.whizzosof...duino/vapi.html

Edited by Farb, Mon Jan 23, 2012 1:56 AM.


#17  

    River Patroller

  • 2,242 posts
  • Joined: 26-February 07
  • New Orleans Saints Super Bowl XLIV Champions
  • Location:Switzerland

Posted Mon Jan 23, 2012 11:21 AM

If possible make a loader like SIO2SD (supports long files names of all files displayed on screen, not selected file only like SDrive).

#18  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Mon Jan 23, 2012 11:28 AM

Unfortunately, the current Arduino SD libraries only support 8.3 filenames.

#19  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Mon Jan 23, 2012 3:55 PM

The changes to support ATX are now up on GitHub. It currently doesn't do accurate timing, uses a simple flip-flop algorithm for duplicate sectors and ignores weak sectors so some images will not work. The ones I've tried thus far all seem to work ok. Once the way the ATX format stores weak sectors is documented, I will implement support for them. Accurate timing will be more of a challenge as memory is getting tight.

#20  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Tue Jan 24, 2012 8:55 PM

XEX support is now added and checked into GitHub!

#21  

    Chopper Commander

  • 105 posts
  • Joined: 01-February 06
  • Location:Colorado, USA

Posted Mon Jan 30, 2012 10:58 PM

I've added preliminary support for SDrive directory navigation as well as added support for a "reset" button that automatically mounts a file named "AUTORUN.ATR" in the root of the SD card.

There doesn't seem to currently be an easy way to go to the current working directory's parent directory so navigating up one level in the SDrive software takes you back to the root directory for now.

These changes should now make the SDrive software fully usable to control SIO2Arduino. There is, however, still a lot of work left to make SIO2Arduino fully compatible with the SDrive software. Whether that's necessary or not is an open question :-)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users