BinBashBanana / webretro

RetroArch in your browser
https://binbashbanana.github.io/webretro/
MIT License
249 stars 350 forks source link

can you update the build.sh?make it support mobile? #31

Closed nenge123 closed 2 years ago

nenge123 commented 2 years ago

I test your more system-cores,they only run in Microsoft Edge/Chromium

can not run in mobile (ios)!

in the js ,here nothing retrun.

BinBashBanana commented 2 years ago

I can't test safari, because I don't have any apple devices, are you able to send the console output?

BinBashBanana commented 2 years ago

Also, can you create future issues in retroarch-web and then tag me (@BinBashBanana)

nenge123 commented 2 years ago

I can't test safari, because I don't have any apple devices, are you able to send the console output?

is the apple iphone 11;

error position:WebAssembly.instantiate(binary, info)

"WebAssembly" can't "instantiate" wasm, so not running.

BinBashBanana commented 2 years ago

Have you confirmed that the same page works on desktop chromium?

nenge123 commented 2 years ago

Have you confirmed that the same page works on desktop chromium?

yes,only desktop chromium can run.

i not have android mobile,so not test

BinBashBanana commented 2 years ago

It works fine on chrome for android, do you have a desktop mac that you can test safari on and send the f12 console log (text or screenshot)?

nenge123 commented 2 years ago

can run in chrome for android ?

error message

CompileError: WebAssembly.Module doesn't parse at byte 3: can't get Function local's type in group 0, in function at index 5

nenge123 commented 2 years ago

i not have mac too~

i push my code, and add console in mednafen_psx_hw.

if someone have mac can test.

nenge123 commented 2 years ago

i ask my friend . the android mobile is error too!

CompileError:

WebAssembly.instantiate():

Compiling function #480 failed: invalid value type 's128', enable with -- experimental -wasm-simd@+21134

nenge123 commented 2 years ago

谷歌浏览器chrome mobile

CompileError: WebAssembly .instantiate(): Compiling function #480 failed: invalid local type 'Simd128', enable with

-- experimental-wasm-simd @+21134

BinBashBanana commented 2 years ago

It works fine on chrome mobile on my android phone, this looks like it could be an out of date browser or a very old phone?

nenge123 commented 2 years ago

its can fixed? or can you build asmjs version?

BinBashBanana commented 2 years ago

This seems to be caused by the SIMD autovectorization that I used on several cores (Beetle PSX HW, melonDS, Mupen64Plus-Next, ParaLLEl N64, Yabause), you can build your own cores without SIMD/autovectorization using the instructions here but go into the makefile and remove -msimd128 -ftree-vectorize.

nenge123 commented 2 years ago

I'm not very good at it.

The emsdk environment has not been successfully configured...

BinBashBanana commented 2 years ago

Which step are you on? ("Setup emscripten" or "Set emscripten environment variables")

If you cloned the emsdk from GitHub Desktop, you may need to run dos2unix on emsdk (script) and emsdk_env.sh

nenge123 commented 2 years ago

Which step are you on? ("Setup emscripten" or "Set emscripten environment variables")

If you cloned the emsdk from GitHub Desktop, you may need to run dos2unix on emsdk (script) and emsdk_env.sh

I think the china great wall make can't setup.

it's can't fix mobile browser error?

BinBashBanana commented 2 years ago

Were you able to figure it out?

nenge123 commented 2 years ago

Were you able to figure it out?

no, If you don't consider fixing it, I don't have a good way to solve it.

BinBashBanana commented 2 years ago

I can build the autovectorized cores without autovectorization separately, and send them here if you'd like. But you should get the build environment set up so that you can build your own cores and even add features. If you send me a terminal error log or output, I can see if I can help you.

nenge123 commented 2 years ago

你的核心问题是,手机浏览器无法解释。其实你可以生成asmjs,免除浏览器解释问题。

Your core problem is that the mobile browser can't parse "wasm" it. In fact, you can generate asmjs to avoid browser interpretation problems.

BinBashBanana commented 2 years ago

I read the error, and it isn't because of WASM, it's because I used SIMD autovectorization in certain cores.

Compiling function #480 failed: invalid value type 's128', enable with -- experimental -wasm-simd@+21134
CompileError: WebAssembly .instantiate(): Compiling function #480 failed: invalid local type 'Simd128', enable with -- experimental-wasm-simd @+21134

Building the core without SIMD will fix the problem (WASM can still be used, because it is faster than asmjs)

you can build your own cores without SIMD/autovectorization using the instructions here but go into the makefile and remove -msimd128 -ftree-vectorize.

nenge123 commented 2 years ago

i update ios15.6.1

CompileError: WebAssembly.Module doesn't parse at byte 3: can't get Function local's type in group 0, in function at index 5

BinBashBanana commented 2 years ago

Can you try the Snes9x core? Does it work?

nenge123 commented 2 years ago

okay,try it later, at last report for you

nenge123 commented 2 years ago

snes9x in ios mobile

ios safari lost asm method

Module.asm output {"ef":{},"jf":{}}

google浏览器 can running in retroarch menu

微软edge can running in retroarch menu