apple2.ca - Terence J. Boldt's Apple II Site
My ProDOS ROM-Drive
ProDOS ROMDrive (essentially a read-only SSD although in 1998 nobody heard of SSDs)
My first Apple computer was an Apple IIe that my brother bought in early 1984. Countless hours were spent playing games which developed my interest in building games. This also led to the creation of various utilities to help organize disks or just to see what could be done while programming.
As time passed, I obtained other machines far more powerful and eventually my once loved Apple IIe got used less and less. I did still pull it out of storage every few months to play some classic games or see what I could accomplish with greater programming skills. The problem was connecting up disk drives, looking for disks and hoping that the disks still worked. To make life simpler, I decided I needed to come up with some way to permanently store the files inside the computer without needing to plug in anything but the power and video connectors. This is where the idea for a solid-state drive began.
In the summer of 1998 I did some research in my own Apple II library for information on building peripheral cards. I drew up some designs in September 1998 and started building a prototype on a solderless breadboard with the wires jumpered over from a dead parallel card which I had cut the traces on. The rough idea at the time was to have two EPROMs. One would hold the 256 bytes of code in the $Cs00 - $CsFF space (where s is the slot number) and the second EPROM would get accessed through the 16 byte port space for the slot. To access more than 16 bytes, I would have a couple latch chips where you could program in the address of the disk EPROM and then read it one byte at a time through the ports. Originally I was going to make my own modified version of DOS 3.3 but before I got too far, David Wilson from Australia convinced me that it was much easier to build it for ProDOS since it supported many types of drives natively.
By November 1998 I had a prototype on the solderless breadboard that could read data from the EPROM but it had no driver code, didn't boot and was very unreliable. In December I managed to have the two EPROM based system running but it would fail to boot about 80% of the time with various read errors. Shortening the length of wires, cleaning up the layout and a new design helped but it was still unreliable. I finally gave up on the second design but as it turns out, it could have been fixed quite easily.
By mid-May of 1999 I finally got around to building a third design. This time I reduced the chip count and made the firmware for the drive reside in the top two blocks of the virtual disk EPROM. It still was somewhat unreliable in slot one but it was progressively worse as it was placed into higher slot numbers. By slot seven the card was completely unuseable. I then discovered that adding a 104 ceramic capacitor to each chip made the problem disappear. It was suddenly fully reliable.
To build actual circuit boards, I tried making some by hand with marker, etching solution and copper on fibreglass boards but this proved to be far too difficult. I then learned the wonders of gerber files which can be created with a variety of PCB layout software. The files were emailed to a company in Alberta, Canada and three days later in July of 1999 I received a batch of 10 blank boards. These boards did not have the familiar green board look to them, nor were they pre-cut. I had to cut and file them to fit an Apple II slot by hand. Apparently it's prohitively expensive to make less than 20 or 30 boards with the full solder-masking process due to the set-up fees.
If you're planning on designing you own card, I highly recommend reading "Interfacing & Digital Experiments with your Apple" by Charles J. Engelisher and Apple's "Apple II Reference Manual" as well as "ProDOS Technical Reference Manual" if you want to build a drive. You also need an EPROM programmer, some chips and a prototyping board. My designs used simple logic gates to decode addresses but if you want to reduce chip count, you'll also need a PAL/GAL logic programmer (which some EPROM programmers can do).
This is a peripheral card for the Apple ][ series computers that acts as a disk drive all in ROM. Although it won't run DOS, it is fully ProDOS compatible and will appear as a read-only hard drive even when booting from another drive. It holds 1022 KB of disk data and 2 KB of controlling code making a full megabyte. The drive boots ProDOS and into BASIC in under 1.5 seconds.
2018-Jun-06 Gerber, drill and PDF files now available
Both sides as a PDF
2018-Jun-06 Updated license agreement in source code
;This is 6502 assembler code for a ProDOS compatible ;Apple II bootable ROM drive. ; ;Hardware/Software (c)1998-1999 Terence J. Boldt ;You may freely copy and modify this source ;as well as the hardware, providing you give ;me credit for the original design. ; ;mailto:firstname.lastname@example.org ;http://apple2.ca ;Please note this code is assembled seven times, ;once for each slot in the Apple II. ;This allows the card to work in any slot without ;having to write space consuming relocatable code. ;Determine which slot we want by command-line define if SLOT1 slot equ $01 endif if SLOT2 slot equ $02 endif if SLOT3 slot equ $03 endif if SLOT4 slot equ $04 endif if SLOT5 slot equ $05 endif if SLOT6 slot equ $06 endif if SLOT7 slot equ $07 endif ;Calculate I/O addresses for this slot slotwh equ $C081+slot*$10 slotwl equ $C080+slot*$10 slotrd equ $C080+slot*$10 sdrive equ slot*$10 sram0 equ $478+slot sram1 equ $4F8+slot sram2 equ $578+slot sram3 equ $5F8+slot sram4 equ $678+slot sram5 equ $6F8+slot sram6 equ $778+slot sram7 equ $7F8+slot ;ProDOS defines command equ $42 ;ProDOS command unit equ $43 ;7=drive 6-4=slot 3-0=not used buflo equ $44 ;low address of buffer bufhi equ $45 ;hi address of buffer blklo equ $46 ;low block blkhi equ $47 ;hi block ioerr equ $27 ;I/O error code nodev equ $28 ;no device connected wperr equ $2B ;write protect error org $C000+slot*$100 ;code is non-relocatable ; but duplicated seven times, ; once for each slot ;ID bytes for booting and drive detection cpx #$20 ;ID bytes for ProDOS and the cpx #$00 ; Apple Autostart ROM cpx #$03 ; cpx #$3C ;this one for older II's ;display copyright message ldy #$00 drawtxt lda text,y beq boot ;check for NULL ora #$80 ;make it visible to the Apple sta $07D0,y ;put text on last line iny bpl drawtxt ;load first two blocks and execute to boot boot lda #$01 ;set read command sta command lda #sdrive ;set slot and unit sta unit lda #$00 ;block 0 sta blklo sta blkhi sta buflo ;buffer at $800 lda #$08 sta bufhi jsr entry ;get the block lda #$00 ;block 1 sta blklo sta blkhi sta buflo ;buffer at $A00 lda #$0A sta bufhi jsr entry ;get the block ldx #sdrive ;set up for slot n jmp $801 ;execute the block ;This is the ProDOS entry point for this card entry lda #sdrive ;unit number is $n0 - n = slot cmp unit ;make sure same as ProDOS beq docmd ;yep, do command sec ;nope, set device not connected lda #nodev rts ;go back to ProDOS docmd lda command ;get ProDOS command beq getstat ;command 0 is GetStatus cmp #$01 ; beq readblk ;command 1 is ReadBlock sec ;Format/Write not permitted lda #wperr ;write protect error rts ;go back to ProDOS getstat clc ;send back status lda #$00 ;good status ldx #$00 ;1024 blocks ldy #$04 ; rts readblk lda blkhi ;get hi block asl a ;shift up to top 3 bits asl a ;since that's all the high asl a ;blocks we can handle asl a ; asl a ; sta sram0 ;save it in scratch ram 0 ;so we can stuff it in the ;high latch later lda blklo ;get low block lsr a ;shift so we get the top 5 lsr a ;bits - this also goes in lsr a ;the high latch ora sram0 ;add it to those top 3 bits sta sram0 ;save it back in scratch ram lda blklo ;get low block asl a ;shift it to top 3 bits asl a ; asl a ; asl a ; asl a ; sta sram1 ;save it in scratch ram jsr get256 ;get first half of block lda sram1 ;get low latch and #$F0 ;clear bottom 4 bits ora #$10 ;set bit 5 for second half ;of 512 byte block sta sram1 ;save it back in scratch inc bufhi ;write 2nd block up 256 bytes jsr get256 ;get second half of block dec bufhi ;put ProDOS buffer back clc ;clear error code for success lda #$00 rts ;return to ProDOS ;This gets 256 bytes from the ROM card ;assuming high latch value is in sram0 ;and low latch value is in sram1 get256 ldy #$00 ;clear buffer counter lda sram0 ;get high latch value sta slotwh ;set high latch for card loop256 ldx #$00 ;clear port counter lda sram1 ;get low latch value sta slotwl ;set low latch loop16 lda slotrd,x ;get a byte sta (buflo),y ;write into the buffer iny inx cpx #$10 bne loop16 ;go until 16 bytes read inc sram1 ;next 16 bytes cpy #$00 bne loop256 ;go until 256 total rts text db "ROM-Drive (c)1998-1999 Terence J. Boldt", 0 org $C0FC+slot*$100 db 0,0 ;0000 blocks = check status db 3 ;bit 0=read 1=status db entry&$00FF ;low byte of entry
Josef Huber sent me an a nice schematic of the drive since my schematics were hand drawn. I fixed the one mistake on it and sent it back with some annotations in red.
2002-Jun-20 Discontinued (sort-of)
I no longer have any boards left but if someone *really* wanted one, I could have more produced. This was a very fun project to work on and I got to share it with other people. It was also a learning experience on many levels. I now know that a simple idea for hardware project can take years to get around to starting and a year of free time to produce. I also learned lots about how the Apple II works so if you're building a hardware project and have some questions, feel free to email me.
1999-Aug-23 No more waiting list, buy one today!
Go ahead and order a drive if you want one. No waiting list! Also feel free to email me with ideas for the 'next' Apple II project. I think I'll start another project shortly... Don't worry, I plan to keep on selling these ROM-Drives for a while.
To get your ROM-Drive customized with your choice of software on it, you will need to have a disk image (or disk images). The best way to do this is with an emulator running on a PC or Mac. To be sure you get exactly what you're expecting, it's best to use Apple II Oasis which allows you to create a 1022 KB hard disk image. Optionally, you can put 1022 KB of ProDOS files contained within several standard 140 KB .DSK or .PO disk images. Fill the drive with your choice of ProDOS compatible files and then email me for further instructions. Pricing is $80 Canadian including shipping in Canada, $60 U.S. including shipping to the U.S. and $55 U.S. + shipping for international orders. This pricing is just slightly above my costs and the boards are available in limited quantities. Also available as an option is a ZIF socket and extra ROMs so you can easily swap disk images for more space.
1999-Jul-19 Sold Out (first batch of PCB's)!
It only took 4 days to sell out of the first round of 6 PCB's. If you're interested in purchasing a ROM-Drive, email me so I can put your name in on the waiting list. Once I have at least 5 orders I will have more boards made up. It only takes 2 to 3 days to have the boards made.
1999-Jul-15 Final Product Finished!
Nearly a year after I first decided to build a card for the Apple II, I finally have a finished product. The board is only tin plated copper without any 'green' solder mask or white silk screening, but it works and works well. Here is a B&W scan of the front and the back.
As announced on comp.sys.apple2, I will be selling six boards and keeping two for myself. This is a non-profit hobby but I will be charging slightly above my cost in order to cover the price of materials used for development. The pricing is as follows:
$80.00 Canadian funds (includes shipping to anywhere in Canada)
$60.00 U.S. funds (includes shipping to anywhere in the United States)
$55.00 U.S. funds (shipping extra for any other country)
Included in the price is a 4 Mb EPROM (512KB) unless I can find some 27C080's for a decent price. I will burn the EPROM with whatever programs you send me (that will fit of course). If all six sell out before you get a chance to buy one, I will entertain the possibility of having more PCB's made up.
Thank-you everyone who has shown an interest in this project. If you have suggestions for the next project, email me with your ideas.
1999-Jul-06 Third Design PCB Layout
I bet you're wondering why I haven't had an update in almost two months (or maybe not). To cut the sob story short, my PC died and I lost the work I was doing on the PCB layout. For those who know that I write backup software for a living might ask why I didn't have a backup but I have no answer. Anyway, after I got back from vacation, I got a new computer and I'm proud to say that I have started and finished the PCB layout for this final design. I will be ordering 8 prototype boards later this week. If all goes well, I will have a finished product sometime in August. That's not quite one full year from the time I orginally thought of making this ROM-Drive. I've learned a lot by doing this project and the next project will take much less time.
1999-May-18 Third Design Schematics
I scanned in my schematics for the address/data bus as well as the enable/clock/direction lines. This is my third and last design for the card. Hopefully I'll have the PCB layout by next week. So far I've booted the prototype well over 100 times and it has never failed (since the capacitors were added). The 512K drive currently has about a dozen games, ProDOS and a couple utilities on it. It should be a decent size. It would be nice to find some 27C080's to bump that up to 1 MB, but this is ok for now.
1999-May-15 Third Design Prototype
The first prototype of the latest design didn't work. I tore it apart and when I had about 3 or 4 wires left to rip out, I noticed one was broken. So after three hours of building it again, it sort of worked. Oddly enough it worked 47 of 50 boots in slot one but as I moved it up slots it became less reliable until in slot seven it booted once in about 30 tries. Once again I checked and shortened wires to improve reliability. Finally I got that brilliant idea to add a 104 capacitor to each chip (like every other PCB on the planet has) and suddenly it works fine in any slot. This new design uses only one EPROM by putting the boot code in the top 2K of the ROM. It now uses 3 octal buffers (74LS245), 2 octal latches (74LS374), 1 NAND (74LS00), 1 OR (74LS32) and any 28 or 32 pin 27 series EPROM (2764 - 27C080). It could use less chips by accessing the disk image through the same 256 bytes as the boot code, but then I'd have to have a custom version of ProDOS or DOS to support it. As it stands it appears as a regular ProDOS compatible disk drive.
1999-May-05 Third Design
I will be slightly changing the format of this web site soon. I want to put up designs from other people. Leslie Ayling and David Wilson have both created flash ROM-drives. I'm always interested to see what people have done in the way of Apple II hardware.
As for my project, I was ready to have the boards printed. After seeing a flash ROM-drive with only one ROM on it, I felt the need to improve my ROM-drive. Last night I came up with a new design (last time - I promise!) that uses a single 27C080 EPROM for both the ProDOS code as well as the disk image. I'll build the prototype in the next week or so and for sure have the boards made up by June. I think it's worth the redesign since it has one less chip and may take up slightly less space. For now I will be sticking with a straight EPROM design instead of flash-ROM since it's easier to make it a full megabyte.
1999-Apr-12 Tested Second Design Prototype
I tested the design with a 27C010 (128Kx8) chip now and it works perfectly. I think it is safe to say that it will work with any chip from 2764 (8K x 8) up to a 27C080 (1M x 8). I discovered that my programmer does support those 1 MB EPROM's so I'm ordering a few this week. I also found a cheap 512 KB Flash RAM chip, so there is potential for a new design on the horizon. I should be able to finish the PCB design for the current 1 MB drive by next weekend. It would be nice to have a finished product before starting with a new one.
1999-Apr-07 Second Design Prototype
Whoa! After redoing the PCB layout to make the board neater and smaller, I decided to start the complete design from scratch. Last night I built the new prototype and it works flawlessly. I booted it many times and it hasn't messed up a single byte yet. I even played a game of H.E.R.O. off of it running under ProDOS. Again, PRODOS and BASIC.SYSTEM boot and load in under 1.5 seconds on a 1 MHz IIe. As a bonus, the new design uses only one disk image ROM of just about any size up to 1 MB instead of using 4 ROMs of 64 KB each. I still use NAND and AND gates for decoding because I don't have a PAL/GAL programmer. A couple more chips could be cut from the new design which currently includes one firmware ROM (2716), one disk image ROM (2732 - 27040), two latches for addressing (74LS374), one line buffer (74LS245), one AND chip (74LS08) and two NAND chips (74LS00).
1999-Mar-09 Useless Update
I'm still waiting for price quotes. Also, since I just wasted all my money on a brand new Yamaha scooter, I'll have to wait a couple pay checks before I can purchase anything. Check back in April some time. I should have some good news by then.
Thanks to Mike and a couple other people for pointing out some alternate
|All content Copyright ©1984-2003, Terence J. Boldt, unless noted otherwise.|