Together with the PCBs came in a new revision of the C64/SX64 RAM Cartridge with onboard SD2IEC. It has a completely new layout and was tailor made to a C64 Cartridge shell I got from Ebay. Now I had more PCB estate at my disposal so the layout is much cleaner and thus better looking. The extra space gave room for some vintage looking parts, like the 5mm LEDs and bright red DIP-switch. Another change in the design is a pushpush microsd card connector and software control of the RAM.
SD2IEC part
Most of the top of the PCB is occupied by the SD2IEC part. SD2IEC is a project that takes an Atmel microcontroller and turns it into a (protocol) clone of a vintage commodore diskdrive. It will not completely emulate a real drive so not all the fastloaders will work, but great for everyday use. Now you can carry your C64 collection with you on a little microSD card. It has also 2 LEDs that simulate both LEDS on the drive (activity and error) and a DIP switch that let you select between ID 8 to 11. On the top there is a (solder) connection for the IEC cable. This time I didn’t forgot to include a ICSP connection. Just as the last time I followed this tutorial to burn the bootloader to the chip (even got myself a proper Atmel programmer this time), but it did nothing.. After some googling it happens the fuses I had the fuses wrong and the full commandline to program an ATMEGA644P with the bootloader should is:
avrdude -p m644p -U flash:w:sd2iec_bootloader.hex:i -U hfuse:w:0xDA:m -U efuse:w:0xFD:m -U lfuse:w:0xE7:m
After installing the bootloader the firmware can be flashed from SD card (just copy the appropriate .bin file to the root). The right firmware version for this cart is lars-64k and the bootloader can determine if a new version is placed on the SD card.
RAM cartridge part
This part of the board enables you to quickly develop (standard) cartridges or swap between multiple without removing/inserting/erasing/writing chips. It is based on an old article in Transactor. It replaces the ROM chip with a SRAM and by flipping switches it can switch between RAM and ROM mode. Inspired by the circuit of Magicdesk 1 I tried to replace the switches with logic. It turns out it didn’t work 🙁 Can’t tell why it is failing as I think in theory it should work.
The 747174 (left) / 7402 (right) combination is copied from the Magicdesk 1 circuit. Writing to the IO1 memory area should clock the D-flipflops. D5 controls the !EXROM signal and D6 the ability to write the RAM (!WE to the SRAM chip).
Things to change in the next (last?) revision
It looks I didn’t run the Design Rule Check before sending it in so I violated it a bit and had some clearance errors. I checked it with the multimeter and it didn’t short anywhere. Next revision should I should fix it an pass the DRC. Another nuisance is the ID dipswitch is mirrored. Don’t know what to do with the circuitry around the SRAM, so I’m open for suggestions there.. Probably will revert to an EPROM and the stealth circuit used in the EPYX fastloader cartridge.
Wow! I’ve started investigating a similar project, combining the SD2IEC and the C64FC design (http://jmp.no/blog/c64fc-is-done).
I am hoping I can modify the SD2IEC firmware to allow for CRT loads from the SDCARD into the SRAM of the cartridge.
The creator of C64FC ended up using dual-port SRAM to work around some issues. This is substaintially dearer than regular SRAM, but does simplify the design somewhat. I’m aiming for a really low build cost for my version so will be investgating whether using regular SRAM and freezing the CPU during write via /DMA will work.
The idea of using the SRAM for memory expansion is a great one too, and being able to flip between modes should be useful. I’d love to swap those modes via the SD2IEC firmware, so you would change modes via the C64 directly (rather than external buttons).
I completly ditched the idea of SRAM (for now) and used an EPROM instead. Perhaps in the future I’ll redesign it with SRAM.. Dunno..
Loading was a matter of load”cartridge”,8,1 where the program cartridge has the start address of $8000 and 8KB size. Not completly transparent as the 64FC, but much easier 🙂 If lots of interest I’ll get some made and put them in the store.