[release] Mempak Tool for the ED64

Discussion in 'Everdrive 64' started by saturnu, Sep 2, 2012.

  1. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    [release] Mempak Tool v0.5 for the ED64

    Please download the latest ED64 OS, Controller-Pak features are now implemented! This program is obsolet. :D


    Hallo,
    Here is my Mempak Tool for the ED64

    You can Backup, Restore, View, Format and Clone your Controller-Paks with it.

    Please be kind, it's my first N64 project and i'm not a professional, perhaps krikzz implements someday these features into the OS.
    But until someone has a better solution, feel free to use my program. :D

    Install:
    At first please create a directory called 'MEMPAKS' in the root directory

    Changelog:
    0.5:
    - exit to ED64 OS (Firmware 1.16 or later)

    0.4:
    bug fixed
    ...thanks to angrylion

    0.3:
    experimental Dexdrive n64 file format support (37K files only)
    /*
    There are dexdrive files with corrupt (/missing) mempak headers.
    Some games can fix their savegames. Maybe they were created with emulators. ^^
    */


    0.2:
    - Reset-Button works
    - fix filebrowser freezing
    - hide debug messages on the backup screen

    Todo:
    - single note support
    [only if enough people are asking for ^^]
     

    Attached Files:

    Last edited: Jan 19, 2013
  2. retrofan

    retrofan Member

    Joined:
    Jul 25, 2012
    Messages:
    15
    Likes Received:
    0
    you are the best
    viel better als the rest
    hello hello i must go!
     
  3. Jackhammer

    Jackhammer Peppy Member

    Joined:
    Jul 14, 2008
    Messages:
    358
    Likes Received:
    59
    Is this just for an actual memory card, or can you create virtual cards on the Everdrive SD card?

    Either way, thank you.
     
  4. derekb

    derekb Well Known Member

    Joined:
    Jan 7, 2009
    Messages:
    1,964
    Likes Received:
    44
    If mempack read/write is pretty fast be nice is KRIKzz can implement auto backup/restore of mempack data
     
  5. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    It is for actual memory cards.
    greets, saturnu
     
  6. reprep

    reprep Gutsy Member

    Joined:
    Jun 8, 2012
    Messages:
    475
    Likes Received:
    1
    Thanks a lot. This is very useful. I will test and report back.
     
  7. XiTaU

    XiTaU Active Member

    Joined:
    Mar 6, 2012
    Messages:
    37
    Likes Received:
    0
    damn nice work will give it a go for sure will be very useful for those games which use up way too many pages.
     
  8. reprep

    reprep Gutsy Member

    Joined:
    Jun 8, 2012
    Messages:
    475
    Likes Received:
    1
    I gave it a go, and it works perfect. Thanks a lot.

    I backed up my controller pak's contents to SD cart, formatted the controller pak, checked it in a game to see that it's empty, restored the content back to controller pak from SD and voila it works.

    I didn't get what Backup MEM and Restore MEM really do. They save the content to RAM. and then what? Is it used for copying a controller pak's contents to another pak?

    Also i couldn't get Show Mempak option to work. Not a big problem though as most of the games using controller pak show the contents of the controller pak when started with START button hold.

    GUI has some problems. Every new entry is overwritten the old ones and this makes it hard to read. Not a big problem if you know what you are doing though.

    RESET button doesn't register. At least not unless you hold it like 10 seconds or so.

    Also is there a way to edit those .mpk files on computer? And do you plan to make backup and restore individual save files possible?

    That is all for now. Thanks again.
     
  9. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    yes i was an example of the libdragon library, i just leave it there for non ED64 users.

    that's the only feature that is working like a charm for me :D

    yes the GUI has still a few problems, can someone confirm that something is overwritten?
    it was fudged together in no time, after i got my fingers on the sd-libs. o_O
    I think i even uploaded a debug version with some error messages on the restore screen.

    You can use project64, open the controller plugin and use it's mempak features so add/extract single notes, even convert n64-dexdrive saves to the mpk format.
     
  10. KRIKzz

    KRIKzz Well Known Member

    Joined:
    Apr 5, 2010
    Messages:
    1,672
    Likes Received:
    2
    Good work!
    Must be it happens cuz saturnu did not use sleeps between controller readings.
    Would be good if you will make possibility to back in OS. You just should fill first two mbyte of cart memory by zerro, copy os binary to begin of cart memory, then run simulate_pif_boot routine
     
  11. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    Yes, it's working now. ^^
    That's strange, why can you debug so many different platforms even without looking at the code. :D

    greets, saturnu
     
  12. KRIKzz

    KRIKzz Well Known Member

    Joined:
    Apr 5, 2010
    Messages:
    1,672
    Likes Received:
    2
    Cuz i had same problems in the past :)
     
  13. scottzane

    scottzane Rising Member

    Joined:
    Jul 17, 2010
    Messages:
    51
    Likes Received:
    0
    KRIKzz : you are amazing, I knew chessmaster that play with eyes folded but I am discovering blind debugging :encouragement:
     
  14. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    Sounds like a nice feature but I think I don't have that routine :D
    Perhaps it's better to keep some files of your code secret, even if 'trunk/N64/NeoN64Menu/neo_2.c' gives us an idea how it works in general.

    greets, saturnu
     
    Last edited: Sep 4, 2012
  15. angrylion

    angrylion Active Member

    Joined:
    Mar 15, 2008
    Messages:
    31
    Likes Received:
    0
    I had successfully backed up the contents of my controller pak, formatted it, played another game and tried to back up once again to another file. Unfortunately, this tool overwrote pak0.bak, and I ended up with two identical files, pak0.bak and pak1.bak. So it erased my former savestate. Could you please look into it, saturnu?
     
  16. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    sorry for that you are right, in the last revision i rewrote that function and used a wrong file-extension to check for. :-(
     
  17. angrylion

    angrylion Active Member

    Joined:
    Mar 15, 2008
    Messages:
    31
    Likes Received:
    0
    Have you fixed the bug only for files with a newer *.mpk extension?
    I renamed one of the aforementioned files to snbokids.bak, formatted the controller pak, played another game, tried to back it up, and once again it wiped out my previous savestate, creating two identical files, snbokids.bak and pak0.mpk.
     
  18. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    hi,

    i checked it again and i think it's working properly in 0.4

    forget about that *.bak extension it just uses mpk files and creats only mpk files

    the program only checks if there is a PAK0.MPK
    if there is one -> check if PAK1.MPK exists and so on
    if there is none -> create one

    now if you rename a PAK0.MPK to snbokids.bak it creats a new PAK0.MPK with the current controller-pak content

    edit:
    version 0.3 just used .bak as extension even if the program told you that PAKX.MPK was written, perhaps your old backup is still there as PAK0.MPK and not overwritten. ^^
     
    Last edited: Sep 12, 2012
  19. angrylion

    angrylion Active Member

    Joined:
    Mar 15, 2008
    Messages:
    31
    Likes Received:
    0
    Nope, I used windiff and fc.exe to compare files, and they were identical. This overwriting behavior was consistent, it occurred regardless of *.bak/*.mpk extensions or me renaming backup files. Even if there were many old backup files, all of them were overwritten whenever I tried to back up with version 0.4. Then I checked my SDHC card with Windows ScanDisk, which found many errors in FAT32 file system. In particular, it complained like this about all but one mempak files:

    \MEMPAKS\PAK1.MPK is cross-linked on allocation unit 4094.
    Cross link resolved by copying.

    After fixing these errors with ScanDisk, your tool worked as expected, which is relieving. Now what exactly damaged the file system by assigning multiple files to the same disk space unit is unknown.
     
    Last edited: Sep 12, 2012
  20. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    that's nothing that should happen. No, indeed. ^^
    i send you a pm, so that you can see in detail what's happening in the backup function.

    greetings, saturnu
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page