Skip to content

Certain games crash due to uninitialised memory #19

Description

@InvoxiPlayGames

The BrainSlug launcher doesn't clear out RAM that might be used by titles as places for uninitialised globals or where allocations otherwise expect there to be pre-nulled data.

Problematic titles include SC7P and SZBP, where SC7P will often crash during early OS or SC init when encountering globals that are expected to be nulled out, and SZBP randomly crashes during startup.

These crashes don't manifest on Dolphin where all memory is initialised to zero.

Putting the following at the start of Brainslug's main() seems to mitigate the issue as a starting point...

memset((void *)0x80006000, 0, 0x9FA000);
memset((void *)0x80c00000, 0, 0xD00000);

...but given the hardcoded addresses it's not a true solution and could easily accidentally trample over something important in the loader if not careful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions