blog.jmp.no

Electronics, coding and hacking. And ADD.

« Working on a GUI. C64FC: Current state of affairs »

C64FC is done!

2014
24
December

A few years ago I had an idea: emulate a 27C256 on an AVR and use it as a programmable C64 cartridge. The goal was to make C64 development fast, fun and streamlined. The emulation part was a bit too demanding for the AVR I played with at the time, so I had to think bigger.

As time went by, the cartridge also went though many stages of development, a few of which can be seen below. I've done mistakes, been too quick to place orders, spent countless hours pulling my hair trying to figure out why it wouldn't work, and so on. I guess many of you have been though the same at some point in time.

C64FC development history

A few days ago I had a breakthrough getting the device to identify as an USB HID device, and yesterday it all just "clicked." The device works and transfers images without a hint of problems. Release candidate 2, with its minor hardware patches, is perfect:

C64FC RC2 in half a cartridge shell

Since the cartridge identifies as a HID device, no drivers are required! The client software automatically detects it on the USB bus and communicates with it. File transfers are so smooth and fast you have to see it for yourselves:


The 800MHz VIA C7 laptop used in this demonstration takes 1.4 seconds to initiate communication, transfer the file and reset the C64. On my slightly faster Core2Duo workstation this is completed in 1.1 seconds. Not that it really matters, but it's worth mentioning.

Even though I do not consider it necessary, I will drag the cartridge through phase RC3 to let a handful of betatesters give it a go. Meanwhile, I will be working on a Qt GUI frontend which will allow people to play with this from Linux, Mac and Windows.

Have a merry xmas! I know I'm having one :-)


Share:

to C64FC is done!

Feed for this Entry

  • …d Tips for Your Digital Needs C64FC Posted on by Over at , Stian Soreng recently announced the completion of the C64FC. It is the modern solution to C64 software development. By connecting to a development PC through U…

29 Comments

  • Wow, how cool is this!

    I have just brought up my old C64 to start using it again after 20+ years in the basement.
    Been looking on a few SD2IEC-versions but have not placed any order on one yet.

    What would it take to be a betatester for this awesome project?

    #823 | Comment by zippiz on Dec 25, 2014 07:17pm
  • zippiz: Thanks for the kind words, but I must stress that this is something completely different than the SD2IEC and U1541. This is a *cartridge* emulator, and will never replace the 1541 or support D64 files. Currently it only emulates 8K cartridges, but 16K's are planned. Single file PRG support (greater than 8K) will be supported, though.

    As for betatestling I'll have to see how many boards I'm ordering first... :)

    #824 | Comment by admin on Dec 25, 2014 08:25pm
  • Amazing job! Well done.

    I understand that this is not the main goal of the project, but would it be possible to make cartridge program execution steppable on the C64 from the PC? I think there is a way to pause the main CPU execution from the cartridge port. I'm affraid reading the current registry and RAM status with the AVR is just too much.

    #825 | Comment by István Nagy on Dec 25, 2014 10:26pm
  • István: The CPU's RDY line is not available from the expansion port, so that'll be difficult. Unless you add a wire and a hook directly to the CPU, but now we're moving way out of the original intents for this cartridge. But it's a very good idea indeed!

    However, patching the (running) code byte-for-byte is possible right now.

    #826 | Comment by admin on Dec 25, 2014 11:04pm
  • please add me to a newsletter or beta list if possible, I have been looking for a solution like this for a long time, as I want to code 6510 again and moving through USB on my Ultimate2 is just a bit too tidious, so it stays in Vice all the time.

    Sounds amazing, really interested.

    Thanks for building something this cool

    Scarzix/Offence

  • Awesome job!
    I would love to apply as beta tester and to give some suggestions to how the gui could be streamlined for end users.

    Also wanted to invite you to a great Facebook group where we can find many hardware hackers and service techs for commodore and amiga. It's mainly Scandinavians in the group but we are honored to have many demo scene folks, coders and hardware hackers as myself.

    Link posted to thos blog has recently claimed its fair share of questions ;)

    My thoughts, an more advanced version of EasyFlash 3?
    Kernel support and dead test (booting from self) features overriding internal kernel?

    Kind regards and merry Christmas from sunny Sweden!
    Ho ho ho!

    Link: https://www.facebook.com/groups/retrodatorer/

  • Thanks for the answer!
    Can this emulate cartridges which have buttons on their back? Or freezer cartridges have more complex logic inside not just a single ROM chip?

    #829 | Comment by István Nagy on Dec 26, 2014 08:36am
  • Kent: I've asked to join the group, see you there once I get approved!

    #830 | Comment by admin on Dec 26, 2014 10:38am
  • Scarzix/Offence: I know *exactly* what you mean, and this is why I wanted to develop this cartridge in the first place. Get code in the C64's memory as fast and efficiently as possible.

    #831 | Comment by admin on Dec 26, 2014 10:41am
  • Please but me down for beta testing if you have any extra boards. If not please let me know when you go to market with a final version. Thanks.

  • Everyone: Looks like there's enough interest to order a new batch of boards. I'll do a little interest poll in a few days to see how many I should order.

    #834 | Comment by admin on Dec 26, 2014 06:36pm
  • Looks like it's possible to pause C64 execution using the DMA line of the cartridge but it requires some logic http://ar.c64.org/wiki/File:Safely_freezing_the_c64.pdf

    Can you estimate price for the beta boards?

    #835 | Comment by István Nagy on Dec 29, 2014 06:58pm
  • István: Interesting! I was not aware that pulling the DMA line low also affects RDY. I will definitely look into that!

    Also, as for price, it's hard to tell. I'm going to place an order for new PCB's soon, and will at the same time estimate a price for one beta board.

    #836 | Comment by admin on Dec 31, 2014 10:42am
  • Really Nice project! I was waiting for something like that since 1994!!!
    Would you consider just 8/16kb cart emulation? or could be possibile for Kernel support and dead test overriding the internal kernel? It would be very nice to have a bigger ram space to use (say 1MB or more).
    Someone else mentioned "tp make cartridge program execution steppable on the C64 from the PC"... wiring a RDY signal from CPU to the cart should not that difficult... but it would be nice to have the ability to inspect and patch the memory at execution time!

    great job! keep up with it!

    #838 | Comment by MaD][ / SSP on Jan 3, 2015 12:42am
  • Hello, that's a really great project. I'm interested but i prefear to wait the 16k support, since i would use it to build cartridge for c64 16k cart competition :)

    #839 | Comment by Juri on Jan 3, 2015 06:14pm
  • Juri: Hopefully you won't have to wait too long. I already have 16K chips on the way :)

    #841 | Comment by admin on Jan 4, 2015 04:45pm
  • What is the upper limit you can support in cartridge space? For eg. the C64 version of Bomberman requires a 64KB ROM cartridge http://www.rgcd.co.uk/2013/10/bomberland-c64-2013.html?m=1

    #842 | Comment by István Nagy on Jan 5, 2015 12:09am
  • István: Some carts have internal memory paging which is very difficult for me to emulate (but not impossible)

    I will settle with 16K eventually, but I suspect it might be possible to copy all 64K into the 64's RAM using the same technique as with PRG loading today.

    #843 | Comment by admin on Jan 5, 2015 07:51am
  • Thank you for the answers! :)

    #844 | Comment by István Nagy on Jan 5, 2015 11:53am
  • Good new then! Please if you would, sign me in for the betatesting of 16k cartridge :) If price would not too high i would be really pleased to play and test with that cartridge! Just for curiosity: how many times can be written the internal memory?

    #845 | Comment by Juri on Jan 7, 2015 12:20am
  • Juri: I'll let you know once it's ready!

    I will investigate the lifespan of the components further too.

    #847 | Comment by admin on Jan 7, 2015 08:03am
  • Did something similar for the ZX Spectrum back in the day when PCs weren't yet common - except understandably that one was focussed on getting RAM dumps OUT of the Spectrum (and into an emulator on the PC), not the other way around, and it worked over the LPT instead of USB (obviously). I hvae to admit, the NMI line came in quite handy - you could freeze the Z80 any time you wanted...

    #853 | Comment by Max on Jan 16, 2015 08:21am
  • Great news, great job!

    This may seem like bikeshedding, but how about moving to Micro-B USB receptacles (even the USB3 version) for the production revision? Those are supposed to be much more durable than the Type B, everyone and their grandma has tons of Micro-B cables (not so much for Type B), and it's also kind of where the world is heading :)

    #854 | Comment by g on Jan 16, 2015 08:58am
  • The 'correct' way to develop on the C64 used be too use a salve computer system and an 'interlo' cable.

    *Basically a cable interface onto the expansion port with a relocatable loader*

    We had all sorts of issues with cartridge based development interfaces, not to mention it blocked the port incase we wanted to use a secondary cartridge to 'halt' the software and 'save' the video memory at 0x400 that gets stamped on when the default screen comes back.

    You can check out some of my offerings ( Dragon's lair C64 final screen, Jet set willy C64)
    I also was a 1541 disk code junkie, had home brew development hardware based around an 'acorn atom'.

  • Very cool project. So when can i get one, and how does it work.

    #879 | Comment by Precious Roy on May 26, 2015 03:15pm
  • Precious Roy: Early betas are out, and a new batch will be shipped out in not too long. I will make a new blog post containing all the info you're after pretty soon :)

    #880 | Comment by admin on May 26, 2015 07:22pm
  • Great project!
    I was looking to create an SD2IEC adapter but on a cartridge slot with the capability to load a CRT from the SD-Card slot. I had gotten to the stage where I realised I'd need to use SRAM rather than an EEPROM or Flash, and was just about to order the parts when I stumbled across your project (which is just as well as I suspect I would have had the same issue you ended up fixing with the dual ported SRAM).

    Love the USB control! This is certainly a great feature and would make testing on real hardware a delight!

    Awesome work, and as I progress with my project I'll shoot you a link!

    Cheers

    Peter

    #970 | Comment by Peter Godwin on Jun 20, 2016 02:01am
  • Hi,

    Im starting to dabble in electronics, and used to program the C64 back in the day, so your cartrige is very interesting.

    Do you know when you will be shipping some out, or alternatively releasing the specs?

    Many Thanks,

    Dean

    #989 | Comment by Dean Dunn on Jul 28, 2016 06:31pm
  • Are these available? Very interested!

    #1034 | Comment by Mark on Nov 3, 2016 12:44am

About You

Email address is not published

Add to the Discussion

Add to Google