Dangerous Dave fan page: the code, the HD engine and an AI-searched run

We redrew Dangerous Dave in HD and Super HD, and you can jump to any level. Our AI broke the speedrun world record by a wide margin: 5:55.348 for all 10 levels, 22.5 seconds faster than the record played by hand (no run on speedrun.com or TASVideos is faster). Some of its finds surprised us. On level 6 it takes a trophy that is not on the map at all; on level 5 it loses a life on purpose, then reaches the door through the map's left edge. Both use a bug at the map's left edge that no earlier run we could find had used, and those two levels alone are over 14 seconds faster than in the record run.

HOW IT WORKS
  1. This page carries the game's own program, DAVE.EXE: the 1990 Softdisk release, 76,586 bytes. Nothing else is needed.
  2. In your browser, the engine unpacks it, checks its SHA-256 fingerprint, rebuilds the game's data from it, and translates the game's routines into JavaScript with our own lifter.
  3. Before the game starts, both are checked against the engine we verified our run on. We tested that the translated code is identical to it, 100 of 100 routines, and that the rebuilt data equals it. The game starts only if both match.
  4. Slide QUALITY to pick the view at any time: CLASSIC, the original picture; HD; or SUPER HD. Click the game screen to give it the keys.
  5. PLAY is yours: a level button starts that level in the game, and asks first if you are in the middle of one. WATCH plays our AI run instead: a level button plays that level of the run, ALL the whole run. SPEED works in both. In WATCH, press a game key or the pad to take over from that moment.
  6. Export your moves as a small file, or load a moves file and watch it play back.
CONTROLS
Arrow keys or numpad 4/6walk left / right
Up arrow or numpad 8jump (climb up on trees and vines)
Down arrow or numpad 2climb down; with the jetpack, fly down
Numpad 7 / 9jump left / right
Ctrl, Z or Spacefire the gun (once Dave has it)
Alt or Xjetpack on/off (once Dave has it)
F1 or Hhelp
F9 or Ppause
Escback to the title (asks Y / N); stops a replay
Touch: 8-way pad, FIRE, JETPACKthe same on phones
F8change the graphics (HD, Super HD, Classic)

Are you sure you want to switch levels?

THE LEVELS

Each level's whole map, with the margins past its edges: scroll the strip sideways.

LEVEL 06Level 6: 1360 ticks (19.429 s), from the level picture to the door
PAST THE LEFT EDGETHE MAP

THE AI RUN

An AI-searched, tool-assisted run through all 10 levels, in one game from power-on.

5:55.348
World record: no run on speedrun.com or TASVideos is faster. Timed from the start of level 1 to the level 10 door.

In the last two years the record played by hand came down one second at a time, from 6:22 to 6:17.86 (May 2025), and has not moved since. Ours is 22.5 seconds faster, timed the same way, and about 35 seconds faster than the only tool-assisted run, from 2011.

LEVEL
01
02
03
04
05
06
07
08
09
10
ALL
OUR TICKS
435
1854
1559
4327
1541
1360
2096
1845
1810
4138
24874.33
SECONDS
6.214
26.486
22.271
61.814
22.014
19.429
29.943
26.357
25.857
59.114
355.348

ALL: the whole game, from the start of level 1 to the level 10 door, level changes included.

Original picture (320x200)

The picture switches every 5 seconds between the original picture and Super HD. The video has the game's own sound effects. Playing it with sound mutes the game above.

VERIFICATION AND LIMITS

Verified. Our verifier does not run a hand-written copy of the game. It runs the original DAVE.EXE's own machine code, translated ahead of time, instruction by instruction, into JavaScript (no emulator and no rewrite of the game rules), on the game's own data, and feeds it the recorded keys one game tick (1/70 s) at a time. A level time counts only if this replay reaches that level's door in the number of ticks claimed, from the same start, without losing more lives than allowed; the whole 10-level run was replayed the same way from power-on to the level-10 door. Our two fast simulators (one in JavaScript, one in C) are faster translations of the same program, checked tick for tick against it. As spot checks, the original DAVE.EXE itself, run in a PC emulator (QEMU, FreeDOS) with the same keys, matched our engine on every compared value at every tick in 14 runs on levels 5, 6, 8 and 10. Three of them used the very key sequences our final run plays on levels 5, 6 and 10, each from its own recorded level start (score, lives and jetpack fuel there differ a little from the final run's).

Limits.

  • The whole 10-level run was never replayed on the original DAVE.EXE in the emulator; only single levels were (14 runs).
  • Levels 1, 2, 3, 4, 7 and 9 were never replayed on the original program; their times rest on the translated code.
  • The level 5, 6 and 10 spot checks started from those levels' own recorded starts, not from the final run's own level entries (these differ in score, reserve lives, jetpack fuel, the fuel-burn timer, the jump-table index and the next extra-life score). From the final run's own entries the same keys reach the doors at the same ticks on our engine; that start was not tested on the original.
  • The spot checks compared the game's variables (position, state, timers, items, monsters, shots) every tick, not the screen.
FULL LEVEL TABLE

Each level is timed from the moment it appears on screen to the moment Dave touches the door, in game ticks (70 per second).

LevelOur run (ticks)Our run (s)Lives at the door
14356.2143
2185426.4863
3155922.2713
4432761.8142
5154122.0141
6136019.4292
7209629.9432
8184526.3572
9181025.8573
10413859.1143
Whole game, start of level 1 to the level 10 door24874.33355.348

"Lives at the door" counts Dave's lives when he reaches each level's door.

WATCH IT

The run plays in the game screen at the top of the page, from its own moves in our engine: switch the strip under the screen to WATCH: a level number replays that level and ends at its door, and ALL replays the whole run.

ROUTE GUIDES

The way through every level, and how to do the strange tricks yourself: which keys, where to stand, and how many frames you have.

Shows the level picked in The levels, above.

LEVEL 06Level 6: 1360 ticks (19.429 s), from the level picture to the door

The normal route takes the trophy at (40,8) in the middle of the level and comes back to the door at (4,0). Our route never goes right of column 20. It takes a trophy that is not on the map at all.

STEP BY STEP: KEYS, PLACES, FRAME WINDOWS

Why that trophy exists. Left of column 0 the game reads the map one row up, from its right end. For row 0, "one row up" is outside the map: the values just before it, where the game keeps the level's monster paths. On every level the last of those values happens to be the code the game uses for a trophy. So at (virtual) column -1 of row 0, a few pixels off the left edge of the first screen, the game finds a trophy: the "phantom trophy". Dave takes it rising at x -46..-43, at y 31.

Step by step (ticks of the AI's run):

  1. Jetpack and gun.
    • From the start (2,8) jump up-right onto the jetpack at (6,6) (t59).
    • Jump up-left; Alt (pressed t77, let go t78) lights the jetpack. Rise to the gun at (3,5) (t80).
    • Alt again (let go t97): jetpack off. Drop to the bottom row.
  2. Shoot saucer 1. While falling past (6,7), →+Ctrl at t121 for 4 ticks. The shot kills saucer 1 at t149. Window -1..+3 (5 ticks: very hard); 2-3 ticks early, Dave dies at t219.
  3. Along the bottom row. Land at (6,8) (t132); Alt (let go t132) lights the jetpack. Move right along row 8 to x 319 (columns 19-20) by t361.
    • The AI does this with a 6-tick pulse that switches the jetpack on and off to save fuel: Alt+→, Right, Alt+→, Left, nothing, nothing. It is not humanly repeatable.
    • A player can simply hold → with the jetpack on. Dave reaches x 319 at the same tick (t361), and the door comes at the same tick, 1340. Fuel is 45 instead of 54 at t361, which is enough.
  4. Up the shaft. Hold ↑ (t361): fly up the shaft at columns 19-20 to row 3, 12 px left, then up to row 1 (t482, x 307, y 35).
  5. West along row 1. Hold ← (t482-739): fly west at y 35 to x 65. The screen scrolls back to the first screen at t518-532.
  6. Up through the door tile. At x 65 hold ↑ (t739). Dave flies up through the door (4,0): until you hold the trophy, the door is empty space. He is above the map at t759.
    • Window for the AI's run: -3..0 (4 ticks).
    • The door tile lets Dave through for -3..+3 (7 ticks: hard).
  7. West above the map. Hold ← at y 3 (t771-820) to x 16. ←+Alt (t820-821), let go at t822: the jetpack switches off and Dave lands on top of the map at x 14 (t823).
  8. Jump left over the edge. ↑+← (t825, 4 ticks), then ←.
    • The first rising step of a jump from the top of the map wraps Dave to y 253, below the map. So he is not above the map when he passes x < 2, where the game would warp.
    • The arc carries him left past the edge (x < 0 from about t832).
  9. Light the jetpack at the top of the arc. ←+Alt at t878-879 (x -38..-40, y 224).
    • Window -6..+1 (8 ticks: hard).
    • Later than +1, Dave drifts too far left and misses the column.
  10. The column. Fly left to x -46 (t886) and hold ↑.
    • Window: Up at x -43..-46 (0..3 ticks early), which is 4 ticks: very hard. At x -47..-49 Dave misses the trophy.
    • Dave is off-screen here: the picture shows the empty start room and only the fuel bar moves. Count ticks from the light, or watch the bar.
    • Dave flies up for 192 ticks through the band below the map and into the virtual column. There the game reads column 98 of the level, a column of gems worth 4,500 points (an extra life in our run).
  11. The phantom trophy. At y 31 Dave cannot rise further: the next value up acts as a ceiling for the jetpack. ↑+Alt for 1 tick (t1078), then let go. At t1080 the trophy is taken ("GO THRU THE DOOR!") and the jetpack switches off.
    • Window for the AI's run 0..+1 (2 ticks: frame-perfect); for the trophy alone 0..+3.
    • Earlier, Dave drops before he reaches the trophy.
  12. Fall back through the wrap. Dave falls straight down at x -46; sideways drift is blocked until y 170.
    • Hold → from t1209. The fall drifts right, Dave drops out of the bottom, wraps to the top and lands on top of the map at x 43 (t1305).
    • Window -20..+5 (26 ticks: easy).
    • He must land at x 2 or more, or the game warps.
  13. Into the door. Move right on top to x 59 (the AI uses short Alt+→ jetpack pulses along the top). Hold Alt and let go over x 59: Dave drops into the door tile (4,0) and the level ends at t1340.
    • Letting go 1-3 ticks late costs 1-3 ticks (x 60-62).
    • Letting go 1-2 ticks early leaves Dave standing on the border; he walks in at +19/+20 ticks.

Human version. Flying instead of pulsing (step 3) is the only change it needs: door at 1340. The other steps go by position. The hard ones are step 10 (a 4-pixel column, off-screen) and step 11 (let go of Alt just as Dave stops at y 31).

ALL 10 LEVELS: SUMMARY AND HOW TO READ IT

What this is. An AI search, run in our simulator, found these routes; we did not play them by hand. This guide explains, level by level, where Dave goes and how the tricks work, so that a player can try them. For each trick it gives:

  • the keys;
  • where to stand;
  • the timing window, measured in our simulator. We replay the run with one key press moved by +-1, +-2, ... ticks and every other key unchanged, then see which shifts still work.

Where the AI's input is not humanly repeatable, the guide says so. In those places it gives a human version: a reactive input script (hold a key until Dave reaches a place, then the next key) that we ran in the same simulator to the door. How the run itself was checked is told under The AI run, above.

Summary

Times are in game ticks (70 per second), from the level picture to the door.

leveltickssecondslives at the doorkey trickhuman version tested
14356.2143hop into the shaftwalk off the ledge: door +6 ticks
2185426.4863-t208 release: none found
3155922.2713-land in the pit first: door +33
4432761.8142-walk-and-climb ending: door +140
5154122.0141die after the trophy, then the door through the left-edge wrapreactive script: door +1 (+3 from the restart)
6136019.4292the off-screen phantom trophyfly instead of pulsing: same door tick
7209629.9432-the AI's own keys are forgiving (+-3)
8184526.3572Alt tap right after the jetpack cancels the jumphole method works; corridor needs eyes
9181025.8573-full reactive script: door +145
10413859.1143-t121 release: 2-3 ticks only

Whole game, from the start of level 1 to the level 10 door: 24874.33 ticks = 355.348 s (5:55.348). Timed the same way, the speedrun.com record (played by hand, May 2025) takes 6:17.86, and the TASVideos tool-assisted run (2011) about 6:30.4; its own time, counted from power-on, is 6:32.80. Our run is on neither site: we have not submitted it.

The "human version" column gives the ticks our reactive scripts add at the door against the AI's run, all replayed in our simulator. They show that a forgiving input exists in the simulator; they are not recordings of human play.


How to read it

  • Ticks. The game runs at 70 ticks per second; 1 tick = 1/70 s = about 14 ms. "t500" is 500 ticks after the level's run starts (the run starts 20 ticks after the level picture appears; 21 on level 1).
  • Tiles. Each level is 100 columns x 10 rows. (12,8) means column 12, row 8; columns count from the left (0-99), rows from the top (0-9). Row -1 means above the map, row 10+ means below it. "x" is Dave's position in pixels from the left edge of the level (16 px per column).
  • Keys are the original game's: the arrow keys (keypad 7 and 9 jump up-left and up-right); Ctrl fires the gun; Alt switches the jetpack on and off. The page's engine may put these on other keys; it says so next to the player.
  • Window means the tick shifts that still give the AI's run to the tick (same door tick, same lives). "Trick window" (where given) means the shifts for which the trick itself still works, even if later keys then no longer line up.
  • Difficulty, from the window:
    • 1-2 ticks: frame-perfect, not humanly repeatable;
    • 3-5 ticks: very hard;
    • 6-10 ticks: hard;
    • 11-20 ticks: moderate;
    • more than 20 ticks: easy.

Five rules of the game that the routes use

  1. Holding a key works like the AI's tapping. Dave walks on every 3rd tick, jumps and climbs on every 2nd, and falls and flies on every tick. A direction pressed between those ticks is kept until the next move. Where the AI taps a key (Right, nothing, Right, ...), holding it instead gives the same run, in every level. The exceptions are six short releases, listed under their levels: L02 t208, L04 t3894, L08 t435-436 and t666, L09 t250, L10 t121-122. With all other taps held, every level replays to the same tick.
  2. Alt and Ctrl act when you let go. The jetpack switches, and the gun fires, on the tick you release the key, not when you press it. Holding the key for 30 ticks repeats it. So press, then let go where you want the switch.
  3. The screen scroll freezes the game for one tick per column (15 ticks for a full screen), and no key is read during it: an Alt press-and-release made during a scroll does nothing.
  4. The map wraps vertically. A hole in the bottom row lets Dave fall out of the bottom of the screen. He comes back in at the top of the same column and can stand on top of the top row, outside the walls, where nothing can touch him. Levels 8, 9 and 10 drop through a floor hole this way. On levels 5 and 6 Dave gets on top of the map from inside (tree tops, the door tile), and a jump from up there also wraps below the map.
  5. Left of column 0 the game reads the map one row up, from its right end. That is how level 5 reaches its door, which is really at the far right, from just off the left edge of the first screen. It is also how level 6 finds a trophy that is not on the map at all (see level 6). One danger: being above the map at the far left (x below 2) makes the game warp. Dave must pass there below the map; a jump from the top of the map wraps him there at once.

SECRETS FROM THE CODE

What the original program does at the edges of the world. Every edge below was checked by dropping Dave there in our C translation of the original code, unless it is marked otherwise.

ONE GRID OR MANY?

Each level is its own grid of 100 × 10 tiles.

THE WHOLE ANSWER

Each level is its own grid of 100 × 10 tiles. But all ten grids sit back to back in one block inside the game program, and the game never checks whether a column number is past the edge of the map. So a few tiles left of the map, Dave would be inside the same level's right end, shifted down one row; and a few tiles right of it, in the level's left end, shifted up one row. Above and below the map the game reads nothing at all: that is open air, and because Dave's height wraps around, the strip above the map and the strip below it are the same space. Another level is never "a few tiles away": the nearest one is more than 280 columns off, behind other data.

ALL 14 PLACES, AND EVERY MAP

How these pictures were made. Classic look only: the original game's own VGA drawing, nothing added. Frames are 640x400 (the 320x200 screen at 2x, nearest neighbour); full maps are 1x (16-pixel tiles); crops are 640x320 (20 x 10 tiles at 2x). Frames: our C translation of the original program in drawing mode, the frame taken through the page's classic palette. Maps and crops: our engine running the game's own tile routine. No art drawn by us, no overlays.

Keys of the original game: arrows move, Up jumps, Alt switches the jetpack on and off, Ctrl fires.

S01

The phantom trophy: a trophy hidden one tile left of every level's top-left corner

All 10 levelsoriginal: seen under QEMU
The phantom trophy (level 6, our final run) Our final run never touches level 6's real trophy. Dave is 46 pixels left of the map, level with the top row, where the game reads the byte stored just before the map: a trophy code. The game draws him at the right edge instead (his sprite wraps around the screen); the trophy counts and GO THRU THE DOOR! appears.
Where
Column -1 of row 0. It is not on the map: the byte the game reads there is the last byte of the level's monster flight-path data, stored just before the map, and on every level that byte equals the trophy's tile code.
Why players never see it
The screen never shows anything left of column 0, and only Dave's item check ever reads that byte: Dave's top must be in the top row while he is 1 to 3 tiles left of the map.
How to get there
Normal play, on levels 5, 6 and 10 (the others give no way out of the map that leads there). Level 6, the way our final run does it: take the jetpack, fly up through the door in the top-left corner (without the trophy the door is just a passage), go up until the top of the screen wraps you to the space below the map, fly left past the map's left edge, then fly up about 3 tiles left of the map until Dave is level with the top row: the trophy is taken there and the level's door now works. The keys: see the level 6 route guide.
In our AI run
Yes, on level 6: about 15.4 s into the level (tick 1080), Dave 46 px left of the map, at the height of the top row. Our final run never touches level 6's real trophy.
Seen on the original DAVE.EXE?
Yes: the original DAVE.EXE under QEMU took it in two different level-6 runs, tick for tick like our engine (one of them with the very keys of our final run's level 6).
S02

The world left of the map: the level's own right end, one row lower

All 10 levelsoriginal: seen under QEMU
Level 5's door, reached from the left Our final run ends level 5 at its real door, which stands at the far right of the map, by coming in from the left side: left of the map the game reads the level's right end, one row lower. Dave (drawn wrapped, middle right) is 75 pixels left of the map; the next tick the level ends.
Where
Any column left of column 0, rows 0-9 (with the camera at the level's start). k tiles left of the map in row r the game reads column 100-k of row r-1; in row 0 it reads the level's flight-path data.
Why players never see it
The camera never scrolls left of column 0, so this area is never drawn; when Dave is there the original draws his sprite in the wrong place (at the right edge, a few pixel rows up) or not at all.
How to get there
Normal play, on levels 5, 6 and 10: leave the map upward (level 5: climb the trees at the left end onto the roof; level 6: fly up through the door tile in the top-left corner; level 10: fall through the floor hole at column 10 and you land on the roof), get into the open space above or below the map, and move left past column 0 while you are not level with the score line (there the warp would start). Walls and items of the right end then act as if they stood left of the map.
In our AI run
Yes: level 5 (the run reaches level 5's real door, which stands at the far right, by coming in from the left side: Dave is left of the map for 204 ticks), and level 6 (420 ticks, for the phantom trophy).
Seen on the original DAVE.EXE?
Yes: QEMU replays of level-5 and level-6 runs that go left of the map matched our engine tick for tick.
S03

Level 6's sealed second door and trophy, reachable from the left side

Level 6original: seen under QEMU
Level 6's sealed trophy, taken from the left side A 1432-tick route on level 6 takes the trophy, whose copy stands 17 tiles left of the map. Only a sliver of Dave shows (bottom left); the status bar confirms the trophy.
... and its sealed door The same route ends the level at the walled-off second door, 21 tiles left of the map. The game draws Dave at the right edge. The original DAVE.EXE played this route the same way, tick for tick.
Where
Door (79,0) and trophy (83,8) in the walled-off far right of level 6. Seen from the left side they stand 21 tiles left of the map (in the copy of row 0, read one row lower) and 17 tiles left (copy of row 8). This walled-off part is also level 8's warp zone (from the code; not run).
Why players never see it
They sit in a part of the map that walls seal off from the playable area, so the camera never goes there in normal play, except through level 8's warp.
How to get there
Normal play: as in S01, fly up out through the door tile at the top, get into the space below the map, fly left past the left edge, down to the height of the bottom rows: the trophy is taken about 17 tiles left of the map; then fly up to the second row: the door, about 21 tiles left of the map, ends the level. A whole run doing this exists (1432 ticks).
In our AI run
No. The final run (1340 ticks) takes the phantom trophy and leaves through the main door (4,0).
Seen on the original DAVE.EXE?
Yes: the whole 1432-tick run through these two tiles was replayed on the original DAVE.EXE under QEMU and matched tick for tick.
S04

Level 8's hidden exit under the floor

Level 8seen in our engine only
Level 8's hidden exit, 1: into the floor hole Dave, carrying the trophy, falls down the two-tile hole in level 8's floor, close to its left wall. Dave was placed above the hole by editing memory, with the trophy flag set, so the status bar shows no trophy icon.
Level 8's hidden exit, 2: in the hole His head reaches the bottom row. One row lower, below the floor and under the wall on the left, the game's item check finds a byte equal to the door's code. Dave was placed above the hole by editing memory, with the trophy flag set, so the status bar shows no trophy icon.
Level 8's hidden exit, 3: the level ends The game counts it as the door: 2,000 points and the GOOD WORK corridor to level 9. Dave was placed above the hole by editing memory, with the trophy flag set, so the status bar shows no trophy icon. Here the GO THRU THE DOOR! line is switched on instead of off, a side effect of setting the flag by hand.
Where
The two-tile hole in the bottom row at columns 34-35. When Dave's head reaches the bottom row, the item check also looks one row lower, below the map; under column 33 that byte (part of level 9's monster flight-path data, stored after level 8's map) equals the door's tile code.
Why players never see it
It is below the map, never drawn, and it works only within 5 px of the hole's left wall and only while Dave carries the trophy.
How to get there
In principle in normal play: carry the trophy (81,1) back to this hole and drop into it so that Dave's left edge is 1-5 px inside the wall column on the left of the hole when his head reaches the bottom row; a straight fall, or a fall while drifting slowly left, works. A keys-only route from the trophy to that spot was not built: our shots place Dave there by editing memory.
In our AI run
No. The final run falls through this very hole at tick 698, before it has the trophy (tick 1564), so the hidden exit does nothing then.
Seen on the original DAVE.EXE?
No (seen in our engine only).
S05

Level 8's bottomless shaft: fall out of the floor, drop back in from the top

Level 8original: seen under QEMU
Level 8's bottomless shaft, 1: gone Our final run drops Dave down the hole in level 8's floor. He has fallen off the bottom of the screen; there is no floor below the map.
Level 8's bottomless shaft, 2: back from the top About a second later he falls back in at the top of the same shaft (top left).
Where
Columns 34-35: open in the bottom row and in the top row.
Why players never see it
It looks like a pit to avoid; nobody expects that the game has no floor below the map.
How to get there
Normal play: walk into the hole. Dave falls off the bottom of the screen and, about a second later, falls back in through the gap in the top row.
In our AI run
Yes: level 8, ticks 698-793 (80 ticks below the map, 16 above it), then back into the map.
Seen on the original DAVE.EXE?
Yes: three QEMU replays of level 8 used our final level-8 keys for their first 1068 to 1178 ticks (from that line's recorded level start), which include this drop; they matched our engine tick for tick.
S06

The roof of level 10

Level 10original: seen under QEMU
On the roof of level 10 Most of our final run's level 10 is played on the roof: Dave (the small figure at the top, under the score line) runs and jumps on top of the level's top row, where the screen has room only for his upper half.
Where
On top of the top row (Dave level with the score line), from column 0 to 8 and beyond.
Why players never see it
The level is meant to be played inside the walls; the roof can only be reached from below the map.
How to get there
Normal play: walk into the floor hole at column 10 of the bottom row (the only hole on level 10 that is not fire or water). Dave falls off the bottom of the screen and lands on the roof. Jump along the roof; you drop back into the level where the top row has gaps (around columns 9-10, 20-26, 62 and 96-97).
In our AI run
Yes: most of level 10 is played on and above the roof (427 ticks above the map and 1700 in the open space beyond it, mostly jump arcs over the roof).
Seen on the original DAVE.EXE?
Yes: our final level-10 keys were replayed on the original DAVE.EXE under QEMU and matched tick for tick (from that file's own level start).
S07

The loop above and below every map

All 10 levelsoriginal: seen under QEMU

Pictures: see S05 and S06.

Where
Above the top row and below the bottom row. Dave's height is kept in 0-255, so the strip above the map and the strip below it are one space: falling past the bottom continues at the top, and rising above the top continues from below.
Why players never see it
The screen shows only the map's rows and the status lines; below the map Dave is off the bottom of the screen.
How to get there
Normal play: fall through any floor hole that is not fire or water, or jump from the roof of a level.
In our AI run
Yes: levels 5, 6, 8, 9 and 10.
Seen on the original DAVE.EXE?
Yes: several QEMU replays (levels 5, 6, 8, 10) pass through it and matched.
S08

Four warp zones: pieces of earlier levels

Levels 5, 8, 9 and 10seen in our engine only
Level 10's warp, 1: the spot Keys only: Dave comes back in at the top of the screen while 25 pixels left of the map (his sprite wraps to the top right). That is a warp spot: the warp starts.
Level 10's warp, 2: WARP ZONE The WARP ZONE scene: Dave drops down a corridor between two walls.
Level 10's warp, 3: inside level 1 Level 10's warp zone is a piece of level 1's map, entered at its column 11: Dave arrives right of the wall that seals this part off in level 1. By the game's code, its door sends Dave back to the start of level 10.
Where
Level 5 -> level 2's map from its column 42; level 8 -> level 6's map from column 67; level 9 -> level 7's map from column 71; level 10 -> level 1's map from column 11. The warp starts at two invisible spots: above the map at its far top-left (camera at the start), or past the far right edge. Each warp zone is the walled-off part of its target level (S10, S11, S03, S12), with its own trophy and door.
Why players never see it
Both spots are outside the normal play area.
How to get there
Normal play. Level 10 (checked with keys only, in our engine): drop through the floor hole at column 10; falling out of the bottom brings Dave back in at the top. Get past the left edge of the map and let him fall: when he comes back in at the top while he is still left of the map, the WARP ZONE scene plays and he arrives in level 1's map. Levels 5 and 8: our runs stand on these levels' roofs (level 5 at its top-left corner, level 8 after falling down its floor hole), so stepping left to the corner should start the warp; that last step was not run. Level 9: not checked. After a warp zone's door the game sends Dave back to the start of the level he came from (from the code), and that level's warp is used up.
In our AI run
No.
Seen on the original DAVE.EXE?
No (seen in our engine only).
S09

Level 0: the level that is not there

Levels 1, 2, 3, 4, 6 and 7seen in our engine only
Level 0, step 1: over the top of level 6 No tricks, keys only: Dave has flown up through the door tile in level 6's top-left corner and now flies left along the very top of the screen, over the status bar.
Level 0, step 2: the warp scene At the top-left corner the game starts its warp scene. Level 6 has no warp zone, so the corridor has no walls.
Level 0 Level 0: a level made of the 1,280 bytes stored just before level 1, mostly the game's colour palette. Real tiles turn up in odd places above a floor of noise. Dave (top left) is frozen; the two Dave-like figures are level 0's "monsters". Seen in our engine; never run on the original program.
Where
Level number 0 (stored as level index -1): the 1,280 bytes just before level 1 in the game program. The part used as the map is mostly the game's colour palette, plus other tables.
Why players never see it
The warp spots exist on every level, but only levels 5, 8, 9 and 10 have a warp zone. On the other six the game's table says 0, and the game loads 'level 0'.
On screen
The status bar is normal (score, LEVEL 06 or the level you came from, lives). The playfield shows real tiles in places no level has them: blue bricks, a tree, a door, a red gem, a pipe, a crown, a cup and grass, above a floor of noise (bytes that are not tile numbers, drawn from wherever the game's tile table points). Dave stands in the top-left corner. After the start, Dave-like figures appear in the middle: level 0's 'monsters', whose sprite numbers, computed from the level number, fall below the real monster sprites.
How to get there
Normal play, from level 6 (keys only, no memory edits, checked in our engine): 1. At the start take the jetpack just right of you (and the gun, if you like). 2. Walk right along the bottom floor to the right edge of the first screen, switch the jetpack on and fly up there to the top corridor. 3. Fly left along the top corridor to the door in the top-left corner; do not take the trophy first (without it the door is a passage). 4. Fly straight up through the door tile until Dave stops, level with the score line. 5. Hold Left: Dave flies (or, with the jetpack off, walks on the roof) to the left edge. At the corner the WARP ZONE scene plays with empty walls, and the next screen is level 0. Our final run flies along this very line and turns away 13 px before the corner. On levels 1, 2, 3, 4 and 7 there is no way out of the map, so only by editing memory.
What happens next
Hang, then return. Dave is frozen: no key moves him (his 'alive' flag is off). After 65,556 ticks (about 15.6 minutes) the respawn countdown, which was never started, runs all the way round: Dave loses a life and comes back alive at the same spot. In our probe (Right held) he then fell onto a deadly cell of the noise and died 24 ticks after he started moving; every respawn repeated it until the lives ran out, and with keys held the game went on to a new game at level 1. No crash.
In our AI run
No (it passes within 13 px of the warp spot, then jumps away into the space below the map).
Seen on the original DAVE.EXE?
No (seen in our engine only).
S10

Level 1's walled-off part: level 10's warp zone

Level 1seen in our engine only
Level 1's sealed trophy Behind a wall that runs from the top row to the bottom row, level 1 hides a second trophy (columns 26-45 shown). The camera never comes here in level 1's own play.
Level 1's sealed door The far right of level 1 (columns 80-99) holds a second door that no player reaches from level 1 itself.
Where
Trophy (35,5) and door (98,4), in the part of level 1 to the right of the playable start area.
Why players never see it
A wall that runs from the top row to the bottom row (columns 18-19) keeps players out in level 1 itself; the only way in is level 10's warp, whose start spot is off-screen (S08).
How to get there
Through level 10's warp (S08), checked with keys only in our engine: Dave arrives at column 20, and this part's trophy and door were not run. The part of level 1 that Dave can reach has no opening in its top row or its floor, so he cannot go around the wall through the space outside the map.
In our AI run
No.
Seen on the original DAVE.EXE?
No (our engine only).
S11

Level 2's walled-off part: level 5's warp zone

Level 2from the code: not run
Level 2's sealed door Past the wall at column 50, level 2 hides a second door (columns 60-79 shown).
Level 2's sealed trophy And at its far right (columns 80-99) a second trophy.
Where
Trophy (98,8) and door (68,6), in the unused right part of level 2.
Why players never see it
A wall that runs from the top row to the bottom row (column 50) cuts this part off from where Dave starts, so the camera never goes there, except through level 5's warp.
How to get there
Through level 5's warp (S08): from the code; not run. The part of level 2 that Dave can reach has no opening in its top row or its floor, so he cannot go around the wall through the space outside the map.
In our AI run
No.
Seen on the original DAVE.EXE?
Not run (from the code only).
S12

Level 7's walled-off part: level 9's warp zone

Level 7from the code: not run
Level 7's sealed door and trophy Right of the red wall (columns 78-79), level 7 hides a second door (bottom left) and a second trophy (middle right), with gems around them.
Where
Trophy (93,5) and door (80,7), right of the part of level 7 that can be played (columns 1-76).
Why players never see it
A wall that runs from the top row to the bottom row (columns 78-79) cuts this part off from where Dave starts, so the camera never goes there, except through level 9's warp.
How to get there
Through level 9's warp (S08): from the code; not run. The part of level 7 that Dave can reach has no opening in its top row or its floor, so he cannot go around the wall through the space outside the map.
In our AI run
No.
Seen on the original DAVE.EXE?
Not run (from the code only).
S13

Level 9's sealed gun

Level 9never reached
Level 9's sealed gun Right of the wall at column 77, level 9 has a gun that our routes never visit (columns 72-91 shown).
Where
A gun at (84,6), right of the part of level 9 the route uses (columns 6-76).
Why players never see it
A wall that runs from the top row to the bottom row (column 77) cuts it off from the part of level 9 the route uses.
How to get there
Not checked. That part of level 9 is open at the top and at the bottom, so a Dave falling through the space outside the map while drifting right might get in from above; no run tried it.
In our AI run
No.
Seen on the original DAVE.EXE?
Not applicable (never reached).
S14

Phantom vines below the map

All 10 levelsnever reached
Where
Two rows below the bottom row, for the climbing test only: its 'row 10' is a slice from the middle of the same map, and its 'row 11' is the first row of the next level's map. Wherever those bytes are vine or tree tiles, the game would let Dave climb in thin air.
Why players never see it
Dave can only start climbing while standing or jumping next to a vine, and he can never stand or start a jump that far below the map.
How to get there
Not reachable, not even with the jetpack; only by editing memory. This is the one place where the game reads another level's map for Dave.
In our AI run
No.
Seen on the original DAVE.EXE?
Not applicable (never reached).

Every level, with the margins past its edges

Scroll each strip sideways. The bar under each picture marks where the map itself starts and ends.

Level 1: the whole map, plus 10 columns past each edge Level 1's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then the next level's flight-path data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02

Level 2: the whole map, plus 10 columns past each edge Level 2's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then the next level's flight-path data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02

Level 3: the whole map, plus 10 columns past each edge Level 3's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then the next level's flight-path data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02

Level 4: the whole map, plus 10 columns past each edge Level 4's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then the next level's flight-path data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02

Level 5: the whole map, plus 10 columns past each edge Level 5's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then the next level's flight-path data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02

Level 6: the whole map, plus 10 columns past each edge Level 6's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then the next level's flight-path data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02 S03

Level 7: the whole map, plus 10 columns past each edge Level 7's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then the next level's flight-path data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02

Level 8: the whole map, plus 10 columns past each edge Level 8's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then the next level's flight-path data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02

Level 9: the whole map, plus 10 columns past each edge Level 9's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then the next level's flight-path data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02

Level 10: the whole map, plus 10 columns past each edge Level 10's 100 x 10 map, drawn with the game's own tile routine, plus 10 columns past each side that the camera never shows. Left of the map: the level's right end, one row lower; in the top row, the end of the level's monster flight-path data, with the phantom trophy right next to the corner. Right of the map: the level's left end, one row higher; in the bottom row, spare bytes and then other program data. Bytes that are not tile numbers draw as noise. Above and below the map there is nothing: open air.

Secret places on this map: S01 S02

HOW THE LEVELS ARE STORED

How the levels are stored

  • The ten levels are stored inside DAVE.EXE itself, in one block of ten records, one directly after another. Each record holds three things in this order: the level's monster flight paths, then the map (10 rows of 100 tiles, stored row by row, one byte per tile), then a few spare bytes.
  • The game picks a level by its number: it jumps to the start of that level's record (record number = level − 1) and treats the part after the flight paths as the map.
  • To find the tile under a point, the game divides the point's position by the tile size (16 pixels), adds the camera column, and reads byte number (100 × row + column) of the map. It checks the row: above the map it returns "open", below the map it returns "open". It never checks the column.
  • Rounding: column numbers are rounded toward zero, so the first 15 pixels left of the map still count as column 0.
Our own pseudo-code (not the game's code)
tile(row, col):  if row is above the map or below it -> open air
                 else -> the byte at position 100*row + col, counted from the start of the map
                         (col may be < 0 or > 99)
The block inside DAVE.EXE, in memory order (a schematic: labels, not tiles)
The ten level records sit one after another inside the program, between the palette and tables before them and other data after them. palette &tables L1 flightpaths map10 × 100 spare L2 flightpaths map spare … L10 flightpaths map spare otherdata … "level 0" = the 1,280 bytes just before level 1's record (the part it uses as the map is mostly the game's colour palette, plus other tables)
WHAT SITS AROUND EACH MAP IN MEMORY

What sits around each map in memory

  • Before row 0 of every map: that same level's monster flight-path data. Before that come the previous level's spare bytes and then the previous level's map. Before level 1: the game's colour palette and other tables.
  • The very last byte of every level's flight-path data equals the trophy's tile code. So every level has an invisible "phantom trophy" one tile left of its top-left corner. Our final run takes it on level 6 (about 15 s into the level, Dave 3 tiles left of the map, near the top), and the original DAVE.EXE did the same with those keys under QEMU.
  • After row 9 of every map: that level's spare bytes, then the next level's monster flight-path data, then the next level's map. After level 10: other program data.
  • One strip, ten grids: read as one long ribbon 100 tiles wide, each level is 10 rows of the ribbon and the levels are separated by just under 3 rows of non-map data. The game only ever treats one level's 10 rows as the playfield.
EVERY EDGE, IN PLAIN WORDS

Every edge, in plain words

What the game reads around one level, columns −3 to 102 (a schematic: labels, not tiles)
Left of column 0 each row continues as the right end of the row above; right of column 99 each row continues as the left end of the row below; above and below the map is open air. -3-2-1 012 … 979899 100101102 above row 0: open air (the same space as below the map) 0 flight-path data T row 0 row 1: col 0 1 2 1 row 0: 97 98 99 row 1 row 2: col 0 1 2 ⋮ (each row: the row above's right end) (each row: the row below's left end) 9 row 8: 97 98 99 row 9 spare bytes, then next level's flight paths below row 9: open air; falling here brings Dave back in at the top T = the phantom trophy (the last byte of the flight-path data) left of column 0: a copy of the row above's right end (k tiles left = column 100-k of the row above) right of column 99: the row below's left end, but it is never reached: the warp check fires first left of row 0: the end of the level's own monster flight-path data
EdgeWhat the game reads thereWhat Dave meetsProbes
left of column 0, rows 1-9the same level's row above, from its right end (k tiles left = column 100-k of the row above)a copy of the level's own right end, one row lower44 drops on all 10 levels: this reading predicted the game every time; "the same row wrapped" and "stopped at the edge" both failed where they differed
left of column 0, row 0the end of the level's own monster flight-path datamostly open, with a few cells that act as walls, deadly tiles or items; the phantom trophy right at the corner; on level 6 also gem pointsL06 and L09 drops took the trophy; L06 drops scored gems
right of column 99(rows 0-8) the same level's row below, from its left end; (row 9) spare bytes, then the next level's flight pathsnever reached: once Dave's position passes 306 pixels with the camera at its right end, the warp routine runs (see the warp below)right-edge probes on L05, L06, L08, L09, L10
above row 0nothing (always "open")open air; standing is possible on top of row 0a jump from the top of level 10 rose 32 pixels above the map and came back down onto it
below row 9nothing for walls and floors ("open")open air; Dave falls on and comes back in at the top of the same columna fall in the strip below level 10 landed on top of row 0 76 ticks later
below row 9, pickups onlywhen Dave's head is in row 9, the item check also looks one row lower: the spare bytes and the next level's flight pathson level 8 one such byte equals the door code: a hidden exitL08: with the trophy, falling into the floor hole at its left wall ended the level
two rows below the map, vines onlythe vine test reads "row 10" from the middle of the same map and "row 11" from the next level's top rowthe only place the game ever reads another level's map for Dave, but Dave cannot be in a climbing state therefrom the code; not reachable
TELEPORT DAVE A FEW TILES LEFT OF THE MAP

Teleport Dave a few tiles left of the map

The probe: Dave placed in a falling state 1, 2, 3 and 4 tiles left of the map, at the height of the top row, with no keys held.

LevelDave dropped 1-4 tiles left of the mapPast the right edgeThe warp from the top-left corner or the right edge
1lands at once on a copy of the level's top-right wallnever reachedlevel 0 (no warp zone)
2lands at once (same)never reachedlevel 0
3lands at once (same)never reachedlevel 0
4lands at once (same)never reachedlevel 0
5lands at once (same)never reachedwarp zone: level 2's map, from its column 42
61 tile: lands at once; 2 tiles: takes the phantom trophy and falls straight out of the bottom; 3-4 tiles: scores gem points from the flight-path data and lands one row lowernever reachedlevel 0
7lands at once (same as level 1)never reachedlevel 0
8lands at once (same as level 1)never reachedwarp zone: level 6's map, from its column 67
9falls straight through and out of the bottom (the far right of level 9 is open space); 1-2 tiles: takes the phantom trophy first; 3-4 tiles: picks up a gemnever reachedwarp zone: level 7's map, from its column 71
101-2 tiles: lands at once; 3-4 tiles: falls past the level's real trophy, takes it, and falls out of the bottomnever reachedwarp zone: level 1's map, from its column 11

Same level or another level? Always the same level: its other end, one row up or down. To reach the next level's map Dave would have to go more than 280 columns (14 screens) right of row 9, through the spare bytes and the next level's flight paths; the previous level's map is more than 280 columns left of row 0. The only way the game ever puts Dave into another level's map is its own warp.

THE WARP, AND "LEVEL 0"

The warp, and "level 0"

  • The warp check runs every tick: Dave above the map at the far top-left (camera at the start, x < 2), or at the far right (camera at the end, x past 306) starts the warp. Each level can warp once per game; after that, and inside a warp zone, Dave is pushed back instead.
  • Levels 5, 8, 9 and 10 have a warp zone: a piece of an earlier level's map (2, 6, 7 and 1). These pieces are the walled-off parts of levels 2, 6, 7 and 1 (Gallery S11, S03, S12, S10). Its door takes Dave back to the start of the level he came from. from the code; not probed to the door
  • The other six levels have no warp zone in the game's table, so the warp loads level number 0: a "level" made of the 1,280 bytes stored just before level 1's record; the part it uses as the map is mostly the game's colour palette, plus other tables.
  • seen in our engine, which runs the original code translated; never replayed on the original under QEMU In level 0, Dave arrives frozen; no key does anything. After 65,556 ticks (about 15.6 minutes) the respawn countdown, which was never started, runs all the way round: Dave loses a life and comes back alive at the same spot. In our probe (Right held) he then fell into a deadly cell of the garbage map and died 24 ticks after he started moving. Each respawn repeated that until the lives ran out; then the game was over, and with the keys still held it went on to a new game at level 1.
The vertical loop (one column)
The vertical loop of one column y 0..15: above the map y 16..175: rows 0-9 y 176..255: below the map

Dave's height is kept in 0..255: falling past 255 continues at 0; rising above 0 continues from 255 downward.

The secret places these rules make, each with its screenshots, how to get there and what our run does with it, are under All 14 places, and every map, above.

WHAT WE BUILT

Four things, in short.

THE CODE, TAKEN APART

We reverse-engineered the game's program, DAVE.EXE, routine by routine, and rebuilt it from our own source.

MORE

The rebuilt program is identical to the original, byte for byte: the unpacked program (172,848 bytes), and, packed again with LZEXE 0.91, the 76,586-byte file on the disk. 101 of the game's 150 functions are now C.

AN HD ENGINE

The same game, drawn again with our own art: the HD view is 1280×800 pixels, 4 times the width and the height of the classic 320×200 picture. Super HD draws the same screen once more as stylized 3D, with depth and real materials. Every object keeps its place, size and colours, and nothing is added.

MORE

The game underneath runs unchanged, and you can switch between the classic, HD and Super HD views in the middle of a level. Super HD loads the first time you pick it.

MOVE EXPORT AND IMPORT

The engine records every key press with its game tick (70 ticks per second).

MORE

Export saves your moves as a small JSON file; import loads a moves file and plays it back. During playback the engine compares a fingerprint of the game state every 70 ticks, so you can see whether a replay stays in sync.

AN AI SEARCH

AI agents ran search programs (beam searches, retimers and annealing) on two fast re-translations of the same program, one in JavaScript and one in C, trying key sequences tick by tick and keeping whatever reached the door sooner.

MORE

Both were compared with the verifier's engine after every tick: 0 differences in 28.7 million and 33.8 million compared states.