News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Is there a way to see what an ips file has changed?  (Read 1688 times)

Xdegenerate

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Is there a way to see what an ips file has changed?
« on: June 04, 2019, 12:23:30 am »
There is a japanese rom I have where someone has hacked a particular action id like to use in an English rom.

Is there someway perhaps I could make an IPS file of it, then somehow be able to read the coding that it actually changes in the patch to try and figure what coding may be able to transferred to clone the action on another rom?

P.S: It's no a GG/PAR/raw hardcoded patch)

Psyklax

  • Hero Member
  • *****
  • Posts: 1056
    • View Profile
    • Psyklax Translations
Re: Is there a way to see what an ips file has changed?
« Reply #1 on: June 04, 2019, 12:35:40 am »
Well yeah: in a hex editor, you can compare two files. I use HxD, and in that you just open both the original ROM and the patched ROM, and do a File Compare. I used it before to make a patch that combined two other people's patches together without any overlap.

In your case you don't need to make a patch, you can just compare a clean ROM with the modded one.

Xdegenerate

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #2 on: June 04, 2019, 05:44:50 am »
I was doing that, but there is a million lines to compare lol.

Z3R0X

  • Jr. Member
  • **
  • Posts: 55
  • My name's not shane, kid.
    • View Profile
    • My YT channel with mini tools.
Re: Is there a way to see what an ips file has changed?
« Reply #3 on: June 04, 2019, 07:12:51 am »
I was doing that, but there is a million lines to compare lol.

Well those "lines" are the changes  ;D
I don't know what are you looking for.

Psyklax

  • Hero Member
  • *****
  • Posts: 1056
    • View Profile
    • Psyklax Translations
Re: Is there a way to see what an ips file has changed?
« Reply #4 on: June 04, 2019, 08:34:54 am »
I was doing that, but there is a million lines to compare lol.

If you have some idea what you're looking for, that would help. If the patch has a million changes, then you're going to have to learn a bit of assembly and do some debugging. ;)

abw

  • Sr. Member
  • ****
  • Posts: 288
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #5 on: June 04, 2019, 08:52:42 am »
You can also try playing with something like IPS Peek, which shows you which address ranges each section of an IPS patch modifies (this might reduce the diff list from a million bytes to a hundred ranges, which should be easier to work with) and lets you selectively include/exclude ranges from the patch, so by process of elimination you can isolate what address ranges affect the behaviour you're interested in.

FAST6191

  • Hero Member
  • *****
  • Posts: 2593
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #6 on: June 04, 2019, 09:00:25 am »
+1 to the things said so far, and yeah the massive list of changes is to be expected with this kind of approach in this scenario.

Assuming you are not dealing with one of those games that changes table ever screen (several have been seen in the wild) then text should have a different "feel" to binary changes, and possibly be in a different location within the ROM to where the stash the text (most scripts are fairly close together, or stuffed in certain banks if it is one of those systems). Figure out what the text works like and you should then be able to eliminate vast swathes of the change list.

Beyond that then yeah time to play with the affected mechanics; don't know what it is but if it affects scores, experience, pickups or similar then you have the start of a tracing session there.

Cyneprepou4uk

  • Full Member
  • ***
  • Posts: 176
  • Самый лысый ромхакер
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #7 on: June 04, 2019, 09:20:30 am »
One more thing you can do here is start replacing modified bytes with original bytes in a modified rom, several changes at a time, until you find out which one of them affects that particular action
I am the baldest romhacker
NES Romhacking Guide

Xdegenerate

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #8 on: June 04, 2019, 09:42:41 pm »
+1 to the things said so far, and yeah the massive list of changes is to be expected with this kind of approach in this scenario.

Assuming you are not dealing with one of those games that changes table ever screen (several have been seen in the wild) then text should have a different "feel" to binary changes, and possibly be in a different location within the ROM to where the stash the text (most scripts are fairly close together, or stuffed in certain banks if it is one of those systems). Figure out what the text works like and you should then be able to eliminate vast swathes of the change list.

