Author Topic: FF9 Memory card checksum  (Read 8960 times)

ffgriever

  • *
  • Posts: 74
    • View Profile
FF9 Memory card checksum
« on: 2002-08-24 09:38:19 »
Was just wondering... Does anyone know how the checksum for FF9 savegame on psx memory card is created?

[EDIT:] Tried to figure it out by disassembling, but got stuck on it (I'm not good at this kind of stuff  :weep: )

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
FF9 Memory card checksum
« Reply #1 on: 2002-08-24 10:52:13 »
I'm not sure if this will help you, but you could take a look at this:

http://psxmemtool.ngemu.com/

Here's a tool which can recalculate the checksum of PSX memcards. However, I haven't tried it out yet. I'm currently trying to recalculate the checksum of Dino Crisis 2 memcards, so ...

Well, good luck!

 - Alhexx

 - edit -
... or take a look at Zophar's Domain:
http://www.zophar.net

 - edit 2 -
Yupp, I found something interesting on Zophar's Domain:
http://www.zophar.net/tech/psx.html

Download the description in any desired format and goto section 10. Memory Cards -> there's VERY exact information'bout the complete memory card format including checksum calc...

ffgriever

  • *
  • Posts: 74
    • View Profile
FF9 Memory card checksum
« Reply #2 on: 2002-08-24 13:54:07 »
THX. I think it will be helpfull...

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
FF9 Memory card checksum
« Reply #3 on: 2002-08-24 18:49:04 »
Erm .. yes. But there's one problem I recognized when I read that doc:
The Checksums in the description are just the ones used in the headers, not the ones used by the game itself... so you will have to search for the checksums yourself :(

However, I've been able to find all checksums used by Dino Crisis 2 today. There were 2 checksums stored in the data, both additional algorithms.

Here's how I found the checksums:
1. Load a Save in FF9.
2. Let some seconds pass.
3. Save game to another slot.
4. repeat step 2 and 3 some times.

Then you will have to open the memcard in a hex editor and compare the blocks. Somewhere the time will be saved. And you will see that some values in the block have chnaged: the time value, the checksums and some other values... now it's a bit tricky to find out which value stores what ... but that's what makes hacking so interesting :D

Good Luck!

 - Alhexx

ffgriever

  • *
  • Posts: 74
    • View Profile
FF9 Memory card checksum
« Reply #4 on: 2002-08-25 00:24:30 »
Thanks for help. It seems ff9 has one checksum, and it seems to be calculated the same way the ff7 chksum was. I will try it tommorow, now it's a bit late...

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
PSX documentation
« Reply #5 on: 2002-08-26 18:20:00 »
I just wanted to say that I was the one who wrote the PSX documentation on Zophar's page

-halkun
AKA
Joshua Walker

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
FF9 Memory card checksum
« Reply #6 on: 2002-08-26 18:24:58 »
Really??? Hm ... well, so if it's true, I can credit "halkun" in my Dino Crisis 2 Memory Card Editor, right? Well, havin' a look at your Webiste, yes, there is the doc... so: The doc is a great job!

 - Alhexx

smallion

  • Guest
FF9 Memory card checksum
« Reply #7 on: 2002-09-03 08:45:50 »
Hi,
I just wanted to say that I am the author of PSXMemTool, and yes, it will only calculate the XOR checksum of the header of a PSX saved game :weep:.
I have found that the data blocks checksum seems to be calculated differently for different games :weep:, but by using PSXMemTool you should get an idea of where the checksum is stored in the data block, by resaving your game over the same memory card slot and comparing what changed since the last save. If your are using an emulator you have to be aware when the emulator actually writes the memory card back to the harddisk, usually this happens when you exit back to the main gui, or sometimes when you quit the emulator completely.

Also, hi to halkun, your documentation has helped me greatly in the development of PSXMemTool, I should credit you in my Readme.txt file  :oops:

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
FF9 Memory card checksum
« Reply #8 on: 2002-09-03 13:30:17 »
Hm ... seems like we can open a PSX Dev Topic here :D

Well, your tipps in finding the offsets via an emulator is fine, however, like I mentioned before, I was able to find the game checksums by simply trying around. I've already decoded over 'bout 50% of Dino Crisis 2's SaveGame format. I can change all important values as EXP, energy, slots and blablabla ... however, the tool for editing the savegames isn't finished yet...

 - Alhexx

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
What exactly did you guys find useful? (and other rants)
« Reply #9 on: 2002-09-08 06:53:33 »
To tell you the truth, I really don't pay my PSX doc much mind anymore. I bearly hang out in the PSXDev channels as I have other hobbies that occupy my time. Every time I meet up with a PSXDev person they aways seem to point and say something like "Oh my god that as *you*" Like I'm famous or something. Sometimes they are amazed simply because of all the information in the doc, other times they wonder why Sony hasn't sued the pants off of me.

To tell you the truth I'm a horrable programmer, and never ever made a single line of code for the PSX.

I however can take apart other's people's code and splatter it all over the wall and see how things really work. My motivaton to revrese FF7 isn't what it used to be. I've migrated to linux and would love more than anything to start a project on porting a reversed FF7 engine. There are however some problems

1) I don't have windows anymore so I can't watch the original code run
2) Linux can't run the Trumotion 2.0 codec for the movies as it's part of DirectPlay. There is a program that can load and execute the TR20 codec (mplayer) but it is very poorly written and I must distibute a hacked version of the *.xa codec driver, which is illigal
3) Like I said, I'm a horrable programmer as well.
4) There is no number 4
5) Linux and C go hand-in hand. I'm not going to knock Pascel or it's OO derivitive, but I simply can't program in anything other than C. I can't even parse pascel.
6) If a port project was even going to start it would require SDL and OpenGL to make it nice and cross-platform and also this is the Linux's eqiviant to DirectX (Though not campatibe)
7) I don't know SDL *or* OpenGL, I use a high-level graphics libary called "Allegro" which is nice cause it's cross-platform, but bad as it's slow as dog poop and has no ability to do accelerated graphics. AllegGL, which is it's hybred of OpenGL is broken.
8) Because of number 3 learning number 7 will be very difficult and I have a day job
9) Running FF7 on wine bombs my X server, not really a programming issue, but you can see what I have to work with.
10) there really isn't a number 10 either, I just wanted to round off the reasons.

