Hello, Guest the thread was viewed9k times and contains 54 replies

last post from docbobo at the

EasyFlash³ vorteile ggü. KungFuFlash

  • Ich kan mich nicht vorstellen das eine combination von FPGA und CPU viel kleiner werden kan als 4 chips (1 fpga, 1 cpu / RAM, 2 level-converters?)

    kleiner nicht, aber viiiiel genauer im Zeitfenster.


    Manche Dinge sind eben zeitkritisch.

    Und zudem sind auch manche C64 Boards zickiger wie andere.

  • Aus meiner Sicht wäre eine Mischung aus Kung-Fu und EF3 eine tolle Sache.

    Das Beste aus beiden Welten ...

    1. SD Karte statt Flash Speicher
    2. echte Emulation aller Cartridge Modi (inklusive sauber den Kernal nach außen ...)
    3. Lade Mögllichkeit von TAP, PRG, D64, D71, D81, ...


    Erreicht werden kann das zb. durch einen kleinen FPGA ...



    Oder aber wie bei der EF4 Idee durch Controller + CPLD.

    Dabei muss der Controller gar nicht schnell sein.

    Eine 5V Kompatibilität würde manches vereinfachen ...

    • 5V toleranter CPLD
    • zb. ein ATmega 324
    • SD Slot.
    • RAM

    Flash braucht es nicht.

    Nur eine Möglichkeit für den Controller das RAM zu beschreiben (zb. über SPI).

    Das RAM wird aus Sicht des C64 Schreibgeschützt im Modul Betrieb.



    Theoretisch kann man damit auch noch andere Cartridges emulieren: NeoRAM, GeoRAM ...

  • Dieses Cyclone-II Board kostet samt JTAG Programmer 14€ ...

    https://de.aliexpress.com/item/4000296762100.html


    • auf dem Board implementiert man eine kleine CPU
    • SD Card anschliessen
    • 5V Anpassungen
    • evt. ein RAM dazu, falls das bestehende nicht reicht



    Das als Cartridge für den C64, das lässt keine Wünsche offen.

    Man kann damit alles emulieren, was es so gibt.

  • Diddl - klingt so, als hättest Du das schon mal vorbereitet... Muss jetzt quasi "nur noch" zusammengelötet werden, oder? :emojiSmiley-12::emojiSmiley-12:

  • Diddl - klingt so, als hättest Du das schon mal vorbereitet... Muss jetzt quasi "nur noch" zusammengelötet werden, oder? :emojiSmiley-12::emojiSmiley-12:

    Vorbereitet nicht gerade, aber ich habe ja vor Jahren mal das FE3 für den VC-20 konzipiert.

    Beim C64 ist das um einiges komplexer, aber man macht sich halt Gedanken ... :)


    Da ich einige EF3 und nun auch ein KungFu besitze, kenne ich die Vor- und Nachteile.

  • Also ich finde ja das KFF sehr cool, obwohl ich das ehrlicher Weise noch nicht zusammengebrutzelt habe.


    Wenn ich es aber richtig verstehe, ist es beim KFF nur über die SD Karte möglich, PRGs zu laden?

    Beim EF3 finde ich es sehr bequem, vom PC aus mit EasyTransfer die PRGs einfach per USB ins 64er RAM zu feuern.

    Wenn sowas mit dem KFF auch ginge, würde die Prio in meiner Projekteliste deutlich steigen. :D


    Geht das vielleicht und ich weiß es nur nicht?

  • Ein Cyclone II teile ist uberhaupt nicht 5V tolerant. Also mindestens 2 grossen 40-pin levelshifter chips benotigt. Dabei gibt es kein Flash im Chip und viel zu wenig RAM bits fur ein CPU, also dazu muss man noch ein externen flash teil und ram teil hinzufugen - oder das wird schon sehr schwer. Das sind ja schon 6 Chips. Wenn man ein standard minimal FPGA CPU compiliert, wird das wohl nicht schneller als ~100 MHz gehen.


    Den KFF hat ja nur 1 Chip, ohne weitere zusatslichen sachen, mit on-board 1MByte flash und 192 kByte RAM. Dieses ST teil ist nur 4 euro. Keine 5V sachen benotigt. Und, fast alles im KFF ist jetzt mit C programmiert - sowohl ARM code als 6510 code.


    Was gibt es denn noch nicht im KFF, ich meine fast alle cartridges konnen doch emuliert werden mit KFF durch software updates?


    Es geht einfach um mit den KFF eigene, minimale version von easy tool uber USB ein PRG im C64 zu setzen, das gebrauch ich fur cross-compilation. Functioniert einfach.

  • Was gibt es denn noch nicht im KFF

    Der Kernal-Ersatz ist meines Wissens bisher nicht über ein Proof-of-Concept hinausgekommen. Darüber hinaus wäre ein REU-Funktion eine tolle Sache.


    Aber davon ganz abgesehen, wie ich oben schon geschrieben habe: Warum müssen solche Projekte regelmäßig mit dem Totschlagargument "wozu-braucht-man-das" bekämpft werden? Damit bewegt man sich in unserem Hobby auf ganz dünnem Eis und stellt schnell fest, dass überhaupt nichts von dem, womit wir uns hier beschäftigen, gebraucht wird. Was geht denn davon noch nicht mit einem modernen Notebook?


    Bitte versteh mich nicht falsch, ich einer der größten Fans des KFF. Vor allem auch wegen seines einfachen, preiswerten und eleganten Aufbaus. Aber ich würde mir trotzdem auch sofort ein EF4 aufbauen, wenn es das gäbe.

  • Ja ich verstehe das es spass macht hardware zu basteln, aber fur ein EF4 wird dan auch nog viel software gebaut werden mussen, dan kan mann doch am besten erst mal de KFF software versuchen zu erweitern.

    Es ist anders wenn ein zukuntiges EF4 wirklich etwas ermoglicht oder mehr spass macht oder einfacher ist oder billger ist oder mehr "retro" ist oder "cooler" ist, oder mehr coimpatibel ist als es jetzt gibt. Aber so etwas habe ich noch nicht gehort hier oben.


    Mein soft-kernal fur KFF ist fertig und functioniert gut auf beide meine C64, aber ich habe selber keine original KFF, wie ich hier oben beschreibt habe.


    Meine eigene versuch den KFF zu "pimpen" ist mit ein 100-pin statt 64 pin teil mit LCD fur boxart, IEC bus anschluss, speaker, DMA pin anschluss, usw.

    Alles nur "optionelle" KFF erweiterungen, das basis concept functioniert ganz gut.

  • i think both carts have it appeal. The kff would be more versatile as it is easier to programm a micro for most people. The easyflash is a bit complicater to program. The easyflash can respond quicker to changing signals because it uses hardware gates for that. The kff is more time critical as things happen sequential.


    The best solution would be a micro with a 5v cpld for fast switching.


    For now im happe with my kff ,)

  • The easyflash can respond quicker to changing signals because it uses hardware gates for that. The kff is more time critical as things happen sequential.


    The best solution would be a micro with a 5v cpld for fast switching.

    Actually the EF3 runs at 25MHz, so 40ns accuracy, quite a lot slower than the ARM's 168Mhz. I think just like the KFF the 25Mhz of the EF3 is free-running, not synchronzied to the C64's clock.

    Skoe's EF3 soft-kernal mode is right on the edge of the available timing he has on the FPGA, as he analyzed back in 2011, you can check his excellent document for the details.


    If it were not for the silly open-drain rising-edge issue with the 5 volt tolerant IOs on the KFF arm chip, it would actually be significantly easier to meet the timing in skoe's document using the ARM cpu than with the original 25Mhz. I had to used every trick in the book to switch the EXROM/GAME values *as well as* the open-drain mode of the pins to normal mode 4x in one clock cycle, to make it work. But it does work and has around 10 nops still in the code so the signals can still be moved a little earlier or later in 6ns increments, if issues with certain C64's are found.


    But it would be nice to have a 5V CPLD. As far as I am aware there are no cheap 5V tolerant CPLD's on the market anymore, even 3.3V compatibility is now ending it seems where some parts only offer 2.5V compatibility. The old Spartan II series seems to be the best - but then you need to provide an additional core voltage of 1.8V I think on top of the 3.3V. And pricing is not attractive.

  • xc95xl is a good choice indeed, and cheap for the small packages.

    Then again I think I'd rather chose a newer ST ARM part (400MHz, still 5V tolerant) over a combination of the current STM32F4 and a CPLD, if there is a need.

    Right now there is no obivious need I can think of for faster CPU - but there is one for more RAM. The STM32H7 series have swapped the flash/ram sizes, where you typically get small 128kB flash and 1MByte of SRAM. That is probably an even better match for the C64 use-case, allowing for REU type usage. Easyflash emulation would then all be in RAM - and loaded/saved to SD card.

    But lots of software development needed - I'd first try extending the current KFF.

  • Nein, an einem EF4 arbeite ich nicht. Es gab damals ein paar Ideen (wie immer). Inzwischen gibt es aber so viele Module, von Low-End 16k-Modulen, EasyFlash 1 über Mittelklassemodule wie EF3 oder KFF bis zu High-End-Geräten wie die 1541UII+ oder Turbo Chameleon, dass ich es nicht mehr so spannend finde, ein weiteres dazuzubauen. Gerade weil es ein Hobby ist. Viele davon sind Open Source, mit geeigneten Lizenzen um sie kostenlos privat und auch kommerziell bauen zu können und als Basis für Neu- und Weiterentwicklungen nutzen zu können. Was will man mehr :)


    Ja, natürlich kann man so etwas mit Microcontrollern und MHz lösen. Nach dem Zyklenzählen für den einen oder anderen Fast Loader für's sd2iec, dem ARM2IEC-Prototypen, an dem ich mitgearbeitet habe und der open1541 (siehe auch hier), die noch nicht fertig, aber immerhin schon genau genug für die einige Fastloader war. Mit 6502, den 2 VIAs, User Interface, FAT FS, Disk Rotation und GCR-Zeug emuliert in einem < 10 Euro µC mit 400 MIPS. 10 Jahre vor der Pi1541. Aber ist nie fertig geworden mangels Motivation. Für den externen KERNAL gab's auch einen Low-Cost Prototyp auf einem Cortex-M (LPC1313). Ja, die STM32s sind eine sehr gute Wahl für so etwas, die setze ich beruflich ein und würde heute wahrscheinlich auch einen solchen wählen. Es ist sicher total spannend, so etwas mit einem µC zu machen - aber nicht für mich. Im Gegenteil, ein Problem mit MHz oder mit großen FPGAs zu lösen, reizt mich nicht. Letztlich läuft schon annehmbar ganzer C64 auf einem RasPi emulieren.


    Quote

    Actually the EF3 runs at 25MHz, so 40ns accuracy, quite a lot slower than the ARM's 168Mhz.

    Although nearly all you wrote was correct, I think you misunderstood @Sjaak74 here: The point is that you can capture a number of signals (if you know that they are synchronized to Phi2 for example), make a number of decisions only limited by the number of gates and switch outputs and directions at the next clock cycle, 40 ns later. With a µC GPIO => synchronizer => bus => CPU => bus => GPIO take at least a number of cycles and can only make a limited number of decisions, e.g., with a jump table. However, don't take this as an argument for or against µC or configurable logic.

    But you are right with the accuracy: Should have used 50 MHz instead of 25 MHz, which would have made it a bit easier :D But again, my minimalism.


    Okay, against too much language chaos I'll go on in English: Considering that there are more than 1000 (or maybe several 1000?) EF3s out there, it looks much more useful to continue to maintain the EF3 software instead of inventing something new (some of the software is also used by the KFF by the way, like the USB tools - which I appreciate, and Kim did good work to release his stuff Open Source too).


    So there will be an updated EF3 core this year with improved USB compatibility (fixed already, but needs more testing) and two other projects are on the way. One is directly EF3 related and one is not. Ready at Christmas, I guess ;)

  • skoe great news that there will be an EF3 update!

    Your comment about number of EF3's out there makes a lot of sense too. Compatibility with EF3 should stay whatever the future can bring.


    On CPLD's I certainly understand the point Sjaak74 made about use of parallelism in hardware - I used to design hardware for a living (ARM SoC chips in fact). What a lot of people not doing actual FPGA synthesis might miss is that a single LUT macrocell in the XC95XL CPLD mentioned above has a delay usually *slower* than one ARM cpu cycle!


    This coupled with the case that the ARM can do most combinatorial instructions (which are quite similar to what one macrocell can do) for 32 bits at a time in one cycle, the tradeoff when a CPLD/FPGA is better at a task than a microprocessor, is much less clear than it used to be 10 years ago. At least, thats my opinion.


    For this particular case of C64 cartridge emulation there are some complex ones that just the ARM wont be able to handle I think - then again I'm not sure if a CPLD would help much for that specific cartridge either its more that there is too much functionality. Being able to arbitrarily stall the C64 CPU with the DMA pin might be sufficient for those exceptional cases.

  • [snip]


    Okay, against too much language chaos I'll go on in English: Considering that there are more than 1000 (or maybe several 1000?) EF3s out there, it looks much more useful to continue to maintain the EF3 software instead of inventing something new (some of the software is also used by the KFF by the way, like the USB tools - which I appreciate, and Kim did good work to release his stuff Open Source too).


    So there will be an updated EF3 core this year with improved USB compatibility (fixed already, but needs more testing) and two other projects are on the way. One is directly EF3 related and one is not. Ready at Christmas, I guess ;)

    There is easily several 1000 if not 10.000s of the EF3 around in the general public. I'm sure of it. Okay not sure, but I have an anecdote:


    I saw some of them hanging off a Rack in a retro-computer shop in Japan a couple of Years ago. Quite off the beaten path. I remember it because the shape was like a C64 cartridge and so I asked the shop-owner: "Is this for C64?" - and he said "Yeah it's a flash-cart." But when I went back in early 2020 after getting a C64 again and fixing it and looking for a way to get games on it (Ultimately I got an EF3 from Der_Alte_Bastler , for which thanks!) I went back to the shop and he had sold them all. When I inquired - he just laughed and said had made "Only about a 100" and that he had sold his last one "Years ago".


    Again this is in Japan where the C64 was anything but popular (probably because the horrible Commodore MaxMachine bombed hard after some poor people here got duped into buying it)...

  • ...Freezer funktionieren auch nicht vollständig. Nach dem Freezen kann nicht mehr zurüclgekehrt werden ins bis dahin laufende Programm. Aber FCIII-Nutzer z.B. kennen das. ;)


    Oha, das wäre ein Gamebreaker für mich, hätte mir schon fast ein KFF besorgt. Oder kann man mittlerweile mit dem KFF nach dem Freezen (Action Replay MK6, Super Snapshot 5 etc.) wieder ins laufende Programm zurückkehren?

  • ...Freezer funktionieren auch nicht vollständig. Nach dem Freezen kann nicht mehr zurüclgekehrt werden ins bis dahin laufende Programm. Aber FCIII-Nutzer z.B. kennen das. ;)


    Oha, das wäre ein Gamebreaker für mich, hätte mir schon fast ein KFF besorgt. Oder kann man mittlerweile mit dem KFF nach dem Freezen (Action Replay MK6, Super Snapshot 5 etc.) wieder ins laufende Programm zurückkehren?

    Ich wusste nichtmal dass es das Problem jemals gab ;)


    Ich nutze es zwar selten aber vom SSnapshot 5 aus kann ich ohne Probleme in laufende Programme zurückspringen (gerade mit Giana Sisters getestet) ...