Beyond that then yeah time to play with the affected mechanics; don't know what it is but if it affects scores, experience, pickups or similar then you have the start of a tracing session there.

Its just a particular special move added to the character when you press the select button.

Psyklax

  • Hero Member
  • *****
  • Posts: 1056
    • View Profile
    • Psyklax Translations
Re: Is there a way to see what an ips file has changed?
« Reply #9 on: June 05, 2019, 01:10:55 am »
Its just a particular special move added to the character when you press the select button.

That narrows it down, but it still baffles me why people ask for help while keeping the game and system they're interested in a closely-guarded secret. :D

If you're dealing with the NES or SNES then a bit of assembly knowledge would help because you could do a trace log and look at what's going on with the registers for controller input. If you don't know about that stuff then it might be harder to figure out.

Xdegenerate

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #10 on: June 05, 2019, 05:28:02 am »
That narrows it down, but it still baffles me why people ask for help while keeping the game and system they're interested in a closely-guarded secret. :D

If you're dealing with the NES or SNES then a bit of assembly knowledge would help because you could do a trace log and look at what's going on with the registers for controller input. If you don't know about that stuff then it might be harder to figure out.

Lol, I wasn't keeping it a secret. I just didn't think it relevant lol.

It's a hack of Double Dragon II. When you press the select button it changes Billy/Jimmy into the clone sprites of the "Shadow" Boss version and throws the fireball/hadoken thing (about 4 sprites). Then reverts back to the original B/J sprites.

On another version of the same game, they've hacked it so when you jump, you just have to press punch to activate the spinning air kick, you don't have to be at the peak of the jump, plus if you keep tapping A he continuously does the move! Aswell as back kick (B) has been changed to a standing knee, so you do that and then you can hit A (punch) to do the super-uppercut. Plus select is the rising knee, but I want it to be the fireball.

I'm hoping I can figure out how to get both hacks working in the same game.

I have no assembly knowledge at all. I guess I'm stuck looking at 100's of lines of code. Unless someone here who knows what theyre looking for has an interest in trying to figure it out too?
« Last Edit: June 05, 2019, 05:35:24 am by Xdegenerate »

Psyklax

  • Hero Member
  • *****
  • Posts: 1056
    • View Profile
    • Psyklax Translations
Re: Is there a way to see what an ips file has changed?
« Reply #11 on: June 05, 2019, 07:10:00 am »
Lol, I wasn't keeping it a secret. I just didn't think it relevant lol.

I know, I'm kind of joking, but it's very common on this forum for people to come with queries about a game and yet give no clue as to which game they're talking about. The more we know, the more we can help! ;)

Regarding your situation, it's tricky to see what the hacker did since we can't see his hacked ROM, but I can look at the original ROM and see what they might have done. This will give you a clue as to where you should look. Later on I'll have a look at it and get back to you. :)

Xdegenerate

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #12 on: June 05, 2019, 09:42:05 am »
Appreciated

Psyklax

  • Hero Member
  • *****
  • Posts: 1056
    • View Profile
    • Psyklax Translations
Re: Is there a way to see what an ips file has changed?
« Reply #13 on: June 05, 2019, 12:05:33 pm »
So after playing the game and having a look, I can see one thing that you mentioned: the bit that checks if you're at the right height to do your spinning kick. At $1827D in the ROM, there's an instruction which branches if your current height is equal to the one given in the ROM at $1828E, which is 02. If it is, you do a spinning kick, if not, you don't. Remember I said about doing a file compare? Open both the original ROM and the hacked one in HxD and press Ctrl+K to open the file compare menu. This lets you see every single byte that is different between the files, and I would imagine something around $1827D is different. Worth checking it out.

As for the rest, I haven't really looked, but it's a start. :)

Xdegenerate

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #14 on: June 06, 2019, 06:19:53 am »
So after playing the game and having a look, I can see one thing that you mentioned: the bit that checks if you're at the right height to do your spinning kick. At $1827D in the ROM, there's an instruction which branches if your current height is equal to the one given in the ROM at $1828E, which is 02. If it is, you do a spinning kick, if not, you don't. Remember I said about doing a file compare? Open both the original ROM and the hacked one in HxD and press Ctrl+K to open the file compare menu. This lets you see every single byte that is different between the files, and I would imagine something around $1827D is different. Worth checking it out.

