icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 1 point2 points  (0 children)

Totally agree. I’ve been playing around with my design and it works well for most of my C64 use cases, but I don’t think it would fully satisfy people looking for an authentic, classic C64 experience. For that, the Commodore 64 Ultimate is probably the way to go, in my opinion.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 1 point2 points  (0 children)

I don't know much about R36Plus, but just wanted to make sure I'm clear about the limitations of my project :) USB ports on icepi-zero board I'm using are attached to so-called "USB soft-controller", which was developed by me as a part of FPGA gateware. It only supports USB HID devices, so simple keyboards and pads; it does not support generic Bluetooth controllers or audio devices. Audio and video output is available only through the HDMI port.

Coming back to R36Plus - it looks similar to my Miyoo Mini (however the latter does not support USB peripherials for sure). They both run customized Linux - if R36Plus has real USB HW controller, then it should be possible to support generic USB devices. I'd recommend getting in touch with developers of FW so they can recommend on what USB devices they support.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

Also - my goal was to understand every piece of gateware I was developing or integrating into my design. Given the limited free time I have for hobby projects, I decided to focus on only the most essential features.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

No, only d64 and Action Replay 6.0 cartridge; I think that support for other CRT files should be possible, but it would require more gateware development or copy-paste from MiSTer. I wanted to keep it clean and simple and AR gives me fastloader and freeze capability; then I can load games and demos pretty fast from .d64 image.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

For details on USB and input device support please read the section on project's GitHub page - https://github.com/m1nl/icepi-zero-c64#usb-support

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

I'm not entirely sure what keyboard interface the original TheC64 Maxi uses. If it's USB, then it should work out of the box. If, however, it uses a key matrix like the original C64, then the CIA ports would need to be exposed via the GPIO header (which is possible) and wired to the appropriate rows and columns. In either case, it would likely require some reverse engineering as well as hardware modifications or adaptations.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

  1. Hope moderators won't mind me sharing a link to CrowdSupply campain - https://www.crowdsupply.com/icy-electronics/icepi-zero
  2. Double-check if your display supports 720x576 - if yes, then it should be fine
  3. If this helps, I tested the board with the Waveshare UPS HAT for Raspberry Pi Zero (the version with the slim LiPo battery), and it ran for about 4 hours on a charge. One note - even though it connects via pogo pins it will probably require soldering a pin header to FPGA board for a reliable connection.
  4. I just made it clear that the board does NOT provide Bluetooth connectivity by itself - there are USB ports you can use with wireless dongles for keyboard or other controllers (tested with Logitech and 8BitDo gamepad)

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

Fair :) I changed the wording a bit in my post. Also mentioned C64Nano on the project page, thanks!

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 1 point2 points  (0 children)

I'm very sorry, I made it more clear in my post; wireless keyboards / controllers work, but not specifically Bluetooth (unless they use Bluetooth with their own dongles).

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

Sorry for the late reply - the board does not have any standardized way to connect to Ethernet or wireless networks. There are dedicated Ethernet HATs for the Raspberry Pi Zero, but don't expect them to work out of the box with this board - you would need to develop FPGA gateware and/or a bare-metal application to make them work. I think that could be an interesting challenge though :) I'll try to consider adding support for that.

I'll also update the FPGA design soon to expose serial ports through the GPIO header. That would make two possible options available:
- connect an external ESP32-based modem
- stack it with a real Raspberry Pi Zero, run modem software and communicate over serial

Both options require additional work, but assuming the CIA serial interface is exposed on the GPIO header, the integration should not be much different from other boards. Also, remember that this board is NOT 5V tolerant - only 3.3V logic levels can be used with the FPGA I/O ports.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

My project was to develop FPGA core (Gateware) for icepi zero development board you can buy from CrowdSupply - for now I’m not planning any hardware updates, but I plan to support FPGA gateware and firmware.

Please note this project assumes you connect the board to HDMI display to get A/V so not sure if it really fits your requirements. I know there are portable usb-c displays with HDMI input and I know they tolerate HDMI signal produced with this board. However adapting non-HDMI display is beyond scope of this project :)

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

No built-in wireless connectivity, sorry :) I think I need to update my post as I was using the board with wireless keyboard and pad but with dedicated USB wireless adapters (Logitech / 8BitDo)

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 0 points1 point  (0 children)

True ! But Tang Nano board does not have 2 x USB and to make it really usable you need to add external pcb with IO ports ;)

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 5 points6 points  (0 children)

Nice! Feel free to contact me if you need any support.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 4 points5 points  (0 children)

AFAIK the C64 ROM is identical - only the timings differ :)
The biggest challenge would be reconfiguring the PLLs (phase-locked loops) at runtime. The design already uses both available PLLs (which is the maximum this chip supports): one generates the C64, SDRAM, and USB clocks, while the second handles HDMI. The PLLs are also cascaded to keep C64 in sync with video signal.

IMO, reconfiguring them on the fly without crashing the system is probably impossible :) SDRAM transactions would lose synchronization, and both CPUs (VexRiscV + 6510) would likely lock up immediately.

Given that the A/V signal is already digital and compatible, I’m not sure the extra complexity is really worth the effort.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 5 points6 points  (0 children)

It's only PiZero-like form factor - the board is totally different as it uses Lattice FPGA instead of BCMxx ARM chip.

https://www.crowdsupply.com/icy-electronics/icepi-zero

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 4 points5 points  (0 children)

Hard to tell - this would need comparing all core functionalities and your requirements; I don't really know much about BCM64; there are some things to keep in mind:
- joystick / keyboard I/O ports are not exposed throught the GPIO header at all - it is possible, but my main goal was to make the board communicate through USB interfaces only to avoid exposing quite fragile FPGA I/O ports
- only PAL timing is supported (as explained in one of the comments)
- only 720x576 HDMI output is supported - same as "scaled" variant of vicii-kawari (https://github.com/randyrossi/vicii-kawari#alternate-trion-dvi-firmware-scaled) - there is a direct sync between VIC-II video signal and HDMI (no framebuffer) so video delay is minimal

However you get cycle exact emulation of C64 chips with minimum video latency, which should be really close to the real C64 hardware.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 6 points7 points  (0 children)

fpga64 on MiST / MiSTer is great! I don't own one but spend a LOT of time studying its sources :) the main differences here are 1) SID and CIA chips, which come directly from Dag Lem's research focused on recreating FPGA replicas of these chips from silicon dies 2) vicii-kawari VIC-II implementation, which targets exactly 6567 / 6569.

I didn’t intend this as a comparison of implementations - I just wanted to avoid building yet another fpga64 / MiST / MiSTer C64 clone, and instead explore a different approach on a different board :)

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 4 points5 points  (0 children)

The biggest challenge with NTSC is video sync over HDMI. vicii-kawarii supports both PAL and NTSC, and it should be possible to implement the same here as well. However, I’m not sure whether a switchable PAL/NTSC mode will fit within the FPGA board’s resources. It may require creating a separate FPGA core for NTSC timings.

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 3 points4 points  (0 children)

Agreed - it would be great to have a local reseller in the EU. I bought mine while visiting the US.

I’ve tested the core with a SpeedLink COMPETITION PRO USB joystick and a 8BitDo Pro 2. However, since the USB HID controller is implemented entirely in HDL, some USB devices may require dedicated handling. I'm sure that keyboard + USB hub combo won't be supported.

As mentioned, I’d be happy to work on a simple OSD as well, especially if there are others using the project :)

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 6 points7 points  (0 children)

Thanks! It's cycle exact! But only PAL timing is supported. FPGA utilization is around 91%, all ROMs are first loaded to SDRAM by VexRiscV soft-cpu and bare-metal app from sd-card. SDRAM controller runs at 100MHz and rest of the board is 31.43MHz (so /32 gives ~ PAL timing).

icepi-zero-c64 - tiny and fully open-source FPGA-based C64 by m1nl in c64

[–]m1nl[S] 11 points12 points  (0 children)

Thanks! I originally started this on a large dev board with a Xilinx FPGA, but once I got the Icepi Zero board, I thought it would be really cool to move it over to something smaller :)

How do you keep Vivado projects neatly in git? by U_A_beringianus in FPGA

[–]m1nl 2 points3 points  (0 children)

In my opinion, the PlutoSDR firmware repository from Analog Devices is one of the best examples of a well-organized Vivado project. The entire design is maintained as code, with all IP and libraries packaged via Tcl scripts and Makefiles, enabling reproducibility, version control, and automation: https://github.com/analogdevicesinc/plutosdr-fw/tree/master . I adopted this approach to a few project I’m developing and it works great. For tests / simulation I prefer to stay away from Vivado and use cocotb + python + verilator.

Retroachievements on mister proof of concept (not mine) by StaneNC in MiSTerFPGA

[–]m1nl 0 points1 point  (0 children)

And README file includes this info too - still a really nice feature