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

Fix Hamilton's Great Adventure #3427

Merged
merged 2 commits into from
Sep 18, 2017
Merged

Fix Hamilton's Great Adventure #3427

merged 2 commits into from
Sep 18, 2017

Conversation

flash-fire
Copy link
Contributor

This game calls sys_rsx_context_attribute before sys_rsx_memory_allocate. This inevitably causes a crash. So, I return that the resource doesn't exist. Doesn't seem like a race condition because the main thread asks for the context before the rendering thread is even created. Could be wrong though so I left that in as a comment.

@mention-bot
Copy link

@flash-fire, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jarveson, @Nekotekina and @kd-11 to be potential reviewers.

@digitaldude555
Copy link

screenshot 1338
yes

@flash-fire flash-fire force-pushed the rsx_patch branch 2 times, most recently from b12cb3c to 84b6c57 Compare September 10, 2017 19:00
@AniLeo AniLeo requested a review from kd-11 September 12, 2017 17:56
Copy link
Contributor

@kd-11 kd-11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alignment on that comment will trigger ocd XD. Move it above outside the block or down one line and indent it with the return block. Otherwise looks sane enough.

{
// Hamilton's Great Adventure [NPUB30458] calls this function before calling allocate. Not sure if race condition.
sys_rsx.error("sys_rsx_context_attribute called before sys_rsx_context_allocate: context_id=0x%x, package_id=0x%x, a3=0x%llx, a4=0x%llx, a5=0x%llx, a6=0x%llx)", context_id, package_id, a3, a4, a5, a6);
return CELL_ESRCH;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just change to EINVAL to match real hw

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed and rebased. Sorry I don't pay attention to github notifications.

Copy link
Member

@AniLeo AniLeo Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If handling that matches real console behavior then it shouldn't have the "Not sure if it's race condition" comment as it's correct (?)

…ocate. This inevitably causes RPCS3 to crash. Add nullptr check to prevent this.
@AniLeo
Copy link
Member

AniLeo commented Sep 18, 2017

For future reference, the behavior implemented here has been tested on a real PS3 and it was confirmed correct. Merging as soon as it finishes building.

@AniLeo AniLeo merged commit d5fb718 into RPCS3:master Sep 18, 2017
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.

5 participants