Add necessary features for LgyBg and Process9 development #151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am currently developing a replacement for AgbBg and TwlBg that would fix the bad upscaling that the official module suffers from.
To that end, I am adding the following features:
[makerom] Add -baremetal flag
This is the simplest workaround to us not supporting multiple phdr per "segment"
(looking at Process9 and TwlBg, Nintendo's tooling seems to support this usecase).
K9 and legacy FIRM k11 don't have memory management and have everything
be RWX. We can exploit how they load CIPs to have the segment be
anything, and be able to be loaded at any VMA (first segment defines LMA
and entrypoint, however). With this flag, the first phdr in the .elf
file is always chosen as the "code" segment and so on.
For example, we can have a FCRAM segment where the image is initially
loaded and jumped to, as the first segment, then an AXIWRAM segment. For
TwlBg, Nintendo seems to have a RWX phdr inside the code "segment" that
it relocates to AXIWRAM, but we don't support this.
[makerom] Add -pagesize option
Kernel9 uses pagesize=0x100 instead of the usual 0x1000.
(one can notice it when using ctrtool on Process9)
[makerom] Remove 32 interrupt ID limitation