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

Author Topic: Would like to know how to compile an ips file.  (Read 2863 times)

Ten-X Legacy

  • Jr. Member
  • **
  • Posts: 4
  • Just a high school grad who likes to program.
    • View Profile
Would like to know how to compile an ips file.
« on: August 23, 2017, 02:31:00 am »
I've done some editing to this http://forums.warsworldnews.com/viewtopic.php?t=13526
And I cannot seem to find how to make the files into a patch. I've done a bunch of google searching, but it seems like LunarIPS makes patches by comparing a clean and hacked ROM and spitting out the difference.
Problem is I'm not sure how to apply it in the first place. Figured this would be a good place to ask.

So, simple version.. I would like to know how to either apply the files I have to a ROM, or compile them into an IPS file so that I can patch it.
« Last Edit: August 23, 2017, 02:52:25 am by Ten-X Legacy »
(Insert witty remark here)

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7086
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Would like to know how to compile an ips file.
« Reply #1 on: August 23, 2017, 11:48:28 am »
IPS programs can usually both create and apply patches.
Yes, LunarIPS can apply the patch as well.
"My watch says 30 chickens" Google, 2018

Psyklax

  • Hero Member
  • *****
  • Posts: 1112
    • View Profile
    • Psyklax Translations
Re: Would like to know how to compile an ips file.
« Reply #2 on: August 23, 2017, 12:56:26 pm »
If you have a hacked file and an original, you just tell Lunar IPS which is which and it makes an IPS file. You don't need to apply anything. I don't really understand what's at that link...

Jorpho

  • Hero Member
  • *****
  • Posts: 4758
  • The cat screams with the voice of a man.
    • View Profile
Re: Would like to know how to compile an ips file.
« Reply #3 on: August 23, 2017, 09:59:34 pm »
I have no experience with these things, so someone please correct me if I am wrong:

The title of the thread indicates that it is an ARMIPS module.  It appears that the "ArmIPS Pack" downloads are assembly code intended for use with the ARMIPS Assembler.
https://github.com/Kingcom/armips

The ARMIPS assembler is "for various ARM and MIPS platforms".  ARM and MIPS are two different CPU architectures (like PowerPC or x86) and are not particularly related to "IPS patches".  (I don't know why they decided to write it as "ArmIPS" in that thread.  That just seems to be confusing.)

Opening up "InfiniteCOs11.zip", I find main.asm, which contains the line
Code: [Select]
.open aw2-original.gba, aw2-infinite.gba, 0x08000000
So, I'm guessing you need to download the Win32 version of ARMIPS, rename your Advance Wars 2 ROM to aw2-original.gba, put it in the same folder as main.asm, and then run "armips main.asm" from the command line.  Make sense?

That will produce aw2-infinite.gba, and you can then use Lunar IPS to make an IPS patch by comparing aw2-infinite.gba to aw2-original.gba.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

Ten-X Legacy

  • Jr. Member
  • **
  • Posts: 4
  • Just a high school grad who likes to program.
    • View Profile
Re: Would like to know how to compile an ips file.
« Reply #4 on: August 24, 2017, 08:07:00 pm »
Very much appreciated Jorpho.
It's taken me a few hours of combing through the readme files of ARMIPS, but I'm installing the visual studio tool that is needed to open it.
As long as I can eventually find the command line, I think I'll be golden.
Again, thank you very much.
(Insert witty remark here)

Jorpho

  • Hero Member
  • *****
  • Posts: 4758
  • The cat screams with the voice of a man.
    • View Profile
Re: Would like to know how to compile an ips file.
« Reply #5 on: August 25, 2017, 02:02:25 am »
It's taken me a few hours of combing through the readme files of ARMIPS, but I'm installing the visual studio tool that is needed to open it.
Oh no!  Don't do that!

I said "you need to download the Win32 version of ARMIPS".  There's a link to https://buildbot.orphis.net/armips/ halfway down the page.  Click the first "Download" link to get a .zip file with armips.exe.  No visual studio required.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

Ten-X Legacy

  • Jr. Member
  • **
  • Posts: 4
  • Just a high school grad who likes to program.
    • View Profile
Re: Would like to know how to compile an ips file.
« Reply #6 on: August 26, 2017, 08:52:57 pm »
Welp. Evidently you need visual studio if you want to edit the compiler. Not to use it. Yay.
Anyways, one 4+gb download and a few hours later I finally have myself a .bat file to run the ARMIPS compiler. And now an inside joke with my friends over the last two days has become me screaming "quotation marks!"

Yeeeah.. I've been adding quotation marks to a bunch of things because I'm working on a 3 year old hack. So I've had to manually update it.. Took hours.

Anywho. After hunting down a few typos that the maker of the hack left it with, I finally built it! Aaaand now I have to figure out what is causing the game breaking texture errors.
Could be something I did while updating it and tracking down all the compiler errors. Or it could be some more typos that the original creator left me.
Either way, not all the characters are broken.. So I can compare them to find the problem. Yaaay.
(Insert witty remark here)

Jorpho

  • Hero Member
  • *****
  • Posts: 4758
  • The cat screams with the voice of a man.
    • View Profile
Re: Would like to know how to compile an ips file.
« Reply #7 on: August 27, 2017, 08:40:55 pm »
I finally have myself a .bat file to run the ARMIPS compiler.
There's another example of a similar patch at https://jul.rustedlogic.net/thread.php?id=4920 , which I found by googling for "aw2-original.gba" (with quotes).  The download in the last post even includes armips.exe and a "build.bat".  All it contains in this case is "armips mainphultra.asm".  That's all you need.

I suppose it's possible that ARMIPS may have changed in the time since this Infinite CO hack was released, and that might be the cause of your problems, but if that's the case you can just try an old version of armips.exe dating back to the time of its release, like that one included in that aforementioned download.
« Last Edit: August 28, 2017, 12:56:14 am by Jorpho »
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

Ten-X Legacy

  • Jr. Member
  • **
  • Posts: 4
  • Just a high school grad who likes to program.
    • View Profile
Re: Would like to know how to compile an ips file.
« Reply #8 on: September 03, 2017, 12:41:12 am »
Heh. Nah, thanks though.
I've already got it updated, just took me half a day. The only thing left to do is fix a few graphics bugs. And since I found a few typos in the character text files, I'm assuming these bugs are caused by a typo error that ARMIPS didn't notice.
Again, all I've got to do is compare the broken ones to the rest and it should work. Just gotta find the time, haven't been home much this week.

Thanks again for all your help.

Edit: I added a bit extra to my batch file so that I could read the errors before it closed.
Code: [Select]
@echo off
armips.exe main.asm
pause>nul
Kinda had to. Also, that's another hack by the same guy! I'm pretty sure that most advance wars 2 hacks were made by him. Kinda neat.
« Last Edit: September 03, 2017, 12:48:42 am by Ten-X Legacy »
(Insert witty remark here)