02 November 2008, 19:07 | #1 |
Posts: n/a
|
Want to learn how to dissassemble games
Hi there,
I want to learn to disassemble games. Not for any great purpose, just to see how they tick and to do something during the cold wet months of winter. I do know a bit of 68k assembly. What I don't know is where to start. I am assuming that the first place to look is the bootblock, but how do I look here and what should I be looking for? |
03 November 2008, 04:34 | #2 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Hmmm.. It's not a quick and simple thing to try and explain
Personally I use WinUAE and action replay 3. I load the bootblock to an address (say $50000) and then I disassemble it with d $5001c or similar (the exact number escapes me). I then see what the bootblock is doing, and if you are lucky it's reserving some memory, then loading the game-loader to an address and then jumping to it! If you are unlucky.. well you'll see Next you change the bootblock to loop on itself instead of JMP loader, correct checksum, write it back to disk and reboot! Now when you enter the replay you can disassemble the JMP address and figure out what the loader is doing. Again if you are very lucky it's a single file game and like with bootblock you modify the loader to flash screen or something once loaded and then you can disassemble the game Hope this is okay, i've simplified it greatly as I have just finished work and it's 3.30am |
03 November 2008, 18:02 | #3 |
Posts: n/a
|
Cheers for that.
But still not sure How to do it. How do you load the Bootblock to an address such as you say $50000? Thats what I'm looking to do. If I could see what the bootblock is doing then I might be able to figure out the rest myself, but I don't know anything about bootblocks. Thanks Keeks |
03 November 2008, 21:34 | #4 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
The single most important thing to remember is to follow each jump in the bootblock as the cpu would. Do not even look at code below a jump before you have ruled out that the branch is taken. Then, look for "move something, offset(a1)" and calls to "offset(a6)" as a1 and a6 have the structure pointer to the trackdisk device and execbase, respectively. If you see this combo it is usually loading something with trackdisk.device. By learning the trackdisk structure (structure.doc by Kodiak), you know which sectors are loaded, and to where. Then you can load those sectors to the same place and disassemble from there (IF the loaded stuff is jumped to, otherwise not, see above )
Learned this proper when I had to have a look at a game lately |
04 November 2008, 20:31 | #5 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
|
Far easier is to rip the bootblock with a utility like grab (grab Game.adf bootblock.bin first 1024) then just use the tool resource to disassemble it. No mucking around with memory allocations and you can comment and save your work as you go - which is good for a newbie that might need a few passes to work out what's going on.
|
04 November 2008, 20:47 | #6 |
Posts: n/a
|
Thanks for the replies. Much appreciated.
Where would I find the utility grab. I'm assuming it is CLI based utility? Thanks again for the help |
06 November 2008, 04:32 | #7 |
Registered User
Join Date: Apr 2006
Location: Sydney / Australia
Posts: 113
|
Not sure where you can find grab. There's a vaguely-similar utility on aminet called GrabInFile. You don't need it though, resource (v6.06) comes with a "Disassemble BOOT sector" macro that pulls the data straight off the disk.
Last edited by xaind; 06 November 2008 at 04:38. Reason: grammar, duh. |
06 November 2008, 18:10 | #8 |
Posts: n/a
|
Cool guys.
Thanks for the help. Should have enough info now to get me started. Thanks again |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I want to learn about Workbench | mancity | support.Apps | 26 | 21 May 2012 06:14 |
Want to learn Blitz, but I have a problem. | diablothe2nd | Coders. Tutorials | 52 | 09 January 2012 12:36 |
To Late To Learn How To Program On The Commodore 64? | Kitty | Retrogaming General Discussion | 10 | 01 November 2009 21:11 |
How did you learn to program | BippyM | Coders. General | 80 | 01 April 2007 19:25 |
A little lesson to learn about Pong | MethodGit | Retrogaming General Discussion | 7 | 07 December 2001 13:03 |
|
|