Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Mark III/SMS Phantasy Star from GBA and Saturn Phantasy Star Collection

Reply to topic
Author Message
  • Joined: 22 Apr 2018
  • Posts: 159
Reply with quote
Mark III/SMS Phantasy Star from GBA and Saturn Phantasy Star Collection
Post Posted: Sat Feb 22, 2020 9:13 pm
Both the Japanese Saturn release of Phantasy Star Collection and the North American GBA release of Phantasy Star Collection include the original Mark III/SMS Phantasy Star game, and appear to run it in SMS emulators of some sort.

I recently ripped the Saturn disk and dumped the GBA ROM, and noticed that the versions of Phantasy Star they contain don't seem to match the US SMS or Japanese Mark III cartridges I have. Does anyone know more about these versions, and where they fit in the version history of SMS/Mark III Phantasy Star?

I've read elsewhere that the Saturn version may match the version packaged in a Mega Drive Fukkokuban re-release of Phantasy Star, which is actually an SMS game packaged in a Mega Drive cartridge with some sort of boot ROM, but so far I've been unable to dump that cartridge myself to compare, although it works just fine in a Mega Drive.

I couldn't get the Saturn version to actually play in an emulator, though it's somewhat similar contents-wise to the working Mark III cartridge I have. The GBA version seems to work just fine, though! Although they both have "TMR SEGA" BIOS-appeasement text, they don't have valid SMS CRCs, so they likely wouldn't run in export SMS unmodified.

Looking at the ROM, it seems the English translation for the GBA version was updated compared to the SMS cartridge I have.

In any case, here's some fingerprinting information from the version in the Saturn Phantasy Star Collection, which I'm arbitrarily labelling "Phantasy Star (J) [Collection].sms" for lack of a better name:

CD Volume label: PHANTASY_STAR_COLLECTION
Filename on the CD: PS1/PS.COM
Size: 524288 bytes (header falsely claims 256K)
SMS header info: 9500 (Rev.01) (256 KB)

sha256:85765eb6d6de1c7b48285bc2ca3b4ea2de9325f854de5fbfde26035ba5ea92fe Phantasy Star (J) [Collection].sms
sha1:2f827f653c272c7a1f98dc18ac0065c6c10a3780 Phantasy Star (J) [Collection].sms
md5:306b0d5f9c793dc848e05c0f30956bb1 Phantasy Star (J) [Collection].sms
mekacrc:157EA8B191E86C2F Phantasy Star (J) [Collection].sms
crc32:913ef4a2 Phantasy Star (J) [Collection].sms

Here's the equivalent information for the English version from the GBA version, which I'm arbitrarily labelling "Phantasy Star (UE) [Collection].sms":

Offset in GBA ROM: 7807700 bytes
Size: 524288 bytes (header falsely claims 256K)
SMS header info: 9500 (Rev.03) (256 KB)

sha256:8f82747aa9939ff2426841f693d571a4d675b0d45f6a8b30b08cd72e7e4ee502 Phantasy Star (UE) [Collection].sms
sha1:551c01093b5e3b5e22797bd9b36479812c0abac2 Phantasy Star (UE) [Collection].sms
md5:dbbb33f411ea87991e051327335d4a38 Phantasy Star (UE) [Collection].sms
mekacrc:0B932A08DC5737C6 Phantasy Star (UE) [Collection].sms
crc32:0fc1c8c3 Phantasy Star (UE) [Collection].sms

The GBA cartridge dump I'm extracting it from is this one:

sha256:6747a17af7ccb082bab1f2a8ed7d88952ab93879d93173b12331b1e5e8ec1c4e Phantasy Star Collection (USA).gba
sha1:9f2dc591c9b1526f9f965b1c375fb4ea7101fd16 Phantasy Star Collection (USA).gba
md5:af7e218eb4a7f28f1887b3504647854e Phantasy Star Collection (USA).gba
crc32:e5a7fe17 Phantasy Star Collection (USA).gba
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13179
  • Location: London
Reply with quote
Post Posted: Sat Feb 22, 2020 11:18 pm
We’ve analysed similar modern emulated efforts. Two things tend to be patched: flashing and use of the Red Cross symbol.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 159
Reply with quote
Post Posted: Sun Feb 23, 2020 6:59 am
Maxim wrote
We’ve analysed similar modern emulated efforts. Two things tend to be patched: flashing and use of the Red Cross symbol.


