TASEmulators / TASEmulators/BizHawk

Improve waterbox startup with compilation changes

Open
#2,087 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

re: Waterbox Request: Feature/Enhancement
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

Prerequisite: Switch to .NET Core.

Waterbox executables need to be loaded to a predictable address. It's too hard to guarantee this address in the first 2G for space, so we put it out in the hood, typically 0x36f00000000. This means code is compiled with -mcmodel=large, which hurts perf.

.NET core gives us opportunities to fix this.

https://github.com/dotnet/samples/tree/master/core/hosting

We would make a small unmanaged executable that:

  1. ran a few intitial startup checks (some of the stuff that zeromuisan tries to do now can get foiled when assemblies accidentally load too early)
  2. blocked off some address space for waterbox
  3. booted a CLR instance and loaded the main emuhawk assembly

edit: Maybe https://github.com/SnowflakePowered/sabinokaku can do this? --yoshi

TODO.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked .NET Core hosting samples and verify the prerequisite of switching to .NET Core. Then map how Waterbox executables are currently started and compiled, including the startup checks and address-space reservation described here. Done should be a decided and implemented startup design that avoids the current large code model, with its effects validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.