• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

NuBusFPGA: HDMI on NuBus Macs

cheesestraws

Well-known member
Again - a development platform, not a product :-/

Well, for me, I can assure you that's precisely why I want to play with it. It would be much less interesting if it were finished. I'm away for a few days: when I get back let me check that I can get the other bits. I'm sure I'll be able to get the software running.
 

Bolle

Well-known member
I would be interested in one as well. I can proxy one to @cheesestraws as well if needed… we send stuff back and forth regularly anyways so you don’t have to bother with UK shipping.
 

Melkhior

Well-known member
For the moment, all three available carriers have been earmarked. I'll update the thread if the situation changes.
 

6a62

Member
This has me eyeing up the old Xilinx Zynq-7020 FPGA dev kit I have sitting in the cupboard now, I really should find a good use for that some day...
 

Melkhior

Well-known member
I've announced the IIsiFPGA in a new thread. Same concept for '030 PDS, lot of shared stuff in the gateware, in particular the Framebuffer is the same.
 

bigmessowires

Well-known member
Since this is a build-it-yourself device, if possible it would be great to see an outline of the required hardware/software tools, and the general steps for building one on of these. The Github FAQ text was mostly focused on describing the features rather than the build. Sorry, I know this is a big ask. What you've already done is amazing, I just think it'll be easier for other people to follow in your footsteps if they have a something like a step-by-step build outline. I'm thinking of something like:
  1. Here's the BOM file (with links to where to buy)
  2. Here are the Gerbers for the PCB
  3. Here's the the FPGA module you need
  4. Populate the PCB using your favorite method
  5. Use XYZ software with JKM programming tool to write xxxxxx.bitstream to the FPGA
  6. Any other hw configuration that's needed before use
  7. Software requirements on the Mac side
  8. Anything else?
Hardware

I poked through the Github, and it looks like nubus-to-ztex.csv is the current BOM? I see designators, but not any component values or other details. Are those given somewhere else? I was also unsure about the meaning and naming of the Gerbers. How many layers is the PCB, four? More photos of the assembled PCB would be helpful, and at a higher resolution, so they could be used to compare against a work-in-progress board. Is the PCB thickness 1.6mm? Any other special requirements like ENIG plating?

Software

For people who mainly want to build this and use it, rather than hack the software, it would be awesome to have a prebuilt FPGA bitstream. That would save a lot of trouble needing to install and configure various toolchains and rebuild everything from source. My guess is that many, many people would be excited just to have a NuBus video card that ouputs HDMI, and not trouble themselves with any other hacking or development. Pre-build binary modules could include the FPGA bitstream itself, already-built versions of NuBusFPGAInit and NuBusFPGAHDMIAudio INITs, a built binary of the DeclROM, and the "Microcode for acceleration".

Other

Once I have the bitstream and Vivado installed, what's the process for programming the Ztex module? Is it USB or do I need any special FPGA programming hardware? Is there any other hardware or software configuration that needs to be done before the card could be used?

License

What license are you using for the hardware and software? I didn't see anything specifically mentioned.

Sorry for the million and one questions, and many apologies if this is already answered somewhere that I didn't see. Thanks!
 
Last edited:

Melkhior

Well-known member
Since this is a build-it-yourself device,
It's more of a 'prototype for inspiration' than a device per se. It works for me and has been tested by third-parties, but it's not really plug-and-play (and might never be). It's also expensive. I wouldn't recommend building one unless the builder has some significant experience playing with such stuff...

The current source of information is this thread, really...

  1. Here's the BOM file (with links to where to buy)
  2. Here are the Gerbers for the PCB
