tjwei / xnes

javascript SNES emulator
Other
215 stars 62 forks source link

SNEM Sound ? #3

Open GeoffreyPlitt opened 11 years ago

GeoffreyPlitt commented 11 years ago

Using -DSOUND with SNEM has errors because it seems to need the Allegro library. Please advise how to build SNEM with sound?

ociebieda commented 9 years ago

I already tried snes9x with sound, and no luck. They said there is version which supports sound, but there is no sound on Chrome and FireFox: http://tjwei.github.io/xnes/sound4/snes9x.html

tjwei commented 9 years ago

I think this is because xnes use an outdated version of emscripten and some API have been changed, I will update the snes9x port when I have free time, perhaps in a month.

Catarax commented 9 years ago

Do you still plan to do this? It would be awesome.

tjwei commented 9 years ago

Just cloned the repo, attempting to build it, will see how it goes.

tjwei commented 9 years ago

Just remembered why I didn't fix this last year. emscripten changed a lot since then. It is going to take a while. Was too busy back then. Fortunately, I have some time to do this and other side projects. I am working on this, but it may take some effort, because the original one use various hacks to handle memory issues.

tjwei commented 9 years ago

snes9x port is updated with latest emscrpten (1.34). sound works.

RyanAveryBSU commented 6 years ago

What about the WW2 version. Would it be possible to get sound with this? I will attempt to compile and see if I can get sound working. I got snes9x to compile last night but it took about 4 hours to get emscrpten squared away.

Great repo by the way.

tjwei commented 6 years ago

https://github.com/tjwei/pcsxjs uses webworker for emulation and sending sound to the main thread. The similar things can be done for WW2, but the result seems pretty much the same as of the single threaded version. The pcsxjs needs to use web worker so that it can utilize more cpu power. It seems that modern pc browser is capable of emulating snes in single thread. I think compiling to webasm is the right way to do.