Hi!
Is there a way to print the code in the Code view section of the openmsx-debugger to a txt file?
I'm disassembling a binary file and I would like to write comments on different lines
Aangemeld of registreer om reacties te plaatsen
Hi!
Is there a way to print the code in the Code view section of the openmsx-debugger to a txt file?
I'm disassembling a binary file and I would like to write comments on different lines
why don't you just use a disasembler? It will do exactly that, turn the binary into a text file you can edit.
Thanks geijoenr for your answer.
You are right. I was expecting that openmsx-debugger could do it to avoid to learn a new tool (I'm a lazy boy).
Do you have any suggestion for a disassembler?
I used z80dasm on linux and I was happy with the result.
I've recently used disark and I was fine too
I sometimes use this command in the openMSX console (so openMSX itself, not the openMSX-debugger):
disasm <address> <numer-of-lines>
Possibly combined with the command:
save_to_file <filename> <string>
For example:
save_to_file output.txt [disasm 0x4000 500]
It's a bit primitive, but it works.
Thanks guys for your answers.
First I will try wouter_'s option because it's an environment that I already used.
Thanks again for your help.
In Linux, the package d52 contains three disassemblers; one of them is for Z80, called dz80. They allow you to write "control files". These are files where you specify the locations of comments etc. and it will generate a disassembly with the comments in it. Basically like IDA but with a text file instead of an UI. SkoolKit is similar and outputs HTML among other things, but for text files, dz80 is more powerful. As you disassemble, if you find out that you made a mistake (e.g. a label name), it's easier to correct it in the control file than all appearances in the whole listing, as there's usually just one place to change. Another advantage is that you don't have to break any copyrights if you distribute just the control file and let people with the ROMs do their own disassembly.
Here's an example control file to disassemble a bootleg version of PacMan: https://notabug.org/pgimeno/pacmanbl-dis - the project is paused because I have a more important one in my hands right now, but it will give you an idea of what a control file looks like. There's a legend at the bottom of the file.
It's been for years my tool of choice for every disassembly project that goes beyond simple inspection with the debugger. I used it with Thrust II to write the Thrust II Reloaded remake; also with Elite to make a Goat Soup generator, with Mazogs to understand the maze generator, with the Capitán Trueno loader to fix it for certain MSX models, and also with Wriggler, Android Two, Labirint, and now PacMan Bootleg, each for its own reasons.
Thanks pgimeno for the good explanation of dz80, to learn how you use it it's been very helpful
Don't you have an account yet? Become an MSX-friend and register an account!