HLE: fix global context for md5 and sha1#21497
HLE: fix global context for md5 and sha1#21497GermanAizek wants to merge 2 commits intohrydgard:masterfrom
Conversation
|
This should fix such problems indeed. But I'm not aware of any game ever using multiple contexts like that. I'll look at this in detail soon. |
Maybe it will help if game is a modern homebrew, some people make modern indie games on N64 as https://github.com/mwpenny/portal64-still-alive |
|
This does seem totally fine except one issue: Are we sure that the context sizes are the same on the PSP as in our libraries? If it happens that the PSP context for one of these hashes is smaller, we could end up overwriting other data. |
Check this commit 20d393d |
|
Seems ok, except it will break any savestates that currently are in the middle of one of these operations. That's probably extremely rare though, so I doubt it's actually an issue. Also, on PSP init we should clear these maps. |
|
Actually come to think of it, it was already broken for savestates anyway. I am gonna try to confirm if the struct has the same size, and if so we'll just go with your initial solution. |
|
Hm, at least the md5 context is definitely different: https://pspdev.github.io/pspsdk/struct__SceKernelUtilsMd5Context.html |
@hrydgard,
does this fix issue when multiple md5 and sha1 contexts are called?