Skip to content
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

ppu: Stack fixup #5214

Merged
merged 2 commits into from
Nov 1, 2018
Merged

ppu: Stack fixup #5214

merged 2 commits into from
Nov 1, 2018

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Oct 2, 2018

Two fixes: fix base offset from stack allocation.
This was tested on both ppu interrupt thread and a non-joinable non-interruptable thread.

testcases: non-interrupt thread, interrupt thread

results.txt

The only mismatch left is in main thread stack offset, which is related to https://github.com/elad335/rpcs3/blob/1e7eeaad504c3c11d6b5464023b10cc97daafa6b/rpcs3/Emu/Cell/PPUModule.cpp#L1484 so I will leave it untouched atm.

Fixes High Velocity Bowling [NPEA00047] access violations with any(?) version that is not v1.0.

@Deminating
Copy link

Fixes the Back to the Future series intro crash.
Intro -> (Probably) Playable

BTTF screenshot rpcs3_2018-10-02_12-57-04

@AniLeo AniLeo requested a review from Nekotekina October 5, 2018 19:31
@Nekotekina
Copy link
Member

Tests are messy TBH, and don't seem to utilize sys_ppu_thread_get_stack_information to get more readable information.

@elad335
Copy link
Contributor Author

elad335 commented Oct 6, 2018

The syscall provides initial stack address of the allocation, im looking for the current offset from the allcation end, which can only be pulled directly from the register itself. (even though the stack gap fix could still be figured out using the syscall only)

@Nekotekina
Copy link
Member

Offset you talk about is (stack addr + stack size - stack value), it's computed from 3 variables only 1 of them you print.

@elad335
Copy link
Contributor Author

elad335 commented Oct 7, 2018

Have updated the tests according to your advice. Results.txt

@Nekotekina Nekotekina merged commit 3a7f5b9 into RPCS3:master Nov 1, 2018
@elad335 elad335 deleted the stack branch November 2, 2018 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants