• Please review our updated Terms and Rules here

A PET storage option

bitfixer

Veteran Member
Joined
Apr 6, 2011
Messages
679
Location
San Francisco, CA
Hey there PET fans,

I had some time in the last few days, and hacked up a simple drive emulator for a PET.
It's in the breadboard stage right now, but I can save and load programs to/from a FAT32 formatted SD card attached to an Atmel ATMEGA16 microcontroller.
It doesn't support D64 disk images, but I can load and save .prg files to the card.
If people are interested I'll be posting schematics and source code within the next couple of days.

Parts required are a ATMEGA16, micro-sd adapter, and a cable to connect to the IEEE-488 port on the PET: an edge connector and ribbon cable will work.

Some pics of the project so far:
http://www.flickr.com/photos/25219890@N06/sets/72157626969258483/
 
Cool.....


(Just got a disk drive for my pet, Still waiting on the cable and the ram/rom board so it can actually support one.)

Later,
dabone
 
And of course just today I ordered some 5 1/4 floppy disks... ;^b

(Eh, I want to see if I can get the drives working anyway. But assuming I ever get all the bugs worked out of my PET an SD card interface would be a more practical daily driver.)
 
(Just got a disk drive for my pet, Still waiting on the cable and the ram/rom board so it can actually support one.)
Later,
dabone
Ah, right, of course! You only have BASIC 1, which is why you were asking about the JB 6540 adapter; I'll dig through my notes, but you'll probably get the Welte board before I find it ;-)
 
Hi there,

An update on the PET/SD storage device -
I upgraded the pet disk emulator from breadboard to protoboard this weekend, and it seems to be working well.
It supports saving and loading programs, and directory listing using "LOAD "$",8".
There are some rough edges to iron out still, such as:
- support for long filenames when saving a program
- handling error conditions when files are not found (currently if you try to load a non-existent program the board goes into a waiting condition and you need to reset to escape)
- handling multiple hardware addresses
Currently the software doesn't pay attention to device address, and responds to LOAD/SAVE for any hardware address (8,9, etc) used by the IEEE488 port. At the moment the PETdisk just keeps NDAC low and responds to all listen/talk commands. It would be a good and relatively simple addition to specifically respond to only one hardware address. I don't have any actual PET disk drives at the moment to test this out, but I welcome someone who has the equipment to make the additions to the code..
Schematics and code are up at:
http://thedigitalgroup.org/petdisk
This is a bare bones page for the moment, but perhaps I should put this up on Sourceforge?
I welcome any comments/questions. If you are thinking about making one of these feel free to ask me any questions. I used an ATMega16 microcontroller, and for the SD card I soldered wires onto the pins of a MicroSD adapter. Pinout here: http://pinouts.ru/Memory/sdcard_pinout.shtml
The SD card should be formatted on a computer using the FAT32 file system.
I used code from CC Dharmani's project on interfacing an ATMega8 with an SD card: http://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html
I added the IEEE488 interface code and added long file name support for file reads.

Thanks for looking!
 
Some additional pictures of the drive emulator in action:
http://www.flickr.com/photos/25219890@N06/sets/72157626969258483/

I used an empty CD-R case for a project enclosure - not much to look at but free, and convenient.
I already had a PET edge - amphenol male cable around, so I gave this an amphenol female socket. It runs on 3.3v power, which I get from my Atmel programming board (STK500).
Discovered another bug - seems like if too many files are in the directory, and you try to load one of the later entries in the directory, the board doesn't respond in time to the PET and I get a "file not found" error. Most likely need to speed up the file find function in the code. It's a work in progress..
 
Lookin' good!

I always liked this sort of thing with a PET edge connector on one edge and pass-through fingers on the other end; no cables, no IEEE connectors, and pass-through for a printer or other drive etc.

Great idea using a uSD adapter as a socket BTW; finally a use for them ;-) You can also pick up those multi-card USB readers for a couple of bucks these days with all sorts of card sockets.
 
Thanks..
I had a uSD with two adapters that I used for a G1 phone. Kept looking at it and wondering what to do with it, and luckily this project came around. Last I checked uSD card/adapter sets are quite cheap, and you might even have one lying around already. Hopefully the project is useful/interesting to folks here..
For the protoboard, I used a little experimenter PCB I picked up at radio shack for a couple of bucks. Had a couple of bus lines down the middle and enough interconnects to make it useful. Made a few projects with protoboards with no copper on them, that wasn't too fun. All told, 1 microcontroller, 1 uSD adapter, 2 resistors, and a connection to the IEEE488 port.
For power, I'm just using the 3.3v out from the STK500 programming board - but I imagine it would be possible to use the 5v output line from the PET's cassette port and regulate it down to 3.3v. Haven't tried it but thought it might be a way to make this completely self-contained without need for an external power source.
The TX/RX lines on the ATMega16 can also be connected to a serial port for debugging, but a MAX232 or other RS232 line driver would be needed to convert to RS232 voltages.
 
