-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hi! Im new to switch modding. I'm trying to develop a skyline plugin for another game other than smash. I have everything setup, meaning:
- Ryujinx running my own copy of the game
- A generated
main.npdmwith the game specific header, svc's and permissions from the json template in this repo. - A simple rust
cargo-skylineplugin that doesprintln!("Hello from skyline plugin"). - The
skyline_logger_rust.exeapplication to receive the prints and logs.
Im now trying to build skyline so that I can potentially add custom fixes for crashes now, and later on.
What im doing:
- Running
make skyline - Renaming
skyline.nsotosubsdk9 - Moving
subsdk9to theexecfs/dir
However, the game always crash.
What doesn't work:
- Reusing the Smash
subsdk9for my target game: Crash. - Using my compiled version of Skyline as
subsdk9in the Smashexecfs/dir with a known working plugin + workingmain.npdm: Crash. - Bindiffing my
subsdk9with the Smashsubsdk9in IDA to see what I'm missing in order to get skyline to work on Smash (which would be one step forward): i couldn't find any difference, but i must have missed something. - I've also tried dumping known api names and offsets from the sdk belonging to the game into the
syms.ldfile using thegenLinkerScript.pyscript: Crash.
What has worked:
- Using the provided
subsdk9andmain.npdmfrom this repo + my simple print plugin: prints the"Hello from skyline plugin"in theskyline_logger_rust.exe.
Questions:
- Is the
syms.ldfile even used? - If it's used, Is it to "patch" non working import symbols with their corresponding hardcoded mem addresses from the game sdk?
- If so, what counts as the "base address offset"?
- Am i missing something? Due to little documentation, I've just had to guess everything.
For reference, the following crash log is from running Smash with main.npdm (from releases in this repo) + libtraining_modpack.nro and my compiled version of skyline subsdk9:
00:00:06.855 |W| HLE.GuestThread.46 KernelSvc : GetInfo(value: 0x0000000000000000) = InvalidHandle
00:00:06.855 |W| HLE.GuestThread.46 KernelSvc : GetInfo(value: 0x0000000000000000) = InvalidHandle
00:00:06.855 |W| HLE.GuestThread.46 KernelSvc : GetInfo(value: 0x0000000000000000) = InvalidEnumValue
00:00:06.855 |W| HLE.GuestThread.46 KernelSvc : GetInfo(value: 0x0000000000000000) = InvalidHandle
00:00:06.855 |W| HLE.GuestThread.46 KernelSvc : GetInfo(value: 0x0000000000000000) = InvalidHandle
00:00:06.865 |W| HLE.GuestThread.46 KernelSvc : ControlCodeMemory() = InvalidEnumValue
00:00:07.505 |W| GUI.WindowThread Hid Remap: No matching controllers found. Application requests 'ProController, Handheld, JoyconPair, JoyconLeft, JoyconRight' on 'Player1, Player2, Player3, Player4, Player5, Player6, Player7, Player8, Handheld'
00:00:08.106 |S| HLE.OsThread.47 ServiceAm SetFocusHandlingMode: Stubbed. {unknownFlag1: True ; unknownFlag2: False ; unknownFlag3: True}
00:00:08.106 |S| HLE.OsThread.47 ServiceAm SetOutOfFocusSuspendingEnabled: Stubbed. {outOfFocusSuspendingEnabled: False}
00:00:08.108 |S| HLE.OsThread.47 ServiceAm SetGamePlayRecordingState: Stubbed. {_gamePlayRecordingState: False}
00:00:08.313 |I| HLE.GuestThread.46 Cpu PrintGuestStackTrace: Guest stack trace:
Process: Super Smash Bros. Ultimate, PID: 127
0x000000000ac879c4 main:0x27839c4
0x0000000008761804 main:0x25d804 nnMain:0x0374
0x000000000f13d9bc sdk:0x849bc nn::init::Start(unsigned long, unsigned long, void (*)(), void (*)()):0x004c
0x00000000085000ac rtld:0x00ac
00:00:08.314 |I| HLE.GuestThread.46 Cpu PrintGuestRegisterPrintout: Guest CPU registers:
X[00]: 0x0000000000000000
X[01]: 0x000000100ff02a70 (SP:-0x0110)
X[02]: 0x0000000000000005
X[03]: 0x0000000000000000
X[04]: 0x0000000000000008
X[05]: 0x0000000000000000
X[06]: 0x0000000000000000
X[07]: 0x0000000000000000
X[08]: 0x000000100ff02a76 (SP:-0x0116)
X[09]: 0x000000000000002f
X[10]: 0x000000100ff02a95 (SP:-0x0135)
X[11]: 0xfefefefefeff0001
X[12]: 0x000000000000000f
X[13]: 0x0000001100710424
X[14]: 0x0000000000000000
X[15]: 0x0000000000000088
X[16]: 0x000000000f0b2500
X[17]: 0x000000000f552090 (sdk:0x499090) => memcpy
X[18]: 0x0000000000000000
X[19]: 0x0000000000000000
X[20]: 0x000000100ff02a70 (SP:-0x0110)
X[21]: 0x000000100ff02b49 (SP:-0x01e9)
X[22]: 0x0000000000000120
X[23]: 0x0000000000000000
X[24]: 0x0000000000000000
X[25]: 0x000000100ff035e8 (SP:-0x0c88)
X[26]: 0x0000000000000000
X[27]: 0x0000000000000000
X[28]: 0x0000000000000000
FP: 0x000000100ff02fb0 (SP:-0x0650)
LR: 0x000000000f09b240
SP: 0x000000100ff02960 (SP)
PC: 0x000000000f552090 (sdk:0x499090) => memcpy
00:00:08.314 |E| HLE.GuestThread.46 Cpu InvalidAccessHandler: Invalid memory access at virtual address 0x0000000000000000.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels