Closed jcampbell05 closed 8 years ago
it's not frozen, input isn't working.
@fr500 does anyone know how the input is broken and what could I do to fix it ?
not really, we're waiting for someone to be "THE GUY" on this issue
@fr500 cool, so I really want to help fix this. Is there any places you can point me to ? Where in the code is the input handled ? Which areas do you think could effect it ?
I think it's here: https://github.com/libretro/RetroArch/blob/master/input/drivers/rwebinput_input.c
On Sat, Jul 30, 2016 at 5:26 PM, James Campbell notifications@github.com wrote:
@fr500 https://github.com/fr500 cool, so I really want to help fix this. Is there any places you can point me to ? Where in the code is the input handled ? Which areas do you think could effect it ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/3291#issuecomment-236393243, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpC0LtJ5ZaGFCOXo_Z3LRfSZtX8d2L2ks5qa895gaJpZM4JY5y8 .
Implemented one using the native emscripten C++ HTML event APIs, currently it seems emscripten doesn't fire key press callbacks.
Compile with SDL2 support on last Emscripten 1.36.5 in RetroArch setting set sdl2 input driver
@dalter Cool so use SDL instead of RWebInput ?
I fixed RWebInput and add to Makefile.emscripten SDL2 flags. Now input SDL2 and RWebInput work fine But need more test with SDL2 !
Cool stuff gonna try today. @dalter have you looked into implementing gamepad support by any chance? https://kripken.github.io/emscripten-site/docs/api_reference/html5.h.html#gamepad
@fr500 didn't try add gamepad support with RWebInput. But SDL2 alredy has html5 support and gamepads working , but only Xbox 360 and PS3 (ps3 with xbox emuletion set) in google Chrome and Chromium (all webkit browsers). My older gampad "logitech rumbel pad 2" works not properly in chrome (all webkit browsers), miss some buttons. It works correctly only in Firefox
@dalter Do you have a version with these fixes I can use ?
Doesn't seem to work here http://hastebin.com/ripahuyoge.coffee
I'm on the latest master of the toolchain:
buildbot@who-cares:~/tools/emscripten/emsdk_portable$ ./emsdk list
The following precompiled tool packages are available for download:
node-4.1.1-32bit
* node-4.1.1-64bit INSTALLED
emscripten-1.30.0
emscripten-1.34.1
emscripten-1.35.0
The following tools can be compiled from source:
clang-tag-e1.36.4-32bit
clang-tag-e1.36.5-32bit
clang-tag-e1.36.4-64bit
clang-tag-e1.36.5-64bit
clang-incoming-32bit
clang-incoming-64bit
clang-master-32bit
* clang-master-64bit INSTALLED
emscripten-tag-1.36.4-32bit
emscripten-tag-1.36.5-32bit
emscripten-tag-1.36.4-64bit
emscripten-tag-1.36.5-64bit
emscripten-incoming-32bit
emscripten-master-32bit
emscripten-incoming-64bit
* emscripten-master-64bit INSTALLED
The following precompiled SDKs are available for download:
The following SDKs can be compiled from source:
sdk-incoming-32bit
sdk-incoming-64bit
sdk-master-32bit
* sdk-master-64bit INSTALLED
sdk-tag-1.36.4-32bit
sdk-tag-1.36.5-32bit
Items marked with * are activated for the current user.
Compiling with SDL2 doesn't work for me either, it seems for me that the event callbacks aren't being allowed to be fired by RetroArch therefore no input can be processed.
@jcampbell05 @fr500 You are using the latest version of emscipten 1.36.5? you add the flag -s USE_SDL = 2 to LDFLAGS:? emscripten must load a necessary library SDL2 himself when to begin compiling js.
Here is a working example (SDL2 and Rwebinput): http://game-gear.ru/retroarch/RetroArch.html (If example link asks PASSWORD just click Cancel ) What erorrs compilation with SDL2?
I compile Last RetroArch with SDL2 and c Rwebinput and input work fine, but after loading the core emulator, RetroArch freeze I checked without my fix when RetroArch auto load rom from start , and it also freeze . I think that the problem in EGL I test my fix an old version RetroArch 1.3.2 and all worked fine
@dalter Compiling with SDL2 enabled with RWebInput still doesn't fix input for me. This is on Chrome and on the latest master
of RetroArch.
Working at least for me for testcore ,with RWebInput ,Last RetroArch (1 day ago) and last Emscripten .
I have input in menu and no freeze using
arguments: ["-v",""],
instead of
arguments: ["-v", "--menu"],
in the html file.
Ok, input is working now but it's hanging at startup unless we change audio driver from rwebaudio to null
Yes sound to null fix the freeze pb . BTW if you launch game directly instead to boot to --menu (without change audio to null) ,it works also as expected (but no sound too).
Tried compiling and I just got an exception.
Using SDL2 for sound
config += "audio_driver = sdl2\n";
also solve the freeze pb at start , but have no sound in game after
Any chance sound ingame and freeze at start get fixed ? here a cap32 sample core http://dl.free.fr/vvif5yR4L
@r-type I fix audio driver and now all work fine !! (all fix in master)
Nice, thanks ! sound now play fine for me (at least for cap32). and no freeze when launch with --menu .
on side note , i notice that close content works but freeze if reload another content.
Been working on a little something http://190.130.222.178:9080/emscripten/webplayer.html
Data should persist across sessions (start retroarch first, upload second) and settings should be retained (use save current config)
@fr500 nice it's cool to have persistence, I’m not familiar with js so could you explain , did you use NODE FS ? where a the file locally ?
Actually i build with --preload-file to embedded some data need for emulators , like data/ folder for vice C64 . ( result is 2 files .js with .data ) but it's restrictive and tedious . So i would be happy if i can easily have persistent files (data,ra config/coreoptions...).
on side note ,i finally success to build a vice C64 without using libco , so after it was easy to build an rough emscripten version .
@r-type I used a browser based filesystem (browserfs) it has several backends. I'm only using local storage (browser cache) atm but it has backends for dropbox and others.
I commited the changes to master already but you probably need the memory map files from here: https://github.com/jvilk/BrowserFS/releases/tag/v0.5.12.
Once I gets the quirks ironed out I want to make it fetch assets/core info files, etc. automatically on first startup. BrowserFS allows that so it should be simple.
@fr500 thanks for the explanation and link , I'll look at . for the record i never keep cache or anything in my browser!
BTW your idea to fetch at startup look really nice !
@r-type well I plan to add the dropbox backend too, but if you don't save browser cache I reckon you don't use dropbox either.
I added some rudimentary dropbox support https://buildbot.libretro.com/.radius/webplayer.html https://www.youtube.com/watch?v=nNMbIRE2HBI
Works for me but failed on chrome/linux for @sronsse for some reason. Any more testng would be appreciated
This is coming along pretty nicely! Unfortunately did not work here, with or without Dropbox. Likely something I'm doing wrong on my end.
@RobLoach it's still quite fragile, maybe you hit the buttons in the wrong order. For local storage:
For dropbox:
Also, load archive with core causes this port to crash. The zip code seems wrong, it creates a 0 byte file.
@All, this is working nicely but I have a weird issue maybe someone here can help me with. Now that we have a persistent configuration I have discovered that vsync and hotkey input die on firefox after the first run.
I messed with the config a lot, ordered the config alphabetically and then I discovered that removing the line: aspect_ratio_index = "21"
tested about 10 times readding/removing the line and the same happened, made no sense but at least I knew which setting caused the issue. but then I decided to try again from scratch, reproduced, removed the line (without sorting the file) and... nothing, it didn't help.
I checked the template: https://github.com/libretro/RetroArch/blob/master/emscripten/webplayer.html#L201
And noticed the first entry is still at the first line of the config, so I removed that one And it got fixed again.
Tried removing that from the template, but then the culprit became audio_latency
Soo, I'm wondering if there is something wrong with the way I'm creating the base config. I guess I'll have to add these defaults to the platform driver instead (which would be good regardless) but the issue confuses me a lot.
Maybe some hidden character or something... I really don't understand.
BTW: the issue doesn't appear on chrome.
feel free to mantain the discussion.
@fr500
it's still quite fragile, maybe you hit the buttons in the wrong order. For local storage:
- Start Retroarch
- Upload
That did it. Worked with Kirby, wasted 10 minutes playing and I want my 10 minutes back. I do love the music though.
I checked the template
Being a web developer/designer, I can assist with improving this template. Not sure how far you want to go with the emscripten webplayer template shipped with RetroArch though. We could turn this into a really slick web application, with file management and everything.
Well I wouldn't want to overdo it, I want to keep it a single file at least so people bundling it in their sites don't have to go hunting for too many deps. After all you can manage the files via the dropbox app and they have some drop-in upload/download widget IIRC.
That said, I'm not against making it better, here's the list of things I'd like
Instead of the power button overlaid on top it should have a libretro logo or an invader
So if you can help with any of these I'd appreciate it, I want to keep working on the filesystem stuff (I want roms to be volatile, only userdata to be persistent)
I have this log in the html and the canvas doesn't let me use the menu moving cursors etc.