marco-calautti / DeltaPatcher

Delta Patcher is a GUI software that is able to create and apply xdelta patches.
GNU General Public License v2.0
265 stars 30 forks source link

Novice here... ASCII issues? #9

Closed Elite-Mercenary-Raven closed 2 years ago

Elite-Mercenary-Raven commented 2 years ago

The error message I got:


wxWidgets Debug Alert

....\src\common\string.cpp(1186): assert "c < 0x80" failed in wxString::FromAscii(): Non-ASCII value passed to FromAscii().

Call stack: (then I got 19 lines of 8 digit combinations) [20] AddClipboardFormatListener
Do you want to stop the program? You can also choose [Cancel] to suppress further warnings.

Yes No Cancel

This is on Win10. Any ideas? This is the first game I've tried patching, and I did an MD5 checksum to confirm the original iso is the right one for the xdelta file. No idea if anyone can help but I thought I might as well ask! TYSM!

marco-calautti commented 2 years ago

Is the file you are trying to patch in a path with special characters? Like accented letters?

Elite-Mercenary-Raven commented 2 years ago

Thanks for the response, Marco!

It's all standard American English lettering. The error pops up when I try and load the xdelta file into the patcher. I just tried renaming both the patch and iso just in case, and that gave me the same error message too.

I'll link the patch I'm trying to get work, if that's helpful. It's for Armored Core: Formula Front International, a later Japanese release of the game that came with extra content... but it has Japanese text in the FMVs even if you chose the English language option that came with the game (pretty awful oversight imo).

The patch came with 2 .xml files, a .sqlite, a .torrent, and the .xdelta file. Maybe there's something I have to do with some of the other files, ihni. I only tried loading up the .xdelta file into the patcher with the original game .iso backup I have.

So... I suspect it didn't work properly, but what I ended up doing was I pressed cancel to force the patcher to stay open despite the error. I started the patch, then a moment later it gave me a message saying that my file was "patched," but I ended up getting a file that was smaller... 610,118 KB compared to the 879,488 KB of my backup iso. I'm wondering if I have an incomplete iso at the moment, because that seems like a big difference to me. The author of the patch said it's only meant to replace the Japanese FMVs with the English versions that came in the older American release of the game, so I'd think they should be very similar file sizes. I have both releases of the game in my collection and from what I could tell the level of video compression seems similar in both.

I actually briefly tested that patched iso in my PSP. It does run, and I was able to load the first FMV that's available in proper English, so I know that one is at least working. Is that good enough to say it's going to be 100% functional?

Sorry about the length of this message, I'm just stuck and not sure what would be helpful to figuring this out.

Patch: https://archive.org/details/armored_core_ffi_english_fmvs_patch

marco-calautti commented 2 years ago

There is indeed a bug in my code. The bug is in the parsing of the patch description. From my research on the xdelta format, it looked like the address of the description length always started at offset 0x05, but in your patch it starts at 0x06, and so everything messes up. I will have a better look to the format, and fix the issue. For the moment, you can patch your iso using xdelta UI: https://www.romhacking.net/utilities/598/

This tool does not parse the patch description and should work without issues.

marco-calautti commented 2 years ago

I think I now understand how the xdelta header works. I will publish a fixed version of the tool in the next couple of days.

Thanks for pointing it out!

Regarding whether the patched iso works: it should. The patching process is made by the xdelta.exe tool itself.

Elite-Mercenary-Raven commented 2 years ago

Thanks for the update Marco! It's going to make my whole week!

I actually found that patcher too when I was trying to get things to work. It gave me another error message. I know it's not yours but it said



xdelta3: unknown secondary compressor ID: XD3_INVALID_INPUT


OK

Maybe that helps somehow?

Thanks again!

-EMR

marco-calautti commented 2 years ago

It seems the authors of the patch used a version of xdelta that is not compatible with the one used by xdelta ui.

marco-calautti commented 2 years ago

Here is the new version that among other things, should also fix the bug you pointed out. https://github.com/marco-calautti/DeltaPatcher/releases/tag/3.0.0

Please let me know if you encouter other issues.

Elite-Mercenary-Raven commented 2 years ago

I just tried to open it and got:

Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.

Then my antivirus got upset and removed it.

marco-calautti commented 2 years ago

I am fed up of all these false positives from antiviruses. I use an exe compressor to make Delta patcher smaller, and this has caused a lot of issues. I will release a new version without compressing the exe. In the meanwhile you can simple disable your antivirus when running Delta patcher.

Elite-Mercenary-Raven commented 2 years ago

haha nw!

marco-calautti commented 2 years ago

I have updated the executable. Now you should not get any flase positive: https://github.com/marco-calautti/DeltaPatcher/releases/tag/3.0.0

Elite-Mercenary-Raven commented 2 years ago

Bad news... and you can probably guess what it is... antivirus again.

marco-calautti commented 2 years ago

Well that's something I cannot control. Simply add an exception to your antivirus or disable it temporarily

Elite-Mercenary-Raven commented 2 years ago

Alright, a little annoying but no worries. Make sure you upload it to RomHacking.net! I bet the community would love to have it there!

Thanks for updating the project! I really appreciate the effort you put in!

-EMR

marco-calautti commented 2 years ago

I have finally included the xdelta3 code directly in Delta Patcher rather than using the original exe. This should finally remove any false positive by anti virus software. Please download the latest release from the release page and let me know.