suloku / gcmm

A gamecube/wii memory card manager
GNU General Public License v3.0
255 stars 24 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 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: