Author Topic: Phantasy Star IV SRAM data compatibility with the Retrode2  (Read 710 times)

Offline Knight of Time

  • Baby Retrode
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Hi...my apologies if anyone else has asked about the current compatibility of Phantasy Star IV with the Retrode2, but does anyone know if this game's SRAM data works now with the latest firmware?

Skaman thought that the header for this game was good now according to a PM he sent me when I asked him about the game's compatibility with the Retrode2, so yeah, I'm crossing my fingers that this game's SRAM issues are fixed or that it has full compatibility now.

Thanks in advance.

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 146
  • Karma: +38/-0
    • View Profile
Re: Phantasy Star IV SRAM data compatibility with the Retrode2
« Reply #1 on: 21/Feb/2018 03:04:48 AM »
I ordered a copy of the game and I'll investigate once it arrives.

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 146
  • Karma: +38/-0
    • View Profile
Re: Phantasy Star IV SRAM data compatibility with the Retrode2
« Reply #2 on: 27/Feb/2018 09:59:01 PM »
I received the cart and dumped it with the Retrode and another dumper.   The save files differ by a single byte.  The Retrode save does not work properly in KEGA Fusion or Mednafen.  The other dumper produces an 8KB save that after expansion to 16KB works properly in both emulators.

The problem is a single byte at 0x30F1.  This is related to the Retrode's bank switch code for Phantasy Star IV.  The code will set the byte to 1.  I accidently stumbled across this problem while working on saves for other consoles.

I would definitely not attempt to read any save that includes data in the 3rd slot until the code is fixed.

I'll look for a solution.
« Last Edit: 27/Feb/2018 10:00:50 PM by skaman »

Offline Knight of Time

  • Baby Retrode
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Phantasy Star IV SRAM data compatibility with the Retrode2
« Reply #3 on: 28/Feb/2018 01:03:50 AM »
Okay, well I'm glad you're looking into a fix for the game, skaman.

I was considering buying it last summer around the same time I bought Phantasy Star II, Phantasy Star III, and Sword of Vermilion, but since I didn't see much information about Phantasy Star IV on this board around that time, I decided not to buy it at that time. 

Even then, I try to only have one save file for a game when there is room for more than one, with some exceptions (like compilation games that have their own "individual" save files for each game). 

Offline skaman

  • Global Moderator
  • Sgt. Retrode
  • *****
  • Posts: 146
  • Karma: +38/-0
    • View Profile
Re: Phantasy Star IV SRAM data compatibility with the Retrode2
« Reply #4 on: 01/Mar/2018 06:38:45 PM »
I fixed the code.  No more corrupt bytes in the SRAM.

If you previously read any MD carts with large SRAM (16KB or bigger), then the bytes at 0x30F0/0x30F1 were likely corrupted.  They will have changed to 0 or 1.  This occurred even with the SRAM set to Read Only in the Config file.

I'll be adding the code into the v0.24 SMS/GG firmware release.  A BETA firmware will go out to the test group this weekend.

Offline Nori

  • Junior Retrode
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Phantasy Star IV SRAM data compatibility with the Retrode2
« Reply #5 on: 25/Mar/2018 06:24:51 AM »
In the past I lost data in save 1 and 3 but 2 always worked. I haven't tried recently but maybe 1 and 2 now work.