Thanks Tez, I will keep you posted when I do some more work on it. Once I get that cranky 8032 up and running (hopefully) I'll use this to actually load some programs onto it..
 
Are you thinking to produce a run of boards at some stage in the future? I'm certainly looking for something like this for my PETs. I may even want two.

Phil
 
Are you thinking to produce a run of boards at some stage in the future? I'm certainly looking for something like this for my PETs. I may even want two.

Phil
I'm open to the idea, if people are interested..
It requires very few parts so the board would likely be very small and require little soldering.
It would probably be most useful for people who have an AVR programmer to update the code on the Atmel chip as the code progresses. This is mainly something I did as a quick and simple way to load programs on my PET, without attempting to do a complete emulation of any particular drive or disk format. But it should work fine for data loading/saving..
The firmware for the board is homemade so it's only been tested by me under limited circumstances, and likely there would be updates to fix bugs here and there. I think you could program the ATMega chip with an arduino board, but I haven't experimented much with Arduino and don't know for sure.

Incidentally, another thought I had for this design was to add a connector for the cassette port on the PET.
This way, the board could be powered from the PET and would not require an external power supply. Also I could include datasette emulation in the board so you could save/load to .tap files as well as .prg.

In any case, I will look into making a small run of boards and will let you know. I've used a place called ExpressPCB in the past and they are good for short runs of simple boards.
 
Hi all,

I just ordered a small run of boards for my PETdisk IEEE-488 storage device, so watch this space for updates when I test it out.
This version has a few additions which I think are kind of cool. One is that it adds datasette functionality by plugging in audio in/out cables from jacks on the board to your PC sound card and storing programs as audio files. With the next firmware update it will directly load/save tape files to the SD card, although that part is not working yet.
The boards should be arriving tomorrow or friday so I'll let you know as soon as I get to try it out.
 
Hey there,

Wanted to introduce the first mostly assembled PETdisk board, just arrived in the mail this morning.
PETdisk.jpg
I used an ATmega8 instead of a ATmega16 in this design to save on space. The board plugs directly into the IEEE-488 port on the PET, and passes through the signals to the edge connector on the other side. The device number is selected by three jumpers on the board. A microSD card is used for storage, and plugs into the vertically mounted uSD adapter. A vertical 7-pin header solders conveniently to the adapter pins.
The small board on the right plugs into the cassette port on the PET. The red wires you see there will be replaced by two mono 1/8" jacks. These connect to audio in/out on a computer soundcard, and allow you to save/load cassette programs. With the next update to the firmware, I hope to allow saving/loading cassette programs directly to the SD card, skipping the audio step. Power from the cassette port is used to power the PETdisk board via a USB cable connected between the two boards. The PETdisk can also be powered from a regular USB charger for other devices.

Next step is to check the connections on the board and test it out! I'll keep you posted on how it goes.
 
Hi everyone,

In this age of furious development of PET storage devices, here's my update:
I now have the firmware up to date on the PETdisk board, and it's working!
Now, I can load and save .prg files, select the device ID by changing jumpers (8,9,10, or 11), and run additional IEEE-488 devices through the passthrough on the card. Also it's powered from the cassette port via USB cable, and allows you to save/load cassette programs with audio in/out on your computer's sound card. I will post a demonstration video later today.
At the moment I have 4 boards, but could order another run if there is enough interest. One is promised to a forum member but the other 2 are available now. Need to figure out the total cost, but it will likely be under $20 if there's enough interest.
I can sell them assembled or as a kit, as desired.

I highly recommend anyone interested also get Twylo's PET board as well..
The PETdisk is based on 100% homebrew code, and does not attempt any direct support of disk images (at least not at the moment). The PETdisk is nice if you want a tiny, simple and self-powered device that can load and save programs, which also provides a datasette interface. Twylo's is a more complete solution that uses the full sd2iec firmware.

Thanks..
 
The PETdisk is nice if you want a tiny, simple and self-powered device that can load and save programs,

I assume that the SD chip is not soldered into your gadget? Also that if one has a SD interface in his PC, one can transfer .prg files from the PC to the SD memory? And then by plugging it into your gadget, get it into the PET? Will the gadget work this way if all files are kept on the root directory of the SD?

If so, I want one. I will try the other gadget also.
 
Basically I soldered a 7-pin header onto a MicroSD-to-SD adapter. So a microSD card goes into this adapter to serve as the storage for the PETdisk. You can take the microSD card out, and connect it to a computer using a separate microSD-to-SD adapter. Generally any microSD card you buy comes with the adapter - just picked up a 2 gig microSD and adapter at Fry's for $6, so they are pretty cheap these days.
The adapter with the pins connects to the board with a socket, so you can remove the whole thing for ease of changing media.
It supports both standard SD and SDHC cards.

To get .prg files onto the card, you just connect it to a computer, format the card with FAT32, and copy the .prg files into the root directory. When you put the card back into the PETdisk, the PET can see the files.

If this sounds good, I'll mark you down for one.

Just about to make a quick video of the hardware in action which will hopefully explain some of these features more clearly. Thanks!
 
Back
Top