Hello,
I have designed and built a Apple ][ card that can interface two SD cards as ProDOS block devices. It uses very commonly available chips, and is based on the ATMEGA328P microcontroller and 82C55 peripheral interface. It uses simple readily available parts to be easy to reproduce, now and into the future. It can host ProDOS order block devices from either raw block device SD cards or from FAT filesystem formatted SD cards. I also have planned interfacing the card to a Wiznet 5500 for Ethernet support.
You can find the github site with the gerbers and firmware at:
http://www.github.com/profdc9/Apple2Card
You can also find many other projects I've done on my github as well.
Dan
That looks really great. Very clean! Simple throughhole design with standard components. Neat. I also thought about an ATMEGA-based interface card for a while - using latches or shift-registers for the ATMEGA/AppleII interface. But using the 8255 looks really good - reduces the number of used components. A simple solution connecting an ATMEGA to the Apple II bus could also be used for many other purposes...
Concerning the flash/EEPROM: how about adding a pull-up and jumper, so the EEPROM's /WE can be jumpered to 6502 R/W. This would eliminate the need for a TL866 programmer - when using the 28C256 EEPROM. A dedicated bootstrapper/programmer utility for the Apple II could then write the ROM image to the EEPROM. This would also simplify updates a lot.
I can't thank you enough for sharing this
do you expect quick revisions (of the board) or did you like run this setpu for 6 months on your own ?
I'm planning to make one for me, this looks really cool and I like doing things myself (instead of ordering a booti)
Two things that I think would be helpful,
- A parts list (especially to chose the right sd slots)
- A photo of a finished project (for inspiration)
super thanks Dan
I just completed this, but it seems to work for booting ProDOS and playing games, reading/writing files etc. The current board is a bodged version but this version has all of the bodges in it. Of course there could still be problems but it is a simple design and probably not much can go wrong with it.
I can provide a parts list but the SD card slot in particular is the most common microSD card slot you can buy. On lcsc there are 5 companies that sell the same format SD card slot. For example:
https://www.amazon.com/QMseller-Spring-Loaded-Transflash-Memory/dp/B07WMSNMLN/
I added a pullup resistor and jumper to the RW bus line, so in principle it should be programmable in circuit. I submitted the change to the github.
Dan
I added control lines for the other 28C256 pins so that the write unlock signal can be sent.
Yes, not a bad idea to allow full control in switching the ROM area anyway. Also means completely different ROM images can be mapped into the boot ROM, so the card can switch its behaviour. One could add a boot menu, providing an option to select the ROM image, so the card could look like a serial interface instead, etc.
A flexible Arduino/ATMEGA platform as an Apple II card does have a lot of other potentials - besides the disk emulation. I'm probably going to make one of these. But it'll take a few weeks before I get to that...
Another idea/optimization: how about leaving the program jumper in there, but disconnecting U3D pin 13, adding a pull-down and connecting it to PIO's PC3. Write-access to the EEPROM is then normally blocked/ignored as it should, but now you have full SW-control to enable write-access via the PIO. The program jumper could remain always plugged (or eventually be replaced by a solder bridge). No need to open the Apple 2 if you wanted to update/change the ROM images...
Also, if the ATMEGA had any available I/O pins (looks like PC4/5 are available?) you could think about hooking one pin up to the Apple2 IRQ. This would allow the platform to be used for projects which wanted an IRQ...
Given the price of serial cards ; if this could in a way be used as a serial card that would be great as well .
How about a bill of materials and photo of a completed board we can compare?
Makes it easier to build.
Thanks!
Bill
PC3 is unfortunately used by mode 2 of the 82C55 and so is unavailable. I could use a line like PB4 on the 82C55. The 28C256 has a special sequence of write instructions needed to address it anyways, so writing to the ROM accidentally is very unlikely to happen, especially as the address lines to the 28C256 need to be manually toggled by the processor through the 82C55. The jumpers are there mainly so that when programming the 28C256 is not needed, the jumpers can be removed and the PB0-PB7 and PC1 and PC2 pins can be used for other purposes by the Apple ][ (for example a parallel IO interface).
As for the IRQ, I kind of want to stick a pin in this version of it, as it already does quite a bit, and I might have to add interrupt priority circuitry if I enable IRQs.
PC4/PC5 can be used as serial lines using SoftSerial. I originally tried to add circuitry so that the built in UART could do double-duty on the 82C55 and as serial, but it was too much of a compromise and kind of flaky.
The nice thing about the 82C55 mode 2 is that it a synchronous interface and therefore is tolerant to interruptions on the AVR side, so that some serial communications could be possible, for example, PC4/PC5 to a ESP8266 using SoftSerial, which is why I broke out those pins onto a separate 10 pin connector so that they could be extended to a separate breadboard.
Dan
Sorry if I missed this but is your project meant to be a Prodos Block mode hard drive emulator, or is it meant to handle .dsk / .po disk images?
It has two modes. The first is that the SD card can be used directly as a block device for ProDOS. This allows many 32 MB volumes to be handled by the driver, so that for example, S7D1 could be one 32 MB volume, s5D1 could be another 32 MB volume, s5D2 could be another 32 MB volume, etc. The FAT filesystem mode provides access to one 32 MB volume at a given time in the form of a PO disk image, so that for example, s7D2 can be the "BLKDEV01.PO" file, which can be read/written by CiderPress for example, so you can use this to transfer files back and forth from the Apple II more easily. There are two SD card slots, and usually S7D1 is served from one slot and S7D2 from the other, so that the boot volume can be left unchanged and the other card swapped while the computer is running. There is a simple interface during boot up that allows the type of volume to be selected.
Price of serial cards? You can buy Super Serial Cards for under $100 easy... that's cheaper than when they were new... Lesser cards like 6850 based can usually be found under $50 if you don't need to run very fast.
I've read through your Github page with great interest.
Maybe I should have done so before asking questions, but I do have more questions as a result.
I'm encouraged with your board design. It looks really quite nice and I'd like to try it.
A Bill of Materials would be very helpful, especially if you have cart data from a popular vendor like Mouser, Newark, or Digikey.
Also, I'm perfectly willing to get cards made, build one and test it and sell the remainder of the cards back to the community - I've done this with projects before, but if someone (perhaps youself) has purchased a number fo boards from PCBWay or another manufacturer, would you make bare PCBs available to the community?
LCSC_Exported_20220615_222017.zip
I've made a Bill of Materials.
I buy my stuff from lcsc.com because it is much cheaper. The shipping is not bad if you use international mail post. Some of the items you may have to obtain from sources other than lcsc because they are on backorder, or if you do not want to use Chinese clone alternatives (for example the 28C256 or the 82C55). I use some of the Chinese alternatives because of the ongoing chip shortage. The attached ZIP file contains a "CSV" file that you can submit to lcsc.com as a Bill of Materials.
I have made PCBs with JLCPCB. I don't mind making the PCBs available but the shipping can get a costly for a lot of boards.
could you please share the list in a plain readable format ?
I've just ordered 5 boards from PCBWay (in continental europe) they afre "46% done" (whatever that means) I should get them in a month or so (snail mail).
Here's a copy of the file as a PDF
https://www.applefritter.com/files/2022/06/15/Bill-Of-Materials.pdf
The 20 nF capacitor should be a 20 pF capacitor.
I only used PCBWay once, I find JLCPCB's HASL finish was much smoother
Thanks for the bil of materials. Can you please add component location to the PDF so we know where the parts go on the board?
Heres a list of parts and their part placement
https://www.applefritter.com/files/2022/06/16/Parts-Placement.pdf
A quick note. If you had the Rev 1 card made (as opposed to the Rev 1.1 card I uploaded last night), solder the pins for J6 on the back side of the board. The pins in the Rev 1 version are reflected if it is to be used with the following board:
https://www.ebay.com/itm/284798824548
A 10 pin IDC extension cable can be used to go between the SD card and this board, however, the pins on the Rev 1 should be sticking out the back, and Rev 1.1 and onward they will be sticking out the front.
Rev 1.1 also added optional access LEDs to show when the SD cards/network is being used.
Well done, Dan.
This is going into my "Will build when time and budget permits" pile right near the top.
Thank you so much for your generosity to the community.
Chesh
Here's a picture of the version 1 board without any bodges.
picver1.jpg
Do you foresee the EEPROM's larger 32K memory to become useful later? Just asking, since the 8K EEPROM (28C64) is significantly cheaper and pin compatible (well, except for 2 missing and unused address lines of course). Since the firmware uses the first 512bytes only anyway, and when you'd not forsee any need for more memory - you could add the smaller device as an option in the parts description.
Even a 27c64 EPROM should work without PCB modifications, if someone did not want the firmware update option.
Yes, a 27C64 or 28C64 should work fine. I have a bunch of 28C256 so that is what I use. The upper address lines are connected to the 82C55 so that the EEPROM unlock sequence can be issued by the processor and so can be programmed, but otherwise don't need to be connected. The only one that must be connected is JP2 which is needed to address 256 more bytes of ROM. This may change in the future though.
I ordered 5 PCBs from China a week ago ; and they should be here (in continental europe) in the coming days.
I'll post follow up message on my build.
A flash utility is written.
I wrote a flash utility that can flash the firmware onto the 28C64/28C256 in the system without an external programmer.
It is called "FLASH.SYSTEM" and it can be run from PRODOS, but it does not use any PRODOS system calls (except to exit to operating system) so it should work without PRODOS if needed.
It is simple. You short the jumpers that it says, press a key for the slot number, and it flashes. After you are done, remove the jumpers except for JP2
Dan
As another update,
I repaired the language card on my Apple ][+ and now I have verified that the card works with an Apple ][e w/ 128k RAM and a Apple ][+ w/64k RAM on ProDOS 2.4.2.
As promised and after multiple weeks of customs nightmare ( china -> europe )
here they are
MG_8140-1920.JPG
Again if anyone in continental europe is interested in one of those, let me know. I had to order 5 but obviously don't need all of them.
ced_2022-07-19@11h52_IMG_8141-1920.JPG
Fits nicely :)
I wouldn't mind one. I live in Denmark.
It looks good! Let me know if you have any questions building it. Stay cool, my friends.
By the way I started work on the W5500 ethernet support.
stay-thirsty.jpg
I found out about this on the vcfed forums, and built a couple.
I've been playing with it on my //e non enhanced, and rediscovering apples. My //gs doesn't get enough love.
I planning on digging out the //gs this weekend and running this alongside my cffa.
I've got some partial kits including PCB's and sd slots, logic Ic's, and most discreet components (I'm short on leds and 10k resistors.)
available in the USA if anyone wants them for cheap. No atmegas.... sigh...
I went the cheap route also for eeprom... I have a ton of 27c512s and they work great as is (put the code @ $4000).
If you program your eprom and mcu outside the board, the only jumper needed is jp2.
Dan ][ Card
Let me know the details via Private message. Thanks!
I haven't built this card yet. I've built 3 of the related project, the APPLE ][ SHIEILD. It uses the same chips mostly, except instead of the Atmel being on the board, it is on an Arduino UNO which plugs onto the board.
I've been planning to order PCBs to build at least one of these myself.
I've got extras of most of the chips too except the 82C55 which aren't so easy to get. I have a bunch of the Atmel chips too. I don't have the SD card slots though. I think I used all the AT28C256 that I have at the moment and the only other EEPROMs I think I have are AT28C64B.
Ok, I'm out of SDcard slots, leds, diodes, and .1 uf caps..
I've got 3 PCBs left that come with the following.
PCB
XD82c55 with socket
7432 with socket
7400 with socket.
27c512 eprom with socket
atmega328p socket only.
16mhz crystal
1k resistors
2k2 resistors
470 ohm resistors
4.7k resistors
20pf caps.
$15.00 + shipping
I didn't order all the parts for 10 boards because I had no clue if it actually worked for what I wanted when I came across it.
This worked out well for me since I didn't have to order the minimum 5 boards from JCLPCB or PCBWay... And I didn't have to track down some of the other parts I didn't have on hand...
Hello, I have some news.
I have a version of an Ethernet driver for the Dan ][ controller. It uses this W5500 development board:
https://www.ebay.com/itm/284125888083
https://www.ebay.com/itm/255005038687
You will also need a 10 pin IDC ribbon cable to plug it into the connector on the card.
The version of IP65 with the additional driver is at:
https://github.com/profdc9/ip65
I made a hacked version of a disk image in the Apple2Card project that works on an Apple II+, unenhanced //e (however the Telnet client requires 80 columns). It is under the "dsk" directory in the project:
https://github.com/profdc9/Apple2Card
At this time the wget program does not work but I should be able to get Contiki to work.
By the way, the Xinluda 82C55A from lcsc.com works fine and I use it, as well as the XD74LS00 and XD74LS32:
https://lcsc.com/product-detail/I-O-Expanders_XINLUDA-XD82C55-5_C707086.html
https://lcsc.com/product-detail/Gates_XINLUDA-XD74LS32_C521170.html
https://lcsc.com/product-detail/Gates_XINLUDA-XD74LS00_C556265.html
They have over 300 82C55 in stock for $1.70 in qty 1.
Here is a picture of version 1.1 with the ethernet interface. Note if you have version 1 there is a mistake and you have to solder the pins in the back of the card because they are the mirror image of the correct orientation.
Version 1.1 with Ethernet attached
Here is an example of telnet to the particlesbbs.dyndns.org (port 6400).
Particles BBS screenshot with Apple //e Telnet
Have fun!
Dan
That Ethernet hookup is pretty cool!
Just ordered some modules. Great work!
Last 3 pcbs are also gone, so no more kits at the moment.
People can order more boards from JLCPCB or PCBWay, but of course they have to order 5 at a time. I have a feeling now with the Ethernet working that this may prove to be an extremely popular board. Given that the Uthernet and other similar things are not readily available these days. The other way to attach to BBSes, etc., is through WiFi with one of the ESP module based solutions. Those have their own benefits and drawbacks. There are reasons why sometimes a wired Ethernet solution is valuable.
One thing I will say is that the driver I wrote doesn't support all of the W5500 features, only the ones that are required by IP65 (packet send and receive). I do not think my patches will make it into the official IP65 distribution as they require a change in the default slot (from 3 to 7 for example) and it is not a production card like the Uthernet II. I kind of see that as advantage personally, but it's not my project. I am not sure if I will get around to supporting all of the features of the W5500 or only the ones needed for IP65 and Contiki. My opinion is that it would be better to write programs that are not specific for the W5500 and are usable by all of the platforms and cards supported by IP65, which is what the driver I have written already does, and doesn't require special features of the W5500.
By the way, I also made my own PCB for a WifiModem if you want to connect to the internet using that instead:
http://www.github.com/profdc9/WifiModem
I have already precompiled a version of the zimodem firmware for it, and the modem includes the necessary buttons so it may be flashed on-board.
I am not sure the Uthernet qualifies as "production card". At least not lately. Maybe if they mean it was at one time. Every time I've checked a2retrosystems they are sold out. But the quantity was updated to zero at least only a few months ago, so maybe they are occasionally making a batch.
Anyway, I think your card is actually a lot more attractive in a lot of ways... Not only is it DIY friendly, it combines more functionality than just Ethernet... the SD slots are worth the price of building one on their own.
The W5500 is an SPI device... so the interface you've exposed there isn't really exclusive to it. There are quite a few SPI peripherals out there that are used in the Arduino world. So it would only be a matter of writing the software for the Atmel and Apple II to make use of those.
I need to make one of those WifiModems. I've got a bunch of the various ESP modules that I've used for other projects and messing around in the past.
This was basically the motivation to make the Dan ][ in the first place, to make something that would not require exotic parts or an expert build. For most of my projects, if they are going to be useful in the future, I avoid specialized parts and use as generic and common of parts as I can. The 82C55 is still sourced by many manufacturers, and the ATMEGA328P is common still (and there's even a clone by Logic Green that could be pressed into service if needed). So it's about as future-proofed as I think one could be in these uncertain times. The W5500 perhaps less so, but that was sort of a stretch goal.
It would not be hard to add additional functionality. The messages between the Apple ][ and the ATMEGA328P are fairly simple and more could be added if another (or a different) SPI device was to be used. I also exposed the I2C pins of the ATMEGA328P on the board in case those would be useful for future projects.
I even considered using a STM32F103C8T6 (another very common ARM processor) in place of the ATMEGA328P, but I thought it would be better to stick with the 8-bit chip right now as there's a serious shortage of the STM parts and many fakes being sold.
By the way, I am implementing a similar card for the ISA architecture
http://www.github.com/profdc9/ISACard
In that project there is a little "outboard" that allows the SD card slots and the ethernet PCB to be mounted outside of the computer. I haven't tested it yet but it should work with both the current Apple2Card and the ISACard versions.
I like i2C. I designed an Apple II card for it using the Phillips (now NXP) PCF8584 chip a few years ago. That chip really makes a direct i2C intterface easy for any 8 bit microprocessor, especially 6800, 6502 or 6809.
I think the ATMEGA328P is a great choice because it is so common and the Arduino IDE makes developing for it such a snap. The fact that most Arduino UNO boards have the chip socketed makes it even easier since you can so easily program the chip that way and then move the chip onto a more stand-alone board. t is a super cheap chip, and I doubt it will be going out of production any time soon since there are so many UNO boards being sold, if for no other reason.
I'm glad you posted the info on where to get the 82C55 chips because I had been having trouble finding them at a reasonable price in any kind of quantity. It's a good and easy to use chip. I also like the venerable 6522, but it also has availability issues, albeit I think that Western Design Center may still sell (and possibly still be making) W65C22 chips. I just checked and Mouser has a bunch in stock, although they aren't exactly cheap, $7-$11 each depending on quantity. But still good to know you can get them.
If you're interested in ARM on a card for an Apple II, check out:
https://github.com/tjboldt/Apple2-IO-RPi
That card hosts a Raspberry Pi Zero W. That's a pretty decent little system. And since it looks like it is a parallel interface instead of a serial one, and especially since it doesn't require any hard to get chips like a 6551 like David Schmenk's RPi card, it looks like a winner. I've built two of them but haven't had the time to play with them yet. Hopefully next week. I have a bunch of stuff to play with.
I ordered 10 of the WifiModem PDBs from JLCPCB yesterday along with some of the parts that I didn't already have on hand.
I also started building something I've been thinking about for a long time. It is basically a printer emulator. It plugs into an Apple II parallel printer card like a Grapler+ or an Epson APL. It has a WROOM-ESP-32 microcontroller and some switches and LEDs. It will emulate an Epson MX-80 printer and upload the data via WiFi to my server where it will be rendered into PNG images. It should be possile to emulate a bunch of other different parallel printers like the Apple DMP, Okidata, etc. too. And I can probably build a lower cost version for emulating serial printers like the Imagewriter and Imagewriter II using the ESP 8266 which is cheaper. The reaspm I'm targetting the MX-80 first is it is so widely supported. The reason for using the ESP-32 for the parallel version is I need more GPIO pins for it than are available on most of the ESP-8266 modules.
I have at least 2-3 Apple II parallel printer interfaces sitting around with no good use, I would be interested in that, not to thread hijack.
I have at least two of the original version of the Apple Parallel Printer Card (short card with a 20 pin IDC connector facing up. Not the later version with the larger board and the connector facing to the back.
That said, it wold require a different cable than the one I'm making right now, which has a 20 pin IDC connector like is used on the Grapper+ I plan to develop/test with.
I could, however, probably make a version for those other boards, or better yet, make one with two connectors on it, one 26 pin and one 20 pin. Then it would be able to support a wider variety of cards.
In any case the hardware for this is really incredibly simple, it is mostly going to be the software that will be the bigger part of the development work. Part of it will be on the WROOM ESP-32, the other part will be the server side code.
Just a few components from success...
A few 2.2K resistors, a few sockets, and a couple Atmega IC's and we're good to go with 2 complete boards.
I changed the sockets to Augat machined pin type, changed the electrolytic cap to a tantalum, (shorter) and changed the resistors to tan colored metafilm with "normal" color codes.
I've found that those blue chinese resistors lose their color codes when cleaning with acetone. (hate that) Also, I'm not crazy about their non-traditional (and hard to read) color code scheme either.
My compliments to the board designer who chose to put in guide holes for the MicroSD card sockets. They mounted very easily and held in-place without hassle.
Also thanks to @dabone for putting together the kits he sold. Nicely done!
For those who are in process of building their own, I suggest you use the Version 1.1 schematic when placing the resistors because the 1.0 version uses different values in the parts listing and runs out of Rx values before the board is complete. (found myself unsoldering a bunch of 4.7K values to replace with 10K values) The schematic is not hard to follow.
Almost there...
Dan][ControllerV1.1.jpg
Nice work macnoyd!
I just wanted to make a note about adding the Wiznet ethernet board.
If you're going to add the Ethernet board like I show in the picture, do not populate R27/R28. This is because I have a special "outboard" I have been working on which places the SD card slots on the outside of the computer:
https://github.com/profdc9/ISACard/tree/main/ExtCard
This connects to the J6 just like the W5500 Ethernet module, and then the W5500 Ethernet module connects to the outboard extension card.
The outboard extends the SD card slots outside of the computer and needs R27/R28 to be present. If you're not using Ethernet yet, R27/R28 doesn't matter.
Pages