Jump to content
IGNORED

SIO2Arduino


Farb

Recommended Posts

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
  • Like 2
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :-)

Link to comment
Share on other sites

  • 3 months later...

Hi,

 

Are you telling me that I can build an SD drive out of the electronic junk I have in my workshop.... Today???

 

that's pure magic. Thank you so much!

 

The website shows a pretty much complete and well documented project. Is it at its final state? What's next?

I'm trying it this weekend no doubt.

Link to comment
Share on other sites

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

 

That could be formidable. The Arduinos don't have video output themselves. However, there is the Gameduino shield: http://excamera.com/sphinx/gameduino/

 

Still, the Arduino runs this "display" by sending commands over SPI. Like a serial terminal.. Vaguely like the XEP80 "80 column" display that hooks up to the Atari's joystick port.

 

It would still be formidable. Somehow the video from the Gameduino shield has to be mixed with the Atari's.

Link to comment
Share on other sites

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

 

That could be formidable. The Arduinos don't have video output themselves. However, there is the Gameduino shield: http://excamera.com/sphinx/gameduino/

 

Still, the Arduino runs this "display" by sending commands over SPI. Like a serial terminal.. Vaguely like the XEP80 "80 column" display that hooks up to the Atari's joystick port.

 

It would still be formidable. Somehow the video from the Gameduino shield has to be mixed with the Atari's.

 

There's actually very simple composite output library - it's called TVout, it's not really something impressive with color and hires graphics, but it's made out of 2 resistors :)

 

http://code.google.com/p/arduino-tvout/

 

Link to comment
Share on other sites

The website shows a pretty much complete and well documented project. Is it at its final state? What's next?

I'm trying it this weekend no doubt.

 

Thanks for kind words, RodCastler. The project is in a resting state until I get the time and motivation to work on it again. I mostly accomplished what I wanted to with it, namely PRO image support and as much ATX image support as I could implement without the format being properly documented.

 

As for what's next, I don't know. I think the video overlay idea is cool but I'm not knowledgable enough to get something like that working. I'd still like to toy with 850 emulation at some point. One of the reasons I made the firmware open source is so others could jump in and contribute.

 

I've only ever heard of one other person attempting to build SIO2Arduino and he never let me know if he was successful. If you get yours working, please let me know!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...