Hacker News new | ask | show | jobs
by triangleman 3835 days ago
but how does the NES know what the CRT is doing? It's not like they are synced up.
7 comments

The NES's GPU generates sync pulses on the video line - one at the end of each line to make the electron gun's aim to return to the left side, and a long one at the end of each frame for the electron beam path to return to the top left. Circuitry in the TV uses these pulses to keep the picture stable.

https://en.wikipedia.org/wiki/Analog_television

They very much are synced up, since the PPU needs to generate the video signal directly: https://en.wikipedia.org/wiki/Picture_Processing_Unit

I'm not familiar with the NES in particular, but typically the software is synced with the video signal via hardware interrupts.

To answer more specifically: the NES doesn't know what the CRT is doing. It's the CRT's responsibility to sync itself to the incoming signal. So there's not bidirectional communication, but they are still synced.
They are synced up; in the NES, the PPU generates the video signal and is also attached to the CPU and provides interrupts at various points in the frame.
It controls the CRT by issuing HBLANK and VBLANK signals.
It doesn't. The NTSC standard outputs scanline-by-scanline, and traditional CRT televisions are synced to the signal.
CRTs wouldn't work if the video device wasn't synced up, whether that's an NES or whatever, it has to know when to send what data. It's not like the TV has a buffer.