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

Author Topic: RomPatcher.js  (Read 1287 times)

marc_max

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
RomPatcher.js
« 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 :-)


Supported formats:
  • IPS
  • UPS
  • APS (N64)
  • BPS

Features:
  • can patch and create patches
  • shows ROM CRC32, MD5 and SHA-1 before patching
  • easily scalable to other formats
  • made in Vanilla JS
  • extra: Byte Swapper (mostly for N64 ROMs, but also useful for transferring savegames between some emulators and real system)

To-do:
  • APS (GBA) compatible
  • SNES/NES header fixer
« Last Edit: November 03, 2017, 04:54:46 am by marc_max »

aqualung

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: RomPatcher.js
« Reply #1 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...

maseter

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: RomPatcher.js
« Reply #2 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!

andrewclunn

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: RomPatcher.js
« Reply #3 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.

marc_max

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: RomPatcher.js
« Reply #4 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

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.

MagusLOGS

  • Jr. Member
  • **
  • Posts: 37
    • View Profile
    • My Blog
Re: RomPatcher.js
« Reply #5 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.

andrewclunn

  • Full Member
  • ***
  • Posts: 151
    • View Profile
Re: RomPatcher.js
« Reply #6 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.
« Last Edit: July 25, 2017, 09:54:22 am by andrewclunn »

marc_max

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: RomPatcher.js
« Reply #7 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 :-)


marc_max

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: RomPatcher.js
« Reply #9 on: October 10, 2017, 11:32:19 am »
http://en.wikibooks.org/wiki/Super_NES_Programming/SNES_memory_map#The_SNES_header

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.

marc_max

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: RomPatcher.js
« Reply #10 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).

marc_max

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: RomPatcher.js
« Reply #11 on: November 03, 2017, 04:49:26 am »
Added BPS support (apply patch only)!

Chronosplit

  • Hero Member
  • *****
  • Posts: 876
    • View Profile
Re: RomPatcher.js
« Reply #12 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.

qwertymodo

  • RHDN Patreon Supporter!
  • Full Member
  • *****
  • Posts: 162
    • View Profile
Re: RomPatcher.js
« Reply #13 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.

lexluthermiester

  • Sr. Member
  • ****
  • Posts: 491
    • View Profile
Re: RomPatcher.js
« Reply #14 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.

marc_max

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: RomPatcher.js
« Reply #15 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.
« Last Edit: November 12, 2017, 10:36:26 am by marc_max »