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

Usage of CoreGetRomSettings seems weird #1025

Open
jgcodes2020 opened this issue Aug 9, 2023 · 2 comments
Open

Usage of CoreGetRomSettings seems weird #1025

jgcodes2020 opened this issue Aug 9, 2023 · 2 comments

Comments

@jgcodes2020
Copy link

jgcodes2020 commented Aug 9, 2023

Currently, CoreGetRomSettings will error with M64ERR_INPUT_NOT_FOUND if it finds multiple entries. The next best method of getting the ROM settings is to first open the ROM, then call CoreDoCommand(M64CMD_ROM_GET_SETTINGS, ...), then close the ROM.

Is the method I mentioned the intended method?

Suggestion

Add a method similar to CoreGetRomSettings, but specifying both MD5 hash and CRCs. This is trivial to add, and allows me to parallelize the file reading on the frontend.

@Rosalie241
Copy link
Contributor

Looking at the code for CoreGetRomSettings(), it seems like intended behavior, see [1].

Personally in RMG I use the open ROM -> retrieve settings & header -> close ROM method, I do cache those entries though to speed up subsequent loading of the ROM browser.

As for your suggestion, it'd be trivial to add but I wonder what your use case is exactly? i.e do you have a ROM browser in your front-end?

[1] https://github.com/mupen64plus/mupen64plus-core/blob/master/src/main/rom.c#L918

@jgcodes2020
Copy link
Author

@Rosalie241

do you have a ROM browser in your front-end?

Yep, exactly.

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

No branches or pull requests

2 participants