Part 11 – porting to the Turbo Chameleon 64
After porting the Minimig core to my ebay-acquired Cyclone III board, I’ve spent some time this week porting the MiniSOC project to the Turbo Chameleon 64.
Hardware-wise the TC64 is very similar to the CIII board – the FPGA is identical, and there’s the same amount of SDRAM – albeit with a slightly different layout – so porting projects from one to the other is fairly straightforward. The only complicated part is routing certain signals through a CPLD which is used in the TC64 to multiplex some of the IOs, and as a bonus, to provide 5v tolerance. This is taken care of in the Chameleon-specific toplevel, meaning once again that the same basic source tree can be built for DE1, the CIII board and now also the Turbo Chameleon 64.Other changes this time round include:
- A hardware register which allows software to query the clock speed, (allows software to calculate the correct period for serial comms.)
- A hardware register indicating the maximum safe SD-card speed (reduced on the Chameleon due to signals being routed through the CPLD MUX)
- A hardware register indicating the amount of RAM available.
- Updated firmware which allows you to swap between three modes with the F keys.
- A new DMACache to replace the old VGACache. This is more stable, uses M4Ks/M9Ks for storage, and has scope for adding extra channels for extra sprites, sound, etc.
Anyone who’s interested can download binaries here.
Copy the contents of “SDCard” to the root directory of an SD card. (Boot.sre is the firmware itself, test.img is a picture for the firmware to load.
For the DE1 or C3 board, upload the bitstream (.sof file) from the respective platform directory using Quartus. For the Chameleon, either use Quartus to upload the .sof file if you’ve added a JTAG header – or use Chaco to upload the .rbf file to a spare slot.
(Chameleon users, note that the mouse will go nuts when the core first starts. That’s because the Chameleon core initializes the mouse in 4-byte (wheel) mode, whereas the MiniSOC expects 3 byte packets. If you move the mouse, then let it sit for a moment it should sort itself out.)
In a break from how I’ve handled releases so far, this time the zipfile contains just the binaries. Full source can be found at my github page – the source for this release is tagged “Part11”.