Shared publicly  - 
 
Currently I'm planning the updated version of my C64 universal cartridge ( http://www.ohwr.org/projects/c64cartridge/wiki ). I want to start a Kickstarter project, but first I want to build a fully working prototype of the updated version (hardware fully working), so that I can concentrate on mass production (I hope :-) ), regulations like WEEE  for selling electronics, ESD/EMI testing etc., and for writing the firmware and PC software. All parts are non-BGA, which means I could sell it as a kit and you can solder it at home. But I plan to sell it fully assembled and tested, too.

Now the planned changes, later some open questions:

- new microcontroller: My idea is to replace the 8 bit CPU with the LPC11U24 ARM CPU (Cortex M0), because it is easier to program. E.g. there is a debug pin, when set, you can just plugin the USB port to a PC and it emulates a mass storage device with "firmware.bin" as a file. Updating means just to copy a new firmware file to it. And instead of a proprietary IDE you can use GNU GCC for the firmware, e.g. Codesourcery. It's not that much more expensive, EUR 4 for one.

- FPGA instead of CPLD: With the CPLD I can't emulate e.g. a C64 REU or access larger memory. So I plan to use a Lattice MachXO2 FPGA (LCMXO2-1200HC). It costs EUR 8, so still reasonable. It should have enough power to implement even a second SID or a Z80, and it is pin compatible to bigger FPGAs.

- SPI flash memory is getting less expensive. I'll replace the current SPI flash with a 16 MByte version for EUR 3.40.

- SDRAM instead of SRAM: Currently I'm using a 128 kByte SRAM IC. Some game cartridges need up to 512 kByte, and the REU can be upgraded up to 16 MByte. This is the reason to use the IS42S83200G SDRAM: 32 MB, for the same price as the old SRAM: about EUR 3! Accessing is more complicated, but I can do it with the new FPGA.

I need a different oscillator for the microcontroller and a better voltage regulator, and the input of the FPGA is not 5V tolerant, so I need more voltage level shifters, but in sum it should be less than 40 EUR for the parts and the PCB.

Some questions:

- should I add a SD card socket? The on-board 16 MByte SPI flash memory could save hundreds of cartridges, but swapping an SD card could be easier, or even selling SD cards with games would be possible (if I can get the permission from the license holders), or for more advanced projects (the cartridge can be used as a normal USB device, too, without a C64, and you can program the microcontroller and the FPGA with your own programs).

- how many LEDs, switches and push-buttons do I need to emulate as many different cartridges as possible?

- any other features I forgot? I will add some headers for attaching hombrew electronics, both on the CPU and the FPGA side. Maybe a not populated VGA connector with a R2R network, or a DVI output?

Comments, feature request etc. are welcome!
4
Chris McClelland's profile photoFrank Buss's profile photoRobert Åkerblom-Andersson's profile photoRon K Jeffries's profile photo
12 comments
 
Wow. Kickstarter is a really cool idea. Keep us informed. Are you planning preasembled kits aswell? A working HDMI would be a killer feature. I dont know if its possible to cycle accurately emulate both sid and vic for this on the cartridge?
 
Yes, I think I'll sell just the parts as a kit, and as another option pre-assembled, but the pre-assembled will not be a kit: the populated PCB needs just to be mounted in the cartridge case, not much to assemble for this version then :-)
I'm not sure about HDMI. Some people for the Raspberry Pi complained that it has no VGA output, and every display has still VGA. But technically HDMI would be better, more colors, and maybe even not that difficult, as seen in this project: http://hackaday.com/2012/08/03/moving-an-fpga-project-from-vga-to-dvi-d/
Cycle accurate SDI and VIC might be not possible (at least not both at the same time), but maybe with a more expensive FPGA. They are all pin compatible, so maybe this would be a good option for those who wants it. There is even one which is some EUR cheaper, I'll decide later which one will be in the final cartridge.
 
I'm designing an FPGA module that will be usable in several of my own projects; maybe it will be useful for other people too. I'm still in the process of laying out the PCB, but you can view its current state by going to http://mayhewlabs.com/webGerber/, then extracting the files from http://www.swaton.ukfsn.org/umdkv2/fpgaBoard.zip and dragging & dropping the files into your webgerber browser window.

