Thulinma / ndsplus

Linux support for the EMS NDS Adapter+
GNU General Public License v3.0
23 stars 4 forks source link

Pokemon Platinum 128mb card id CPUE. Will pay and send a copy if help #23

Open huenex opened 8 years ago

huenex commented 8 years ago

$ sudo ./ndsplus --debug 0000: 13 aa 55 aa 55 aa 00 01 ..U.U... NDS Adapter+ firmware version 256 detected. 0000: 50 4f 4b 45 4d 4f 4e 20 50 4c 00 00 43 50 55 45 30 31 00 00 0a 00 00 00 POKEMON PL..CPUE01...... 0018: 00 00 00 00 00 00 01 00 00 40 00 00 00 08 00 02 00 00 00 02 f8 23 10 00 .........@...........#.. 0030: 00 98 40 00 00 00 38 02 00 00 38 02 fc 77 02 00 00 10 43 00 b4 1b 00 00 ..@...8...8..w....C..... 0048: 00 2c 43 00 70 0e 00 00 00 66 10 00 40 0f 00 00 00 00 00 00 00 00 00 00 .,C.p....f..@........... 0060: 57 66 41 00 f8 08 18 08 00 3c 43 00 b8 f8 7e 0d ac 0a 00 02 88 01 38 02 WfA......<C...~.......8. 0078: 00 00 00 00 00 00 00 00 3c 30 3c 06 00 40 00 00 a0 4b 00 00 00 00 00 00 ........<0<..@...K...... 0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........................ 00a8: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........................ 00c0: 24 ff ae 51 69 9a a2 21 3d 84 82 0a 84 e4 09 ad 11 24 8b 98 c0 81 7f 21 $..Qi..!=........$.....! 00d8: a3 52 be 19 93 09 ce 20 10 46 4a 4a f8 27 31 ec 58 c7 e8 33 82 e3 ce bf .R..... .FJJ.'1.X..3.... 00f0: 85 f4 df 94 ce 4b 09 c1 94 56 8a c0 13 72 a7 fc 9f 84 4d 73 a3 ca 9a 61 .....K...V...r....Ms...a 0108: 58 97 a3 27 fc 03 98 76 23 1d c7 61 03 04 ae 56 bf 38 84 00 40 a7 0e fd X..'...v#..a...V.8..@... 0120: ff 52 fe 03 6f 95 30 f1 97 fb c0 85 60 d6 80 25 a9 63 be 03 01 4e 38 e2 .R..o.0.....`..%.c...N8. 0138: f9 a2 34 ff bb 3e 03 44 78 00 90 cb 88 11 3a 94 65 c0 7c 63 87 f0 3c af ..4..>.Dx.....:.e.|c..<. 0150: d6 25 e4 8b 38 0a ac 72 21 d4 f8 07 56 cf 53 51 00 00 00 00 00 00 00 00 .%..8..r!...V.SQ........ 0168: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........................ 0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........................ 0198: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........................ 01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 ...............@........ 01c8: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........................ 01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........................ 01f8: 00 00 00 00 00 00 00 00 ........ Card title: POKEMON PL Card ID: CPUE Card size: 128 MiB

huenex commented 8 years ago

e-mail me if you are able and interested in helping

Thulinma commented 8 years ago

What is the problem exactly? It won't read the card? Write? Both? Any error messages when you make an attempt?

huenex commented 8 years ago

exactly. cant read, and displays text saying it cant read the card. its a copy i bought from china, but if i can get someone to help me get these cards read i'll be down to give a card for testing+cash for helping

Thulinma commented 8 years ago

Could you post the exact error message it's giving you? There's like... a dozen or so possible errors, so it matters what the exact text is.

Thulinma commented 8 years ago

Okay, actually, strike that, using the hexdumps from your first post, I've deducted you probably got the message "It looks like you got a card that I don't know how to handle. Please run me with --debug and post the output as an issue on github - thanks!".

Could you try commenting out lines 372-374, recompiling, and then trying with: ndsplus --size 524288 --backup test.sav With some luck, that should get it working. If so, let me know and I'll update the code to allow for this in a more general way without needing to edit the code.

huenex commented 8 years ago

sure ill try that right now thanks

huenex commented 8 years ago

$ ./ndsplus --size 524288 --backup test.sav NDS Adapter+ firmware version 256 detected. Card title: POKEMON PL Card ID: CPUE Card size: 128 MiB It looks like you got a card that I don't know how to handle. Please run me with --debug and post the output as an issue on github - thanks!

Again, I'd like to say that this is a chinese replica card that i plan on using for pokemon storage

Thulinma commented 8 years ago

Looks like you forgot to comment out lines 372-374.

huenex commented 8 years ago

haha i just forgot to re make

huenex commented 8 years ago

oh, i guess i actually need editing/converting help. when i open the sav with sav editors, they're showing all values as really high numbers and stuff.. damn. you got a paypal email?

Thulinma commented 8 years ago

It's still possible something is corrupt because of the card being wrongly detected. Does the savegame look at all reasonable, or is it complete randomness?

And yes, I have a paypal e-mail (jaron@vietors.com), but I mainly do all this as a hobby. So while the thought is appreciated, don't feel like you have to send anything just because I replied to a few messages.

huenex commented 8 years ago

well the native sav is 2048 KiB, but all game sav editors require 512 KiB. the information displayed is all scrambled and random.

Thulinma commented 8 years ago

In that case you might want to try and change the --size parameter to 2097152, and see if that helps. If it still stays scrambled, you might need to override some of the detected offsets (more complicated than merely commenting out a line or two) or possibly update your ndsplus device to a newer firmware.

huenex commented 8 years ago

no, that actually does the same thing. when i restore the file, either overridden or not, if it's 2048, it works perfectly. these sav files, however, do need to be 512KiB so i can edit them.

Thulinma commented 8 years ago

So... am I understanding correctly that the save backups and restores just fine now, but it's not editable? Or is it not actually backing up / restoring and only claiming to do so?

huenex commented 8 years ago

correct. i cannot edit them, but i can backup and restore to 2408 KiB Flash save cards. (ie chinese replicas)

Thulinma commented 8 years ago

Sounds like indeed, you can't do much else at this point. Some kind of encryption, perhaps? Would be odd... It's more likely there's something wrong with reading these chips in the ndsplus, and it just happens to work both ways somehow... But impossible to tell at this point.

huenex commented 8 years ago

well i was able to clone my save file and it works 100%, i think it's just that they made a workaround to make the card work with the anti-piracy checks.

huenex.sav.zip

huenex commented 8 years ago

is there a way to copy the rom with your script?

Thulinma commented 8 years ago

Not as far as I am aware, no. Sorry. The device simply doesn't support reading the ROM chip past the initial header.

huenex commented 8 years ago

oh okay. thanks

sfiera commented 8 years ago

I had the same issue with a Platinum (UK) cartridge and was able to resolve it with the above instructions. I was able to edit the resulting (512KiB) save file with PokeSav under WINE. If you want to compare the debug information with huenex's dump I can provide that.

Thulinma commented 8 years ago

Great - all the more reason to add that new flag to allow overriding those lines in a more general way. I'll see if I can find the time to update sometime soon... No need for another dump, thanks though.