-
Notifications
You must be signed in to change notification settings - Fork 64
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
32X emulation - emscripten #233
Comments
I think the alignment for code pointers isn't working correctly. The Makefile sets |
Got it, I've fixed that now. New issue, I get a Line 285 in 479f120
How should I debug this? |
The easiest I can think of is to replace the include line with the whole content of the referenced file. That should give you a proper line number in the crash. |
Closing as there has been no feedback for month. Besides, there's an emscripten version of picodrive build automatically by buildbot and that compiles just fine. |
It compiles just fine, but Sega 32x is completely broken. I haven't had time to look into this due to being busy, though I hope to get around to it |
If you have more info, feel free to comment, reopen, or make a PR, please! |
Finally got time to sit down and take a look @irixxxx It turns out these lines are causing a segfault on emscripten. Not sure why, since I'm not familiar enough with the project: Lines 223 to 224 in 09d3cb6
However adding a pre-processor to not run that code on emscripten seems to fix it entirely? I'm not sure if this has any unwanted side-affects, though, so wanted to ask before I made a PR or anything. Emscripten doesn't (yet) support function alignment, though I'm working on getting it upstreamed to wasm-ld. |
Picodrive relies on the lowest bit being zero in the set of memory access functions, to be able to distinguish a direct mapping through a memory pointer from an access function. That's so ingrained in it that it's probably way too much work to change this. So, it'll probably be best to upstream your changes to emscripten first. |
I'm in the process of doing so, waiting on help for this PR: llvm/llvm-project#105532 Once that PR is merged, it won't require any change in this repo, because functions need to be aligned at link time and emscripten can't (currently) ship as a shared object library |
Hello all,
I've been working on trying to get 32X emulation working in the browser, however it appears to just load to a black screen (specifically 32x emulation). I've traced this back to a core issue, and after hours of digging through the program, I've came here for help.
The portion of the logs that caught my eye was particularly this section:
As this doesnt appear to occur on a native copy of RetroArch I've compiled.
Changes I've made so far:
Told libretro to not use mmap, since mmap location hints are not supported in emscripten.
My current
emscripten
target options are:Any information leading to where I can get more logs, and what I can do to fix the issue would be appreciated.
Thank you
Edit: as a note, this is somehow possible, as there are several closed source versions of picodrive with working emscripten support (emulatorjs.com). Through some code injection I have managed to get the RetroArch/picodrive logs, and no
ptr is not aliqned
errors were presentThe text was updated successfully, but these errors were encountered: