If you'd like to support our preservation efforts (and this wasn't cheap), please consider donating or supporting us on Patreon. Thank you!
Proto:Donkey Kong (Atari 8-bit family)
This page details one or more prototype versions of Donkey Kong (Atari 8-bit family).
| This article is a work in progress. ...Well, all the articles here are, in a way. But this one moreso, and the article may contain incomplete information and editor's notes. |
Files and source code for a prototype build were released by Curt Vendel to AtariAge on August 29, 2008.
Contents
ROM
| This needs some investigation. Discuss ideas and findings on the talk page. Specifically: Binaries are different, further differences in-game need a closer look. Additionally, the source code has not yet been compiled. |
A.OUT
The file A.OUT seems to be a compiled ROM file of the game. It is only ~10 KB compared to the final game's 16 KB. It has the flag "debug" set to true!
The ROM image contains a build date:
21.MAR.83 13.42.46
Without even datamining the ROM we can see prototype sprites for both Donkey Kong and Pauline in use. The only thing the player can do in the demo is play the intro cutscene, and before they do that it shows DK on top of the second level.
Version Investigation
| This needs some investigation. Discuss ideas and findings on the talk page. Specifically: It's in the header. Even the rough dates of most files are going to be difficult to identify. See the talk page. |
According to AtariAge user Goochman and programmer Landon Dyer, this version of the source code may not all be final or retail. "Landon indicated the official release was not his final - the death sequence isnt perfect something about overlapping cells)"
According to Dyer, "I had a bit more time to look at this, and I'm certain that it's not the final version of DK. Some things that I know are missing:
- A formatted comment near the gravity control stuff (label 'PtSVel') that explains the equations of motion.
- A piece of copy protection code that changes some zero-page values (in order to cause havoc). The JSR instruction is later checked to see if the stomper has been removed.
- The code in the file 'tr' that implements the easter egg isn't integrated anywhere (should be near the code that draws the title screen).
If someone was mucking with the code to (say) do a port, I could seem them removing the latter two, but not the first comment. Maybe this is a mix of files.
The proof is in the pudding, however. If it builds (and I'm not even going to try...) and appears to work, then people will certainly find it useful. The only major bug that was fixed "late" was a situation where Mario could fall and fall forever; it was possible for his velocity to grow so that he wouldn't evern intersect with a girder, so he'd just loop around off the bottom of the screen and back to the top. I think I just noodled the collision rectangles to deal with this.
So I would characterize this as "mostly finished" with me probably just twiddling my thumbs and adding the above stuff during the two weeks at the end of the project while Q/A ran through it. [Yeah, things were kind of fast and loose that way; programmers could add stuff during final testing and get away with it.]"
Development Credits
Programming - Landon Dyer
Sound - Brad Fuller
Some Graphics - Mona Lundstrom
; Cartoon drivers ; Written by Vince Wu and Richard Harvey
;; Design, coding & screaming: Landon Dyer ;; ;; Firefighting and moral support: Vince Wu ;; ;; Graphics artwork: Mona Lundstrom ;; ;; Sound tables: Brad Fuller ;;
"The ‘cartoon’ sequences were given to another engineer, whose code I had to entirely replace (he originally wanted to do the job in FORTH, and didn’t understand that the game couldn’t afford to devote half the cartridge space to a FORTH interpreter just to make his life easier)."
Joke Comments
In the file MAIN.PRN.txt, there is a sort of header box summarizing the development timeline. There are some identical and some older versions of this in other files.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; D O N K E Y ;; ;; K O N G ;; ;; ;; ;; ;; ;;Just when you thought it was safe to come back from the arcades....;; ;; ;; ;;Perpetrator: Landon Dyer ;; ;; ;; ;;HISTORY: ;; ;;Nov '82 - IDS, initial coding ;; ;;Dec '82 - more coding, hair pulling, general cruftiness ;; ;;Jan '83 - schedule screaming, rampant insanity, accusations ;; ;;Feb '83 - semi-winnage, accompanied by cries of anguish and threats;; ;;Mar '83 - Lucifer announces a cooling trend ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In CMAIN, there is some more text under this header box:
; Q: What is black and white and can't turn around in an elevator? ; A: A nun with a javelin in her head. ; ; Q: What do you call a nun who has had a sex change operation? ; A: A transister.
Two quotes can be found below the header in the TMAIN file:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; ; I have desired to go ; Where springs not fail, ; To fields where flies no sharp and sided hail ; And a few lilies blow. ; ; And I have asked to be ; Where no storms come, ; Where the green swell is in the haven's dumb ; And out of the swing of the sea. ; ; -- Gerard Manley Hopkins ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Gotta admit, that I'm a little bit confused, ; Sometimes it seems to me, like I'm just being used, ; Got to stay awake, have to try and shake off, ; This creeping malaise, ; If I can't find my own ground, how can I find my way ; out of this maze? ; ; Deaf, dumb and blind, you just keep on pretending, ; That everyone's expendable, and no-one has a real friend, ; And it seems to you the thing to do, ; Would be to isolate the winner, ; Everything's done under the sun, ; And you believe in your heart that everyone's a HACKER... ; ; - Pink Floyd ; Animals ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The following is found in MAIN.PRN.txt:
Spring difficulty ; ; How Hard Can You Get? [*sigh*] ; ; This table governs how often a spring is to be created. The numbers ; here are in jiffies. ;
Dyer didn't know what to call the prizes, and he detailed his plight in the code found in MAIN.PRN.txt among other files:
; Prizes
; These are shoved into players; left-bottom justified in 8x8
; There's some confusion as to what to call the damn things....so I'm
; gonna do what I like, here...
prizbas = *
; the Umbrella
; The "Birthday Cake" [I think...]
; The Purse ["...omigosh...that's not a /Birthday Cake/???"]
; The Hat
Game Details in Code
"Kill Level"
There is a proclaimed "kill level". The word "level" here is indicative of the Y-level (height), and this just defines an invisible platform along the bottom of the screen that kills Mario. According to Dyer, "it's just an invisible platform with a "kill" bit set. Land on the platform and Mario dies. That's all." The other three screens have hex value FF stored here, corresponding to no death-plane.
db $80+26,1 ; lev 5 (deadly)
db 5 ; killage level (bump Mario off if he ever gets here...)
Mario's Jump Physics
According to Landon Dyer, "Mario’s jump moves are derived from basic physics of motion, and the calculus-based equations are in the source, nicely formatted so you can see where the magic equates just below came from."
; ; PtSvel and PtYacc are governed by the usual Newtonian equations of ; motion. Note that PtSvel must never exceed $100, since the jump ; code can't handle it. The code in PSFALL will, however, handle it ; (mainly 'cause it HAS to....) ; PtSVel = -400 ; Jumpman start-jump velocity PtYAcc = 20 ; Gravity's acceleration, for every object gravity = ptyacc ; just a synonym PtMaxX = 160-5 ; Jumpman max X-position
Offscreen Hammers
There are actually hammers in the elevator screen (75m), but they are drawn offscreen. This is noted in the drawing hammers routine, and in the "lmap" area of the TABLES section/file.
; ; Draw hammers ; For the Elevators rack, which doesn't have any hammers, the position ; of the hammers must be off the screen, so they aren't drawn... ;
db nwide+1,nwide+1 ; x_pos is off screen
db nlines,nlines ; and so is y_pos
Both hammers are defined to be at position x = "nwide+1", y = "nlines".
; ; graphics ; pmx = $30 ; player offset of left side of playfld pmy = $20 ; player offset of original top of screen gmode = $e ; graphics mode nlines = 198 ; # of lines maintained in Playfield vlines = 198 ; # of lines visible at a time nwide = 160 ; # of pixels wide (std playfield) bwide = 40 ; # of bytes wide
nwide is always 160, nlines is always 198.
The following images have been edited to show where the two hammers probably are. (Additionally, it would normally be 336×240, but the width has been increased to 348 to leave room to show the offscreen hammers.)
The area inside the white outline is what's rendered to the screen, in pixels this area is 320×197. The two out-of-bounds hammers are in the same position. In this mockup, the top-left pixel of the hammer is at pixel position (322,198). It can be seen in the lower-right corner of the second image.
PAL Differences
PAL systems may have used the same ROM image for the game. Apparently, it was a struggle to get everything working properly.
; Its a long story. In order to get PAL compatibility, ALL of the ; following equates will have to be munged, twiddled, mutated and ; permuted. Look here if something isn't moving as fast as it should, ; or as slow as it should, or if the color assignments are off. The ; first table contains NTSC stuff, the second table contains PAL stuff. ; ["Stuff" in this context means anything used as a velocity or ; constant depending on something that is somehow different in PAL.] ;
Compile-Time Errors
There are a number of compile-time errors indicated in MAIN.PRN and MAIN.PRN.txt. These were probably fixed before the final build.
38 ERRORs, 1169 Labels, $3F7F free. Last error occurred on Page 101
Hidden Graphic
At the end of the FONTS file, there is a monochrome encoded graphic not seen during gameplay. It is named "hhfx5", indicating itself as the sixth frame of the explosion graphic, but it is actually a signature by programmer Landon Dyer.
This graphic data cannot be found in the final game, likely because it took too much storage space.
Small Details/Trivia
- Fireballs are inconsistently named. Names include FB, Fireballs, FF, Firefoxen, FThings, Fire-thingies, Firecreatures, and Firecritters.
- Perhaps interestingly, there are no specific comments about the LMD Easter egg.
- The source code has numerous hints at being written for compilation by the ATARI CAMAC Assembler Ver 1.0A.
- The game has a 6×6 font of a near-complete English alphabet, with Q replaced by a question mark.
- There are numerous small typos in the comments, like "gorrila", and "110" instead of "100".
- Internally, Pauline is referred to several times both by the generic term "LADY" and the name "Nell".
Prototype Leftovers
Unimplemented Sound Effect
| This needs some investigation. Discuss ideas and findings on the talk page. Specifically: Is there an arcade equivalent of this? |
The comment describing the SFX Driver lists a "warning" sound effect, which is apparently not implemented.
****************************** * sfx driver for donkey kong * * 02/03/83 * * * * * * * * notes: * * TABLE DRIVEN SINGLE VOICE * * VERSION * * * * * ****************************** * priorities * * * * increasing order of * * priority * * * * ch1 * * * * walk * * jump * * srivet * * rotate * * * * * * ch2 * * * * march2 * * march1 * * attack * * warning (not implemented) * hammer (in ch 2,3,4) * * * * ch3 * * * * stamp * * fall * * grin * * girl1 (in ch 3,4) * * * * ch4 * * * * spring * * points * * * * music in ch 1 & 2 * * * * howmuch * * intro * * * * * ******************************
Todo List
| This needs some investigation. Discuss ideas and findings on the talk page. Specifically: What in this list still applies to the final version? |
In the file TODO is a list of unimplemented features and bugs. The date this was last updated is unknown. Seemingly some (or potentially all) of the bugs on this page were fixed by release.
Unimplemented stuff ------------------- Smarter barrel movement strategy - Barrels look at joystick direction & Mario's state - Tend to "run away" from active hammers Blue barrels Moving ladders - State init - Update - Patches to Mario's ladder state handler Firebarrel - initial drawing - flame animation DLI in Elevator rack to hack PL3 <- PL1 (so fireballs don't look bad.) Punt PAL totally Punt barrel inviso-state Put yellow in fireball fonts Bug fixes --------- Mario - sticks on ladders sometimes - Bogus jumpover on edges of screen - install new, non-transparent fonts Collision detect loses when Mario doesn't touch the edge of an object's kill area. Barrels go down adjacent to ladders Floating scores get messed-up on top of ladders (so move 'em.) Sequential floating-scores lose. VDRAW doesn't clip very well to the left (garbage created in middle of the screen.) Wierd things with Luser-abort. Punt ABORTP() during cartoon sequences (only active during game play.) Fireball leap doesn't look very good (and probably should be punted.) Move 2nd hammer to the left on the Ramps rack. Need better lettering on HOWHI screen, also "PLAYER 1/2" indicator. Kong currently creates too many barrels (/really/ slowing down the animation on the Ramps rack.) Kong is garbaged-up on the Elevators rack. Not all spring fonts are being shown (so punt a couple of them.)
Copyright Message
A pre-final copyright message can be found in the file TIMAIN:
; ; This is the copyright message ; copyrt db psxy,64,147 db 1,9,8,3,10,11,30,11,28,19 ; '1983 ATARI' db psxy,48,160 db 1,9,8,1,10,1,9,8,3,10 ; '1981 1983 ' db 24,19,24,30,15,24,14,25 ; 'NINTENDO' db psxy,56,147,psquote dw copysym ; "(C)" db psxy,40,160,psquote dw copysym ; "(C)" db eol
So the older copyright text would have had the top line say "1983 ATARI", rather than the final game's "BY NINTENDO".
| Mockup | Final |
|---|---|
![]() |
![]() |
Early Sprites
| To do: More! There are probably more minor differences, ChainSwordCS is working on it... |
Donkey Kong
The file KONG.FNT, despite seeming to be the final version, contains graphics that do not match the final game.
The final version is symmetrical, and mirrored in almost every possible way. This was done as a way of saving cartridge space. The original bitmap artwork was done by Mona Lundstrom. The conversion to assembly code and mirroring was done by Landon Dyer. He did it by hand, which may explain the errant blue pixel on Donkey Kong's grin.
There are numerous small differences in almost every body part of DK. For more minor details and close observation, the spritesheets are available at The Spriters Resource.
Pauline
The Lady, better known as Pauline, has different sprite-work compared to the original Arcade game. In the final version of this port she only ever appears in one sprite, definitely due to cartridge space restrictions. But in prototype versions, she had many more sprites! Some of these sprites can each be found in MAIN.PRN.txt, LADY.FNT, and KICKDATA.FNT.
For more minor details and close observation, the spritesheets are available at The Spriters Resource.
Debug Code
Debug Flags
A number of debug flags are contained in the header (in HDR, MAIN.PRN.txt, and several other files). This specific text is taken from HDR.
debug = true ; turn on debugging code rom = false ; true if generating code for ROM runram = true ; turn off ROM protection code invinc = true ; true if protagonist is invincible
Testing Code
The files TEST.BU and MAIN.PRN.txt (among others) contain debugging/testing code. The code in MAIN.PRN.txt is probably more up-to-date.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Testing code ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
test local
EPROC
TEST PROC
lda #1
ldx #1
jsr scrgen
rabbit jsr dconsw
cmp #7
beq rabbit
jsr icart2
jmp rabbit
Build Dates
There are several different build dates seen in the files. These mostly correspond to outdated versions of certain files, and are mostly compile-time dates.
| Build text | Source File |
|---|---|
Donkey Kong Sat Jan 29, 1982 |
CMAIN |
* sfx driver for donkey kong * * 02/03/83 * |
SND CNDS.PRN.txt CSND1.PRN.txt MAIN.PRN MAIN.PRN.txt |
Donkey Kong Thur Feb 24, 1983 |
MAIN.BU MAIN.m65 VMAIN.BU MAIN.PRN MAIN.PRN.txt |
Donkey Kong Sun Mar 13, 1983 |
TIMAIN |
* Revision 19.MAR.83 23.03.22 ÞÉdbÞÉ'19.MAR.83 23.03.23' |
MAIN.PRN MAIN.PRN.txt |
* Revision 21.MAR.83 13.42.43 ‰db‰'21.MAR.83 13.42.46' |
LOG.TMP |
21.MAR.83 13.42.46 |
A.OUT |
Note that "January 1982" is probably an error, based on the development timeline.
| The Donkey Kong series | |
|---|---|
| Arcade | Donkey Kong • Donkey Kong Jr. • Donkey Kong 3 • Donkey Kong, Donkey Kong Jr., Mario Bros. |
| Atari 8-bit family | Donkey Kong |
| NES | Donkey Kong • Donkey Kong Jr. • Donkey Kong Jr. Math |
| Game Boy (Color) | Donkey Kong • Donkey Kong Land • Donkey Kong Land 2 • Donkey Kong Land III (Prototypes) • Donkey Kong Country (Prototype) |
| SNES | Donkey Kong Country • Donkey Kong Country 2 • Donkey Kong Country 3 |
| Nintendo 64 | Donkey Kong 64 (Prototype) • Diddy Kong Racing |
| Game Boy Advance | Donkey Kong Country • Donkey Kong Country 2 • Donkey Kong Country 3 • Mario vs. Donkey Kong (Prototype) • Diddy Kong Pilot (Banjo-Pilot Prototypes) • DK: King of Swing |
| GameCube | Donkey Konga • Donkey Konga 2 • Donkey Kong Jungle Beat • Donkey Konga 3: Tabehoudai! Haru Mogitate 50 Kyoku |
| Wii | Donkey Kong Barrel Blast • Donkey Kong Country Returns |
| Nintendo DS | DK: Jungle Climber • Mario vs. Donkey Kong 2: March of the Minis (Prototype) • Mario vs. Donkey Kong: Minis March Again! • Diddy Kong Racing DS |
| Wii U | Donkey Kong Country: Tropical Freeze |
| Adobe Flash | DK: King of Swing - Hurling for Distance • DKC 3: Barrel Blastapalooza |
| The Mario series | |
|---|---|
| NES/FDS | Super Mario Bros. • Super Mario Bros. 2 (FDS) • Super Mario Bros. 2 (NES) (Prototype; Doki Doki Panic) • Super Mario Bros. 3 |
| SNES | Super Mario World • Super Mario All-Stars • Super Mario World 2: Yoshi's Island (Prototypes) |
| Satellaview | BS Super Mario USA • BS Super Mario Collection |
| Nintendo 64 | Super Mario 64 (64DD Version) |
| GameCube | Super Mario Sunshine (Demo) |
| Wii | Super Mario Galaxy • Super Mario Galaxy 2 • New Super Mario Bros. Wii |
| Wii U | New Super Mario Bros. U • New Super Luigi U • Super Mario 3D World • Super Mario Maker |
| Game Boy (Color) | Super Mario Land • Super Mario Land 2: 6 Golden Coins • Wario Land: Super Mario Land 3 • Super Mario Bros. Deluxe |
| Game Boy Advance | Super Mario Advance • Super Mario Advance 2 • Super Mario Advance 3 • Super Mario Advance 4 |
| Nintendo DS | New Super Mario Bros. • Super Mario 64 DS |
| Nintendo 3DS | Super Mario 3D Land (Demo) • New Super Mario Bros. 2 • Super Mario Maker for Nintendo 3DS |
| Nintendo Switch | Super Mario Odyssey • New Super Mario Bros. U Deluxe • Super Mario Maker 2 • Super Mario 3D All-Stars • Super Mario Bros. 35 • Super Mario 3D World + Bowser's Fury |
| iOS/Android | Super Mario Run |
| Mario Kart | |
| Console Games | Super Mario Kart (Prototypes) • Mario Kart 64 (iQue Prototype) • Mario Kart: Double Dash!! (Demos) • Mario Kart Wii (Channel) • Mario Kart 8 (Deluxe) |
| Handheld Games | Mario Kart: Super Circuit • Mario Kart DS (Demos) • Mario Kart 7 |
| Arcade Games | Mario Kart Arcade GP • Mario Kart Arcade GP 2 • Mario Kart Arcade GP DX |
| Mario RPGs | |
| Super Mario RPG | Legend of the Seven Stars |
| Paper Mario | Paper Mario • The Thousand-Year Door (Paper Mario 2 Demo) • Super Paper Mario • Sticker Star • Color Splash • The Origami King |
| Mario & Luigi | Superstar Saga (+ Bowser's Minions) • Partners in Time • Bowser's Inside Story (+ Bowser Jr.'s Journey) • Dream Team • Paper Jam |
| Mario Party | |
| Console Games | Mario Party • Mario Party 2 • Mario Party 3 • Mario Party 4 (Demo) • Mario Party 5 (Demo) • Mario Party 6 (Demo) • Mario Party 7 • Mario Party 8 • Mario Party 9 • Mario Party 10 • Super Mario Party |
| Handheld Games | Mario Party Advance • Mario Party DS |
| Mario Sports | |
| Console Games | NES Open Tournament Golf • BS Excitebike Bunbun Mario Battle Stadium • Mario Golf • Mario Tennis • Mario Golf: Toadstool Tour • Mario Power Tennis • Mario Superstar Baseball (Mario Baseball Demo) • Super Mario Strikers (Demo) • Mario Strikers Charged • Mario & Sonic at the Olympic Games (Beijing 2008, London 2012, Rio 2016) • Mario Sports Mix • Mario Tennis Aces |
| Handheld Games | Mario's Tennis (Virtual Boy) • Mario Golf • Mario Tennis (GBC) • Mario Tennis: Power Tour • Mario Golf: Advance Tour • Mobile Golf • Mario & Sonic at the Olympic Games (Beijing 2008, London 2012) |
| Web Games | Mario Tennis: Power Tour - Bicep Pump |
| Other | |
| Arcade Games | Donkey Kong • Donkey Kong Jr. • Mario Bros. • Donkey Kong, Donkey Kong Jr., Mario Bros. • Mario Roulette • Luigi's Mansion Arcade |
| Computer Games | Donkey Kong (Atari 8-bit family) • Mario is Missing! (DOS) • Mario Teaches Typing (DOS) • Mario's Early Years (DOS) • Mario's Game Gallery (Mac OS Classic) |
| Console Games | Donkey Kong (NES) • Donkey Kong Jr. (NES) • Mario Bros. (NES) • Kaettekita Mario Bros. • Wrecking Crew • Dr. Mario (NES) (Prototypes) • Mario Paint (Prototype) • Mario & Wario • Tetris & Dr. Mario • Undake 30: Same Game Mario Version • Mario's Super Picross • Wrecking Crew '98 • Mario is Missing! (NES, SNES) • Mario's Time Machine (NES, SNES) • Mario's Early Years: Fun With Letters • Yoshi's Safari • Hotel Mario • Super Mario's Wacky Worlds • Mario no Photopi • Mario Artist Paint Studio (Prototype) • Mario Artist Talent Studio • Mario Artist Communication Kit • Dr. Mario 64 • Luigi's Mansion • Dance Dance Revolution Mario Mix • Fortune Street • Captain Toad: Treasure Tracker (Wii U, Switch) • Mini Mario & Friends amiibo Challenge • Dr. Luigi • Mario + Rabbids Kingdom Battle • Luigi's Mansion 3 |
| Handheld Games | Dr. Mario • Mario Clash • Donkey Kong • Mario's Picross • Picross 2 • Jaguar Mishin Sashi Senyou Soft: Mario Family • Mario Pinball Land • Mario vs. Donkey Kong (Demo) • Mario vs. Donkey Kong 2: March of the Minis (Demo) • Mario vs. Donkey Kong: Minis March Again! • Super Princess Peach • Dr. Mario & Puzzle League • Mario Bros. Classic • Luigi's Mansion (Nintendo 3DS) • Luigi's Mansion: Dark Moon • Captain Toad: Treasure Tracker (Nintendo 3DS) • Photos with Mario • Dr. Mario World |
| Web Games | Dr. Mario: Vitamin Toss |
| See also | |
| Yoshi • Donkey Kong • Wario | |





















