News: 11 March 2016 - Forum Rules

Author Topic: Advanced SNES ROM Utility  (Read 3481 times)

Dom

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Advanced SNES ROM Utility
« on: August 27, 2021, 12:26:47 pm »
This thread can be used to discuss, ask questions, report bugs and make suggestions for improvement for the Advanced SNES ROM Utility :)



Relevant Link

Release date: 2021-08-25
Last modified: 2021-10-08
Current version: 0.9.6

History:
- v0.9.6 [2021-10-08] added BDF and XDELTA patching functionality. Handle LoROM SlowROM the same way as FastROM when expanding to 48 or 64 Mbit and more for improving compatibility (experimental). Note: If you have *.bdiff patch files, please rename them to *.bdf and also rename *.vcdiff to *.xdelta.
- v0.9.5 [2021-10-01] added BPS patching functionality. Support for expanding up to 64 MBit incl. mirroring (not well tested, so call it experimental). Support for expanding BS-X ROMs up to 32 MBit and fixing internal ROM size. Fixed refreshing bug of drop down boxes for selecting country and file sizes for expanding/splitting when a patch affects file size or country code.
- v0.9.1 [2021-09-12] added UPS patching functionality. Supports reversing patches, expanding and truncating to destination file size. Fixed CRC32 calculation for headered ROMs. Cleaned up design.
- v0.9    [2021-08-30] added IPS patching functionality. Supports patches with RLE hunks, expanding and truncating.
- v0.8.3 [2021-08-28] fixed detection of some GSU-2 ROMs, so detection now should work fine for all ROMs. When "Save As" was used, context is now on new file.
- v0.8.2 [2021-08-27] fixed application crash and wrong checksum calculation when loading few ROMs
- v0.8.1 [2021-08-25] intial release

To Do:
- Maybe: some improvements in expanding to 48/64 MBit (if neccessary)

Have fun  ;)
« Last Edit: October 08, 2021, 01:35:05 pm by Dom »

Ice Man

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #1 on: August 27, 2021, 01:40:38 pm »
Nice to see you're still working on it. :D

Dom

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #2 on: August 27, 2021, 02:11:09 pm »
Greetings  :happy:
Sure, after a quiet long time of silence, I decided to clean things up a little and make a redesign of code ::)
But I just found out there're still some minor corrections needed till it works flawless like the old one.
Had a problem detecting some GSU-2 ROMs. I guess I messed up the sequnce things get loaded.
So after fortune smiles at v0.8.2 there will soon be a v0.8.3  :laugh:

August 28, 2021, 05:48:56 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Update submitted!  8)

Please let me know if you like the new "Save As" behaviour or if you prefer staying in context with the originally opened file.

August 30, 2021, 12:31:41 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Submitted new version 0.9 with IPS patching  8)
« Last Edit: August 30, 2021, 12:31:41 pm by Dom »

the_E_y_Es

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #3 on: September 07, 2021, 06:55:52 pm »
Hi there. Can I use this to redefine the RAM range of a given rom? In the past I used LunarExpand to increase rom filesize, but when loading the expanded rom in the debugger, I found that none of that extra space was actually there in the RAM. I've been told it is necessary to change the rom's manifest, or something. Do you think that could be added as a feature to this utility?

Dom

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #4 on: September 08, 2021, 01:52:42 pm »
Hi!

Well, I'm not quite sure about that, but I guess the ROM header only stores information about the (S)RAM size.
Afaik there're also no banks for mirroring data. ROM is ROM and (S)RAM is (S)RAM, that's it!
There're even some games like Star Fox, without any information about (S)RAM, so this value doesn't seem to really matter.

You can change it in the header, but there're some special cases you can't (Star Fox), so it's better not to do that.
Easiest way, if you want to change it anyway, is to take a Hex Editor and change it manually.

SRAM: In LoROM go to offset 0x7FD8 in HiROM go to 0xFFD8
RAM: Only if new header was used (when HiROM 0x7FDA / LoROM 0xFFDA is 0x33) go to offset 0x7FBD in LoROM or 0xFFBD in HiROM

and change as followed:

0x00 = No RAM
0x01 = 16Kbit (2KB)
0x02 = 32Kbit (4KB)
0x03 = 64Kbit (8KB)
0x04 = 128Kbit (16KB)
0x05 = 256Kbit (32KB)
0x06 = 512Kbit (64KB)

Anyway, expanding is for fitting your ROM virtually to the physical size of an (E)EPROM/FlashROM for burning, if you want to make a repro cart or add some extra data if you're running out of free space within your ROM hacking project. This has nothing to do with (S)RAM  ;)
« Last Edit: September 11, 2021, 11:21:53 am by Dom »

the_E_y_Es

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #5 on: September 11, 2021, 07:07:58 am »
So expanding is only for the purposes of retro cartridges?

What if I want to add extra data/code to a ROM, but there is not enough free space? What should I do, then?

Dom

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #6 on: September 11, 2021, 11:08:33 am »
At least, it has nothing to do with (S)RAM expanding  ;D
Sure, if you want to add some extra data for your ROM hacking project, expanding is also useful for handling this, of course  :happy:
Just expand your ROM and do some pointer things  ;)

Edit: I updated my last post to clarify this matter.
« Last Edit: September 11, 2021, 11:24:16 am by Dom »

the_E_y_Es

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #7 on: September 11, 2021, 05:47:07 pm »
I see. Thanks for the explanation.  :)

