Anyone know how PocketNES assigns SRAM and Savestates?

Discussion in 'GBA - Emulation' started by Lemmy Koopa, Jun 9, 2014.

  1. Lemmy Koopa
    OP

    Lemmy Koopa M3 Perfect fanboy

    Member
    347
    279
    Sep 17, 2012
    United States
    Ohio
    I got some hacks of a game that I'd like to have designated/individual SRAM files.

    It's sharing one with another hack and making the saves corrupt, having to play all over again.

    I've read that PocketNES saves by checking if the ROM data is similar in some section of the ROM, but I don't know where. Can anyone help?
     
  2. DanTheManMS

    DanTheManMS aka Ricochet Otter

    Member
    4,330
    107
    Jun 2, 2007
    United States
    Georgia
    Lemmy Koopa likes this.
  3. Lemmy Koopa
    OP

    Lemmy Koopa M3 Perfect fanboy

    Member
    347
    279
    Sep 17, 2012
    United States
    Ohio

    Isn't that if I want to inject SRAM files from hex? Could I use this to create 2 seperate SRAMs?

    I really don't get how PocketNES differentiates between two games. I swore it did a ROM check at a block of data in the game, but I really don't know where and how much.

    Some hacks don't impede on the original game, some do. It's weird.
     
  4. cracker

    cracker Nyah!

    Member
    3,155
    453
    Aug 24, 2005
    United States
    Use Hoe's POCKETNES ROM Builder. In the Tools menu there is an SRAM manager that can save/load NES saves to/from the PocketNES .sav.
     
    Lemmy Koopa likes this.
  5. Lemmy Koopa
    OP

    Lemmy Koopa M3 Perfect fanboy

    Member
    347
    279
    Sep 17, 2012
    United States
    Ohio
    I'll check it out. I'm not sure if it'll work with the recent builds of PocketNES that DWedit made though.

    I still think PocketNES is the best portable NES emulator between DS and Phone NES emulators so I'm always using it.
     
  6. cracker

    cracker Nyah!

    Member
    3,155
    453
    Aug 24, 2005
    United States
    Yeah it is very possible that there are differnt compression routines that he added.
     
  7. Another World

    Another World Emulate the Planet!

    Former Staff
    10,499
    1,673
    Jan 3, 2008
    Colombia
    From Where???
    Lemmy Koopa likes this.
  8. kuwanger

    kuwanger GBAtemp Regular

    Member
    227
    89
    Jul 26, 2006
    How does PocketNES choose SRAM and savestate files? The short and the long of it is, there's no automagical way to differentiate games from each other with PocketNES because of its checksum algorithm that's used to differentiate roms. So, short of getting lucky like CKY-2K did or modifying PocketNES to use something other than the checksum to choose the SRAM/Savestate, you'll have to do something like disassemble the code at one of the offsets used by the checksum algorithm and either replace it with cognate code, reorder the code while retaining its meaning, or hope some of the code is dead and thereby trivially mutable.
     
  9. Lemmy Koopa
    OP

    Lemmy Koopa M3 Perfect fanboy

    Member
    347
    279
    Sep 17, 2012
    United States
    Ohio

    That was me who made that topic as well. Figured I'd ask here too since this is about 100 times more active than PocketHeaven.
     
  10. kuwanger

    kuwanger GBAtemp Regular

    Member
    227
    89
    Jul 26, 2006

    I figured such was likely so, but then as here is 100 times more active than PocketHeaven, it seemed a good idea to redirect everyone else to the "best" answer so far. :) Sorry I couldn't be of more help on the issue, though.
     
  11. Lemmy Koopa
    OP

    Lemmy Koopa M3 Perfect fanboy

    Member
    347
    279
    Sep 17, 2012
    United States
    Ohio
    You've done a lot of help honestly, probably the best answer I've got so far.