kernel: Implement code address offset for Skyline compatibility #10

Merged
Zephyron merged 1 commit from kernel/skyline-32bit-code-offset into main 2025-11-01 05:45:48 +00:00
Owner

Add support for the Skyline 32-bit modding framework by implementing
a code address offset and improving memory state verification.

Changes:

  • Add CodeStartOffset constant (0x500000) applied to 32-bit code
    address space types (Is32Bit and Is32BitNoMap) in KProcess::LoadFromMetadata
  • Add debug logging for 32-bit syscall argument tracking in
    SetProcessMemoryPermission, MapProcessCodeMemory, and
    UnmapProcessCodeMemory wrapper functions
  • Replace CheckMemoryStateContiguous with CheckMemoryState in
    KPageTableBase::UnmapCodeMemory for more flexible memory state
    verification

This implementation enables compatibility with:

  • Skyline 32-bit modding framework
  • CTGP-DX (Mario Kart 8 Deluxe mod)
  • Other homebrew using 32-bit Skyline

Based on similar fixes in Ryujinx (commit 5e9678c8fe) and Eden emulator.

Co-authored-by: JPikachu jpikachu.eden@gmail.com
Co-authored-by: JPikachu jpikachu@eden-emu.dev
Signed-off-by: Zephyron zephyron@citron-emu.org

Add support for the Skyline 32-bit modding framework by implementing a code address offset and improving memory state verification. Changes: - Add CodeStartOffset constant (0x500000) applied to 32-bit code address space types (Is32Bit and Is32BitNoMap) in KProcess::LoadFromMetadata - Add debug logging for 32-bit syscall argument tracking in SetProcessMemoryPermission, MapProcessCodeMemory, and UnmapProcessCodeMemory wrapper functions - Replace CheckMemoryStateContiguous with CheckMemoryState in KPageTableBase::UnmapCodeMemory for more flexible memory state verification This implementation enables compatibility with: - Skyline 32-bit modding framework - CTGP-DX (Mario Kart 8 Deluxe mod) - Other homebrew using 32-bit Skyline Based on similar fixes in Ryujinx (commit 5e9678c8fe) and Eden emulator. Co-authored-by: JPikachu <jpikachu.eden@gmail.com> Co-authored-by: JPikachu <jpikachu@eden-emu.dev> Signed-off-by: Zephyron <zephyron@citron-emu.org>
Add support for the Skyline 32-bit modding framework by implementing
a code address offset and improving memory state verification.

Changes:
- Add CodeStartOffset constant (0x500000) applied to 32-bit code
  address space types (Is32Bit and Is32BitNoMap) in KProcess::LoadFromMetadata
- Add debug logging for 32-bit syscall argument tracking in
  SetProcessMemoryPermission, MapProcessCodeMemory, and
  UnmapProcessCodeMemory wrapper functions
- Replace CheckMemoryStateContiguous with CheckMemoryState in
  KPageTableBase::UnmapCodeMemory for more flexible memory state
  verification

This implementation enables compatibility with:
- Skyline 32-bit modding framework
- CTGP-DX (Mario Kart 8 Deluxe mod)
- Other homebrew using 32-bit Skyline

Based on similar fixes in Ryujinx (commit 5e9678c8fe) and Eden emulator.

Co-authored-by: JPikachu <jpikachu.eden@gmail.com>
Co-authored-by: JPikachu <jpikachu@eden-emu.dev>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Zephyron deleted branch kernel/skyline-32bit-code-offset 2025-11-01 05:45:49 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Citron/Emulator!10
No description provided.