
NES Graphics – Part 3 - dustmop
http://www.dustmop.io/blog/2015/12/18/nes-graphics-part-3/
======
toxican
part 1: [http://www.dustmop.io/blog/2015/04/28/nes-graphics-
part-1](http://www.dustmop.io/blog/2015/04/28/nes-graphics-part-1)

part 2: [http://www.dustmop.io/blog/2015/06/08/nes-graphics-
part-2](http://www.dustmop.io/blog/2015/06/08/nes-graphics-part-2)

------
thescriptkiddie
Does the electron gun physically move, though? I thought it was fixed and the
beam is just steered with magnets.

~~~
blakeyrat
The gun fires straight ahead. The electrons it produces are deflected in the
desired direction by electromagnets.

I don't think it's possible to create a mechanical way of moving the gun fast
enough to achieve the needs of even a low-res TV screen. If it was a physical
mechanism, you can imagine it'd break all the time.

~~~
mchanson
There was such a thing as a mechanical television:

[https://en.wikipedia.org/wiki/Mechanical_television](https://en.wikipedia.org/wiki/Mechanical_television)

~~~
blakeyrat
Not one using an electron gun. The article is specifically about CRTs. (Of
course I know about mechanical televisions; I just didn't talk about them
because they weren't relevant to the topic.)

------
cbd1984
Something else the article gets wrong, and this is a nitpick, is that it
implies every scanline is redrawn every single time. This is called
progressive video, and CRTs didn't do this. CRTs did something called
interlaced video, where every _other_ scanline is redrawn in a given screen
update: Evens, then odds, then evens, and so on. This was done to reduce
bandwidth requirements and to prevent flicker.

(Progressive versus interlaced is the difference between the "p" and the "i"
in 480p versus 480i, 1080p versus 1080i, and so on.)

Therefore, with interlaced video, each screen update, called a "field", only
has _half_ of the data of a complete frame, and the other half is not sent:
The next field is one-half of the next frame. Therefore, interlacing cannot be
undone cleanly. Deinterlacing, and it's called, is inevitably a process of
reconstructing an image which has passed through a rather brutally lossy
compression algorithm.

(Distributing interlaced video where the same frame is broken up into two
fields, and therefore frames _can_ be reconstructed cleanly, is called
"progressive segmented frame". It was used in film-to-video transfer.)

[http://www.lurkertech.com/lg/fields/](http://www.lurkertech.com/lg/fields/)

~~~
scanlimes
You are mistaken on two counts.

CRT _TVs_ were designed around interlaced broadcast signals, but CRT
_monitors_ most certainly supported high resolution progressive scan video.
The much vaunted Sony GDM-FW900, for instance, one of the last great CRTs
before LCD monitors took over, supported progressive scan resolutions of
1920x1200 at 85hz.

And the NES and most early game consoles really did output a progressive scan
signal that CRT TVs could display, through a hack known as "240p". Basically,
the device only ever outputs odd fields in an out-of-spec NTSC signal, giving
the effect of a progressive scan image with half of the vertical resolution.
CRT TVs, being "dumb" analog devices, would just keep redrawing over the odd
lines every time, and never ever touch the even lines.

This is the source of the "scanlines" effect of darkened horizontal lines
spanning the screen, as these lines were never directly hit by the beam while
a 240p game was running. It's also part of why these old games look like crap
on modern LCD TVs, as almost all of them have scaling hardware that is
ignorant of the 240p hack and incorrectly treats the signal as if it were
interlaced, producing tremendously ugly results.

------
rasz_pl
Oh boy, those were the tough times for chip designers. sprite0 and mapper
triggering are clever hacks that could have been avoided with <100 transistors
(8 bit counter) in the PPU to let you trigger an interrupt on arbitrary
raster.

------
triangleman
but how does the NES know what the CRT is doing? It's not like they are synced
up.

~~~
bvk
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](https://en.wikipedia.org/wiki/Analog_television)