As for the rest, I haven't really looked, but it's a start. :)

I haven't tried seeing if I can bring over the moves from the second hack, but the fireball one known as the shadow hack didn't work :(

All I managed to be able to convert over was one line that changed the back kick into a standing knee.

I was copying each line for line that showed differences in the hack and the regular Japanese version, and converting that modded hex to the English version. But it got to a point where the hex between the eng and jap versions where not the same.

Eventually it seemed like the eng version added or subtracted a particular column of hex code and matches went out the window :(

Like example line 01234s was on line 01235 on the other rom. I tried changing it the same way on the same line, then tried to adjust it to the next, one resulting in the in game graphics mucking up, the other in booting to a grey screen.

The changes seem to be all over the place, not just one or two lines.

The hack takes a non functioning select button and changes it to activate a sprite switch to another character that throws the hadoken, then reverts back to the normal sprites. Also while the projectile animates as one does.

I think somewhere in the code something doesn't translate right, as I thought maybe that's why the entire graphics messed up, and it seemed to change the buttons to auto-fire by holding them.

I dunno, I can't figure it out. It's over my head. I dunno if anyone more experienced and understands how the code on the jap version works and can translate it to the English version? But I've failed to achieve it :(

Psyklax

  • Hero Member
  • *****
  • Posts: 1056
    • View Profile
    • Psyklax Translations
Re: Is there a way to see what an ips file has changed?
« Reply #15 on: June 06, 2019, 06:51:56 am »
Ah, I didn't realise you were working with the Japanese version, of course there will be thousands of differences. If you don't know the first thing about assembly, forget it. The thing that I told you about was working exclusively with the US ROM.

So clearly I misread your first post. You should compare the original Japanese ROM to the hacked version. Actually, forget it: use Lunar IPS to make an IPS file and host it somewhere, then we can take a look.

Z3R0X

  • Jr. Member
  • **
  • Posts: 55
  • My name's not shane, kid.
    • View Profile
    • My YT channel with mini tools.
Re: Is there a way to see what an ips file has changed?
« Reply #16 on: June 06, 2019, 10:15:37 am »
Most of the time games with different regions have different code, that means the offsets will change, quick example GameShark codes are different depending of the region of the game.
What you need to do:
- Look for the hook in the hacked version.
- Locate how the hook reads button inputs (NES and SNES just read certain offsets for imputs)
- Understand how the custom function read palette or what that func do, branches, call another function, etc.
Note: if you do not have any experience in assembly you will have a hard time.

Xdegenerate

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #17 on: June 07, 2019, 05:59:57 am »
use Lunar IPS to make an IPS file and host it somewhere, then we can take a look.

http://www.mediafire.com/file/l59bv44ekv70bdd/Double_Dragon_II_jp.zip/file

IF anyone can work it out, that would be great!

Psyklax

  • Hero Member
  • *****
  • Posts: 1056
    • View Profile
    • Psyklax Translations
Re: Is there a way to see what an ips file has changed?
« Reply #18 on: June 07, 2019, 09:46:56 am »
Okay, I had a look at the Super Hack. The thing about IPS files is that they're very simple: they show you an address with three bytes, then the amount of bytes to change (with two bytes), then the new data. There are a lot of little changes with this hack, and the first two are clear: the US version is a few bytes off the Japanese one, so changing the address in the IPS will do it.

However, there's a problem next: the Japanese version has a big empty space around $A5C0, but the US version doesn't. The hack uses that space to insert a new routine, but since there's no equivalent space in the US ROM, this will be tougher to do. The routine will have to go somewhere else, but that will also mean changing references to the routine. It'll be more work than you might expect. :)

Xdegenerate

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: Is there a way to see what an ips file has changed?
« Reply #19 on: June 07, 2019, 09:52:54 am »
Sigh :(