Tuesday, February 1, 2011

The Hardware

This C64 on an FPGA-Project runs on this Board:

Core of the Board is an Altera Cyclone-II EP2C8Q208 FPGA. Although it's 'only' a mid-range FPGA, it offers enough power and logic units to hold a whole C64 including all the ROMs and the Color-RAM. For the normal 64k Ram, there is a 512Mbit SRAM on the board.

The Board does not have a Video/Composite-Out, so right now I'm abusing the HSync- and VSync-Pins of the VGA to generate 4 Signal Levels (Sync, Black, Grey and White) using a simple technique with 2 resistors (Based on the PIC Composite Out on Rickard's electronic project page (http://www.rickard.gunee.com/projects/video/pic/howto.php)).

The Video is only greyscale now, using a 32Mhz-Pulse Signal to get 9 Luma-Levels. They are far from beeing accurate, but the quality on a 1084 is fairly good. I'm going to visit the manufacturer of the FPGA-Board in march, he has prepared an AD725-Expansion for the board. The VIC-II Entity does already forward a 4Bit-Color-Index-Signal as well as HSync and VSync to the VideoOut-Entity, so the implementation of the AD725 should be quite easy.

There is no input besides the PS/2-Keyboard yet, I cannot plug a 1541 or anything. A bus driver IC, needed for the proper 5v <-> 3.3v Level Shifting, is on the way. At the moment, I can only compile 8k- and Ultimax-Cartridge-Files into the FPGA's Blockram.

The speed is virtually identical to a PAL C64 - the Master-Clock of the Board is 50Mhz, which goes into a PLL with a ratio of 29/46, giving an output clock of 31.5217MHz. This clock is divided again by 4 to get the pixel-clock (7.880 MHz), or by 32 to get the system clock (985054 Hz). Compared to the precise MHz figures at CodeBase64 (985248 Hz), it's less than 200 Hz off - 0.02%!

No comments:

Post a Comment