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

HLE scanning order #40

Open
RadWolfie opened this issue Aug 23, 2018 · 1 comment
Open

HLE scanning order #40

RadWolfie opened this issue Aug 23, 2018 · 1 comment
Labels
OOVPA Any OOVPA change relative

Comments

@RadWolfie
Copy link
Member

Moved from Cxbx-Reloaded/Cxbx-Reloaded#124

Original post by @PatrickvL:

The order in which OOVPA's are scanned, greatly influence the correctness of the outcome. With the right order, most of not all functions are located correctly, resulting in correctly placed patches, resulting in better emulation than when the order is wrong. When the order is wrong, functions are located incorrectly, leading to incorrectly placed patches, leading to crashes and otherwise incorrect emulation.

Currently, there's an effort underway to order the OOVPA's in code alphabetically, giving a well defined ordering, and as a result, duplicates or omissions can be easily spotted and corrected.

Alphabetical ordering is however a 'wrong' order to use during scanning, as described above.

So, we should devise a scanning order, leading to the highest possible ratio of correctly located functions.

One such scanning order could be to scan for big functions first, smaller functions later.

Also, we could scan for xrefs first, patches later.

Another idea is to scan with one OOVPA version per xref/patch first, ideally the version linked into the executable.
Keep the current approach in which the memory is scanned again until no more symbols are found.
Then, for any symbol not yet found in the first phase, scan using the nearest OOVPA version available.
Once that's done, either stop or repeat one last time with the next-nearest OOVPA versions.
Any symbol still not found, must be deemed not present.

Let's discuss this idea, and if possible, others, please.

For all posts see Cxbx-Reloaded/Cxbx-Reloaded#124 first before make new post.

@RadWolfie RadWolfie added the OOVPA Any OOVPA change relative label Aug 23, 2018
@RadWolfie
Copy link
Member Author

I'm assigning the task to myself for DSOUND library at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OOVPA Any OOVPA change relative
Projects
None yet
Development

No branches or pull requests

1 participant