Everything should be in the KiCad project (V5.1 or later). In addition, there should be a ZIP file with generated stuff like Gerbers, that I uploaded to JLCPCB for manufacturing (plus placement & BoM files: nubus-to-ztex-all-pos-jlcpcb.csv &
nubus-to-ztex-jlcpcb.csv). Theoretically (and assuming the relevant parts are still available!), just uploading the ZIP, placement & BoM to JLCPCB should 'just work'... but again, experience needed, JLCPCB is about price! Also, triple-check the orientation of SMD parts, KiCad and JLCPCB seem to have different assumptions and nearly all of them need to be rotated into proper positioning :-(

JLCPCB did both the PCB & the full assembly of all parts. I can do 2.54mm through-hole soldering (needed for the IIsiFPGA's 120-pins DIN connector)., but not SMD.

  1. Here's the the FPGA module you need
ZTex 2.13a, other 2.13 might work (same pinouts, larger Artix-7 FPGA), no other module will (different pinouts and/or supply voltage).

  1. Populate the PCB using your favorite method
  2. Use XYZ software with JKM programming tool to write xxxxxx.bitstream to the FPGA
ZTex have their own software to program over USB. Vivado with a JTAG programmer also works, but is more complex (for V1.2, the current one, don't go anywhere near the older V1.0 and its CPLD!).

  1. Any other hw configuration that's needed before use
External 5V supply & USB cable for programming is all. The ZTex 2.13a can take more than 5V, but if it's on the NuBusFPGA carrier that 5V is fed directly to the HDMI and USB circuit, and those *really* don't like more than 5V.

  1. Software requirements on the Mac side
For basic framebuffer & RAM disk, none, the built-in Declaration Rom handle everything.
Acceleration & audio have their own INIT, but those are optional (and cool :) ).

  1. Anything else?
The willingness to waste money on what is fundamentally a toy & take some risk with your vintage hardware... Although it works-for-me, it may not be 100% compliant with all rules and regulations, etc.

I poked through the Github, and it looks like nubus-to-ztex.csv is the current BOM? I see designators, but not any component values or other details.
Should be. More of the relevant information is in the KiCad project, the CSV are mostly formatted for SeeedStudio & JLCPCB.

I was also unsure about the meaning and naming of the Gerbers. How many layers is the PCB, four?
Yes, four layers, the naming is whatever comes out of KiCad. Those works a SeeedStudio (SBusFPGA V1.x, NuBusFPGA V1.0) and JLCPCB (NuBusFPGA V1.2, IIsiFPGA).

More photos of the assembled PCB would be helpful, and at a higher resolution, so they could be used to compare against a work-in-progress board. Is the PCB thickness 1.6mm? Any other special requirements like ENIG plating?
I think everything should be visible in KiCad ? The board is the default 1.6mm and I did use ENIG (I think), but not idea whether that's a requirement...

For people who mainly want to build this and use it, rather than hack the software, it would be awesome to have a prebuilt FPGA bitstream.
Yes, for the 3 out in the wild I shared a reference bitstream and INITs. Make things easier to start. Declaration ROM and the microcode for the acceleration are built into the bitstream (although the Declaration ROM can be in an external Flash connected to the PMod if desired, which can save time when playing with it).

Once I have the bitstream and Vivado installed, what's the process for programming the Ztex module? Is it USB or do I need any special FPGA programming hardware? Is there any other hardware or software configuration that needs to be done before the card could be used?
Easiest is to use ZTex' programming software over USB, as you just need the USB cable. JTAG is also an option, but I didn't even bother having the JTAG header assembled in V1.2, though that's possible.

Once the bitstream is flashed, then the card should be plug-and-play as any other NuBus framebuffer. As mentioned, only acceleration & audio do need additional software.

What license are you using for the hardware and software? I didn't see anything specifically mentioned.
I really should fix that! There should be very little reliance on patched third-party code by now (some is included by github submodules). Probably, the gateware would be same as Litex (BSD 2-clause), stand-alone SW code GPL2, hardware CC Attribution-NonCommercial-ShareAlike.

Sorry for the million and one questions, and many apologies if this is already answered somewhere that I didn't see. Thanks!
No problem, and thanks for your interest :)
 

Jockelill

Well-known member
Since this is a build-it-yourself device, if possible it would be great to see an outline of the required hardware/software tools, and the general steps for building one on of these. The Github FAQ text was mostly focused on describing the features rather than the build. Sorry, I know this is a big ask. What you've already done is amazing, I just think it'll be easier for other people to follow in your footsteps if they have a something like a step-by-step build outline. I'm thinking of something like:
  1. Here's the BOM file (with links to where to buy)
  2. Here are the Gerbers for the PCB
  3. Here's the the FPGA module you need
  4. Populate the PCB using your favorite method
  5. Use XYZ software with JKM programming tool to write xxxxxx.bitstream to the FPGA
  6. Any other hw configuration that's needed before use
  7. Software requirements on the Mac side
  8. Anything else?
Hardware

I poked through the Github, and it looks like nubus-to-ztex.csv is the current BOM? I see designators, but not any component values or other details. Are those given somewhere else? I was also unsure about the meaning and naming of the Gerbers. How many layers is the PCB, four? More photos of the assembled PCB would be helpful, and at a higher resolution, so they could be used to compare against a work-in-progress board. Is the PCB thickness 1.6mm? Any other special requirements like ENIG plating?

Software

For people who mainly want to build this and use it, rather than hack the software, it would be awesome to have a prebuilt FPGA bitstream. That would save a lot of trouble needing to install and configure various toolchains and rebuild everything from source. My guess is that many, many people would be excited just to have a NuBus video card that ouputs HDMI, and not trouble themselves with any other hacking or development. Pre-build binary modules could include the FPGA bitstream itself, already-built versions of NuBusFPGAInit and NuBusFPGAHDMIAudio INITs, a built binary of the DeclROM, and the "Microcode for acceleration".

Other

Once I have the bitstream and Vivado installed, what's the process for programming the Ztex module? Is it USB or do I need any special FPGA programming hardware? Is there any other hardware or software configuration that needs to be done before the card could be used?

License

What license are you using for the hardware and software? I didn't see anything specifically mentioned.

Sorry for the million and one questions, and many apologies if this is already answered somewhere that I didn't see. Thanks!
Being one of the three in the "outside world" :), I can add some comments to your questions and some experience of my own:

