I am not sure if someone has the same passion and interest in playing this nifty cute little introductory game, Dangerous Dave. I am talking about the first version of this game, where it features the side scrolling arcade action game with not much visual treats (it was one during those times). I was a crazy addict in my young ages and I had also tried to tamper with the high scores file and put my name to be the top.

All you need is a simple hex editor. I believe even the SublimeText or vim does the work for you. They both have a hex mode to open the files in hexadecimal mode. We are going to change the results that gets displayed once a game is over. The old DOS games have an 8 + 3 naming convention. This 1989 game has three files in total.

  • DAVE.EXE
  • EGADAVE.DAV
  • DSCORES.DAV

The main file we are concerned is the DSCORES.DAV file. The game reads the contents of that file and displays the high scores like this when you get a high score and die or just leave the game in its home screen without touching anything and it goes into demo mode:

To change the above information, we need to look into how the DSCORES.DAV file structure looks like. When the file is opened with a Hex Editor, for now, I am going to use SublimeText 2, it looks this way:

If we find the similarities between the score card and the hex we have got and map them accordingly, we can find that each record is in the following format.

0703 0900 0000 4B4F 53

Consider the above record as this format:

AABB BBBB BBBB CCCC CC

If we boil it down, we get the following information:

  • AA - Two byte digit level information (RAW).
  • BB BBBB BBBB - Five byte digit score information (RAW).
  • CCCC CC - Three byte character name (HEX).

The name is alone stored in Hex, while the integers for the numbers are stored in the raw format. If we try to add the following information:

  • Level: 07
  • Score: 35007
  • Name: PPK

It would be converted into:

0703 0500 0007 5050 4B

And if we insert it in the front and save the file, the file looks like:

The bright coloured part is the new set of bytes that have been inserted. Now saving this file and replacing it with the original and opening the game gives me:

I found this trick when I was a kid and I used an application called HxD, an ancient hex editor, but now-a-days there are many online services like HexEd.it, which is what I used to do the above edits. Happy Hacking! 😁