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

Author Topic: IPS patches and Hex Editing  (Read 4492 times)

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2921
  • 2 + 2 = 5
    • View Profile
IPS patches and Hex Editing
« on: January 28, 2015, 06:52:03 pm »
What's the easiest and/or best way to dissect information contained in an IPS patch? (BEWARE: huge run-on sentence coming) I'm working on A Link to the Past and I'd like to examine any of the patches I find for the game that are relevant to my work and be able to know exactly what is being changed and where so it will be easier for me make specific modifications while taking full advantage of any work or information available to me without being restricted to either copy/paste tactics or doing a bunch of unnecessary research if the information I'm looking for has already been found and utilized by others. Sorry if that was a mile long. LOL

Also, if you do OR have done much work on this game and have any data relevant to making changes to ALttP in a hex editor I would appreciate as much of that data as possible, no matter what aspect it pertains to.

UPDATE
Okay. I found the tools IPSelect and IPS Peek. They were exactly what I was looking for (oh baby...). Now that that's out of the way I'd like to be bombarded with offsets and hex values pertaining to A Link to the Past (fingers crossed).   :happy:
« Last Edit: January 28, 2015, 08:14:43 pm by SunGodPortal »
War is Peace. Freedom is Slavery. Ignorance is Strength.

FAST6191

  • Hero Member
  • *****
  • Posts: 2612
    • View Profile
Re: IPS patches and Hex Editing
« Reply #1 on: January 28, 2015, 08:26:39 pm »
For a patching format as basic as IPS I would probably patch the file and run a compare with my hex editor to see the differences. If you really wanted you could probably even read the IPS file yourself in a hex editor (IPS, especially the features more people will ever use, is truly a basic format), indeed it might be worth that just in case your hex editor's compare function gets a bit confused.

When your chosen patching format starts to gain relocation abilities then you probably will want to take it to a hex editor by default, or at this point it is usually a system with a filesystem so you can take it down to file level and compare against things there.

Edit. Forgot to properly mention the trouble with file compare also applies to patching proper -- if you have a run of 00 in the original image and a run of 00 in the changed one then it will not be detected/noted in the patch. This applies quite often to image editing but I am sure you can see how an IPS patch is not going to be something like http://datacrystal.romhacking.net/wiki/Legend_of_Zelda:_A_Link_to_the_Past:TBL without the comments.
« Last Edit: January 28, 2015, 08:50:03 pm by FAST6191 »

Sliver X

  • Hero Member
  • *****
  • Posts: 1037
  • EX•CINERIBVS•IGNIS•EXCITABITVR
    • View Profile
    • Panicus - A Fragment of Memory
Re: IPS patches and Hex Editing
« Reply #2 on: January 28, 2015, 09:31:27 pm »
This is an explanation of the IPS format, which is pretty crude but simplistic. Looking at a patch in a hex editor and knowing this will allow you to see what offsets are being written to and with what data.

If it's code you'll need to know what the hex (machine code) values are for any given opcode in the SNES's 65c816 and it wouldn't hurt to have at least a basic knowledge of SNES assembly to understand the routines being modified. Data would be simpler as you can just start manually changing bytes you see being patched in the ROM and see what changes, then through trial and error start understanding how/what is being changed.

Nightcrawler

  • Hero Member
  • *****
  • Posts: 5761
    • View Profile
    • Nightcrawler's Translation Corporation
Re: IPS patches and Hex Editing
« Reply #3 on: January 29, 2015, 06:15:53 pm »
TransCorp - Over 20 years of community dedication.
Dual Orb 2, Wozz, Emerald Dragon, Tenshi No Uta, Glory of Heracles IV SFC/SNES Translations