@Melkhior kindly provided me with a reference bitstream so we could test everything. Now the first thing is of course to get that bitstream to the card and to do this you use the onboard USB connector, but, important, you must also provide external 5V power to it (do not feed more than 5V if you have the card installed on the nubus card since this will fry some components on the nubus card!!!). Then you will need the Ztex EZ-USB tools available from here: https://www.ztex.de/downloads/ztex-230623.zip

One BIG note on these tools, they will only work on an Intel powered x86 machine (at least if you use Mac OS, not sure about Linux/Windows since I have not tried any ARM-powered machine with Windows or Linux)! I tried at first to use my M1 mini, but it would fail each time due to some unsupported java functions, when I switched to an intel machine and it worked instantly.

You also need to have a package called LIB4USB installed, otherwise it will not work.

Once you have downloaded the EZ-USB tools there is a java program called FWloader.jar (you need to have java VM and runtime installed on your machine) in the ztex/java/fwloader folder. You use it with switches like this: FWLoader -rf -um YOURFILE.BIN

So on Windows it would be: "java -jar fwloader.jar -rf -um YOURFILE.BIT" to upload the file on Mac:
sudo java -cp FWLoader.jar FWLoader -rf -um YOURFILE.BIT

This will load the bitstream to the fpga. After that it's testing time :). The NubusFPGAinit and NuBusFPGAHDMIAudio are only necessary for acceleration and to get audio over hdmi, for a first test you can run without those.

Once that works with the reference bitstream, you can start playing with vivado and the other tools.

With reservatiom for errors :).
 
Last edited:

Melkhior

Well-known member
  • Changing resolution dynamically would require changing the video clock dynamically in the FPGA, which is doable but difficult, so it's not on the TODO list (if you change monitor, changing the FPGA bitstream is easier and more efficient design-wise)