That makes sense. Since I don't have an easy way to compare the Japanese Saturn release I'm not sure how it differs, but the English GBA release appears to have minor differences in the text, in both content and formatting.

I've quoted a few examples below. Do these perhaps correspond to a different known version of the English translation of Phantasy Star, rather than the V1.2 in my SMS cartridge?

Phantasy Star (UE) [Collection].sms
Quote
00008400: 4545 5460 d661 4953 2055 4e44 4552 204d EET`.aIS UNDER M
00008410: 4152 5449 414c 604c 4157 2165 e14e 4545 ARTIAL`LAW!e.NEE

000085e0: 6095 20c4 61d5 d020 544f 20de 604e 4f52 `. .a.. TO .`NOR
000085f0: 5408 4f46 2050 4152 4f4c 4954 2e65 4f44 T.OF PAROLIT.eOD

00008de0: 544f 60df 2054 4f20 4849 4d2e 6149 20e3 TO`. TO HIM.aI .


Phantasy Star (UE) (V1.2) [!].sms
Quote
00008400: 4545 5460 d661 4953 2055 4e44 4552 604d EET`.aIS UNDER`M
00008410: 4152 5449 414c 204c 4157 2e65 e14e 4545 ARTIAL LAW.e.NEE

000085e0: 6095 20c4 61d5 d020 544f 20de 6057 4553 `. .a.. TO .`WES
000085f0: 5420 4f46 2050 4152 4f4c 4954 2e65 4f44 T OF PAROLIT.eOD

00008de0: 544f 60df 2054 4f20 4845 522e 6149 20e3 TO`. TO HER.aI .
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13179
  • Location: London
Reply with quote
Post Posted: Sun Feb 23, 2020 9:14 am
Well yes, West <-> North and him <-> her... it seems worth tracking these differences.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8195
  • Location: Paris, France
Reply with quote
Post Posted: Sun Feb 23, 2020 8:47 pm
The version dumped from the Megadrive ROM is CRC 07301f83, it was dumped I think by Casiopea who sent it to me around 1999 probably.

In the meka database it is listed as "Megadrive and Saturn", I honestly don't remember how I ended up labelling it as such, it might have been a mistake from this era. But it would also be surprising if you were the first person to stumble on that.

Could you post or send me your 913ef4a2 version for inspection? I have the Saturn disc but CD drive is stashed somewhere.
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 159
Reply with quote
Post Posted: Mon Feb 24, 2020 9:38 am
The version in Saturn RAM is modified compared to the version on the CD. In fact there are two variations, "Katakana" and "Hiragana". I used a Saturn emulator and dumped the RAM using a save state for each variation and they each at least load in an SMS emulator and are at least somewhat playable, though the Hiragana version has no visible text in some parts. The Katakana version appears to be fine. I haven't gotten either version to produce music.

I also loaded the English version from the GBA collection in an SMS emulator and its text appears corrupted. I haven't yet tried to dump RAM for this one.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13179
  • Location: London
Reply with quote
Post Posted: Mon Feb 24, 2020 12:46 pm
I guess for these sorts of thing there will be:

1. Hooks into the emulated game to make the emulation more than just a pure emulator drawing a bitmap to the screen (similar for the sound emulation) - kind of like HLE but with extensions
2. Runtime patching of the ROM to achieve certain things
3. Static patching of the ROM to achieve other things

It’s far easier to add in an “emulator escape” feature than to add features entirely in the emulated system. For example, to change katakana to hiragana you may not have the video memory for the font, but you can just hook the drawing of text, inspect the string, look up the transliteration, draw that to the screen using some “extended” functionality outside the emulated system, then return to the emulated code. To replace the sound you might “hook” the entire sound engine to trigger some samples instead based on the track IDs being triggered.

Another way of looking at it might be that they are emulating a kind of custom enhanced Master System with weird game specific extensions. The only way to emulate that is to emulate those extensions - which may be explicit (calls to undefined functions, writes to custom ports) or implicit (when execution gets to certain addresses, so something custom and then skip over the actual instructions).
  View user's profile Send private message Visit poster's website
  • Joined: 22 Apr 2018
  • Posts: 159
Reply with quote
Post Posted: Tue Feb 25, 2020 4:34 am
Yeah, that makes a lot of sense and likely explains the strangely modified text in the GBA release — I'm guessing it's using a native ARM code text engine that supports a compression scheme of some sort.