* Open-source hardware design
* 80mm x 80mm 4-layer PCB
* Components (inc. PCB) cost €33
* Supports fast (~25MiB/s) data exchange with Windows/Mac/Linux over USB
* No extra programming cables needed
* Incorporates a 16MiB SDRAM & SD-card slot
* 47 general-purpose FPGA I/Os with power & ground on edge-connector
* Can be built at home, provided you have a decent soldering station

I'm having 20 prototype boards made. I'm not particularly interested in buying & selling components & kits but since it's an open design I'm hoping it'll be picked up by others, manufactured professionally and sold cheaply on eBay like this one: www.ebay.com/itm/150835820710
 
webGerber is cool, bookmarked!

Interesting board. The microcontroller is a bit expensive, if a project doesn't need high-speed USB. You could use something like the USB3300 from SMSC and implement it in the FPGA, but of course, then you would need an external programmer, at least for the initial flash programming. Same problem why I used an external microcontroller. And implementing the USB protocol, even with the help of OpenCores, would be a lot of work.

I don't see the SD-card slot in your gerber files and the USB connector. Are they not a SMD soldered parts?

Maybe a good idea for my project as well to provide a SD-card slot, with the option not to populate it, when not needed. Any idea how to protect the FPGA pins for it? I don't want to connect the SPI bus of the SD-card without protection immediatly to the FPGA, because of ESD. I'm already using the NUF2221W1 for the USB bus (cheap EUR 0.35 cent chip), so maybe just two additional chips of the same type could protect the four data lines?
 
I bought ten FX2LP chips from:

http://www.ebay.co.uk/itm/110886747096

The total was $50 + $4.90 P&P, or €4.47 each.

Using a different micro would mean porting the FPGALink firmware again, and I don't really see the point - it already supports AVRs for FullSpeed and FX2LP for HiSpeed.

The USB and SD card connectors are on the back of the board, you need to flip it over (left mouse button + drag).

I have never bothered with ESD protection on USB or FPGA pins. Probably foolish, ho hum.
 
I just saw the Cypress microcontroller from Digikey for $15, maybe I should source some parts from eBay, too, but you never know the quality.
Neat, you can 3D rotate the gerber view. I just tried to deselect the layers and wondered why it was just one side :-)
If you don't want to sell it yourself, no problem not to ESD protect it. I may need CE certification when the Kickstarter projects goes well and I sell it, and they test all external connections with nasty high voltage guns :-)
 
Getting CE compliance (plus FCC compliance if you want to sell in the USA) is extremely expensive. To cover that cost you'd have to set the per-unit price very high, or expect to sell tens of thousands of units. I'd be very happy to be proven wrong, but I doubt that there's a market for tens of thousands of C64 carts.
 
I've seen this for a device at a client for which I work, and CE complicance is not that expensive. Basicly you can just add a CE mark, if you think it is compliant, but to be on the safe side usually the minimum would be to bring it to a professional lab and let it test for ESD and EMI, which can cost $2k-3k, depending on how long you need the lab and the engineers. Then you have to check if all components are RoHS and you need to take care of some safety regulations, which are easy to met for low voltage devices.

FCC is more expensive, because you have to commission an accredited certification center for the whole process, and they are really expensive (charging some k$ just for the registration, without any work done). But I hope it is not that critical if it has at least CE and people are importing it instead me selling it in USA.
 
First off, cool and I hope you make a kickstarter project, I'm not really in the need of a C64 Cartridge nor am I a gamer but I think I would support it anyway for the sake of it... :)

Just a note, MachXO2 is not an FPGA, it's an CPLD. They do look nice, I have been thinking of testing them out for a while. (The second video (in the comment) in this post is rather funny about MachXO2...)

_"-Do you have a boring life? 
 -Stop having a boring life and get an MachXO2...."_
https://plus.google.com/101372835757809463996/posts/TKU3Bg9P4C6

DVI output I think would be good, DVI to HDMI is simple and can be done with a cheep adapter as they basically use the same signals except HDMI adds audio (coarsely speaking).

CE marking in Sweden from what I have understood/learned is as you said Frank, if you think it's comply with CE you can put a "stamp" on it, but you should/better check it unless it is very trivial.
 
Funny video, I've seen this. Right, it is a CPLD. Maybe I mixed it up because it has so many LUTs, like a small FPGA.
 
Back in the day, long ago, far away, I was co-author with Glen Fisher [who I have unfortunately lost track of...] of a popular book of Commodore PET games, then we did Fun and Games for The Commodore 64. I may need to get your cartridge. ;)
Add a comment...