fagensden / gcmm

Automatically exported from code.google.com/p/gcmm
GNU General Public License v3.0
1 stars 0 forks source link

nmm2gci fails to convert GPZJ01 (Nintendo Puzzle Collection) save #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create save for GPZJ01 with NMM
2. Take GPZJ01 folder with nmm save inside and drag to nmm2gci.exe

What is the expected output? What do you see instead?
I expected a converted GCI, instead it gives me the error:
Failed to open:"âjâôâeâôâhü[âpâYâïâRâîâNâVâçâô"
No such file or directory

However, the file "âjâôâeâôâhü[âpâYâïâRâîâNâVâçâô" does 
exist, and after testing/editing the code, I figured out that the program is 
actually trying to open a file called 
"ƒjƒ“ƒeƒ“ƒh[ƒpƒYƒ‹ƒRƒŒƒNƒVƒ‡ƒ“", which is the 
filename encoded in Windows-1252, instead of CP437.

Of course, the actual filename is supposed to be 
ニンテンドーパズルコレクション encoded in Shift-JIS, but NMM 
saves it using CP437 (âjâôâeâôâhü[âpâYâïâRâîâNâVâçâô).

A similar problem exists in gci2nmm, except it will fully convert and give an 
incorrect filename which NMM won't read 
(ƒjƒ“ƒeƒ“ƒh[ƒpƒYƒ‹ƒRƒŒƒNƒVƒ‡ƒ“).  Renaming it fixes 
the issue.

I attached a modified version of nmm2gci and gci2nmm which fixes the issue by 
checking for the gameName GPZJ, and giving the appropriate filename based on 
that.

Original issue reported on code.google.com by moriyama...@gmail.com on 12 Nov 2014 at 2:53

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry I didn't reply when this was issued and I did look into it. I searched 
and searched how to encode the correct filename regardless of operating system, 
but I couldn't find a global solution.

Your patch does indeed work, but it is a workaround for the specific game, and 
I wanted to find a global solution (but I didn't).

Anyway, dios mios has been benched by nintendont, so the nmm format will 
probably have only legacy uses, as I don't think there's anything working under 
dios mios but not under nintendont.

Original comment by sulokuTDCmago@gmail.com on 7 Aug 2015 at 2:50