Creating a CDL file
Back to the main page
Table of contents
Creating a CDL file
Some of you may already know that FCEUX emulator has a Code/Data Logger tool, which can produce a .cdl file. What this tool basically does is highlights code bytes with yellow color and data bytes with blue color.
It also displays "c" and "d" markers on the left in a Debugger (if Code/Data Logger tool is active).
A CDL file itself contains the same amount of bytes as ROM does (not including a header). Each CDL byte corresponds to each ROM file byte. A CDL byte contains different flags for a ROM byte, for example bit0 is a Code Flag, and bit1 is a Data Flag. However, there are other flags which are not used in a Hex Editor or Debugger, but still get logged. I'll explain those 4 other flags later when describing output files.
How to make a CDL file
I haven't tested a CDL file produced by Mesen emulator, but I guess it should be compatible with my disassembler.
Open FCEUX emulator and launch a ROM. Then select Debug -> Code/Data Logger.
Press Start button in the middle, make a Hard Reset (NES -> Power), and go play your game for a couple of hours while having fun. When you finish, press Save or Save as buttons to save a .cdl file.
How to play a game
The idea is to log as much PRG as possible while playing. The goal is to "PRG not Logger" have as less % as you can achieve.
This is just a part of things that need to be done in the game:
Watch the demo
Enter both correct and incorrect passwords
Visit every area
Collect every item
Move cursors in all directions in each menu
Listen to all the music and sounds
Complete the game in all available modes
You can safely use savestates to test different game scenarios, for example you are standing at some crossroad and want to go left and right at the same time. No problem, make a savestate, go left, load a savestate and then go right. Code/Data Logger will append all logged information to the CDL file.
One thing I wouldn't recommend you to do is manually messing up with RAM in order to skip some levels or something while Code/Data Logger is ON. If you really need to test stuff by editing RAM values, I suggest making a savestate and pause Code/Data Logger while you do that. But if you are a skillful enough romhacker and know what you are doing, then go for it.
Of course it's very unlikely that you end up logging 100% of PRG since there can be some unused code and data in the ROM, but still try to log as much as you can. BTW, my disassembler doesn't care about how much CHR data you've logged, but if "CHR not Logged" will be around 0% at the end, this also means that you've done a good job playing and logging the game.