don't click here

Sega Saturn interesting finds

Discussion in 'Engineering & Reverse Engineering' started by TeaTime_Beta, Jan 19, 2013.

  1. Glaber

    Glaber

    Has Beaten Sonic Genesis for GBA Oldbie
    I have a crazy idea. Why not try another emulator just for ripping the missing textures? According to the Sega Retro wiki, the SSF Saturn emulator uses direct X 9, and direct X 9 is very rippable. Or I think there's an open GL ripper too (if you aren't already using that)
     
  2. TeaTime_Beta

    TeaTime_Beta

    Beta of Sokyodai Member
    19
    1
    3
    Sokyodai
    Research on outdated formats and platforms.
    I've tried SSF and found no way in-emu to rip the textures, and I have neither the experience or the means to rip direct X 9. The only textures we're missing are the ones underneath the buildings, so I'm wondering if that's what's causing the problems...
     
  3. Andrew75

    Andrew75

    Technical Artist Member
    2,007
    88
    28
    Project AXSX(Sonic Xtreme) + Misc Projects
    I've tried a few emus and software like 3D ripper DX without any luck. perhaps someone else could have some....... um.... good luck..... :P
     
  4. Glaber

    Glaber

    Has Beaten Sonic Genesis for GBA Oldbie
    wait, that' all that's missing?
     
  5. TeaTime_Beta

    TeaTime_Beta

    Beta of Sokyodai Member
    19
    1
    3
    Sokyodai
    Research on outdated formats and platforms.
    Yeah, that and a few meaningless models, but we can easily recreate the models.
     
  6. Glaber

    Glaber

    Has Beaten Sonic Genesis for GBA Oldbie
    can you show the ground textures you do have? Maybe you might have what you need to remake the missing textures too.
     
  7. Andrew75

    Andrew75

    Technical Artist Member
    2,007
    88
    28
    Project AXSX(Sonic Xtreme) + Misc Projects
    What we have has been posted on page 2 of the topic.
    I'll repost it below.
    Also on page 3 I have uploaded the textures in there full resolution. see below

     
  8. Glaber

    Glaber

    Has Beaten Sonic Genesis for GBA Oldbie
    have you tried using the texture rip function of the models rippers? (generally F9)
     
  9. Andrew75

    Andrew75

    Technical Artist Member
    2,007
    88
    28
    Project AXSX(Sonic Xtreme) + Misc Projects
    Hmm, Have not tried F9 thing, care to give it a shot? I no longer have anything installed.
     
  10. Glaber

    Glaber

    Has Beaten Sonic Genesis for GBA Oldbie
    if I can get everything together I should be able to give it a go.

    I already have the ripper and just recently used it to get the Reebok DLC stuff from Sonic Adventure PAL version
     
  11. TeaTime_Beta

    TeaTime_Beta

    Beta of Sokyodai Member
    19
    1
    3
    Sokyodai
    Research on outdated formats and platforms.
    What ripper are you talking about, exactly? I'm a tad confused here.
     
  12. Glaber

    Glaber

    Has Beaten Sonic Genesis for GBA Oldbie
    the one I use is DX Ripper. it controls the same as 3d ripper DX
     
  13. Andrew75

    Andrew75

    Technical Artist Member
    2,007
    88
    28
    Project AXSX(Sonic Xtreme) + Misc Projects
    Hey Glaber! I say go for it, using that ripper!
     
  14. Glaber

    Glaber

    Has Beaten Sonic Genesis for GBA Oldbie
    Bad news, that plan of mine was a bust. sonic jam works, but the ripper fails to grab anything.

    How did you get what you did anyway?
     
  15. Andrew75

    Andrew75

    Technical Artist Member
    2,007
    88
    28
    Project AXSX(Sonic Xtreme) + Misc Projects
    There are built in texture viewing tools in many Saturn emulators.
    Satourne being the one we used to view the VDP2 textures. Sadly, only a very limited amount of the VDP2 textures are actually viewable.
    the other emulators can't view VDP2 textures correctly or at all.
     
  16. Andrew75

    Andrew75

    Technical Artist Member
    2,007
    88
    28
    Project AXSX(Sonic Xtreme) + Misc Projects
    Hey guys !
    Moop from over on my Project AXSX forums seems to have had a break threw with the Sonic Jam floor textures.
    Post located here http://www.sonic-xtreme.com/forums//viewtopic.php?id=515

    Moop Quote:
    So I came across this thread on SonicRetro, and I saw that they needed the Sonic World floor texture from Sonic Jam.

    Well, I had some time yesterday and decided I'd try my hand at getting it out of the copy of Sonic Jam I just bought for my Saturn.

    I found that Satourne, the emulator, has this weird glitch where, when you try to view the VDP2 textures, it shows up as a 1024x1024 image with only 512x1024 showing. The other half is just a black rectangle.
    [​IMG]

    FYI I found that the upper 512x512 square of the non-black half image actually belongs to the LEFT of the lower 512x512 square when properly put together.

    I did my best with photoshop's crop feature, and this is the best I could get (it's a 4096x4096 PNG, so this is only a screengrab).
    [​IMG]

    As you can see, it's only half of it. Satourne missed exactly every other row (or maybe it's every other column) for some reason.

    Using GLIntercept did not give me any results, and 3D Ripper DX (for use with SSF) isn't the most simple thing to understand, so I'm a bit lost as to where to go from here...

    Note: I did also try dump the memory addresses where the images should be (for example plane A looks like it's between 0x20000 and 0x21FFF) and open that up as an image, but it didn't work (or maybe I did it wrong).

    Any ideas would be appreciated!

    EDIT: So I tried something crazy, and I opened up SCRDATA.MUS in XVI32. I deemed that that file must be the one holding the Sonic World floor texture because the floor is 4096x4096, and that file is exactly 256kb. Anyways, I loaded that up and, taking cues from Satourne's plane address locations, copied ALL the data from 0x20000 to 0x3FFFF into a new file. I saved that as a .raw, opened it up in Photoshop as a 64x2048 image, and interestingly enough there was exactly the SAME HALF of the flooring that I found above (albeit this time in 8bpp grayscale).

    So the VDP2 scales the image 8x to make the floor it looks like. I say that because 64x8=512, and each individual tile I found in Satourne was 512x512. Also, 2048/64=32, which means my huge 64x2048 image contains 32 tiles of 64x64 each (since each 64x64 tile gets scaled to 512x512). So I found 32 tiles, and now I'm still missing the other 32.

    EDIT 2: I was wrong. I found ALL the tiles!!! They're just compressed to 64x32 for some reason, so it only looked like I had half, but I actually have them all! Now I just need to figure out how to color them...

    (And I found an explanation for the "squashed" image...
    http://forums.sonicretro.org/index.php?showtopic=30644&view=findpost&p=726735)

    More info, while I'm at it:
    http://koti.kapsi.fi/~antime/sega/docs.html
    (The "VDP2 User's Manual" and the "Introduction to Saturn Game Development" guide are both really helpful).
    So, on a semi-related note, it turns out VDP2 can only use 128kb VRAM during something called a "display interval," so the fact that my extracted texture file is exactly 128kb makes sense. There's also an extra 2 VDP2 textures I found at the end of SCRDATA.MUS, and I'm not sure what they're for (they still look like floor textures, though). I'll try and put what I have together and see if I can get a grayscale map.
     
  17. Andrew75

    Andrew75

    Technical Artist Member
    2,007
    88
    28
    Project AXSX(Sonic Xtreme) + Misc Projects
    Quote from Moop:

    I have great news! I FOUND THE CLOUD TEXTURES!!!!!
    They were just sitting in there among the normal ones; just smack in between. According to the pattern in the hex data, they should fit right under Plane D, so there is some obvious overlapping thing going on there. (If you look at the Satourne VDP2 Viewer picture, I wonder if they have something to do with that 0x26000 plane location identifier.)
    [​IMG]
    Notice the clouds are on the top right!

    Also, it turns out the two extra textures I found are just grass. I'm not sure what they are for, though. I'm going to take a guess and say they are used to fill in the spot where the cloud textures are stored in the actual game.

    In other news, it turns out the VDP actually needs the whole image to be squashed in order for it to fit in memory. So, I'll stretch it to 4096x4096 and upload it. I just don't know what to do with the 2 random floor textures.

    EDIT: I just noticed, the clouds are stored behind the waterfall. I wonder if that magical misplaced texture must come from a screw up when the VDP2 substitutes grass textures there.

    EDIT 2: Uploaded the 4096x4096 image (Here), as well as the initial scaled 512x512. So, something interesting: The two leftover textures I have don't seem to fit anywhere. They are out-of-bounds grass textures, for sure, but the pixels don't match up in either of the two places that would make sense for them to go. The two places I'm referring to are the cloud area and the area on the top left corner that doesn't look quite correct.

    Anyways, clouds are attached.

    EDIT 3: Still not sure how to get the color back, but this is what I've got for reference (not actual size; it's a screengrab):
    [​IMG]
     
  18. Andrew75

    Andrew75

    Technical Artist Member
    2,007
    88
    28
    Project AXSX(Sonic Xtreme) + Misc Projects
    Good work Moop ! Besides the missing colors, a lot of pixel detail seems to be very blurred in the floorgray4096 copy.png. ( I must have missed something somewhere, could you elaborate?)
    Looking at crop of at 1:1 pixel aspect ratio for floorgray4096 copy.png below, it reminds me of some kind of Photoshop enlargement from a smaller texture.

    [​IMG]


    Also I'm guessing that we would need to copy the effect here to draw the rest of the pixels. http://forums.sonicretro.org/index.php?showtopic=30644&st=0&p=726735&#entry726735

    You know, I wonder how many textures are hidden with-in the Leaked Sonic xtreme 718 demo.
    I know that the metal sonic boss stage floor is there, but what else ? perhaps Background Metal sonic boss stage textures or even other boss stage assets are locked away in that tech demo.
    Would you be willing to check that out?


    Moop Quote:
    You're right about the stretch; I did stretch it. The TRUE image is actually only 512x256, and I posted it above.

    Specifically, it's this:
    [​IMG]
    All I did was extract the raw hex data of each plane from SCRDATA.MUS with HxD, renamed it to .raw, and opened it in photoshop/irfanview. So I don't quite know how to get the colored textures out just yet. Maybe Cheat Engine can pull them out of memory when the game is running....

    What the VDP2 seems to do is scale the image by 8 (8x512=4096) after doing that HALT thing in the SonicRetro link (which stretches the texture to 512x512).

    And I can take a look at the 718 demo. It's lying around here somewhere...
     
  19. Meat Miracle

    Meat Miracle

    Researcher
    1,654
    4
    18
    The reason you can't extract the ground pictures is because it's not a bitmap picture but a tilemap. The 16x16 tiles are at the beginning of scrdata.mus, and the greyscale semi-background you found is the pattern table. Think of how the Megadrive generates backgrounds.
     
  20. Dr. Mecha

    Dr. Mecha

    Member
    1,087
    3
    18
    Dallas, TX
    3d Models
    One problem, Satourne's unable to pick up the missing tiles; the essential tiles are still missing, like the floors for the Sound Building and such.