Skip to main content
June 17, 2009

Mystery of Donkey Kong Kill Level Solved

It was an integer overflow.dkong_kill_screen_lvl_22_fixed

I guess it is never too late to fix a bug. Don Hodges used the old video game firmware and a MAME machine to debug and fix a problem which has kept expert Donkey Kong players from ever getting past level 22. If you have seen King of Kong you would know that one of the challenges of getting a high score is getting as many possible points before a software glitch causes the game to end abruptly at level 22. This is because the time is calculated incorrectly and there is not enough time to complete the level.

In his diagnosis, How High Can You Get, Don Hodges determines that the level counter is multiplied by 10 and then has 40 added to it which overflows a single byte (max is 255) value causing the time to be incorrectly calculated. Don then goes on to implement a fix. The article is a good read for low level code and arcade game junkies.

Veracode Security Solutions
Security Threat Guides

Related Content

Chris Wysopal, co-founder and CTO of Veracode, is recognized as an expert and a well-known speaker in the information security field. He has given keynotes at computer security events and has testified on Capitol Hill on the subjects of government computer security and how vulnerabilities are discovered in software. His opinions on Internet security are highly sought after and most major print and media outlets have featured stories on Mr. Wysopal and his work. At Veracode, Mr. Wysopal is responsible for the security analysis capabilities of Veracode technology.

Love to learn about Application Security?

Get all the latest news, tips and articles delivered right to your inbox.