-
Notifications
You must be signed in to change notification settings - Fork 2
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
Core-side unique id / checksum calculation #4
Comments
We could read the file ourself even if need_fullpath is set, but reading and hashing a 650MB ISO would take a while, and the base file could refer to a dozen of other files (pretty sure CUE files do something funny, and bsnes BML files could have same content for different ROMs too). |
The ISO reading can be done faster by looking inside the container and hashing just some identifiable object there, like the main executable. |
So you're proposing that the frontend learns how to read every disc file system in existence? Because that's nowhere near realistic, and even if it was, the point of libretro is that we can create a new core without reworking the front. A better idea would be to hash a few carefully chosen megabytes from the file. That would make different files show up different (even J/E/U should have a few bytes shifted which will make everything show up differently, alternatively use the RAM differently which will show up once we hash a chunk of code), with the exception of romhacks, and almost all cheats work for hacked ROMs anyways. |
Yea, that's right. Your suggestion would be better at this approach. |
@Alcaro Hashing a piece of data from the ISO does create unique ids but it disallows the frontend to store a single .srm for multi-file content, if it were to be implemented. |
So it appears this function could be done and could be useful, but it needs to approach content in different ways. Hashing it all is good and preferable for small content. It's fast and there are various known good file hashes available to identify it. |
The proposal here is to free the frontend from the "burden" of having to uniquely identify something it doesn't know anything about. For roms, regardless of the media, the emulator core would just return a string containing the internal checksum, game id or catalog number (perhaps with a prefix/namespace to avoid conflicts.) For cores can't identify the content, the frontend would fallback to the current behavior. I'm against adding a image reader dependency to the frontend. edit: I'm against requiring the frontend to have a image reader. |
It would be nice if the libretro api had a way to allow the frontend to query for a string that could uniquely identify the content.
Example usage:
need_fullpath=true
.The text was updated successfully, but these errors were encountered: