Skip to content

Updated PS1 sigscans #109

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Updated PS1 sigscans #109

wants to merge 1 commit into from

Conversation

Jujstme
Copy link
Collaborator

@Jujstme Jujstme commented Jun 7, 2025

This fixes some PS1 sigscans, especially for retroarch and PCSX_rearmed, re-enabling support for those emulators

@Jujstme Jujstme self-assigned this Jun 7, 2025
Comment on lines +15 to +20
SIG.scan_process_range(game, main_module_range)
.map(|addr| addr + 1)
.and_then(|addr| Some(addr + 0x4 + game.read::<i32>(addr).ok()?))
.and_then(|addr| game.read::<Address32>(addr + 0x16A).ok())
.and_then(|addr| game.read::<Address32>(addr).ok())
.map(|addr| addr.into())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason you are using so much and_then chaining instead of just using the ? operator

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It allows me to capture the variable and put it inside the closure.
Otherwise I would need to define a new variable each time.

Functionally the same, but I find this easier to read as I am explicitly writing in the closure what I want to do with the captured variable.

@Jujstme
Copy link
Collaborator Author

Jujstme commented Jun 19, 2025

For the record, I haven't merged this because I haven't tested the code yet.

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.

[PS1] Sigscan for PCSX-reARMed is broken on the latest versions of the libretro core
2 participants