For the record, here are the various fingerprints/checksums for the Katakana and Hiragana modes of the Saturn release:

Phantasy Star (J) Katakana [Collection].sms
Size: 512K
sha256:3bf68f8f265bacbeb44b57586bd5db1334501d478380fabc9898d5265ea2d300 Phantasy Star (J) Katakana [Collection].sms
sha1:79e5a35a27173202900ddddbc240826213ae3ed9 Phantasy Star (J) Katakana [Collection].sms
md5:796d78c318798cde5c788894ab290f4c Phantasy Star (J) Katakana [Collection].sms
crc32:538480a3 Phantasy Star (J) Katakana [Collection].sms

Phantasy Star (J) Hiragana [Collection].sms
Size: 512K
sha256:dd17a5eb523f2f6ba165b6872f6ba37751833f0253cbe338fb15cd64af8128d6 Phantasy Star (J) Hiragana [Collection].sms
sha1:efe2b1b88d0970ecdbd557a66982e2473fd7f5b2 Phantasy Star (J) Hiragana [Collection].sms
md5:18370556376cd3f9af6783c5df7ad511 Phantasy Star (J) Hiragana [Collection].sms
crc32:58eeadd4 Phantasy Star (J) Hiragana [Collection].sms
  View user's profile Send private message
  • Joined: 22 Apr 2018
  • Posts: 159
Reply with quote
Post Posted: Tue Feb 25, 2020 5:14 am
Here's a side-by-side-by-side comparison of the first place where the text rendering differences were apparent.

Left part of the image is dumped from an SMS cartridge with Phantasy Star (UE) (V1.2) [!]

Middle part is the version extracted from the GBA cartridge running in an SMS emulator.

Right part is the same version running as part of the collection in a GBA emulator.

  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2638
Reply with quote
Post Posted: Tue Feb 25, 2020 5:37 pm
are those VDP constraints violations?
  View user's profile Send private message Visit poster's website
  • Joined: 23 Aug 2009
  • Posts: 115
  • Location: Seattle, WA
Reply with quote
Post Posted: Tue Feb 25, 2020 6:13 pm
I've invited a friend who was part of the production team on the GBA version to offer insight into what they did.
  View user's profile Send private message
  • Joined: 22 Apr 2018
  • Posts: 159
Reply with quote
Post Posted: Wed Feb 26, 2020 4:15 am
it appears to me that it is using non-text character numbers to encode common two-character sequences
  View user's profile Send private message
  • Joined: 27 Feb 2020
  • Posts: 1
  • Location: usa
Reply with quote
Post Posted: Thu Feb 27, 2020 3:27 pm
SavagePencil wrote
I've invited a friend who was part of the production team on the GBA version to offer insight into what they did.


That's me!

On the text changes, I know there were certain typos or translation issues that were made by hacking the Master System ROM before the game was emulated.

The emulation was "offline emulation," a name for the developers' technique of doing an offline opcode to opcode translation of the original code. This let us "emulate" the game on a system that was not powerful enough to emulate a SMS.

I'm not sure why the text seems to render differently, from what I understand/remember there would have been no custom text handling written at all.

I do know that to squeeze the game onto the gba screen we had to lose some lines of vertical resolution every frame. I can try to reach out to the original engineers if people want but they're mostly focused on TRS-80 stuff today.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13179
  • Location: London
Reply with quote
Post Posted: Thu Feb 27, 2020 5:56 pm
If it was static recompilation then why is the ROM in there? I guess maybe because when you hit some ROM address read you need to go find that data, whereas the code parts are all over the place in ARM or whatever. Thus the ROM doesn’t actually need to be functional, and the translated code (assembly or even C) can be modified to match data changes, leaving the code in ROM kind of broken.

Thus you’d avoid needing to run a CPU emulator, but still need to run a VDP emulator - but that can translate to hardware on GBA quite well. Overall, though, an amazing achievement to get it running so well on that CPU while still mostly emulated.

The exact content changes are interesting to understand. The diff above covers two:

- The Governor’s letter to Noah uses “her”, elsewhere she’s a he. (Originally the character is supposed to be ambiguously gendered.)
- The underground passage to the Gothic Forest is somewhere to the west/north of Parolit - I guess it is more “up” than “left”? This is an original mistranslation, the original text is more like “I hear you can get to the Gothic Forest -- which is West of Parolit -- through an underground passageway.“
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!