Skip to content

Dynamically loaded module support #26

@Martmists-GH

Description

@Martmists-GH

Some games (notably the Mario Party titles) load NROs at runtime. I'd like to see what possibilities there are to hook into these modules, if any.

Some concerns with these modules:

  • They may be loaded (and unloaded) at any point
  • There is no way for sail to easily link symbols to these modules
  • Hooking into the nn::ro::LoadModule method seems to fail(?) Error on my part
  • Jumps to loaded modules may not fit in a branch instructions, so multiple-op jumps may be necessary, and these might not always fit in small functions.
  • Hakkun uses a wrapper around nn::ro::detail::RoModule which may not work for dynamic loads (especially since the amount loaded at once is unknown)
  • possibly more that I forgot about

Rather than a feature request, I'm hoping this issue can be treated as a discussion thread for other problems and possible solutions, in case anyone wants pointers on implementing support and problems they may have to solve.

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