News:

11 March 2016 - Forum Rules

Main Menu

How compile .ips source?

Started by darthvaderx, February 11, 2019, 10:44:09 PM

Previous topic - Next topic

darthvaderx

I recently found on the internet the source for a patch to add SRAM save on NES Willow and that came with these instructions:

'### Compiling

* Extract and copy the files and folders where you want to, e.g. C:\WillowPatch
* Place your Willow ROM as WILLOW.NES in the folder
* Add the bin folder to the environment PATH variable
* Run compile.bat from the command line.

This will compile the assembly files in the src folder and generate the following files:

* WILLOW.bin
* WILLOW.LST
* WILLOW.SYM

The WILLOW.bin file will be copied to the build folder AS WILLOW.IPS along with the ROM, and IPS
will patch the ROM using WILLOW.IPS

## Notes

The assembly entry point is Willow.asm. IPS_NES.INC sets up the macros necessary to generate a patch file.

The generated WILLOW.BIN is actually an IPS file that can be applied using your favorite patching application
to a clean iNES-headered Willow ROM'


I tried to follow these instructions but something always goes wrong, In Windows 10 I used vDOS but it did not work and in Windows 7 the following message appears'.ips file not found' appears, what could I be doing wrong?

See my hacks channel including some of my works:

https://www.youtube.com/user/MyWashington2/videos

Jorpho

#1
Well, this is not a standard operation and it is going to depend on the specific details of the patch.  So, it's over here, if anyone else is wondering:
https://github.com/RupertAvery/WillowPatch

So, the problem is that if you just try to download the source from there, Github by default makes everything in the download use LF instead of CR-LF, and X816.exe doesn't like that at all! Unfortunately I am completely unfamiliar with Github and I don't know how you're supposed to get around that.

I don't think I should spread this around and I don't even know if this was generated properly, but here's the IPS I got:
https://file.town/download/46k8fe1fuy3fwqbam7utckyf9

Spoiled are my unnecessary ramblings.
Spoiler
I can't get it to work either.  I can tell you that unless you're running the 32-bit version of Windows 7 (or unless you have "XP Mode"), it's not going to work there either – Windows 7 x64 is just as lacking in MS-DOS mode as Windows 10.

Anyway, in DOSBox, for some reason X816 refuses to recognize the closing quote in
.INCSRC "IPS_NES.INC"

I tried manually cutting-and-patching the contents of the .inc file (and the other .asm files) into willow.asm, but the resulting WILLOW.BIN was zero bytes!

Before I go mashing this into a virtual machine, perhaps someone else would like to chime in?

ETA: Okay, if you replace all the LF in willow.asm with CR-LF, X816 kind of works properly, but it hangs on "pass 1".

ETA2: If you replace only the first LF with CR-LF, the build completes, but WILLOW.BIN is zero bytes again.

ETA3: If you replace all of the LF with CR-LF in each of the files, the thing finally behaves and spits out an 854-byte file.
Spoiler
[close]
[close]
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

darthvaderx

Thank you for your attention and work.
Unfortunately the game resets every time you press start. :(
See my hacks channel including some of my works:

https://www.youtube.com/user/MyWashington2/videos

KingMike

It's beyond the needs of this question, but I'm amazed someone would write a program to generate an IPS rather than just providing an IPS.
Or since IPS is such a simple format, patch the ROM directly. (which is what I did for the one patch I released with a custom patcher)
"My watch says 30 chickens" Google, 2018

Jorpho

Quote from: darthvaderx on February 12, 2019, 10:25:36 AM
Thank you for your attention and work.
Unfortunately the game resets every time you press start. :(
All right, I might have messed up.  That's what I get for trying to mash my head against this so late at night.

I was a little more thorough this time (I did a proper conversion using unix2dos.exe instead of trying to do it manually) and got a different result.  This should work:
https://file.town/download/y8fx0xtymlddxxum7pvc8m0xj
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

darthvaderx

#5
Thank you very much and I'm sorry for the headache I caused you. :laugh:
But the hack now simply WORKS PERFECTLY ...
But contrary to what is said on the original website you must hit the Select + A and then B to save, then it is assumed that this version is prior to the final.

Original website (dead download link): http://endersoft.blogspot.com/search/label/NES

Post from the hack author on the RHDN, where he answers my question but does not give me the .ips file:

http://www.romhacking.net/forum/index.php?topic=5832.msg349493#msg349493

Thanks again... :beer:

(I will not submit it to the RHDN because it depends on the author's will as this is not its final version.)
See my hacks channel including some of my works:

https://www.youtube.com/user/MyWashington2/videos

CountBuggula

Quote from: Jorpho on February 12, 2019, 10:27:53 PM
All right, I might have messed up.  That's what I get for trying to mash my head against this so late at night.

I was a little more thorough this time (I did a proper conversion using unix2dos.exe instead of trying to do it manually) and got a different result.  This should work:
https://file.town/download/y8fx0xtymlddxxum7pvc8m0xj

The download link you posted is no longer active.  Since this isn't getting a proper release (at least not for now) could you please re-post it or send me a link in DM?  Thanks!

Jorpho

Really, what I did was simple enough to duplicate.  You'll need to persuade DOSBox to run the compiler, and you'll need to convert the source files with unix2dos.exe (or some similar program – lots of text editors can do it).

But it looks like I still have the IPS around.
https://file.town/download/g9545vi37xiatyorkxe9notwy (stats code z2kidwodsj9er2bfbby0qgadk )
This signature is an illusion and is a trap devisut by Satan. Go ahead dauntlessly! Make rapid progres!

CoolieCoolster

As the latest download link doesn't work either, and I'm compiling all SRAM hacks I can find into one list, I thought I would link to a compiled version of the IPS file hosted on my wiki that shouldn't go missing any time soon: https://wiki.funkey-project.com/wiki/File:Willow.ips.