Sega Saturn RAM backup parser

Discussion in 'Sega Saturn Programming and Development' started by hitomi2500, Mar 11, 2015.

  1. cafealpha2

    cafealpha2 Site Supporter 2015

    Joined:
    Jul 4, 2014
    Messages:
    280
    Likes Received:
    20
    Sorry for the delay.

    I could download the archive without problem.

    OK, as typical user can't dump this cartridge (there's not parallel port available), I don't add more saves. Instead, I will focus on building a new dumper for my cartridges.
     
  2. hitomi2500

    hitomi2500 Site Supporter 2015

    Joined:
    Mar 4, 2015
    Messages:
    92
    Likes Received:
    21
    Okay, new release is up there, it's 0.9.1. Some of the features mentioned in this topic are implemented (hex mode, sorting...). Some are not. And some are not yet (datel support, ...).

    Seems it was blocked for my mobile connection somehow. I downloaded it. Instertion/extraction Supported INCORRECTLY in 0.9.1, i added an allocation table to your format accidently, but now i see it doesn't includes the one. Fix is already available in repository, and will be included in 0.9.2. I tested it successfully with Shining Force 3 ep.1, ep.2 and Panzer Dragoon Saga. SimCity still fails though, maybe it is a US/JP version incompatibility after all. Will check this later.

    That "bug" ended up being feature after all. The problem is that 4 zeroes (last one is counter actually) that are a sector's header are inserted before every sector's content. This is done since i have seen AR doing so years ago. Any program that interacts with saves via BIOS should be unaware of this header. You can disable extracting/inserting this header by switching into manual mode and disabling "Include others clusters headers" in setup. See diagrams in setup.

    Done in 0.9.1, on the first page in setup.

    Good luck! I think i will focus on a cart hardware soon too.

    Update : some fixes (including critical ones) will be included in the next release, which is 0.9.2. Datel import feature will be there too, their saves ended up being compressed a bit (compression appears to be extremely simple and stupid RLE), datel support is already complete.

    When I imported cafealpha2's datel cart, it included almost 300 saves. That instant i realised that extracting them all one-by-one will take like eternity. So here comes new feature - multiple extract. Just select all the strings you want in the list, press "extract", choose folder, and here they are, are all you saves . Multiple insert and multiple delete are in the roadmap.
    And by the way, cafealpha2, your memory card plus image (BUP15.BIN) is actually 8x overdumped, and contains 8 copies of 1M image with only 36 saves. Shining Force saves i did checked in SSF and they loads ok.

    I'm releasing 0.9.2 today. There's still some work to do, but that is not critical.

    Update : looks like i'm talking with myself here. Current release 0.9.3 includes all needed features i can think of now. Development is freezed until some feature request or bug report or hardware to talk with arrives.
     
    Last edited: Apr 14, 2015
  3. Druidic teacher

    Druidic teacher Officer at Arms

    Joined:
    Jun 6, 2006
    Messages:
    3,643
    Likes Received:
    129
    x
     
    Last edited: Jun 22, 2017
  4. hitomi2500

    hitomi2500 Site Supporter 2015

    Joined:
    Mar 4, 2015
    Messages:
    92
    Likes Received:
    21
    Aha! I've got a beta tester! Thank you very much for testing my software. I fixed and implemented some of these issues, leaving these :

    Nice idea, worth implementing. Planned for including into next release.

    Yeah, that looks good. But for some extreme cases (like 64-byte cluster and 32 Mbit card ) it will be quite big, 64K clusters and more, and even with a 3x3 square it will take 1024x1024 or so on the screen, that might be unacceptable for some laptops or small screens. Scrolling will make things simpler to fit, but harder to implement. Well, i just need to think about it a bit.

    SSF_009 uses a single cart image, i used this version for testing. SSF_012 uses filesystem entries for an every save, and these can be presumably imported in "SSF mode". To my shame, i never tested this, but i surely will before next release. I hope that it works, or could be fixed by trimming insert/extract flags for SSF mode.

    Next release is planned this or next week, fixes done already in repo.

    And i have another announcement. If someone wants to translate this program into another language, it's easy. All you will need to do is to install Qt Linguist, get language file from me, translate it (no programming required, just filling forms) and send it back to me for integration. Contact me via pm or via github if you're interested.
     
    Last edited: Apr 24, 2015
  5. Druidic teacher

    Druidic teacher Officer at Arms

    Joined:
    Jun 6, 2006
    Messages:
    3,643
    Likes Received:
    129
    x
     
    Last edited: Jun 22, 2017
  6. hitomi2500

    hitomi2500 Site Supporter 2015

    Joined:
    Mar 4, 2015
    Messages:
    92
    Likes Received:
    21
    Oh ,thanks for pointing that out. I thought this behaviour is fixed.

    I did my research, and it shows that you're almost right - the mysterious 4 bytes are actually time and date, but in a strange format. SSF support now is done and commited, the only things left before release are sector map and asking format for each save.
     
  7. Druidic teacher

    Druidic teacher Officer at Arms

    Joined:
    Jun 6, 2006
    Messages:
    3,643
    Likes Received:
    129
    x
     
    Last edited: Jun 22, 2017
  8. hitomi2500

    hitomi2500 Site Supporter 2015

    Joined:
    Mar 4, 2015
    Messages:
    92
    Likes Received:
    21
    Nah, not weird enough :) It splits 32-bit data into small chunks for each field:
    bit 31..23 - year from 1980 (negative years are supported by ssbkm, i accidentally managed to get circa 1720, not sure how they will be interpreted if ssf)
    bit 22..19 - month (starting from 1, setting 0 sometimes gives a december of the previous year, but i haven't tested this)
    bit 18..14 - day (starting from 1)
    bit 13..9 - hour (starting from 0)
    bit 8..3 - minute (starting form 0)

    I've not tested if SSF actually uses this date, but ssbkm definitly use it, not the filesystem time.
     
  9. cafealpha2

    cafealpha2 Site Supporter 2015

    Joined:
    Jul 4, 2014
    Messages:
    280
    Likes Received:
    20
    Do you need this function ? It packs date from BupDate structure to 32bit integer.



    It is adapted from yabause, so you need to comply with GPL license to reuse this code.

    edit : arg, code tag breaks indent :X I can provide indented code via text file if you need.
     
    Last edited: Apr 27, 2015
  10. hitomi2500

    hitomi2500 Site Supporter 2015

    Joined:
    Mar 4, 2015
    Messages:
    92
    Likes Received:
    21
    Does yabase stores these 32-bit values in its save data? The format is different from ssbkm/ssf, and the function itself seems wrong to me somehow. Like dividing and getting modus from non-2-powers... Well, maybe this is a math i don't understand.. yet. Speaking of which, i totally forgot about yabause. I don't know yet if there is a need for supporting something yabause-specific, but i'm putting that into roadmap. And that function might be useful later.
     
  11. Druidic teacher

    Druidic teacher Officer at Arms

    Joined:
    Jun 6, 2006
    Messages:
    3,643
    Likes Received:
    129
    x
     
    Last edited: Jun 22, 2017
  12. hitomi2500

    hitomi2500 Site Supporter 2015

    Joined:
    Mar 4, 2015
    Messages:
    92
    Likes Received:
    21
    Okay, another release. Today it's 0.9.5, and it includes sector/image/cluster/whatever-you-call-these-little-thingies map from ssbkm (though a bit different, look at the attached image) and some other features discussed above. Some bugs removed, new added, like it's always been. See https://github.com/hitomi2500/ss-save-parser/releases/latest for binary.
    [GALLERY=media, 12]Image_map by hitomi2500 posted May 26, 2015 at 11:00 PM[/GALLERY]
     
  13. mdmx

    mdmx Familiar Face

    Joined:
    Nov 3, 2005
    Messages:
    1,301
    Likes Received:
    29
  14. hitomi2500

    hitomi2500 Site Supporter 2015

    Joined:
    Mar 4, 2015
    Messages:
    92
    Likes Received:
    21
    I don't know how he did it (maybe used AR comm port), but i remember doing it the hard way. Jeez, i just checked SegaExtreme, and that ancient topic still exists there : http://segaxtreme.net/threads/backup-ram-data-format.7892/ Some images dumped back then i used now while debugging the program.
     
  15. cafealpha2

    cafealpha2 Site Supporter 2015

    Joined:
    Jul 4, 2014
    Messages:
    280
    Likes Received:
    20
    I connected a SD card socket to my Saturn second pad connector : http://ppcenter.webou.net/satcom/my_saturn_memcart.jpg
    Prototype made at this time was very Q&D (= it worked enough to allow me to dump my cartridges), but I plan to make and release a more clean board somedays.

    edit: hitomi2500 here = jameson on sx forums ?
     
    Last edited: Jun 20, 2015
  16. mdmx

    mdmx Familiar Face

    Joined:
    Nov 3, 2005
    Messages:
    1,301
    Likes Received:
    29
    cool device. btw, an sd based floppy emulator for the official Sega Saturn floppy would be nice. There's a memory manager available which allows to copy savegames from internal and backup memory to the floppy drive and vice versa.
     
  17. hitomi2500

    hitomi2500 Site Supporter 2015

    Joined:
    Mar 4, 2015
    Messages:
    92
    Likes Received:
    21
    Basically yes, but i was never active on Segaxtreme, and left that place years ago.

    Now that's a nice idea. Though the problem is a rare connector (of course you can always cut taisen cables, but that's a bit... crazy). Memory manager (Floppy operator, or how was it named?) can make debugging easy.
     
  18. cafealpha2

    cafealpha2 Site Supporter 2015

    Joined:
    Jul 4, 2014
    Messages:
    280
    Likes Received:
    20
    I'm making a backup data manager, so that copying saves from a device to another will be possible ;)

    OK, thank you for the information :)

    Me too. I don't want to see people cutting their Saturn link cables in order to get SD floppy emulator.
    There's a solution to solder link wires directly on Saturn motherboard, but it is even more grotesque :D
     
  19. hitomi2500

    hitomi2500 Site Supporter 2015

    Joined:
    Mar 4, 2015
    Messages:
    92
    Likes Received:
    21
    Maybe one can 3d-print the plastic part, and get the metal parts from some cheap and available today connectors. But that sounds like a difficult surgery...
     
  20. Helder

    Helder Site Supporter 2014,2015

    Joined:
    Apr 6, 2013
    Messages:
    981
    Likes Received:
    54
    So you can solder some wires to the Saturn mobo and then to an SD Card reader? do you happen to have some pics or info of these points and the wiring? Might be a fun project to look into doing.
     

Share This Page