Romhacking.net

Romhacking => Personal Projects => Topic started by: marc_max on July 22, 2017, 02:11:25 pm

Title: RomPatcher.js
Post by: marc_max on July 22, 2017, 02:11:25 pm
A few years ago I coded a simple IPS patcher in vanilla JS.
I decided to give it a complete overhaul and add compatibility for more formats :-)

http://www.marcrobledo.com/RomPatcher.js/

Supported formats:

Features:

To-do:
Title: Re: RomPatcher.js
Post by: aqualung on July 22, 2017, 02:46:55 pm
Thank you very much for your work! A js based rom patcher is a very useful utility for those who don't want to be changing its operative system in order to run his favorite patching progam (who tend to be Windows exclusive most of the time).

Vanilla.js... Is it some kind of app-oriented development framework such as node.js and the likes? The amount of js based frameworks availale nowadays is overwhelming. I've been thinking in choosing one of them, but there are so many I sometimes don't know which one to start with: angular.js, backbone.js, etc...
Title: Re: RomPatcher.js
Post by: maseter on July 22, 2017, 04:07:24 pm
Great work, just tested on a few files and it works just fine.

It even works offline if you save RomPatcher.js, ips.js and the rest locally.

Hence my request, could you provide a zip file those as a download?

And another, show if the selected rom is headered or not, is that feasible?

This could be even turned into a browser extension!
Title: Re: RomPatcher.js
Post by: andrewclunn on July 22, 2017, 11:35:12 pm
Why not add the ability to add or remove headers as well?

Hence my request, could you provide a zip file those as a download?

It's on github, and you can download a zip of the repo from there.
Title: Re: RomPatcher.js
Post by: marc_max on July 23, 2017, 06:50:52 am
Added APS (N64) format support :-)

Vanilla.js... Is it some kind of app-oriented development framework such as node.js and the likes? The amount of js based frameworks availale nowadays is overwhelming. I've been thinking in choosing one of them, but there are so many I sometimes don't know which one to start with: angular.js, backbone.js, etc...
Vanilla JS is plain JS, no frameworks are involved ;-)

Hence my request, could you provide a zip file those as a download?

And another, show if the selected rom is headered or not, is that feasible?
You can download it in its GitHub repo (https://github.com/marcrobledo/RomPatcher.js/releases)

And yes, it's feasible. See below.

Why not add the ability to add or remove headers as well?
Sure! Which are the most common systems that usually need header edits?
It's been like 20 years since I edited SNES headers lol.
Title: Re: RomPatcher.js
Post by: MagusLOGS on July 23, 2017, 08:26:40 am
This is great. It would be a big step up for ROMHacking.net if this feature would be implemented into the ROM Hack Database. Patching ROMs directly on any device via Browser would make ROMHacking more accessible.

Browse and select a Patch from the ROMHacking Database, choose the file to patch on your HDD. CRC Check if needed and Captcha before patching to make sure the Servers won't be overloaded and done. It can't get easier and faster than this.
Title: Re: RomPatcher.js
Post by: andrewclunn on July 23, 2017, 09:56:48 am
Sure! Which are the most common systems that usually need header edits?
It's been like 20 years since I edited SNES headers lol.

SNES and NES iheaders are the two that stick out to me.

Other features to potentially add would be a direct hex editor tab, and game genie code to hex conversion (which of course would vary by system) to enable easily making game genie codes permanent within a rom.  Of course these are all just nice to haves, but this is so well done and under active development that I figure I might as well give you a few ideas.  Worthy of a donation (which I will make when not on my phone).

July 25, 2017, 09:54:22 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Sorry for the delay there.
Title: Re: RomPatcher.js
Post by: marc_max on July 26, 2017, 08:11:10 am
I can add support for NES and SNES header editing if it's useful. Are they documented somewhere?


I'm also preparing support for APS (GBA). Anyone can post a link to an APS patch so I can test it? I'm confused because there are two different APS.

BTW, thanks for your donation :-)
Title: Re: RomPatcher.js
Post by: andrewclunn on July 26, 2017, 03:45:29 pm
http://en.wikibooks.org/wiki/Super_NES_Programming/SNES_memory_map#The_SNES_header (http://en.wikibooks.org/wiki/Super_NES_Programming/SNES_memory_map#The_SNES_header)

http://wiki.nesdev.com/w/index.php/INES (http://wiki.nesdev.com/w/index.php/INES)
Title: Re: RomPatcher.js
Post by: marc_max on October 10, 2017, 11:32:19 am
http://en.wikibooks.org/wiki/Super_NES_Programming/SNES_memory_map#The_SNES_header (http://en.wikibooks.org/wiki/Super_NES_Programming/SNES_memory_map#The_SNES_header)

http://wiki.nesdev.com/w/index.php/INES (http://wiki.nesdev.com/w/index.php/INES)
Sorry for the late answer! And thank you for your support :-)

So... I've been thinking on adding a SMC header solution. I have two ideas:
* a warning when trying to patch a SMC headered ROM, asking if the header will be removed before patching
* a 'header' tab which would allow to remove/add headers from any platform

