Hacking DIY - Change the Start Level
In this romhack you are going to change the Start Level at which the game starts.
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 different boards for the different levels. This definition starts at position #3A65 (hexadecimal) and ends at position #3A79 (hexadecimal). You can clearly see which boards are played for each level. From level L=05 the order in which the boards are played is the same for each level.
Code taken from the Donkey Kong Hacking Kit, see the 'LINKS' page for link to this kit.
The game contains another data block with some setup information that it loads when starting the game. This definition starts at position #095E (hexadecimal) and ends at position #0964. The first byte (#095E) defines the start level L=01. The next two bytes (#095F and #0960) define a pointer into the data block with the level/board definitions. The bytes of this pointer are reversed and point to #3A65 which is the start of the board definitions for L=01.
If we want to start the game at level L=03 then we have to change byte #095E to '03' and bytes #095F and #0960 to '6A' and '3A'.
095E: 03 6A 3A 01 00 00 00
If we want to start the game at level L=07 then we have to change byte #095E to '07' and bytes #095F and #0960 to '73' and '3A'.
095E: 07 73 3A 01 00 00 00
If we want to start the game at level L=32 then we have to change byte #095E to '20' and bytes #095F and #0960 to '73' and '3A'.
095E: 20 73 3A 01 00 00 00
Let's implement the change to level L=07.
Start the HxD Editor and open the file 'c_5et_g.bin'. This file contains the game code from #0000 to #0FFF. Scroll to the line '00000950'. You find the data block #095E - #0964 there.
You can now change this block into the desired data for a start level of L=07. 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_5et_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 starts the game at level L=07. 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.