The optimal route is a calculation, not a recorded game. The 189 screens of the walkthrough come from walking the world the cartridge generates with its own rules, counted in SCREENS CROSSED: the clock, jumping and dodging are not in it, and ladders are counted as free. Everything else —the listing, the numbers and the map— comes from the binary and is reproducible with make.
There is no map in the cartridge. The 255 screens come out of a single byte, 0xE222, a feedback shift register: the seed is 0xC4 and the feedback taps are bits 7, 5, 4 and 3. Leaving to the right, 0xB68F steps it forward; leaving to the left, 0xB69F —its exact inverse— steps it back.
Those eight bits carry the three decisions of every screen: two bits pick the scenery, three the kind of scene and three the variant. The ring is maximal —255 states, with 0x00 left outside it and used by the title screen— and the simulation agrees with the emulator on all 255.
Type 5 is the only one dispatched through table 0xAEA4, which holds four routines repeated two by two. Since the eight variants share out four scenes each, every class of treasure comes up eight times: 8+8+8+8 = 32, and not one more.
Each routine writes what its own is worth into 0xE188 —2, 3, 4 or 5, that is thousands of points— so the whole world holds 8·(2000+3000+4000+5000) = 112000 points. With the 2000 the score starts at, 114000: the ceiling of the game.
What has been picked up is remembered in 32 bits, 0xE21D-0xE220: one byte per class of treasure and one bit per treasure. Before drawing one, 0xAAFF rotates its bit out into the carry.
And if it was set, there's no branch and no flag: it does pop hl and ret. It swallows its caller's return address, and the routine that was going to draw the treasure never runs.
Changing screen is 0x9CBE's job: when the player's X reaches the right-hand edge it puts him back on the other side and steps the screen register on. But it steps on one place or three depending on bit 0 of 0xE2EB, which is what says whether you're up on the surface or down in the tunnel. The left-hand routine is symmetrical.
The route that collects the 32 treasures goes down whenever it can: 189 screens with the tunnel against 238 never going down, 21 % fewer. The only way down is a ladder, and the ladders are measured over the 255 captures: the 63 scenes of kinds 0 and 1.
The vine is painted every frame, and it's the code that paints it: what the cartridge doesn't carry is a drawing of it. On every step, 0xA471 traces a sixteen-point straight line onto a bitmap at 0xE18A and sends it to video memory as a sprite pattern. The slope comes from the table at 0xA61A, indexed by the phase of the swing, which runs up and down between 1 and 0x20.
Not a string, not an alphabet, not a hidden message. The font the game loads is ten digits, the colon and a blank: enough for the score and the clock, and not enough for a single letter.
Everything that looks like text —the title banner and the Copyright 1982, 1984 at the foot— is drawing, cut into tiles, one per position. That's why searching the ROM for strings returns nothing readable, and why that one line at the foot, with its two dates, is the only thing the cartridge signs.
Emulator captures, but not of anyone playing: it is told what to put in the screen register and asked for a photograph of each scene. Here is one of each kind, picked by crossing the register value with the table that comes out of the cartridge: get that reading wrong and what sits under each caption would be something else.