Jump to content
  • Advertisement
Sign in to follow this  
ginkeq

Reverse Engineering questions

This topic is 4015 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all. I have a problem.. There is this game from the 80's that I need to reverse engineer. It is 8086 code, and isn't too complex of a game really. Anyway, I guess it was used on a system with 8 memory banks, with some parts being in ROM(I think all the instructions are in ROM). So there are 8 files which appear to correspond to each bank. IDA doesn't seem to interpret it correctly even though I have it set at 16 bit 8086 code. Is anyone familiar with how to reverse engineer something like this(i just have the binary images)? Also, I need to edit the instructions in some of the files. Supposing I could actually get IDA to interpret them, how would I change the instructions around? Are there programs that can do this? I heard it would be easier not to recompile, so if it could just update the opcode and write to disk that would be better.. Thanks

Share this post


Link to post
Share on other sites
Advertisement
My memory is a bit fuzzy on this, but I'm guessing those would be either overlay files or independent data files. Are you sure they contain code?

Most of these hacks were used to get around the 64k barrier. Although I won't guarantee if overlaying was used that early, or if it came later.

As for modifying the files, once you find what to change, you can do that rather trivially, if the instructions you add or remove are of the same size. If not, then it can get tricky due to memory layouts and absolute addresses.

I guess this depends on what you're hoping to gain from this. Some old games have been nicely hacked for compatibility, but many of them use separate loaders.

Share this post


Link to post
Share on other sites
It's kind of weird. I examined the bytes in memory and i have found a similar byte sequence in the file, but it is like this:

In a MAME debugger - It shows memory as maybe 0x12 0x13 0x14 0x15 0x16
In the file, it might show 12, then 16.. It's definitely the same part, but I don't understand it yet I guess.. Maybe the files combine somehow(no clue) to form the true layout..


A few things I want to do is modify the colors, and I already know the coloring scheme because I found the memory mapped IO location and played with that(4 bit color)

Most likely the instruction sizes will be the same, but I will modify the immediate operand or something like that.

One thing that is confusing me is the MAME debugger is using 2 16 bit registers to address stuff (like [bx:si] with values FC00:2000), and it will map to something like 7000(not sure how this works).

Share this post


Link to post
Share on other sites
Ah, that's different. Mentioning IDA and 8086 I assumed it was PC-ish platform.

What these files are, and how they are interpreted will depend on which platform they were made for. MAME supports multiple platforms, and hardware between those differs.

I'd say you best start with the platform documentation. I assume you could use MAME source to see what's going on, although its debugger might be adequate.

As for actual memory and ROM organization for you particular game, or specific loading techniques used, I don't know anything specific.

Quote:
One thing that is confusing me is the MAME debugger is using 2 16 bit registers to address stuff (like [bx:si] with values FC00:2000), and it will map to something like 7000(not sure how this works).


Segment offset addressing. Also here

You should be able to find more information on it on google.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!