PowerPanda

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #8 on: September 15, 2021, 09:03:39 pm »
It would be lovely if this could apply a patch +/- 200 bytes, in case you want to apply a headered patch to a non-headered rom, or vice versa.

And if we're wishing for the moon, the ability to repair checksums and change a rom's internal name would mean that I could retire a couple of other finnicky programs.

Thanks for seeking out feedback.

Dom

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #9 on: September 16, 2021, 10:09:32 am »
First of all, thanks for leaving some feedback  :thumbsup:

Regarding to your question about adding/removing header in patches:
That's what you already can do by clicking on the button "Add Header" or "Remove Header" before applying a patch  ;)
Just read the description of the patch and stick to it. I don't think it's a patchers' job to manipulate a patches' offsets.
It also heavily depends on the format of the patch. IPS isn't even capable to verify the ROM it's applied to  :cookie:
UPS however can, but it just can tell if the ROM is the right one or not, that's it...

"...the ability to repair checksums and change a rom's internal name would mean that I could retire a couple of other finnicky programs."
Just do it  :beer:
You can even change names written in Kanji letters. I also spent a lot of time doing research for fixing checksums, so it should even be able to fix the problematic ones  ;)
« Last Edit: September 16, 2021, 10:39:33 am by Dom »

mziab

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • mteam
Re: Advanced SNES ROM Utility
« Reply #10 on: September 20, 2021, 03:46:17 am »
It would be lovely if this could apply a patch +/- 200 bytes, in case you want to apply a headered patch to a non-headered rom, or vice versa.

A bit off-topic, but if you're okay with using something web-based, Rom Patcher JS has this exact feature. It can add a temporary header or chop it off before applying the patch. As a bonus, it handles compressed files, too.
« Last Edit: September 20, 2021, 05:04:33 am by mziab »

Dom

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #11 on: September 20, 2021, 06:04:01 am »
I don't really get the benefit of your suggested web based tool  :huh:
It's still in the user's responsibilty to add or remove a header before applying a patch.
I guess @PowerPanda was looking for something like an automatic detection and correction.

mziab

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • mteam
Re: Advanced SNES ROM Utility
« Reply #12 on: September 20, 2021, 06:49:58 am »
I don't really get the benefit of your suggested web based tool  :huh:
It's still in the user's responsibilty to add or remove a header before applying a patch.
I guess @PowerPanda was looking for something like an automatic detection and correction.

Well, for one thing, it detects whether a header is present (if it's a SNES rom) and presents the user with an appropriate checkbox to add/remove it, which takes away at least some opportunities for the less savvy to shoot themselves in the foot. Plus, doing it in one go while patching instead of a separate step seems like better usability to me.

PowerPanda didn't mention anything about it being automatic. That would be cool, but reliably detecting whether the actual patch needs a headered rom or not is another story, as I'm sure you're aware. Having a checkbox to add/remove the header and having the user fiddle with it at their own discretion until the patch works for them is probably the next best thing.
« Last Edit: September 20, 2021, 07:21:54 am by mziab »

Dom

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #13 on: September 20, 2021, 07:47:32 am »
Well, for one thing, it detects whether a header is present (if it's a SNES rom) and presents the user with an appropriate checkbox to add/remove it, which takes away at least some opportunities for the less savvy to shoot themselves in the foot. Plus, doing it in one go while patching instead of a separate step seems like better usability to me.

That's exactly what this tool also does...
Just give it a try  ;)

Load ROM, click remove or add header, than apply a patch, very easy.
Should be even the same amount of clicks needed  :happy:

That would be cool, but reliably detecting whether the actual patch needs a headered rom or not is another story, as I'm sure you're aware.

I totally agree in this point! Would be super cool, but at least for IPS, is impossible to do.
Maybe patching formats like UPS/BPS, containing input/output file validation, might be used for handling this, but that's another story (as you've already told :D )

Cheers  :beer:

mziab

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • mteam
Re: Advanced SNES ROM Utility
« Reply #14 on: September 20, 2021, 08:24:25 am »
I admit I haven't actually tried your utility, since I'm on Linux. Glad to see we're on the same page after all. The wording of the original feature request made it seem like this wasn't supported.

Dom

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #15 on: October 02, 2021, 11:09:03 am »
Update!

See information in first post :)

MysticLord

  • Full Member
  • ***
  • Posts: 208
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #16 on: October 02, 2021, 04:44:47 pm »
What other patch formats exist for the SNES?

Brutapode89

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #17 on: October 02, 2021, 05:56:56 pm »
Must I use Advanced SNES ROM Utility to make more text in french in SNES RPG like Final Fantasy?

Dom

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #18 on: October 03, 2021, 09:09:44 am »
What other patch formats exist for the SNES?

I don't know exactly, but I guess IPS, UPS and BPS are the most common ones used for SNES.

Must I use Advanced SNES ROM Utility to make more text in french in SNES RPG like Final Fantasy?

Feel free to use it for expanding, if you run out of space :)

Brutapode89

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
Re: Advanced SNES ROM Utility
« Reply #19 on: October 04, 2021, 06:38:48 pm »
O.K., Dom. Will not be there glitches if the ROM Final Fantasy IV - Easy Type (J) is into 8,00 Mo?
« Last Edit: October 04, 2021, 06:48:38 pm by Brutapode89 »