XaiJu
JOTEGO
JOTEGO

patreon


Research Work

I was asked to publish a bit about how I develop the cores. Today I will talk about a small topic: the horizontal pixel count of Popeye.

All video systems need to count pixels. There is always a horizontal count, H, and a vertical count, V. Popeye PCB schematics are available online and except for some chips marked with a different code on purpose, most of it is accurate.

However the H counter has a feedback loop involving a capacitor. This loop resets the counter at the end of the count. However, the reset value toggles between two possibilities. So one count will be larger than the other. The large count is for the active pixels and the short count for the blank interval.

The question came to me about whether the capacitor was resetting the count too slowly in order to add an extra count. Or whether there was some glitch in the output values. I first simulated the circuit in the computer for different delay values and I found that the count could vary by 1 or 2 cycles depending on how fast the logic gates driving the capacitor are. It may sound like a small thing, but this is about getting the game running at the exact FPS it is meant to be.

So I ordered some 74LS161 chips (with patron funds, thanks!) and I built the circuit. I found that the count was done in the most logical way, with no repeated codes and no glitches. So now I can just write the counter in modern HDL languages to be exactly that.

By the way, Scralings offered to send me a Popeye board. I would have measured this directly on the board. I declined his offer because I think I could get by without it and those boards are very expensive. I am glad I could build the small circuit and verify it. Anyway, Scralings, thanks for your continuous support.

Research Work

More Creators