Auto ips patching problem with the WIP ZSnes

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

nachch
Rookie
Posts: 31
Joined: Sat Sep 04, 2004 12:17 am

Auto ips patching problem with the WIP ZSnes

Post by nachch »

Hi,
I'm having a problem with auto ips patching with the WIP versions of ZSnes.

Description:
I try to load up the game rom 'Alcahest', and in my saves directory I have the IPS translation patch for this game. I get a failed checksum, garbled screen, and finally (3 secs later) ZSnes crashes. Sometimes It won't crash, but the game itself will play with garbled graphics and gliches.

Notes:
1. My rom is good (goodsnes verified), and it works perfectly if there is no IPS file around. (Albeit, in Japanese)
2. Last official stable version (1.36) has no such problems.
3. I've tried all the WIP versions on Ipher's site (all of 2004), and all display the same problem.
4. Snes9X works fine.
5. Prepatching the rom using an ips utility produced a playable rom.
6. I tried another translation patch for reference: Final Fantasy 4.
This game loaded up with a failed checksum, but no other apparent problems (it plays fine, at least the first 3 minutes, and in English).
7. Both games load with a good checksum on Zsnes 1.36.

Hope someone can shed some light on this issue... does the WIP version have any known problems with the IPS patching?
(I've been using 1.36 for a long time and only recently felt adventurous enough to start using the WIP version)

My Specs: (not that I think it matters)
* Athlon 900
* GeForce 2 64MB / NVidia driver 61.77
* SBLive!
* 256MB RAM
* Win2k/WinXP-Pro-SP2 (Multiboot, tried both)

Thanks!

Nachch

(Nach - This is not a spoof off your name, I've been using this name for years...:wink:).
HalfShadow
Nebulous Bastard
Posts: 57
Joined: Thu Jul 29, 2004 8:56 am
Location: Prince George, BC

Post by HalfShadow »

Supposedly the new wip used a different method to read the roms, so even if they worked properly in previous versions, patched roms show up as having bad checksums. In most cases they'll still work, though. I've only had to hard patch one rom to date.
Spoony
Hazed
Posts: 78
Joined: Wed Jul 28, 2004 2:10 am
Location: Peg city

Post by Spoony »

Patched roms will show up with a bad checksum because patching it modifies the contents of the rom, thusly its checksum won't match.

Why it would work hard patched but not soft patched though, I have no idea.
[url=http://www.alexchiu.com/affiliates/clickthru.cgi?id=spoony]Immortality[/url]
nachch
Rookie
Posts: 31
Joined: Sat Sep 04, 2004 12:17 am

That's not it

Post by nachch »

Spoony wrote:Patched roms will show up with a bad checksum because patching it modifies the contents of the rom, thusly its checksum won't match.

Why it would work hard patched but not soft patched though, I have no idea.
The patch also modifies the checksum so it'll match the new data...
This means that a hard patched rom gives a good checksum.

I thought that reading the rom and the ips and just patching it is a mostly straightforward and simple procedure... is there more than meets the eye to this issue (since it was changed in the WIP, that is)?
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

I know EXACTLY what's going on.
This happened to me some months ago with Alcahest and Front Mission 1.

You have 2 ways to fix it.
1- Use IPSedit. Linkage.
The zip holds ipsedit.exe (dos) and ipsedit (linux).
(I saw that you're using windows, but just in case you'd like to change some day)

It's command line, so you'll have to execute it in a dos command-line window.

Code: Select all

Usage: IPSEDIT [-add | -rem] file.ips
       add will add 512 bytes to each offset.
       rem will remove 512 bytes from each offset.
Now I don't remember clearly if you have to remove or add 512 bytes, so make backups of the patch, remove 512 bytes, test the new patch. If it works, get rid of your backup.
If it doesn't work, add 512 bytes to your backup and that should do it.

2- Use SNEStool. At the bottom of this page. DOS app with a gui, so you can double-click it.
Before IPSedit was here I found a strange way to fix those patches; just backup your ROM, hard patch it with snestool, then make a new ips from the difference. This will make very different patches (for both Alcahest and Front Mission 1) that'll work in soft-patching.
You can then get rid of the hard-patched rom.

I advise you try the first solution, as it's the most stable (the second one is just plain magic).

Meh, I'm stupid. Just use this patch. It's my ips-edited Alcahest patch, working perfectly.
Oh well the rest can be useful I guess.
"Give a fish to a man and it will serve him as food for a day. Teach a man to catch fish and he will make his own living all his life."
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
nachch
Rookie
Posts: 31
Joined: Sat Sep 04, 2004 12:17 am

Thanks, but...

Post by nachch »

Thank you grinvader!

However, what I really don't understand is why this problem exists in the first place.
Is there something non-standard in the way IPS patches are created, so that some application will patch fine while another will patch at a wrong offset?
What is the difference in the patching procedure between Zsnes 1.36 and the WIP?
ThunderClaw
I know where you live.
Posts: 148
Joined: Thu Aug 19, 2004 4:51 am

Re: Thanks, but...

Post by ThunderClaw »

512 bytes is the header data--what it sounds like is that you required a ROM with a header the one you had did not have one (Or vice versa).

I think. I'm guessing.
FireKnight:I'm pretty sure a 1KG 24k gold brick costs less than that.

phonymike: well the same amount of raw metals used in a car costs a fraction of the price of a new car idiot. I'm gonna take away your posting privileges and replace them with my balls on your chin.

I smell spray paint.
nachch
Rookie
Posts: 31
Joined: Sat Sep 04, 2004 12:17 am

Re: Thanks, but...

Post by nachch »

ThunderClaw wrote:512 bytes is the header data--what it sounds like is that you required a ROM with a header the one you had did not have one (Or vice versa).

I think. I'm guessing.
That's not it, my rom size is correct for the patch (right size according to the readme that came with the patch).
Also, as I said before, using Zsnes 1.36 works fine, as is hard patching the rom (patching the rom as it is with the ips as it is using ips.exe).
ThunderClaw
I know where you live.
Posts: 148
Joined: Thu Aug 19, 2004 4:51 am

Re: Thanks, but...

Post by ThunderClaw »

nachch wrote: Also, as I said before, using Zsnes 1.36 works fine, as is hard patching the rom (patching the rom as it is with the ips as it is using ips.exe).
Ahh, missed that part. My mistake.
FireKnight:I'm pretty sure a 1KG 24k gold brick costs less than that.

phonymike: well the same amount of raw metals used in a car costs a fraction of the price of a new car idiot. I'm gonna take away your posting privileges and replace them with my balls on your chin.

I smell spray paint.
Dreamer_Nom
Rookie
Posts: 12
Joined: Sun Sep 05, 2004 1:06 am

Re: Thanks, but...

Post by Dreamer_Nom »

The ZSNES IPS patching routine assumes that the changes are roughly in ascending address order. The final write will generally determine if the image was expanded.

Alcahest has its final address write somewhere in the middle of the image. The image size is incorrectly determined as a side-effect.

When the other programs like SNESTool or nsrt add/subtract headers, I think they re-arrange the writing order, thus correcting the problem.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Thanks for that informative report. I should have a fix soon, but won't get a chance to commit it till the end of the week.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Kagerato
Lurker
Posts: 153
Joined: Mon Aug 09, 2004 1:40 am
Contact:

Post by Kagerato »

Wow, what an obscure bug. If someone hadn't created an unusual IPS file, it might never have been discovered.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Is pretty weird to do that. The reason why it doesn't affect NSRT's IPSEDIT is because I made it build a list of changes, sort them, modify them as neccesary and output as needed. The reason why it doesn't affect SNESTOOL is probably because it doesn't care what the order is, if it does track size changes, it probably just remembers where the last was, something which I'll be doing with ZSNES I guess.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
nachch
Rookie
Posts: 31
Joined: Sat Sep 04, 2004 12:17 am

Great!

Post by nachch »

Nach wrote:Thanks for that informative report. I should have a fix soon, but won't get a chance to commit it till the end of the week.
Glad to see this problem, obscure as it may be, taken care of...

This leaves me with a final question though:
Why does the WIP Zsnes generate a rom with a failed checksum, for other ips patches (not oddly created as Alcahest allegedly is), such as the Final Fantasy 4 translation I talked about in my first post?
As before, hard patching the rom beforehand, or using Zsnes 1.36 generates a working rom in which the checksum is good (since the ips also changes the checksum itself, naturally). Something still feels wrong somehow...
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Re: Great!

Post by Agozer »

nachch wrote:
Nach wrote:Thanks for that informative report. I should have a fix soon, but won't get a chance to commit it till the end of the week.
Glad to see this problem, obscure as it may be, taken care of...

This leaves me with a final question though:
Why does the WIP Zsnes generate a rom with a failed checksum, for other ips patches (not oddly created as Alcahest allegedly is), such as the Final Fantasy 4 translation I talked about in my first post?
As before, hard patching the rom beforehand, or using Zsnes 1.36 generates a working rom in which the checksum is good (since the ips also changes the checksum itself, naturally). Something still feels wrong somehow...
Patchin or altering the contents of the rom image in anyway will result in a bad checksum.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
Noxious Ninja
Dark Wind
Posts: 1271
Joined: Thu Jul 29, 2004 8:58 pm
Location: Texas
Contact:

Post by Noxious Ninja »

That's not what he meant.

He says hard patching or older version of zSNES say the checksum is correct, but the WIP doesn't.
[u][url=http://bash.org/?577451]#577451[/url][/u]
Malcster
Hazed
Posts: 72
Joined: Wed Jul 28, 2004 7:30 pm

Re: Great!

Post by Malcster »

Agozer wrote: Patchin or altering the contents of the rom image in anyway will result in a bad checksum.
Not necessarily, the checksum is stored in the ROM as well so if you know what you're doing you can alter it so it is valid.
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Re: Great!

Post by Agozer »

Malcster wrote:
Agozer wrote: Patchin or altering the contents of the rom image in anyway will result in a bad checksum.
Not necessarily, the checksum is stored in the ROM as well so if you know what you're doing you can alter it so it is valid.
I know, but I think that most peope don't know how or don't bother to alter the checksum.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
joe_devore
Regular
Posts: 267
Joined: Thu Aug 05, 2004 12:07 am
Location: NH, USA
Contact:

Re: Great!

Post by joe_devore »

Agozer wrote:
Malcster wrote:
Agozer wrote: Patchin or altering the contents of the rom image in anyway will result in a bad checksum.
Not necessarily, the checksum is stored in the ROM as well so if you know what you're doing you can alter it so it is valid.
I know, but I think that most peope don't know how or don't bother to alter the checksum.
Acutally, I would Really like to know how to do this.
Alter the checkSum IFF the rom is a Translated or what ever
else, and works FINE.

This would be a perfect feature for the next(or when ever)
Nach's NSRT. :lol: :idea:
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Re: Great!

Post by Agozer »

joe_devore wrote:
Agozer wrote:
Malcster wrote:
Agozer wrote: Patchin or altering the contents of the rom image in anyway will result in a bad checksum.
Not necessarily, the checksum is stored in the ROM as well so if you know what you're doing you can alter it so it is valid.
I know, but I think that most peope don't know how or don't bother to alter the checksum.
Acutally, I would Really like to know how to do this.
Alter the checkSum IFF the rom is a Translated or what ever
else, and works FINE.

This would be a perfect feature for the next(or when ever)
Nach's NSRT. :lol: :idea:
Usually the translated rom works fine after the translation patch has been applied, provided that the original rom image was good. And the translated rom has a bad checksum.

The header issue is a different matter.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
adventure_of_link
Locksmith of Hyrule
Posts: 3634
Joined: Sun Aug 08, 2004 7:49 am
Location: 255.255.255.255
Contact:

Post by adventure_of_link »

Hmm... I got a patching problem also. I'm using the latest WIPs of ZSnes, and I did what it said in Evan's FAQ page for soft patching, and the game isn't patched!!! BTW Snes9X works fine.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Okay, I think I fixed it, I can't exactly test it, so I expect those of you who can compile on your own to test it, and the rest of you can wait for ipher.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
adventure_of_link
Locksmith of Hyrule
Posts: 3634
Joined: Sun Aug 08, 2004 7:49 am
Location: 255.255.255.255
Contact:

Post by adventure_of_link »

I'm using the new WIP (9/07/2004), and unless I'm doing something wrong, I still have a problem soft patching my ROMs.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

adventure_of_link wrote:I'm using the new WIP (9/07/2004), and unless I'm doing something wrong, I still have a problem soft patching my ROMs.
Header problems, right? Not the problem originally reported here, correct?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

So can someone with alcahest tell me if my changes fix the problem?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Post Reply