Atari 2600 · original game
Tunnelkin
A digger in a mine twice the height of the screen. The map lives in the console's 128 bytes of RAM, so every tunnel he digs stays dug, and the window scrolls to follow him a scanline at a time.



The second game of the book is set in a mine, and a mine is bigger than a television screen. Chapter 38 builds the mine and a window that slides over it one scanline at a time while the beam is drawing. Chapter 39 puts a man in the mine and gives him a shovel — and the moment the map can change, it has to move out of the cartridge and into the hundred and twenty-eight bytes of the console.
Seventy-eight of those bytes are the map. The window follows the digger, keeping him near the middle of the screen, and every square he digs stays dug.
Tunnelkin is a cartridge you can pick up and play rather than a finished product: there is no score, no sound and no title screen yet. The workshops at the end of chapter 39 are where it becomes a game — make him fall when there is no rock under his feet, stop him walking through rock sideways, count the columns he has cleared.
Where it comes from
Written line by line in Atari 2600 Assembly: