Yugioh replays and stuff that goes in the 190 blocks

Discussion in 'NDS - ROM Hacking and Translations' started by Stuff7, Apr 5, 2011.

  1. Stuff7
    OP

    Newcomer Stuff7 Newbie

    Joined:
    Dec 3, 2010
    Messages:
    7
    Location:
    the Void
    Country:
    United States
    Warning: Spoilers inside!

    I guess this is a good place to put this since pokesav is stickied here.

    I was hoping to find a solution already, but it sounds like people don't play yugioh. >.<
    So Yugioh 2011 has a whooping 190 blocks for you to save replays, your own duel puzzles, and of course dlc(including forbidden lists, ghost data,...and stuff). So I saved a few replays, and I'm out of space. wut? delete "unnecessary data"?! '>.>

    So no. There has to be a way to extract the data from those 190 blocks to some file, and somehow inject it back in.

    So I opened the save file with a hex editor. The picture above is a snapshot I took. It caught the most interesting part anyway. I assume this is the 190 blocks(not just the snapshot). The file starts off with some nonsense(just a few lines) and then some 00s. And then the snapshot. The snapshot explains what I think everything is, because it almost looks obvious. After that replay, it was more 00s, and then the next replay. And it went on like that for all the rest of the replays. Replays is all I had, so I didn't see what anything else looks like.

    But then after the last replay, there were some more 00s and then [512KB-190ish blocks] worth of nonsense, which is most likely game save data. Everything from your name to your decks to your appearance/where you at/what you've done/how many times..etc. So I don't think any of that needs to get looked at. Just the beginning.

    So the intention was to make a import/exporter(should be some simple code), but I have no idea how to handle hex. >.<

    I should try shifting some data in the hex editor first. Guess I'll do that later and report what happened. I'm just scared of those 00s. idk if I should keep the first set of 00s or the second set or both.

    Feedback is appreciated. [​IMG]
     
  2. TehSkull

    Member TehSkull Living the life

    Joined:
    Nov 29, 2009
    Messages:
    2,700
    Location:
    Louisiana
    Country:
    United States
    A good one to try would be to back up a game save, create a new replay, then compare the 2 saves.
     
  3. Stuff7
    OP

    Newcomer Stuff7 Newbie

    Joined:
    Dec 3, 2010
    Messages:
    7
    Location:
    the Void
    Country:
    United States
    ^I just did that and for some reason my newest replay is in listed first. Probably because I deleted the first replay to save this one. BUT, in game this replay is listed last. So common sense doesn't apply here. >..>

    Also, some replays don't show my name twice like that first one. Weird stuff.
     
  4. TehSkull

    Member TehSkull Living the life

    Joined:
    Nov 29, 2009
    Messages:
    2,700
    Location:
    Louisiana
    Country:
    United States
    No no no. Try this, make a new save, play around a bit, then back up the save. After that, you play a game and save the replay. Compare the saves. (In this scenario, the only differences would be the replay, and some various integers like DP and win/loss count)
    Another good one: Take any save, back it up, add a deck, and compare the saves.

    I'd help you out with this, but my older sister is borrowing my AK2i. :/
     
  5. Stuff7
    OP

    Newcomer Stuff7 Newbie

    Joined:
    Dec 3, 2010
    Messages:
    7
    Location:
    the Void
    Country:
    United States
    Sorry for taking so long to respond. I didn't have too much time, and I'm also playing through the game at the same time. XD

    Well here it is. I made a new save, saved a replay, deleted the replay, used the saved replay backup to save another replay, and now I'm about to save a replay in the deleted replay backup just to see what happens. That's 4 backups I have atm + my original.

    So at 00000C80, all the FF's end. You have 00s up to 00000CDEF. And to my surprise, the new save had some weird data from 00000CE0-00008000ish. I really don't know exactly where the 190 blocks end. I was trying to compare it to my real backup, But there's some weird tag duel info there and I don't remember if I saved a replay for that first tag duel. Back to the weird data, I was expecting to see 00s all the way to the end. There's weird gibberish, as if there was something saved there. But this little bit made me giggle a little. Like, wth is that? XD

    So in the 1st replay backup, I see that it starts at either 00000CE0 or 00000D00. I think ..D00 is more likely because CE0 and CF0 are identical to before the replay. And the replay probably ends at 197F. This might be why swapping replays didn't work before. There's a few lines of 00s and then there's "8E 3C DB 93" at the end of them. And then the rest of the lines after that seem to be unchanged.

    The 2nd replay starts at 1980, or more precisely, immediately after the end of the 1st replay. and it starts off similar to D00, which eliminates any chance of CE0-CFF being part of the 1st replay. Maybe. Anyway, this duel was short compared to the first one, so it ends at 21FF
    . But this one has "ED 5C F3 57" o.O? Followed by unchanged data. This is where that snapshot was at, so you see whatever was left there. lol ////

    But even more interesting is when I deleted the 1st replay. This is going back to before the 2nd replay. Instead of deleting/corrupting the data, the data is still there. With the addition of a "01" at 1981 and 00s up to 1B70. That line is 00s and ends with "2F 78 57 54" or /xWT in ascii. Notice the distance between 197C and 1B7C. Thats 200 in hex and...512 in decimal \o/. Coincidence? Eh, maybe.

    So now I want to see what'll happen if I save a new replay over the deleted one. I'll try to save a quick duel so I could see what's left after that replay ends. And now I also wonder if deleted replays will always have /xWT 32 bytes(I think) away. And later I'll check what dlc and duel puzzles looks like. Also, up to C70, it's not just FFs. There's a few areas with other data, but for the most part, it's FFs. I don't think I have to touch that anyway.

    ---------------------------
    EDIT:

    So idk where this terrible inaccuracy came from. I was just now trying to swap the replays around, and it wouldn't work. I'd end up with 190 free blocks. So I thought maybe the last line has some meaning, or maybe even the first line. The last line because it's after quite a few 00s and they were different for both replays, and the first line because these were also different, but the next line was "01 01" Stuff(In hex) for both replays. And nothing would work. And I noticed that /xWT wasn't there anymore. So now I fear that copy and paste in MadEdit might suck horribly.
     
  6. Prof. 9

    Member Prof. 9 GBAtemp Fan

    Joined:
    Jun 17, 2008
    Messages:
    316
    Location:
    The Netherlands
    Country:
    Netherlands
    You need to fix checksums if you change anything in the save file.

    I've done a little research into this game's save files a while back. It seems to store some kind of file allocation table, then a block order table or something like it (???), followed by the actual blocks of data. If you can find them, you can simply hex edit files in your save. For example each ghost data has a set size, so you could swap ghost files between save files. That doesn't really solve the problem though, I guess.

    Here are my notes if you want 'em. Note that I made this with my 512kb save created with AKAIO:

    Warning: Spoilers inside!
    Warning: Spoilers inside!
    Warning: Spoilers inside!
     
  7. Stuff7
    OP

    Newcomer Stuff7 Newbie

    Joined:
    Dec 3, 2010
    Messages:
    7
    Location:
    the Void
    Country:
    United States
    Aww man. Now I have to look at that gibberish up there. >.<
    Thanks, man. All that stuff will come in handy. I do have some stuff from 00000000-00000093. That might be what makes saves different for each flash cart, though. Not entirely sure. Well. It looks like theres another FAT at 80...with I guess a checksum at 44B. And after the first replay, another little section spawned at 480 and it got bigger after the 2nd replay. And I guess a checksum at 664.

    The "DLC Blocks Table (?)" looks like it has a....checksum at C64

    Anyway, I'm using EZFlash Vi, and I was able to find those addresses you had for the tables. They're at the same locations. Looking at the first 4 bytes:

    1st replay - 19 08 30 E0
    deleted 1st replay - 1D 0C 50 E1
    2nd replay(w/o deleting 1st one) - 2A 10 50 E1

    And empty was the same as yours.


    Anyway, You lost me at the second spoiler. I'm guessing that's for stored ghost data. Guess I'll dl something to see what your talking about there.
    And then the 3rd spoiler, idk what to do with that. lol. The save only goes up to 0007FFFF.

    Anyway, thanks Prof. 9. You made me find stuff I didn't think mattered. I really do appreciate it.
    Guess it's time to learn a few new things. Dunno how I would find a checksum and CRC32 looked like y8(^&J5#. >.
     

Share This Page