A game console is a computer with four jobs. It has to put a picture on a television, make a sound, get a game into itself, and, for most of its history, refuse the games its maker did not license. The history of the machines, category by category and generation by generation, is in the Learn article Arcades and video games, by category and generation. This post opens the machines instead, and works through each of the four jobs with the numbers their makers and the courts published, so that every figure can be checked with a pencil. The oldest document here is Atari's own guide for programmers of its Video Computer System (VCS), the console later called the 2600, dated 3 December 1979 (Steve Wright, Stella Programmer's Guide, Atari, 1979, web transcription); the newest is Nintendo's specification for the Switch 2 of 2025. The story of how a market-reserve clone of a Sinclair computer reached a São Paulo living room in 1984 is told in 1984, São Paulo: what Brazil's market reserve actually built; the same two years put Atari clones under hundreds of thousands of Brazilian televisions, and they come back in the section on locks.

Job one: draw the picture

Racing the beam

The Atari VCS had 128 bytes of random-access memory (RAM) in all, inside a 6532 chip that also held a timer and the input ports, and its programmers were told to put the processor's stack at the top of that memory and their variables at the bottom, "hoping the two never meet" (Stella Programmer's Guide). A television picture of even modest resolution needs thousands of bytes, so the VCS kept no picture at all. Its TIA (Television Interface Adaptor) chip draws only what its registers say at the instant the electron beam passes, and the program rewrites those registers line by line as the beam moves down the screen. The guide's numbers turn that into arithmetic.

The frame. "A single television 'frame' consists of 262 horizontal lines, and each line is divided by 228 clock counts (3.58MHz)." Of those 228 colour clocks, 68 are horizontal blank, while the beam flies back to the left edge, and 160 draw the visible line. The program itself must count the lines: 3 lines of vertical sync, 37 of vertical blank, 192 of picture and 30 of overscan (Stella Programmer's Guide).

Part of the frameLines
Vertical sync (VSYNC)3
Vertical blank (VBLANK)37
Picture192
Overscan30
Total262

The processor's share. "The microprocessor's clock is the 3.58 MHz oscillator divided by 3, so one machine cycle is 3 color clocks." Work it through:

  1. Cycles per line: 228 ÷ 3 = 76, as the guide says.
  2. Processor clock: 3.58 MHz ÷ 3 ≈ 1.19 MHz, so one cycle lasts about 0.84 microseconds and a line about 76 × 0.84 ≈ 64 microseconds.
  3. Cycles per frame: 262 × 76 = 19,912.
  4. Cycles a second at 60 frames: 19,912 × 60 = 1,194,720, which is the 1.19 MHz clock again, recovered from the picture.
  5. Cycles spent drawing the 192 visible lines: 192 × 76 = 14,592, or 73.3 per cent of the frame.
  6. Cycles left for the game itself: "the remaining 70 scan lines (3 for VSYNC, 37 for VBLANK, and 30 for overscan) will provide 5,320 machine cycles (70 lines x 76 machine cycles) for housekeeping and game logic", which is 5,320 ÷ 19,912 ≈ 26.7 per cent.

Quotations: Stella Programmer's Guide. The code that draws the visible lines the guide calls the "Kernel", "the essence or kernel of the game", and it must be "one step ahead" of the beam, because the TIA holds only what belongs to the line being drawn. Branches and loops take unpredictable times, so the TIA offers a register called WSYNC (Wait for SYNC): writing to it halts the processor until the beam reaches the right edge, so the next instruction starts at the beginning of the next line. Updating the TIA every two or three lines gives the program more time "at a price paid with lower vertical resolution" (Stella Programmer's Guide).

The playfield. The background walls and barriers come from a 20-bit playfield register, written into three addresses (PF0 with 4 bits, PF1 and PF2 with 8 each), which draws the left half of the screen; the right half repeats it or mirrors it, chosen by one bit in a control register (Stella Programmer's Guide). So a line holds 2 × 20 = 40 playfield cells across 160 visible colour clocks, and each cell is 160 ÷ 40 = 4 colour clocks wide. That is why VCS backgrounds look chunky: the chip cannot draw a wall thinner than 4 clocks unless the program rewrites the register in the middle of the line. On top of the playfield the TIA draws five movable objects, two players, two missiles and a ball, and records their collisions in latches the program reads afterwards (Stella Programmer's Guide).

