Hacking DIY - Change the High Score Text
In this romhack you are going to change the 'HIGH SCORE' text that is displayed at the top of the screen.
For this hack you need a copy of the original 'dkong.zip' (Donkey Kong (US set 1)) and the HxD Editor to edit the romfiles.
A download link for the HxD Editor can be found on the 'LINKS' page.
Create a working folder for the romhack and place the copy of the original 'dkong.zip' into this folder.
Extract the files 'c_5at_g.bin', 'c_5bt_g.bin', 'c_5ct_g.bin', '5_et_g.bin' from the 'dkong.zip' to the working folder.
The game contains a data block with the definition of the various texts that are used in the game. This definition starts at position #368A (hexadecimal) and ends at position #3805 (hexadecimal). You can clearly recognize some of the texts.
Code taken from the Donkey Kong Hacking Kit, see the 'LINKS' page for link to this kit.
Each text starts with two bytes that define the position on the screen, followed by a varying number of bytes that define the individual characters of the text, and ends with the byte '3F' that indicates the end of the text.
The definition of the 'HIGH SCORE' text starts at position #36B2 (hexadecimal) and ends at position #36BE. The first two bytes indicate a screen position of #7680 (bytes in reverse order).
The characters of the text are defined based on the following character data.
Let's say that you want to change the 'HIGH SCORE' text into 'DK FOREVER'.
D(14) - K(1B) - empty(10) - F(16) - O(1F) - R(22) - E(15) - V(26) - E(15) - R(22)
#36B4: 14 1B 10 16 1F 22 15 26 15 22
Let's implement the change to the text 'DK FOREVER'.
Start the HxD Editor and open the file 'c_5at_g.bin'. This file contains the game code from #3000 to #3FFF. Scroll to the line '000006B0'. You find the data block #36B2 - #36BE there.
You can now change this block into the desired data for the text 'DK FOREVER'. Just click in front of a number that you want to change to position the cursor and type the new number(s).
Save the file 'c_5at_g.bin' after making the desired edits.
Add the files 'c_5at_g.bin', 'c_5bt_g.bin', 'c_5ct_g.bin', '5_et_g.bin' from the working folder back to the 'dkong.zip'.
The dkong.zip now contains the romhack that displays 'DK FOREVER'. Test it by starting the rom with an emulator. Remember that the emulator must ignore the checksum errors that are caused by the changes that you made.