Navigate Site: | Home | Blog | Samples | Downloads | About Us | Links | Documentation
Finding Start Addresses
Now, the fact is that you might need to decompile a C64 program, but you don't know which address from which to start and you need a bin file.
There are a few ways to get a start address:
- Find it on the Internet
- Get it from a depacker/decruncher
- Use unp64
- Find it yourself by using SAM
For the 4th option, here are the instructions to help you get to grips with it.
Outputting a 'bin' File
- First load Frodo SuperSAM from the Start menu.
- Alt+F9
-
- Double-click "zol.fss".
- Select Menu 'Tools -> SAM'.
-
- Next, type s 0000 ffff "../RevEngE6502/jobs/zol.bin" and you'll write it out.
-
The bit you'll appreciate is that this is how to generate a bin file that will load into the decompiler ('Binary' box in the RevDasm disassembler).
Now we have a .bin file, we can proceed to finding the start address using Frodo SuperSAM.
Finding a Start Address
- First load Frodo SuperSAM from the Start menu.
- Alt+F9
-
- Double-click "zol.fss".
-
- Menu 'Tools -> SAM'
-
- Go to SAM window
-
- Look at the first of the Entry Points (should be e5dc, though it says 44a5 above)...
- This entry point is now loaded into the RevEngE6502 disassembler as follows:
-
- Click on 'Launch RevDasm'
- Now we want to decompile the disassembled file, zol.usub_E5DC.txt as seen here:
-
- Click on 'Launch RevEngE'
- Congratulations, you've decompiled your first C64 program!
- The next step is to look at more entry points to find more code.
- By the way, if you hit Recurse in RevEngE6502 (the decompiler, not the disassembler), it will find more functions.