Navigate Site: | Home | Blog | Samples | Downloads | About Us | Links | Documentation


About RevEngE6502

RevEngE6502 is a decompiler. It turns the most raw computer code - assemby language - into C code.

The way it works is this: You pick a 6502 program (say, Jet Set Willy) then you find a function to decompile - by disassembling the game - and then you run it through the RevDasm disassembler. It then creates an assembly file. This file goes into the program folder, then into the folder jobs/zol/assembly/zol.usub_4341.txt.

Once you have the assembly file, you decompile it.

For more on this, check here for full documentation.

Let's assume you chose to decompile zol.usub_4341.txt.

What this does is, it instructs the decompiler to look in jobs/zol/zol.usub_4341.txt, and output code either to the console (the black window you see) or to jobs/zol/logs/zol.usub_4341.txt.code.txt.

About Console Windows

The console window needs to be configured by you, because it is tiny and will scroll code off the top.

Decompiler Options

The decompiler (and GUI) has some flags.

Flag Description Purpose
Recurse When decompiling a function call (jsr xxxx), recursively decompile into that function. This flag is when you need to get return values and function args.
Interleave When outputting code (to file or console), put addresses before the lines. This is when you need to load the decompiled code into a debugger or machine code monitor.
Code to File Output code to (eg) zol.usub_4341.txt.code.txt rather than console For more helpful code browsing than outputting to the console.
CC65 Output C code in CC65 Syntax For when you want to re-compile your code in the CC65 compiler.
Hex Globals This outputs globals and labels as hexadecimal. For people who don't like decimal.