Now there can be several ways around this. First use the PSX FF7 data as I am good at ripping apart PSX code, and the PSX versoin of FF7 isn't as rare as the PC version. But the data is packed diffrently.

If anyone wants to put in ther two cents or offer ideas, I'm all ears


Anyway this whole rant was *supposed* be about what you found useful in my PSX doc. I'm probably not going to be updating it. But I've always wonderd what people have done with it. Could they of made something without it? What have you heard people say about it? I guess I'd like to have my ego stroked a little. I've only met about 4 ot 5 people who have found the doc useful. Anyway I must be off to bed.

-halkun

The SaiNt

  • *
  • Posts: 1300
    • View Profile
Re: What exactly did you guys find useful? (and other rants)
« Reply #10 on: 2002-09-08 12:43:56 »
Quote from: halkun
To tell you the truth I'm a horrable programmer, and never ever made a single line of code for the PSX.

You have "horrable" spelling as well.
Sorry, couldn't resist that.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
Re: What exactly did you guys find useful? (and other rants)
« Reply #11 on: 2002-09-08 19:11:31 »
Quote from: halkun
... they aways seem to point and say something like "Oh my god that as *you*" Like I'm famous or something....


I think I know that. I remember someone, I think his/her name was tulkken, calling me a "hacking god" ... hm ... well, it's nice to hear something like that, but ... well, I don't think I've earned it...

 - Alhexx

Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
FF9 Memory card checksum
« Reply #12 on: 2002-09-12 20:49:37 »
Heh, it's something we have to bear with us. If you release something worth using, eventually someone will worship you as a deity  :wink: