Friday, July 20, 2012

FPGA meets Arduino - Part 2


After a long break I did some major updates again on my C64 on an FPGA.

First, I mounted all the parts on a wooden board, so shortcuts and broken connections should not bother anymore.

Top Left: FPGA with the C64
Top Middle: AD725 Breakout with a Lowpass-Filter for the Sound
Top Right: AV-Out
Bottom Left: IEC-Breakout
Bottom Middle: SD2IEC
Bottom Right: (that's what's new) The Control Panel

Also the SID-Socket is gone (for now), sound is replaced by an FPGA-Implementation I found on the net. I don't know who originally coded this SID-Emulation, maybe it's someone of you? Here's the URL: https://svn.pacedev.net/repos/pace/sw/src/component/sound/sid/

And I wanted to add 2 joystick-ports with paddle-support, while not loosing more I/Os for the soon to come cartridge port. The solution you see on the bottom right: An Arduino Pro Mini together with an 1.8" Color LCD, some contol buttons plus 2 joystick-ports - connected using I2C to the FPGA.

With only 2 Pins used for the I2C, I have 2 joy-ports with (soon to come) paddle support (there are some analog inputs on the arduino), and a simple control panel to reset or mute the C64, as well as turn off borders and enable some debug visuals from the VIC-Emulation. The "Menu" is used to define the default kernal image.

Joysticks are updated ~30 times/second - which is fast enough for all games.


3 comments:

  1. Hi Sabbi,

    ich hab mich letzte Woche mal daran gemacht FPGA64 (v25) auf meinem Nexys2-500 ans laufen zu bekommen.
    Laeuft soweit wunderbar, bin noch dabei ein paar meiner Verbastelungen wieder herauszubasteln und auf r27 hochzukommen. Andererseits hab ich den NTSC Modus abgeklemmt (Geschmackssache). Was mich nun interessiert wie du den IEC Bus rausgefuehrt hast.. Da seh ich als Anfaenger in den öffentlichen Sourcen jetzt nicht was offensichtliches... Und mit meiner 1541 reden (oder nen 1581-Klon nachschreiben und ein PC-DD laufwerk anklemmen) waere schon nett :)

    ReplyDelete
  2. Hi Martin,

    Dieser "FPGA64" basiert NICHT auf dem Wendrich-FPGA64/Chameleon sondern ist eine eigene Implementation.

    Für den IEC-Bus hab ich die relevanten Pins der CIA2 auf IO-Pins gegeben:

    assign cia2PIn[7] = sDataIn;
    assign cia2PIn[6] = sCLKin;
    assign sDataout = cia2POut[5];
    assign sCLKout = cia2POut[4];
    assign sATNout = cia2POut[3];

    Dann ein kleines PCB mit einem HC7406 und ein paar Widerstaenden wie im Original nachgebaut - Fertig....

    ReplyDelete
  3. "Da hat man was Eigenes!"
    Geht auch mit dem anderen FPGA64.. Hab schon etliches dazugebastelt.

    ReplyDelete