I tried disassembly my Megaman 1 hack all day (my goal is to edit enemies AI, and weapons maybe), and nothing. I tried alot of things but none of them worked, since all of it is just so confusing for me (I am a newcomer). Then I found out that bisqwit's disassembly can do alot of things, and the example file of Castlevania 2 (this one : https://bisqwit.iki.fi/src/clever-disasm-example/cv2u.lst) is exactly formed in a way that I think I can work with. The problem is, I got alot of files from the link of his disaseembly (lots of CC files and such) and I have no idea of where to start. Can someone explain me with details how it works and how I can end up with the same results as the example?
I'd like to point out that Bisqwit has posted a disassembly of Megaman 1 at https://bisqwit.iki.fi/jutut/megamansource/
As far as "what to do with a bunch of CC files" goes, you would need to compile it using g++. I believe it was intended to be built on Linux or at least a similar Unix-style environment. My main laptop currently only has Windows installed on it, so I opted to install Cygwin on it (which provides a "Unix-like" environment), with g++ and make and other necessary tools for building it. I also had to very gently tweak the Makefile in order to get the build to work on Cygwin.
As to how to use the tool to get a disassembly as useful as the Castlevania II example you pointed at - that is mostly a very manual process. Bisqwit created that .lst file using his tool, plus a 3,000-line file
that he hand-crafted. The tool will not generate the output you saw, without that hand-crafted file as its input. Specifically, it would
generate a disassembly, but the meaning of the sources would largely be opaque: no function names, no variable names, no comments - just raw disassembly.
The process is arduous, but rewarding for the patient. It involves reading the "inscrutable" code and digging for an understanding of what it's doing, then adding lines to an .ini file in order for the next iteration of the disassembler to produce labels and variable names, etc. The disassembler doesn't magically do any of that for itself (though you could at least preseed the .ini file with locations of known soft switches for the NES).
If you're wondering why anyone would ever use the tool - as far as I know it's the only free disassembler tool that actually emulates the code as it disassembles, and uses that information to correctly link up subroutine references across loading/unloading of ROM banks. It also uses it to somewhat track what value a register currently contains, and where in the code it was last set. But the documentation for it is virtually nonexistent, so it's currently a rough ride for anyone who isn't comfortable with reading the tool's source code to understand how to use it. (I used it in a recent project (my first project)
, and hope to write some documentation for it if I find the time.)