SA2/SADX Mod Loader

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Aug 4, 2013.

  1. Turbohog

    Turbohog

    Member
    809
    71
    28
    Wow. The menu and menu background scaling is a huge quality of life improvement. The PVMX texture archive sounds great too! Impressive work Morph!

    Now that the menu scaling problem is fixed, are there really any other glaring issues that anyone knows of when playing SADX widescreen? It's a shame Sega didn't have Morph, MainMemory, and co. to help them when they released the crappy Steam/XBLA/PSN port.
     
  2. SF94

    SF94

    Tech Member
    Well, Sky Chase is basically unplayable at any resolution greater than 640x480 still. Fixing it will be interesting to say the least :v:
     
  3. Blue Spikeball

    Blue Spikeball

    Member
    1,581
    528
    93
    Works as a charm! Thanks, I've been waiting for something like this for a long time. Thanks to the modding scene, the PC version of SADX went from being an underwhelming port to my favorite version :)

    Bug report: While this fixes nearly all scaling issues, they're still present in the GG game select screen and the GG games themselves.
     
  4. SF94

    SF94

    Tech Member
    Yep, I'm aware. It's fairly low priority, but I'll get to it. One other thing that isn't scaling for some reason is the text on the recap screen. Before I get to those though, I'd like to find out why the menus feel the need to write to the depth buffer and cause artifacts like in that screenshot of the character select screen I posted. It should still be yellow behind "Player Select". It works fine with the god-awful 16-bit depth buffer, but like hell I'm reverting that. :colbert:
     
  5. Blue Spikeball

    Blue Spikeball

    Member
    1,581
    528
    93
    That player select screen issue isn't present for me:

    [​IMG]

    Perhaps it's caused by a mod?

    Would you like me to post my settings?
     
  6. SF94

    SF94

    Tech Member
    Sure! It does tend to stop happening sometimes, but I haven't been able to pinpoint it. Does it happen for you if you start the game and go straight to Trial mode, by chance?
     
  7. Blue Spikeball

    Blue Spikeball

    Member
    1,581
    528
    93
    Here you go:
    [​IMG]
    [​IMG]

    Plus my enabled mods:
    [​IMG]

    Just tried that and still no issue.
     
  8. Turbohog

    Turbohog

    Member
    809
    71
    28
    Haha woo boy. I had never tried that before. Fixing that definitely seems like it will be a challenge.
     
  9. Turbohog

    Turbohog

    Member
    809
    71
    28
    So double post. But I think this question belongs here.

    I was trying to make a mod for SA2 that uses the init function of the mod loader. However, it seems like the mod loader doesn't find the init function because I can tell it's never called. The extern "C" and "__declspec(dllexport)" are both there. Does anyone have an idea of what I might be doing wrong?
     
  10. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    Did you make sure to call it "Init", not "init"? The full signature should technically be "void __cdecl Init(const char *path, const HelperFunctions &helperFunctions)", although you can usually ignore the __cdecl as that's the default, and the arguments can be left out if you aren't using them.
     
  11. Turbohog

    Turbohog

    Member
    809
    71
    28
    This is the signature I'm using: "__declspec(dllexport) void Init(const char *path, const HelperFunctions &helperFunctions)".
     
  12. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    Well, do you have "__declspec(dllexport) ModInfo SA2ModInfo = { ModLoaderVer };" in there too? Have you specified the DLLFile key in the mod.ini file? Does the mod loader's log say anything?
     
  13. Turbohog

    Turbohog

    Member
    809
    71
    28
    Yes, I've got that in there. And the mod.ini file is correct. The modloader log shows that the mod is loaded and I can tell it is. I've put in some debug print statements in other parts of the mod and the mod loader log does show those. It's just that the code inside the Init function is never executed.
     
  14. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    Well then without any further information (such as the cpp or dll file) I can't help you.
     
  15. ThePuzzledBoy

    ThePuzzledBoy

    Member
    4
    0
    0
    Motivation to work on something. ANYTHING.
    If this is in the wrong topic, I apologize. I just don't know where else to go.

    Has anyone managed to get the SADX Mod Manager (and any mods) working in Windows XP in this day and age?

    I've been trying this feat myself recently and have even managed to get the necessary redistributables for the Mod Manager and mods (even those that genuinely surprised me when they actually installed in XP), and the mod loader itself works fine (I can select mods, change settings, all that jazz), but after I hit "save and play", I get the system error "sonic.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

    The only settings I've checked in the Mod Manager are "force texture filtering", "force mipmapping", "scale HUD", and "disable CD check".

    I've tried the game with the mod loader (and the same mods) installed in Windows 10, and it works fine there. As for the XP machine, I've tried playing without the mod loader installed and it works fine. I've even tried loading most of the mods by themselves, but the same error appears no matter what. However, I did try running the game with the mod loader installed but no mods set to load, and that actually worked amazingly well -- even performing better than just running it with the default programs and CD, at least with the menu animations; I didn't go much farther than that -- so I assume the error has to do with the mods themselves not playing nice with XP at the game's runtime.

    The specs for my Windows XP computer (if it helps) are:

    • 3.2 GHz Dual-Core Pentium 4
    • 2GB RAM
    • 256MB PNY GeForce 8400 GS DDR2
    • Windows XP Professional SP3


    Thanks in advance,

    Hunter
     
  16. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    The Mod Manager and Mod Loader are built with Windows XP SP3 compatibility, but mods may not be. All of my mods should be XP compatible.
     
  17. ThePuzzledBoy

    ThePuzzledBoy

    Member
    4
    0
    0
    Motivation to work on something. ANYTHING.
    Well, I tried the Metal Sonic mod (as I consider that the easiest way to go since I haven't gone 100% on the game), and it seems to be complaining that "MSVCR100.dll was not found", leading to that mod being unable to load.

    Well, at least it's not an "illegal operation" error. However, MSVCR100.dll is a Visual C++ redist, right? I doubt it's the 2017 one, since I know I have that installed. (I even repaired the install to see if that would fix it, but no dice.)

    I also tried the "Sonic is a girl" mod, and I get the exact same error.

    I also tried both on my Windows 10 machine, and they worked with no problem.

    However, here's where things get interesting. Remember when I said earlier that I tried loading my installed mods one at a time and they didn't work? Well, I tried loading them again, and now they somehow work! Except for a few mods that I'll relay to their respective creators...


    Thanks,

    Hunter
     
  18. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    MSVCR100.dll is from the 2010 redist.
     
  19. ThePuzzledBoy

    ThePuzzledBoy

    Member
    4
    0
    0
    Motivation to work on something. ANYTHING.
    Thanks! Got that downloaded and the mods now work!

    Also, I just want to say I noticed your latest update less than an hour ago mentioning "XP support fixed". Can you give some specifics on that (preferably in layman's terms)? Because I downloaded and installed it after trying your mods, and it broke my mods and caused the same issues as before. EDIT: Ignore that last sentence, it was another, seperate mod that I mistakenly enabled that crashes the game and I'm waiting on a fix for. :specialed:


    Thanks,

    Hunter
     
  20. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    Morph fixed the mod update system in the mod manager, it was using a SHA-256 provider that was incompatible with Windows XP, now it can fall back on one that is compatible.