Tiles, sprites and a frame buffer

Later machines bought memory to escape the race. Space Invaders, in the arcade in 1978, drew into a bitmapped framebuffer from an Intel 8080 (Wikipedia, Space Invaders); Pac-Man's board of 1980 gave 1 KB each to video RAM, colour RAM and program RAM, beside 8 KB of character ROM (read-only memory) for its characters and background tiles (Wikipedia, Pac-Man). The consoles of the third generation, from 1983, used "sprites and tiles instead of block-based graphics" (Wikipedia, Third generation of video game consoles): a background built from small reusable tiles, and a few movable sprites drawn on top by the hardware.

How far memory has come in one comparison: the PlayStation 5 has 16 GB of GDDR6 (PlayStation Blog, 18 March 2020). Counting a gigabyte of memory as 2³⁰ bytes, as memory chips are counted, that is 16 × 2³⁰ = 2³⁴ bytes; the VCS had 2⁷. The ratio is 2³⁴ ÷ 2⁷ = 2²⁷ = 134,217,728. Which kilo, mega and giga a label means is in Bits, bytes and the two kinds of kilo.

Job two: make the sound

Two circuits, five bits, sixteen levels

The VCS's whole sound system is two identical circuits inside the TIA, each with three registers (Stella Programmer's Guide):

  • Frequency. Pulses at about 30 kHz, taken from the horizontal sync counter, go through a divide-by-N circuit set by a five-bit register, AUDF: code 00000 divides by 1 and code 11111 by 32, which gives pulses "adjustable from approximately 30 KHz to 1 KHz". The arithmetic: 30,000 ÷ 32 = 937.5 Hz at the bottom. Five bits give 2⁵ = 32 settings, and that is all the pitch control there is, which is why VCS music so often sounds slightly out of tune.
  • Tone. A four-bit register, AUDC, selects the feedback taps and count lengths of a nine-bit shift counter, producing "pure tones like a flute" or noise "like a rocket motor or explosion".
  • Volume. A four-bit register, AUDV, switches four driver transistors, each twice the size of the previous one, so codes 0 to 15 give 16 levels.

The 30 kHz figure fits the picture timing: the line rate is 3.58 MHz ÷ 228 ≈ 15.7 kHz, so 30 kHz is about two pulses per scan line, the horizontal counter's own beat.

Channels, synthesis and samples

MachineSound hardwareChannels
Atari VCS, 1977TIA2 tone or noise voices
Nintendo Entertainment System (NES), 1985 in North AmericaRicoh 2A032 square, 1 triangle, 1 noise, 1 delta pulse-code modulation (DPCM) sample channel
Mega Drive, 1988Yamaha YM2612 and a square-wave generator6 frequency modulation (FM) channels, 3 square, 1 noise
Super NES, 1990Sony SPC700 and digital signal processor (DSP)8 sample channels, 16-bit, 32 kHz
PlayStation, 1994Sony sound processing unit24 channels at 44.1 kHz, plus compact disc (CD) audio

Sources: Wikipedia, Third, Fourth and Fifth generation of video game consoles. The machines in the table make sound in three different ways. The VCS and the NES's square and triangle channels are generators: a counter and a waveform. The Mega Drive synthesizes by frequency modulation, one oscillator bending the pitch of another, which gives metallic and bell-like timbres from a few numbers. The Super NES and PlayStation play recorded samples, so their instruments can sound like the instruments. The tune on the LGTM ("looks good to me") page is built on exactly this split: its "8-bit" era uses "two pulse waves, a triangle bass and noise drums", the NES's voice set, and its "16-bit" era "the sound of the FM chip in Sega's 16-bit Mega Drive and of PC sound cards", not the Super NES's.