The second option would be ideal, but also very time consuming, and I have literally no free time now :-(
The first option is very easy to implement.
Title: Re: RomPatcher.js
Post by: marc_max on October 22, 2017, 06:38:30 am
The patcher has been updated. A needed bugfix in IPS patching now lets you patch ROMs that will end bigger than they were (like the recent Super Mario Land 2 DX demo patch).
Title: Re: RomPatcher.js
Post by: marc_max on November 03, 2017, 04:49:26 am
Added BPS support (apply patch only)!
Title: Re: RomPatcher.js
Post by: Chronosplit on November 03, 2017, 10:26:49 am
Biiiig thank you for this!  I've been looking for something that can create ips patches on mobile for a while now.
Title: Re: RomPatcher.js
Post by: qwertymodo on November 03, 2017, 02:21:03 pm
Sorry for the late answer! And thank you for your support :-)

So... I've been thinking on adding a SMC header solution. I have two ideas:
* a warning when trying to patch a SMC headered ROM, asking if the header will be removed before patching
* a 'header' tab which would allow to remove/add headers from any platform

The second option would be ideal, but also very time consuming, and I have literally no free time now :-(
The first option is very easy to implement.

For BPS at least, you always remove the copier header.  It's part of the patch spec.
Title: Re: RomPatcher.js
Post by: lexluthermiester on November 03, 2017, 05:41:31 pm
Marc,
You should submit this in the utilities section of the site. This is seeming high quality enough to have an official entry. Just a thought.
Title: Re: RomPatcher.js
Post by: marc_max on November 10, 2017, 04:54:01 am
I hope to upload the new update tomorrow, which adds SNES header removal option before patching.

November 12, 2017, 10:36:26 am - (Auto Merged - Double Posts are not allowed before 7 days.)
I hope to upload the new update tomorrow, which adds SNES header removal option before patching.
It's up now!
Marc,
You should submit this in the utilities section of the site. This is seeming high quality enough to have an official entry. Just a thought.
Thank you! It might be the moment now that it has BPS support at last.
Title: Re: RomPatcher.js
Post by: marc_max on April 25, 2018, 01:32:25 pm
A new feature was added yesterday!
Now it can add a temporary SNES header when applying a patch to an unheadered ROM.
This fixes lots of old patches like this one (https://www.romhacking.net/translations/621/) when trying to patch a clean ROM from no-intro set.

May 01, 2018, 12:22:31 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
A new update!
The UI has been completely revamped from scratch.
Title: Re: RomPatcher.js
Post by: marc_max on April 18, 2019, 06:32:49 am
Updated!

* added RUP, PPF and xdelta support
* added BPS, RUP and PPF patch creation
* huge performance boost
* able to apply patches directly from server
* localization: spanish and catalan

Yes, you've read right. It can now download patches from server and apply directly to the ROM (see index.html code to see how magic can be done, it should be quite self-explanatory). You can even specify input ROM checksums, allowing validation in old format like IPS.
This will be handy for those who want to build their own patchers in their project websites (you can even customize them with CSS). And also, it could be implemented here in RHDN, allowing users to patch their ROMs without downloading them.
Title: Re: RomPatcher.js
Post by: Psyklax on April 18, 2019, 06:43:02 am
You know, this could be a really good tool for novice users. We get so many people coming who don't seem to get the idea of patching and what they have to do. If they could just click on a button on the site which opens a dialogue box where they select their ROM file and it saves a patched version using the one in the database... that would be excellent (assuming that's what it does). It'd be useful for most of us, actually, but especially newbies, since it'd be hard to mess it up. :) Great job!
Title: Re: RomPatcher.js
Post by: maseter on April 18, 2019, 11:39:59 am
I liked the other logo better, because it doesn't take up half the screen:
(https://i.imgur.com/XOoMH1x.png)
Title: Re: RomPatcher.js
Post by: marc_max on April 19, 2019, 02:53:13 am
You know, this could be a really good tool for novice users. We get so many people coming who don't seem to get the idea of patching and what they have to do. If they could just click on a button on the site which opens a dialogue box where they select their ROM file and it saves a patched version using the one in the database... that would be excellent (assuming that's what it does). It'd be useful for most of us, actually, but especially newbies, since it'd be hard to mess it up. :) Great job!
Integration into RHDN should be easy, the only big change they need to do is to upload patches uncompressed. Even I could get zipped patches working with a library like this one (https://gildas-lormeau.github.io/zip.js/) if there is enough interest.
Then a small change in my Rom Patcher JS would do the rest.

I liked the other logo better, because it doesn't take up half the screen:
(https://i.imgur.com/XOoMH1x.png)
Thank you for your feedback.
Can you post a screenshot of how it looks for you?
The logo takes up half the screen intentionally purely for aesthetic purposes. The apply/create window was already very small in first versions, so I wanted to fill up the rest of empty space and make it look like a modern app.
Title: Re: RomPatcher.js
Post by: Special on April 19, 2019, 09:35:52 am
Half the screen? This is what I'm seeing it's not even close to half the screen...

https://i.imgur.com/ZjqD68Q.png
Title: Re: RomPatcher.js
Post by: marc_max on May 22, 2019, 01:37:11 pm
Zipped ROMs and patches support is coming!
Can't promise an estimated date, though.

I'll try to work together with RHDN during this summer, so we can get the patcher implemented in the site and users will only need to drag and drop their ROMs in order to patch them!
Title: Re: RomPatcher.js
Post by: marc_max on June 01, 2019, 01:57:39 am
And zip support was added at last!