English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 02 November 2008, 19:07   #1
Keeks
 
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?
 
Old 03 November 2008, 04:34   #2
BippyM
Global Moderator
 
BippyM's Avatar
 
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
BippyM is offline  
Old 03 November 2008, 18:02   #3
Keeks
 
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
 
Old 03 November 2008, 21:34   #4
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
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
Photon is offline  
Old 04 November 2008, 20:31   #5
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
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.
Codetapper is offline  
Old 04 November 2008, 20:47   #6
Keeks
 
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
 
Old 06 November 2008, 04:32   #7
xaind
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.
xaind is offline  
Old 06 November 2008, 18:10   #8
Keeks
 
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:35.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10595 seconds with 13 queries