Results 1 to 10 of 10
  1. #1
    Wearer of Army Boots
    Join Date
    Dec 2001
    Posts
    449

    What do I need to do know about Hex Editing PSX save files?

    I have a little prior knowledge about hex editing PC game files.

    but when I look into PSX save game files (e.g. .mcr) the hex gets translated into nothing but bullshit. I am using Hex Workshop...

    not even a sensible thing can be seen (unlike for PC ones).



    exactly what do I need to know? no bs, please...
    My blog on nanotechnology in medicine! www.possiblysmall.blogspot.com


    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

  2. #2
    EmuTalk Member
    Join Date
    Feb 2002
    Location
    Germany, NRW
    Posts
    22
    All I can say is that ePSXe compresses its savestates, so editing is somewhat impossible except you know the exact algorithm for de/encoding.

    Memory Card Savestates instead are mostly uncompressed and editable, but some games calculate a checksum on thier data, so editing is also somewhat tricky.

    But you should try to search for game specific values (e.g. money, hp) using Motorola Byte ordering
    Last edited by Mirco Muck; September 9th, 2002 at 12:36.
    Specs:
    PIII-900
    nvidia GeForce2 MX
    256 MB SDRAM @ 100MHz
    2 HDD's (40, 48 GB)
    Hauppauge Win/TV PCI

  3. #3
    Moderator Cyberman's Avatar
    Join Date
    Nov 2001
    Posts
    1,824

    Re: What do I need to do know about Hex Editing PSX save files?

    Originally posted by Renegade
    I have a little prior knowledge about hex editing PC game files.

    but when I look into PSX save game files (e.g. .mcr) the hex gets translated into nothing but bullshit. I am using Hex Workshop...

    not even a sensible thing can be seen (unlike for PC ones).

    exactly what do I need to know? no bs, please...
    Umm restrain yourself from ephithets there

    I can give you lots of BS.. but this is in the wrong forum this is more gaming related. However since I am working on game save state plugins (what I finally am making a plugin that is going to be public?!).

    Heres the deal. DON'T try editing the SAVE file as there are several game save editors out there. SOME GAMES HAVE CRC32 checks to be sure you haven't EDITED the game save as well. Final Fantasy 8 and 9 are a few of such games.

    Anyhow here is a link to a currently under development PSX game card editor called PSXMem Tool. I recomend using that instead, it will save you a lot of insanity. The memory cards have a specific format a directory and a ICON for each saved file. What this means is that unless you dig up this information on the net.. you won't be able to do much. I have the information, but since you want to edit games and not play around with the format of the stupid card, just use PSXMem Tool instead.

    My FF8 Game save plugin might be in the next PSXMem Tool though I doubt it.. the author hasn't replied to me about his progress with testing it So .. can't do anything more with it tell he tells me the plugin works with his compilor and DLL library loading system.

    Cyb
    Progress (n.):
    The process through which the Internet has evolved from smart people in front of dumb terminals to dumb people in front of smart terminals.
    -------------------------------------------------------------------
    Recursive (adj):
    see Recursive

  4. #4
    Emutalk Member euphoria's Avatar
    Join Date
    Jan 2002
    Location
    60° 10' N 24° 57' E
    Posts
    308
    I'm making a savestate editor for Chrono Cross and i'm a bit lost in the CRC section. Is there a certain way of calculating it or is there 2^32 ways to do it or at least does Squaresoft do it same way in all their games? If anyone has knowledge of this i'd apreciate the help.
    Besides i haven't found all the necessary values from the file so the CRC isn't needed at the moment.

    PS. I use UltraEdit to look at the .mcr's and it looks ok. Keep in mind if coding a savestate editor that some values are in 7-bit, 9-bit, Xbit to save space. So you can't search changed values byte by byte.

  5. #5
    Wearer of Army Boots
    Join Date
    Dec 2001
    Posts
    449
    i've heard of motorola and intel byte ordering.

    <lightknight>does it haf anyting to do wit programing a 1337 gc emulatore??3?3?3?3</lightknight>

    seriously though, what is it? is it some sort of thing which rearranges data so that it becomes unreadable to the human in a hex editor?
    My blog on nanotechnology in medicine! www.possiblysmall.blogspot.com

  6. #6
    Moderator Cyberman's Avatar
    Join Date
    Nov 2001
    Posts
    1,824
    Originally posted by Renegade
    i've heard of motorola and intel byte ordering.

    <lightknight>does it haf anyting to do wit programing a <a href="glossary.php?&ltr=#">1337</a> gc emulatore??3?3?3?3</lightknight>

    seriously though, what is it? is it some sort of thing which rearranges data so that it becomes unreadable to the human in a hex editor?
    Ummm Motorola = Big Endian Intel = Little endian.
    It's the ordering of the bytes in words longs and long longs
    For example
    Big Endian:
    WORD MSB LSB
    LONG MMSB MLSB LMSB LLSB
    Little Endian:
    WORD LSB MSB
    LONG LLSB LMSB MLSB MMSB

    It's handy for however the data was stored in the Game Save you are dealing with IE money likely would be stored in a LONG but what byte ordering is a good question.

    Originally posted by euphoria
    I'm making a savestate editor for Chrono Cross and i'm a bit lost in the CRC section. Is there a certain way of calculating it or is there 2^32 ways to do it or at least does Squaresoft do it same way in all their games? If anyone has knowledge of this i'd apreciate the help.
    Besides i haven't found all the necessary values from the file so the CRC isn't needed at the moment.
    It depends on the polynomial they used, as for the same way.. doesn't seem that way, they seem to change the polynomial for each game.

    FF8 uses a 16bit CRC with a polynomial of 0x1350 or
    X^12 + X^9 + X^8 + X^6 + X^4. FF9 used a 32 bit CRC.

    The best way to 'break' it is to take a known save state for example At the VERY beginning of Chrono Cross. guess what data is what inside the file then apply polynomials to the data tell you get a match. You have about 2^16 with a 16bit CRC and 2^32 tries with a 32bit CRC.

    Might take an hour or two or over night to do but You'll know for sure. The other problem is what is the CRC calculated on. you have to know what the save state data area the PSX is doing the CRC check on. It would be cool if you could extract the CRC tables from the game itself .. that's the best way to know the CRC calculation to be honest.

    Cyb
    Progress (n.):
    The process through which the Internet has evolved from smart people in front of dumb terminals to dumb people in front of smart terminals.
    -------------------------------------------------------------------
    Recursive (adj):
    see Recursive

  7. #7
    Wearer of Army Boots
    Join Date
    Dec 2001
    Posts
    449
    ah. it looks like i need supreme knowledge of assembly lang to understand this crap
    My blog on nanotechnology in medicine! www.possiblysmall.blogspot.com

  8. #8
    Moderator
    Join Date
    Nov 2001
    Location
    Oulu, Finland
    Posts
    3,271
    /moved



  9. #9
    Moderator Cyberman's Avatar
    Join Date
    Nov 2001
    Posts
    1,824
    Originally posted by Renegade
    ah. it looks like i need supreme knowledge of assembly lang to understand this crap
    Ummm what has that to do with generating CRC'S?
    not really anything.. you don't need to know Assembly language for say the X86 series to Calculate a CRC you only need to know the CRC polynomial and the initial state.

    For FF8 it's relatively simple fortunately. Start State is 0xFFFF and it's a 16bit CRC the polynomial is 0x1021 might be the same they used for Chrono Cross and FF9 even.. GOK FF9 was not nearly as popular as FF7 and FF8 so ... I doubt anyone wanted to hack the saves

    The size of the save data is 0x1350 or 4944 bytes for FF8.
    CRC's are tricky buggers that's all. here is the code I use for doing the CRC calculation in FF8
    Code:
       while ( Length > 0)
       {
          Index = (checksum >> 8) ^ *dataptr;
          Val = (checksum & 0xFF) << 8;
          checksum = CS_TBL[Index];
          checksum ^= Val;
          dataptr++;
          Length--;
       }
       checksum = ~checksum;
    Do you see assembly language instructions in that?

    Cyb
    Progress (n.):
    The process through which the Internet has evolved from smart people in front of dumb terminals to dumb people in front of smart terminals.
    -------------------------------------------------------------------
    Recursive (adj):
    see Recursive

  10. #10
    Emutalk Member euphoria's Avatar
    Join Date
    Jan 2002
    Location
    60° 10' N 24° 57' E
    Posts
    308
    Slougi: ookko nää oulusta?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •