prb28 / vscode-amiga-assembly

Amiga Assembly extension for Visual Studio Code
GNU General Public License v3.0
178 stars 12 forks source link

How to disassemble and view an Amiga game #27

Open Eternal-student opened 5 years ago

Eternal-student commented 5 years ago

If I wanted to look at an old Amiga game that I have an unencrypted version of (say for example Kick Off 2) and I have the ADF file.. I can examine it with hexdump in VSCode and can see it consists of several smaller components. I've used a tool (DDFS) to extract the parts of the disk and end up with KickOff2.prg file, is it the possible to use the Disassembler to convert it in to assembly language instructions?

prb28 commented 5 years ago

This isn't a newbie question ;-)... The extension opens a file in amiga hunk format, extracts the different parts and calls capstone to disassemble. There is an option to do this : disassemble binary file. But.... It shouldn't work because I think the games are compressed so the beginning of the file should be readable, but the end may be an invalid assembly code and capstone won't like it. If you send me the binary, I can try with the extension in debug mode to see what's happening inside.

I've started this project to help me to learn the amiga assembly code, so I may not be very helpful in how to inspect and disassemble a real game. You may find some help in the English Amiga Board.

Eternal-student commented 5 years ago

The ADF is downloadable from here KO2CV download But if the unpacked version is better, I've zipped it up and put it here unpacked files Let me know if you download it. When I tried the disassembler in the plugin, it sort of showed a blank page with a colon, so I think you're right, it didn't seem to like the file.

I did a bit of reading about it, and maybe it's something I have to use IDA pro or Resource on the Amiga. I've not read very much about Capstone.

prb28 commented 5 years ago

I've downloaded the files and I'm digging... Thanks, I've just reopened the last issue, trying to open this file made me reproduce it ! Yes you're right a real disassembler (like IDA or Resource) is certainly the way to go, but I've no experience about it (since C64 in the mid 80s).

prb28 commented 5 years ago

The ".prg" file is not a valid amiga hunk file, it hasn't the magic cookie $000003f3 at the beginning. So you'll need to step from the boot bloc with a disassembler (IDA or Resource), to get the inner assembly code.

prb28 commented 5 years ago

You can try the console debugger of fs-uae.

Eternal-student commented 5 years ago

Ok awesome thanks for the info. Will have a look.