Retro CPC Dongle – Part 24

Well, my capture card arrived! No more shaky video. Here’s the current state of my CPC2.0. I’ve faked a keyboard to type in |m,1 to start the Arnor disassembler.

Video Capture of CPC

The screen is off center because the video image is being rendered directly from the memory and not through the CRTC output, so there’s no border colour yet. I’ll work on that later. Also, the colours are fake (those who know Maxam Assembler, know the header is red!) and only mode 1 works (mode 2 is easier but is not the boot default).

You’ll also notice a little bit of colour washout and some ghosting. I’ve tried the capture card with both my custom board and the DE10-Nano and the effect is the same, so it’s unlikely to be the board. It could be the ADV7513 video chip, but again, unlikely because I didn’t see the effect on the physical monitor. I plugged in a Google Chromecast to see if this was the same and there was no ghosting there, video played fine, so I’m suspecting it’s my overly long HDMI cable. I’ll try a shorter one to see if that fixes the problem.

The capture device from eBay

It’s worth mentioning the capture device, see above. I ordered one of these on eBay, not really knowing whether it would handle the video formats that I want to present to it. It’s billed as a HD capture box, meaning 720p and 1080p. However, I was delighted to find that is also natively handles 800×600, 1024×768 as well as the usual higher resolutions. I fact, it handled everything I threw at it. It’s not cheap at AU$178, but it feels well built. That is until I realised the aluminium casing is more than decorative. The heat from this device at 1920×1080 is substantial and the metal casing is definitely needed to dissipate all that heat. I’ve been running it at 800×600 for the duration of this article and so far seems to be cool at these resolutions. I also read that these devices can be a little unstable as the designers may not properly implement the UVC specification. I did get a few hang-ups and crashes while capturing at full HD, but this could also be some instability in the Linux drivers for UVC. Anyway, these boxes seem to be available all over eBay, so I highly recommend this. It’s saved me needing to set up two monitors (which I don’t have room for) and an extra plug.

So, back to the CPC. As you can see, I’ve got some fundamentals working. I’ve been working hard to switch the custom board from SPI communications to UART communications for simplicity and reliability. This now works, so I need to do the same with my DE10-Nano.

The DE10-Nano doesn’t have a serial port connected to the FPGA, so I’ll be using the light-weight-bridge I built to fake the keyboard to also fake the UART. This way the interface to the core RTL logic is the same and the DE10-Nano HAL separates the physical board from the core. I also have a problem with the support software upload that stopped working when I switched to UART. Simulations work perfectly, so it has to be a timing issue somewhere.

Trying to diagnose the software upload (click for large)

If you look at the timing, the data changes on the negative clock edge and clocked into memory on the positive clock edge. It used to update on rising edge, causing all sorts of odd timing issues, until I realized my mistake.Looks fine, right? But only the first byte get stored in memory, and since the JTAG port is broken as a result of my last hardware update, I cannot diagnose the problem on my custom board. I need to build a fake UART on the DE10-Nano and use the built in USB Blaster to see what the signals are doing. Unfortunately, not a small job, but that’s my weekends work!

Enjoy yours, until next time!

Last Post <—-> Next Post


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s