The byte rate of a disc. From the fifth generation, consoles could also play CD audio straight from the game disc: 16-bit pulse-code modulation (PCM) at 44.1 kHz, in stereo (Wikipedia, Fifth generation). Work out what that costs:

  1. Bits per second: 44,100 samples × 16 bits × 2 channels = 1,411,200.
  2. Bytes per second: 1,411,200 ÷ 8 = 176,400.
  3. One second of CD audio is therefore 176,400 ÷ 128 ≈ 1,378 times the whole memory of the VCS.

Job three: load the game

The first consoles loaded nothing. The Magnavox Odyssey's "game cards" held no program; they acted as jumpers that rerouted circuits (Wikipedia, Home video game console generations). The of 1976 put the program in read-only memory that the console's processor reads directly through the cartridge's contacts (Wikipedia, Home video game console generations; Computer History Museum, Revolution, Channel F): there is no loading, because the game is already in the processor's address space the moment the power comes on. Discs changed that. A CD-ROM is far larger and cheaper to make than a cartridge, but its data must be read into memory before it runs, and the loading screen was born (Wikipedia, Home video game console generations).

The ninth generation attacked the loading screen with solid-state drives (SSD). Sony gives the PlayStation 5's 825 GB SSD a raw read rate of 5.5 GB per second; Microsoft gives the Xbox Series X's 1 TB NVMe (Non-Volatile Memory Express) drive 2.4 GB per second raw and 4.8 GB per second with its hardware decompression (PlayStation Blog, 2020; Xbox Wire, 16 March 2020). Both consoles have 16 GB of memory, so, ignoring the difference between decimal and binary gigabytes:

  • PlayStation 5: 16 ÷ 5.5 ≈ 2.9 seconds to fill memory from the drive, raw.
  • Xbox Series X: 16 ÷ 2.4 ≈ 6.7 seconds raw, or 16 ÷ 4.8 ≈ 3.3 seconds with decompression.

Mark Cerny, the PlayStation 5's lead system architect, presented the drive and its input-output system as built to remove "loading screens" (PlayStation Blog, 2020).

Brazil had its own loading story. In 1984, accessory makers sold cassette interfaces for Atari-compatible consoles: RAM units that read a game from magnetic tape into the console's memory, so that a game cost about 5,000 cruzeiros on tape in September 1984 instead of a cartridge whose chips were bought in dollars; the first was the Supercharger from Canal 3, at 200,000 cruzeiros (Virgens, Federal University of Uberlândia (UFU), 2019). How a cassette turns bytes into sound and back is worked out in Holes, echoes, magnets, pits and trapped charge.

Job four: lock out the games the maker did not approve

A chip that answers

Nintendo's North American NES carried a lock, the 10NES, which a United States appeals court described in 1992. The console holds a "master chip" or "lock", every authorized cartridge a "slave chip" or "key", and when a cartridge is inserted the console waits for a coded message; with no message, it refuses the game. Atari Games tried to read the lock in 1986, first by monitoring the conversation between the chips and then by chemically peeling layers from the chips to read their code under a microscope; after obtaining a copy of the program from the Copyright Office by falsely stating it was a defendant in a lawsuit, it wrote its own program, "Rabbit", whose signals were "functionally indistinguishable" from the 10NES even though it ran on a different, faster processor and had to include pauses to keep time (Atari Games Corp. v. Nintendo of America Inc., 975 F.2d 832, 1992). The court split the case in two: reverse engineering "untainted by the purloined copy" is fair use; copying from the Copyright Office copy is not (Atari v. Nintendo, 1992).

Four bytes and a message