Turns out, the MMCM (clocking module) in the 7-series FPGA have a reconfiguration interface (see xapp888), that interface can be exposed by Litex, and there's already some codes out there using the interface. So changing the clock wasn't as difficult as I thought it would be, and the recent version of the gateware already had most/all the needed hardware support other than the clock anyway.

So in the latest gateware, the NuBusFPGA (and the other *FPGA should only need testing) now has support for 'true' switchable resolution, in addition to the windowboxed resolution.
 

Jockelill

Well-known member
Any chance these will be straight-up built? Kickstarter, perhaps?
Well, ultimately that descision is completely @Melkhior ‘s :D but having built and programmed a few I can give some input. There are several issues before this would be “a product”:

First are the pure mechanical issues:

*There is no rear bracket and not really a good way to make one since the whole card leans a little to allow the HDMI to be connected (this is a HDMI connector issue, if someone knows of a little raised HDMI, that will improve the situation)

*The FPGA daughter card blocks the neighboring slot partially



For the software:

*It only works in 32bit mode, 24bit mode is not possible at all (maybe not an issue for most users, but still needs to be mentioned). If your machine is in 24bit mode you must remove the card, change to 32-bit mode (using another screen) and then you can boot. In 24bit mode you only get chimes of death.

*Occasionally when you change the resolution (if you are using the dynamic resolution) the picture is not centered, and sometimes you need to redo it several times before it’s centered.

Then the absolute biggest issue is cost.

*The carrier alone cost close to 100$ to build and the FPGA daughter card is in the range of 250$, so just the parts are around 350$. Doubt that many people would be prepared to spend that.

Otherwise, the Nubus, Quadra and IIsiFPGA are in a stable working state with above caveats. Theoretically it would be possible to design a board that has the FPGA on the carrier directly, that would likely reduce the cost, but it would be a very complex 6 layer board to design…

Then it should also be mentioned that the 68030 CPU is quite stretched feeding this card. In the SE/30 and the IIsiPDS using the Full HD is quite slow. For the IIfx the Nubus card works fine and for any of the Nubus 68040 machines it works nice! The QuadraFPGA is really the fastest one but Nubus card of course the most versatile.

I haven’t testest the IIsiPDS in the SE/30 with Carrera yet, but I expect it to work without issues. Carrera and NubusFPGA works fine.
 

LaPorta

Well-known member
Wow, yes, a lot of issues there. I’m just one of Apple’s original Mac customers: needs things to “just work.”
 

opualuan

Well-known member
I’d also be in for variants of this card or a solder only kit (no programming, BGAs already populated if used). Regarding connector issue- single-link DVI gets up to 1900x1200 and is easily adapted to HDMI. Does this solve the leaning issue?
 

Jockelill

Well-known member
I’d also be in for variants of this card or a solder only kit (no programming, BGAs already populated if used). Regarding connector issue- single-link DVI gets up to 1900x1200 and is easily adapted to HDMI. Does this solve the leaning issue?
Pretty sure a DVI connector would be better since it's higher from the start, but that the audio would have to be on yet another connector. The beauty of the HDMI is that is has everything we need :).
 

Melkhior

Well-known member
Why the need for audio at all? Would just video via DVI simplify things?
There's audio because it was fun to try and get audio to work :) In fact as detailed in the QuadraFPGA thread, audio comes with its own HDMI PHY, which only does windowboxed resolution - the 'standard' Litex PHY has hardware resolution, but no audio, it's just DVI signaling in a HDMI connector.

And why HDMI ? it's small and I had cable and monitors. DVI is a bit on the way out, and the connector was bigger (and harder to source IIRC). Also, Highly Desirable Macintosh Interface is a good name even if I say so myself :)

The simplest solution would be to do it like for the IIsiFPGA and QuadraFPGA: smaller (cheaper) board and the connector inside the machine, and thinking about doing a 3D-printed backplate with an extension cable. (someday!).
 
Top