don't click here

SADX/SA1 Hacking/Modding

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Aug 15, 2009.

  1. synchronizer

    synchronizer

    Member
    2,349
    130
    43
    Oh. That's a little disheartening. I was kind of hoping that eventually we'd see a fixed port featuring both good lighting and good transparency. Might that be in the cards in the long-term (few years?) or is no one working on it anymore?
     
  2. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,797
    383
    63
    SonLVL
    Yeah uh, I think he has other projects now. I won't say never though.
     
  3. synchronizer

    synchronizer

    Member
    2,349
    130
    43
    Well that's better than the alternative. Hope he's doing well!

    Thanks for the update.
     
  4. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,797
    383
    63
    SonLVL
  5. My apologies if this is innapropriate for a month+ bump or not, but I've been itching to get this thought out of my head. This isn't a request or anything, but I was just looking into Sonic Shuffle and was really digging the Cel-shaded graphics. I did a google search and checked out gamebanana, which is so frustrating to navigate, and it appears that there has never been a mod for SA1 (or likely SA2 and Generations) that would replace the applicable characters' model. I find it pretty bizarre that none exists, but perhaps not everyone digs that style as much as I do. So I just have to ask, would anyone here even be interested in a mod like that? Or are we all just content with the original Dreamcast graphics?
     
  6. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,617
    93
    Working on my art!
    There was an attempt at a cell shaded Generations mod, but it's probably harder to pull off than it sounds. To get it right you'd have to update a lot of textures and modify the lighting. It's probably more than just swapping out the models (which are essentially lower poly versions of the SA1 models iirc)
     
    • Informative Informative x 1
    • List
  7. I see, that's dissapointing then.
     
  8. PkR

    PkR

    Member
    191
    25
    18
    SADX Dreamcast Conversion, The Emeralds' Awakening
    Since the prototype discussion forum is closed, I decided to post this here. Very late to the party, but I just wanted to share this information and hopefully get someone interested to help.

    Both Preview and Review prototypes have additional versions of the game's main binary that go unused. The game uses the file _Main.rel, the alternative versions are AdvMain.rel and AdvMainD.rel. These binaries appear to be from an earlier build of the game, possibly from before the time they started introducing "Director's Cut" changes. There's a string in AdvMainD that says "Sonic Adventure 1 for GAME CUBE". If you scan AdvMain and AdvMainD with the object scanner in SA Tools, you will find that all characters have their original Dreamcast character models. There are also "d" versions of several stage files. For example stg01d.rel has untouched Dreamcast Emerald Coast, and advertiseD.rel contains the model for the original SA1DC title screen, which is missing in the used version of the file. I suspect those "d" versions would've been used together with the old main binary.

    I think it would be really interesting to get the game to boot with these alternative binaries. But, as expected, simply replacing _Main.rel with AdvMain or AdvMainD makes the game hang, and replacing any of the other files with their "d" counterparts freezes the game or drops the characters into an empty level. I think the DOL file needs to be hacked to load the alternative binary properly. Sadly I don't have the knowledge to do it on my own, so I hope someone can help.

    In any case, when the next update for SA Tools arrives you will be able to explore the levels in both prototypes, and eventually we'll extract all models from them.
     
    • Informative Informative x 11
    • List
  9. Shakidna

    Shakidna

    Rehash Rampage Member
    Last edited: Mar 28, 2022
  10. How to find and edit font graphics for hieroglyphic subtitles? It's in BIN files afaik. I have an idea to replace symbols with their english pronunciation (yes I know it can only be approximate and it is fequently context dependent) to create sort of educational subtitles.

    Edit: nvm I think i better look into highres font mods
     
    Last edited: Aug 3, 2024
  11. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,797
    383
    63
    SonLVL
    You all need to check this out tomorrow
     
    • Informative Informative x 3
    • Like Like x 1
    • List
  12. Shade Vortex

    Shade Vortex

    The Black Vortex Member
    614
    58
    28
    USA, WA.
    YouTube Memes
    Sorry if this is bumping the topic unnecessarily but I decided to try and play SADX again with all my mods, and I get this error when trying to play the game.
    upload_2024-11-10_19-34-48.png
    Also I know it's more of an SA2 thing (I don't wanna bump 2 topics in a row) but whenever I transform into Super Sonic or use Metal Sonic the performance/framerate tanks, and I have no idea why...

    I'm on Windows 11, 64-bit, and my pc specs are https://pcpartpicker.com/list/ct2Zrv definitely not the problem.
     
  13. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,797
    383
    63
    SonLVL
    Sounds like you're missing some of the older MSVC redists. You may need all of these: 2010, 2012, 2013, and 2022.
     
  14. Minquisitor

    Minquisitor

    Member
    4
    3
    3
    Greetings, I am interested in restoring Dreamcast assets to the PS3 version of SADX. While it is a widely disdained version of the game, it has several advantages for me:
    1. It is more convenient to play on my CRT than the PC version
    2. It uses PVR textures just like the Dreamcast version (and unlike the GameCube version)
    3. The files are all stored individually on the hard drive, so there is no need to recalculate LBA's
    4. It may be wishful thinking, but perhaps the shaderps3 folder contains clues for restoring the Dreamcast's lighting system
    That said, I don't know where the character models are stored in this 2010 version of the game. If the file system is otherwise similar to the 360 version's, then SA Tools might come in handy for this.

    Anyway, here is some progress in restoring Station Square's textures:
    [​IMG]

    Upon closer inspection, the curb looks awful, even going off in the wrong direction at times.
    [​IMG]
    So what's going on? Well, the UV's for the curb are completely different between Dreamcast and GameCube.

    Dreamcast textures:
    [​IMG] [​IMG]
    Dreamcast uses a 32x32 texture for the skirt of the curb, and a 64x64 texture for the top. Simple enough.

    My modified texture:
    [​IMG]

    Huh, that's very different... Let's look at the unmodified DX version.

    DX texture:
    [​IMG]

    DX uses a singular texture, though it is subdivided (Let's ignore the drain on the top-left for now).

    Unfortunately, in DX the skirt (of which there are two* variations) is now a pitiful 32x12, which is a 62.5% reduction in detail.
    The top of the curb (also has two* variations) has been cut down to 32x20, which is a catastrophic 84.38% reduction in detail.

    Asterisk time.
    This has all been pretty bad for DX, but now there is a third curb face for diagonally intersecting two curb tiles, which lowers the resolution even further (bh/2 = a 91.79% reduction in detail from Dreamcast).

    Perhaps this can better illustrate the texture logic in DX:
    [​IMG]
    The DX devs were able to place the yellow triangles at whatever angle without consequence because there are no specific geometric features in the DX version, but this practice causes issues with the Dreamcast texture's grooves:
    [​IMG]

    There's other UV issues as well. The pillars at the train station entrance have a unique texture on Dreamcast, but share the same brick texture as the wall on DX.
    [​IMG]
    The pillar textures are very badly misaligned, even in the unmodified DX, so hopefully the PS3 levels are in a modifiable format so I can correct the mappings.
     
    Last edited: Nov 22, 2024
  15. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,797
    383
    63
    SonLVL
    So, uh, fun fact, the game's models are all stored in the executable file, embedded into the game's code. Finding a way to edit them will be an incredibly painful process.
     
    • Informative Informative x 3
    • List
  16. Blastfrog

    Blastfrog

    See ya starside. Member
    Though certainly some time away from now, when eventually finished, the decomp should allow not only for deeper fixes/enhancements but also will make porting to other platforms more feasible.

    Still, should be interesting to see how far one can get by hacking the official PS3 port.
     
  17. Minquisitor

    Minquisitor

    Member
    4
    3
    3
    If the levels themselves are stored in EBOOT.BIN then unfortunately there's nothing I can directly do about UV/model corrections for now. In the meantime, I have a new curb texture that retains the Dreamcast's skirt and DX's top (with a changed hue to match Dreamcast):
    [​IMG]
    [​IMG]
    I think it looks OK.

    Anyhow, I believe the shaderps3 folder may contain clues about restoring Dreamcast lighting to the PS3 version. The lighting model is stored in .wpu files, also used by Sonic Adventure 2 and apparently Sonic Generations. Supposedly, these files can be modified with Windows SDK, but I've not confirmed this.

    There are three lighting models included in the PS3 version:
    1. sonicps_no_lighting.wpu
    2. sonicps_simple.wpu
    3. sonicps.wpu (default)
    The other two non-default lighting models aren't entirely unused however; various menu elements use them, as proven by the black squares upon deleting them.

    So what happens if we force the game to use the alternative shaders in gameplay?
    [​IMG]
    sonicps_simple.wpu and sonicps.wpu are very similar, but the fog and water rendering are different.

    As I said, Sonic Adventure 2 uses wpu shaders. So let's import sonicps.wpu from Sonic Adventure 2 (on PS3)!
    [​IMG]
    ...Odd.
    For some reason, a few of Big's and Gamma's textures survive:
    [​IMG] [​IMG]

    Ultimately, the SA2 shaders on PS3 are much larger than SA1's (6-12kb vs 4-5kb) so they likely contain information irrelevant to SA1.

    Well, back to texture restoration.
    The Mystic Ruins are looking pretty good now!
    [​IMG]

    However, the snow in Ice Cap looks too bright even after restoring the Dreamcast texture, which has got to be the fault of the shader model or the level's own light sources:
    [​IMG]

    I'll probably just see which texture the big snowball uses and lighten that one up for consistency.
     
    Last edited: Nov 24, 2024
  18. Minquisitor

    Minquisitor

    Member
    4
    3
    3
    Some interesting discoveries about SADX shaders on PS3.

    Firstly, these shader files are mostly unreadable, but there are a few pieces of decipherable text like TEXCOORD0, MaterialDiffuse, MaterialAmbient, etc, it's just that the actual values seem to be encoded in some format I'm not aware of. These parameter names do seem to be align with the Cg format the PS3 uses, so it's not entirely avant-garde at least.

    Anyways, I've decided to explore the sonicps_simple.wpu more thoroughly. While sonicps.wpu is a 4.46kb file, sonicps_simple.wpu is considerably smaller at 3.76kb. I suspect the size difference is that the shader file defines which effects each map uses, with sonicps_simple.wpu having less text due to having fewer commands. My evidence is that some maps (and in some cases, merely parts of maps) receive no shading whatsoever when sonicps_simple.wpu is used, which suggests their shading profile has to be specified in the wpu file.

    So, sonicps_simple.wpu is indeed "simplified". This has upsides and downsides.

    Firstly, upsides:
    [​IMG]
    You know the infamous bug responsible for giving Spinners white eyes in SADX? The broken effect responsible for this bug does not seem to be implemented in most or all levels in sonicps_simple.wpu.
    [​IMG]
    THE HORRENDOUS FOG EFFECT IN SKY DECK ACT 1 IS NOT IMPLEMENTED! (Unfortunately, it still exists in Act 2, but this does suggest that each level's effects are defined in this one file)
    [​IMG]
    No more broken fog at the ancient Master Emerald shrine either. Not only do the hills look okay now, the river is no longer toxic either.
    [​IMG]
    The jungle's fog effect also doesn't apply to the cliffs anymore.
    Now for the downsides (compared to sonicps.wpu):
    [​IMG]

    While the jungle fog doesn't apply to the cliffs, it also doesn't apply in the jungle!
    [​IMG]
    The mirror room has no shading (this include's Sonic's model, though Sonic's shading works just fine in the immediately preceding and proceeding rooms).
    [​IMG]
    And Sonic has no shading all throughout Twinkle Park Act 2.

    There are other instances of broken lighting, but overall, while sonicps_simple.wpu is sometimes superior to sonicps.wpu in terms of fog (or lackthereof), it's sometimes inferior in terms of lighting effects. It is a shame that these shader files are unreadable because I would love to go in and customize sonicps.wpu to remove fog effects and reimplement the ambient lighting effects into more levels (which SADX does sometimes use, not as often as on Dreamcast).