webretro
webretro copied to clipboard
Mupen64Plus-Next stack overflow errors
Not sure if this can be solved/answered here, but: Paper Mario crashes (the emulator, not the game itself) due to a "null function or function signature mismatch" . Based on a bit of testing, the time at which it does this seems to vary based on settings, but is consistently no later than the beginning of the very first intro cutscene. Is there any change that can be made to settings or the core to fix this? Failing that, is there some way to compile another core (i.e. parallel-n64) and drop it in here to see if it works, or is there support that needs to be manually added to each core? (I really don't know much about libretro or emscripten for that matter)
N64 is currently not fully supported. I am working on trying to fix this problem.
An in-depth explanation: 3D rendering in the browser uses WebGL, which is most similar to OpenGL ES (GLES, usually GLES 2). Emscripten should automatically map GLES functions to their respective WebGL functions, emulating any discrepancies. However, the rendering engine that mupen64plus uses (GLideN64), renders using regular OpenGL, which is too different from WebGL. There should be a way to get mupen64plus to use GLES2, or I might try ParaLLEl.
I will post any updates here.
Would getting ParaLLEl to work require specific modifications in order to add in support for Emscripten (as opposed to just being "fiddle with Makefile
s until it works)? If not, I might try to compile it and see what happens.
Uhh, probably not. Go crazy :)
Working on compilingParaLLEl with my limited knowledge base, and I'm probably doing something quite wrong compiling it. I had to do some extremely hacky tweaks to the makefile because it was generating an ar archive, and removed some object files from the final command because it was complaining about duplicate symbols when I tried to link it with RetroArch. I also had to remove some _cmd
entries from RetroArch's Makefile.emscripten
because of them being undefined. Once I got it to compile, it would just do nothing when I tried to use it in webretro - some debugging showed that it was just calling exit()
or something? How were the other cores here compiled?
Make sure static linking is on - this will generate a .bc file that then gets compiled again in the main retroarch directory. Be sure to copy in the modified files from the /source/overrides/ directory in this repository.
@joshop the crash is unrelated to the graphical bugs, it is caused by a stack overflow. I have not yet determined the root cause of the stack overflow, but in the 6.5 release the stack size has been increased from 5 MiB (emscripten default) to 256 MiB to mitigate this. The issue can still sometimes happen on some games if left running for long enough. The ParaLLEl N64 core has been built and included with the 6.5 release as well, and it does not have the stack overflow problem. It is still recommended to use the Mupen64Plus-Next core however, because it has a better renderer than ParaLLEl.