Sega's lock was a word. The Genesis III searched each cartridge for four bytes, the letters "S-E-G-A", at a set location, and if it found them showed for about three seconds the message "PRODUCED BY OR UNDER LICENSE FROM SEGA ENTERPRISES LTD" ("produced by or under licence from Sega Enterprises Ltd"). Accolade, which had disassembled Sega's code to make its own games, found the four bytes in every Sega game's start-up code with no visible function, and put them in its own; its games then displayed Sega's message. The Ninth Circuit held that the disassembly was fair use, and that Sega, having made the message the price of compatibility, had not shown it was entitled to an injunction under trademark law, because a feature that is functional cannot be monopolized through a trademark (Sega Enterprises Ltd. v. Accolade, Inc., 977 F.2d 1510, 1992). The lock had tried to make compatibility a trademark question; the court made it a functional one.

The clones that needed no key

Brazil's first wave never met a lock. The second-generation consoles had no regional lockout (Wikipedia, Second generation of video game consoles), and Brazilian manufacturers sold Atari-compatible consoles alongside Gradiente's licensed Polyvox Atari: Dynacom's Dynavision, Milmar's Dactar, CCE's Supergame and others (Virgens, UFU, 2019). When the second wave came in 1989, the clones copied the NES: Dynacom's Dynavision 2 took the American NES cartridge's 72 pins, Gradiente's Phantom System was NES-compatible, and CCE's Top Game was later fitted with two cartridge slots so that it took both American and Japanese NES games (Virgens, UFU, 2019). Nintendo had added its lock for North America after losing control of publishing in North America and Asia (Wikipedia, Home video game console generations); in a market where the console itself was a clone, the lock decided nothing.

Signatures, and the number that must not repeat

From the seventh generation, the lock became cryptography: the console runs only code signed with the maker's private key. In December 2010, at the 27th Chaos Communication Congress, the group fail0verflow showed that Sony's signatures on PlayStation 3 software used the Elliptic Curve Digital Signature Algorithm (ECDSA) with a supposedly random number that, as a report from the congress put it, was "always static" (Exophase, December 2010). Their slides give the rule and the algebra. With e the hash of the signed data, k the private key, m the random number and R a number derived from m, a signature is the pair R and S, where S = (e + kR) ÷ m, all arithmetic done modulo a large prime N. "It is imperative to have a random m for every signature: from a pair of signatures that use the same m, we can compute m and k" (bushing, marcan and sven, Console Hacking 2010, 27C3 slides).

The algebra can be checked with toy numbers small enough for a pencil. Take N = 23, a private key k = 7, a "random" m = 5 used twice, and R = 10 (in real , R comes from a point on an elliptic curve; here it is simply given). Division modulo 23 means multiplying by an inverse: the inverse of 5 is 14, because 5 × 14 = 70 = 3 × 23 + 1.

  1. Sign a message with hash e₁ = 3: S₁ = (3 + 7 × 10) × 14 = 73 × 14. Since 73 = 3 × 23 + 4, that is 4 × 14 = 56, and 56 = 2 × 23 + 10, so S₁ = 10.
  2. Sign another with e₂ = 8: (8 + 70) = 78 = 3 × 23 + 9, and 9 × 14 = 126 = 5 × 23 + 11, so S₂ = 11.
  3. An observer sees both signatures with the same R, which shows that m was reused. Subtract: S₁ − S₂ = (e₁ − e₂) ÷ m, so m = (e₁ − e₂) ÷ (S₁ − S₂) = (3 − 8) ÷ (10 − 11) = (−5) ÷ (−1) = 5. The random number is out.
  4. Now k = (m × S₁ − e₁) ÷ R = (5 × 10 − 3) ÷ 10 = 47 ÷ 10. Since 47 = 2 × 23 + 1, that is 1 ÷ 10, and the inverse of 10 is 7 (10 × 7 = 70 = 3 × 23 + 1), so k = 7. The private key is out.
  5. Check with the second signature: (5 × 11 − 8) ÷ 10 = 47 ÷ 10 = 7 again.

With the key, anyone can sign code that the console accepts as the maker's own; that is what the 2010 report meant when it said homebrew developers could "essentially sign their own applications" (Exophase, 2010). Nothing in the arithmetic depends on the size of N: real keys are hundreds of bits long and the steps are the same. That is why the glossary entry on the nonce, a number used once, insists on the "once".

The lock that cannot be changed

The deepest lock is the boot ROM, code fixed in the processor that checks the next stage before anything else runs. In April 2018 the ReSwitched group disclosed "Fusée Gelée", a flaw in the USB (Universal Serial Bus) recovery mode of the NVIDIA Tegra X1 in the Nintendo Switch: the console is put into recovery mode by shorting a pin on the right-hand Joy-Con connector, and a request for "up to 65,535 bytes per control request" overflows the code that should protect the boot ROM. Because that code is in the chip, the bug "appears to be unpatchable" on consoles already sold (Engadget, 24 April 2018). The vulnerability database records it as -2018-6242, a buffer overflow in the BootROM Recovery Mode of NVIDIA Tegra processors released before 2016, exploitable by someone with physical access to the USB port (National Vulnerability Database, CVE-2018-6242). A lock written into silicon is only as good as its first version.

The bits on the box

The fourth job explains the console labels too. The "bits" of the 8-bit, 16-bit and 64-bit eras are the width of the processor's word: the VCS's 6507 handles 8 bits at a time, the Mega Drive's is a 16/32-bit design, and the Nintendo 64's NEC VR4300 is 64-bit (Wikipedia, Fourth and Fifth generation). As a label it began as marketing: NEC's TurboGrafx-16 had an 8-bit central processor and a 16-bit graphics processor, and the "bit wars" ended after the fifth generation (Wikipedia, Home video game console generations). As a criterion it has scholarly defenders: a 2017 re-examination of the console market at the University of Pittsburgh classifies consoles first by processor word length and then by the spacing of release dates (Kemerer, Dunn and Janansefat, 2017). The PlayStation 5's processor is an design (PlayStation Blog, 2020), the same family as a desktop computer's, and no box has printed its bits for a long time. How the bytes of a wide word are ordered in memory is in Big-endian and little-endian.

Exercises

  1. A VCS game updates the TIA every two lines to gain time. How many updates does it make in the visible picture, and how many cycles does each update get?
  2. How many colour clocks wide is one playfield cell, and how many processor cycles is that?
  3. How many bytes does one minute of CD audio take?
  4. Two toy ECDSA signatures modulo 23 share the same R = 6: (e₁ = 2, S₁ = 1) and (e₂ = 9, S₂ = 11). Recover m and the private key k.
  5. In the Brazilian Christmas of 1984, more than 250,000 consoles were sold, 120,000 of them by Polyvox (Virgens, UFU, 2019). What is the largest share Polyvox can have had?
  6. Sony's quarterly table adds up to 97.9 million PlayStation 5 units at 30 September 2026, and its headline says more than 100 million on 10 November 2026 (Sony Interactive Entertainment, Business Data and Sales). What is the smallest average number shipped per day in between?

Answers

  1. 192 ÷ 2 = 96 updates, each with 2 × 76 = 152 cycles.
  2. 160 ÷ 40 = 4 colour clocks, which is 4 ÷ 3 ≈ 1.33 processor cycles: a cell is narrower than the time it takes to execute one instruction, which is why rewriting the playfield in mid-line is a matter of exact timing.
  3. 176,400 × 60 = 10,584,000 bytes.
  4. m = (2 − 9) ÷ (1 − 11) = (−7) ÷ (−10) = 7 ÷ 10 = 7 × 7 = 49 = 2 × 23 + 3, so m = 3. Then k = (3 × 1 − 2) ÷ 6 = 1 ÷ 6, and the inverse of 6 modulo 23 is 4 (6 × 4 = 24 = 23 + 1), so k = 4. Check: (3 × 11 − 9) ÷ 6 = 24 ÷ 6 = 4.
  5. 120,000 ÷ 250,000 = 48 per cent, an upper bound, since the total was more than 250,000.
  6. From 30 September to 10 November is 31 + 10 = 41 days, and at least 100 − 97.9 = 2.1 million units: 2,100,000 ÷ 41 ≈ 51,000 units a day.

Sources