-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS: Improve timing accuracy for title launches (both ARM and PPC) #9545
Conversation
b6329e8
to
b5eb829
Compare
Changes seem good, but this time I'll wait with approving until testing is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't 100% sure what to test so tested a handful of things: wiiware titles, wii games, system menu and various channels, and a VC game. Code wise, LGTM
You still have |
Low MEM1 is cleared by IOS before all the other constants are written. This will overwrite the Gecko code handler but it should be fine because HLE::Reload (which will set up the code handler hook again) will be called after a title change is detected.
Reading the boot content from the NAND takes a non-negligible amount of time and the PPC should be held in reset while the DOL is being read.
The extra IPC ack is triggered by a syscall that is invoked in ES's main function; the syscall literally just sets Y2, IX1 and IX2 in HW_IPC_ARMCTRL -- there is no complicated ack queue or anything.
We should only try to load a symbol map for the new title *after* it has been loaded into memory, not before. Likewise for applying HLE patches and loading new custom textures. In practice, loading/repatching too early was only a problem for titles that are launched via ES_Launch. This commit fixes that.
The PPC is supposed to be held in reset when another version of IOS is in the process of being launched for a PPC title launch. Probably doesn't matter in practice, though the inaccuracy was definitely observable from the PPC.
Also gets rid of one static variable
9469880
to
aef0760
Compare
Squashed and rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, untested
I forgot to post I tested this with Ocarina of Time, Super Smash Bros. Brawl, and Metroid Prime Trilogy among other titles. |
Oversight from dolphin-emu#9545, which moved the "new game has been loaded" logic to a separate OnNewTitleLoad function that has to be called explicitly *after* a title has loaded.
Oversight from dolphin-emu#9545, which moved the "new game has been loaded" logic to a separate OnNewTitleLoad function that has to be called explicitly *after* a title has loaded. Coupled with the commit that makes Dolphin not clobber 0x1800-0x3000 when using MIOS, this fixes Wind Waker and other MIOS-patched games when they are launched from the System Menu.
(alternative title: make ES_Launch slower and potentially break it)
This is a series of commits to make ES launch timings closer to console:
(those commits can be reviewed one at a time)
This PR also simplifies IPC reinitialisation after an IOS relaunch and makes it more accurate. Contrary to what the current code suggests, there is no complicated ack queue or anything. The extra IPC ack is actually triggered by a syscall that is invoked in ES's main function; the syscall literally just sets Y2, IX1 and IX2 in HW_IPC_ARMCTRL.
Needs careful testing because ES_Launch is cursed