Time |
Nickname |
Message |
00:47
🔗
|
Vito` |
db48x: does emscripten not initialize gamepads on its own? |
00:48
🔗
|
Vito` |
I notice emularity sets up two listeners for them |
00:54
🔗
|
bai |
I think emularity mainly does that to offer some indicator of whether the gamepads are available or not, I'm pretty sure that you don't need to do anything special in the js to make emscripten sdl apps handle gamepads |
02:06
🔗
|
db48x |
without those listeners it generally doesn't work |
02:07
🔗
|
bai |
hmm, actually now that you mention it I do seem to remember a firefox bug about that yeah |
02:08
🔗
|
db48x |
whether that's due to a bug in Emscripten, MAME, or what I couldn't tell you |
02:08
🔗
|
bai |
where certain things wouldn't show up if you didn't register events first |
02:08
🔗
|
db48x |
yea |
02:08
🔗
|
bai |
I want to say that's fixed by now but with only a vague recollection I can't really say for sure |
02:08
🔗
|
db48x |
although that might be a deliberate decision here, in the gamepad spec |
02:09
🔗
|
bai |
there's the requirement about pushing a button before the gamepads will show up, yeah |
02:11
🔗
|
|
phe has quit IRC (Quit: Leaving) |
02:12
🔗
|
db48x |
even if you press a button, the page doesn't get any information about the gamepads unless it has a gamepadconnected listener |
02:13
🔗
|
bai |
ah, yeah actually maybe that explains why I never had to worry about it with my own loader, because I was using it with the 3d engine which already registered handlers for that |
02:14
🔗
|
db48x |
presumably that listener would be added when the program calls in to Emscripten's SDL port. Maybe MAME doesn't call it, or maybe Emscripten doesn't set up the listener |
02:14
🔗
|
db48x |
in any case, adding it ourselves is easyier than figuring that out, and anyway it lets the user turn on the gamepad a few seconds earlier |
02:15
🔗
|
bai |
yeah, you'd think so. computers are hard :D |
02:16
🔗
|
db48x |
indeed |
02:17
🔗
|
db48x |
that said, Emularity presents absolutely no UI about the gamepads at all |
02:28
🔗
|
Vito` |
so I need to set up the listeners |
02:28
🔗
|
Vito` |
then hit the button |
02:28
🔗
|
Vito` |
_then_ run the emscripten code? |
02:33
🔗
|
bai |
I'm *pretty* sure that emscripten and mame and dosbox all handle gamepads being connected after they've launched |
02:33
🔗
|
bai |
so you don't have to wayt for a button press to launch them |
02:33
🔗
|
bai |
wait* |
02:39
🔗
|
Vito` |
https://icculus.org/~icculus/testjoystick-emscripten/ suggests otherwise |
02:40
🔗
|
Vito` |
that's the SDL2 joystick test and it doesn't seem to do anything at all |
02:41
🔗
|
bai |
hmm. it might be up to the app to implement polling and handle newly-attached gamepads...I dunno, this is deeper than I've had to dig into it so I really can't say |
02:42
🔗
|
bai |
for me it's mostly Just Worked(tm) with mame and dosbox, but I haven't done much outside of those two |
02:42
🔗
|
Vito` |
mame and dosbox using emularity, though, right? |
02:42
🔗
|
bai |
I've used them outside of emularity too |
02:42
🔗
|
Vito` |
but only in your framework that also sets up those listeners |
02:44
🔗
|
bai |
well....pretty sure I also had some simple 2d versions going with my loader as well, which ran outside of the engine....but that was a long time ago that I really played around with it at that level |
02:44
🔗
|
bai |
I know I'm not being very useful here :D |
02:45
🔗
|
db48x |
you don't have to wait for the user to press a button on the gamepad before running the program |
02:50
🔗
|
Vito` |
is there a way to restart an emscripten program |
02:50
🔗
|
Vito` |
I think this just runs immediately and exits |
02:51
🔗
|
bai |
yeah, that's what I was trying to figure out too, I think that's exactly what it does |
02:51
🔗
|
bai |
you can re-run the same app yes, I think you just call Module.start() or .run()? |
02:52
🔗
|
Vito` |
Module.run() doesn't seem to do anything |
02:52
🔗
|
bai |
nah it's probably more complicated than that |
02:52
🔗
|
bai |
yeah |
02:52
🔗
|
bai |
I know I could reuse mame instances and just re-run them with different arguments to get the new games to boot |
02:52
🔗
|
bai |
let me see if I still have code that does that |
03:00
🔗
|
bai |
maybe it worked because I was using modules...I think if you just reload the emscripten file which defines the module it'll reset everything and you can run again...but there's probably a better way |
03:09
🔗
|
Vito` |
I can't seem to reliably get this app to detect joysticks |
03:09
🔗
|
Vito` |
even with the listeners added |
03:09
🔗
|
Vito` |
maybe 50% of the time it works |
03:28
🔗
|
Vito` |
I'm getting faster with the button press and it's more reliable then |
03:29
🔗
|
bai |
you can make a game out of it. who said web gaming wasn't fun? |
03:34
🔗
|
SketchCow |
Maybe he's not here, but the guy who was THE joystick guy was here |
03:34
🔗
|
bai |
luser? |
03:34
🔗
|
SketchCow |
Torrenting the CHDs for MAME has been a beeeoth |
03:35
🔗
|
|
SketchCow sets mode: +oooo arkiver bai balrog db48x |
03:35
🔗
|
|
SketchCow sets mode: +oooo devesine_ DFJustin godane jvilk_ |
03:36
🔗
|
SketchCow |
Ted Mielczarek |
03:37
🔗
|
SketchCow |
I just asked him to come here. |
03:38
🔗
|
SketchCow |
current emulation things I'm doing - |
03:38
🔗
|
SketchCow |
- Arranged ANOTHER set of amazing Apple II old stuff grabs |
03:38
🔗
|
SketchCow |
- Continue to remove doubled Apple II items in the collection, by hash |
03:38
🔗
|
SketchCow |
- Ripping Apple II floppies from one of the remaining bins |
03:38
🔗
|
SketchCow |
- Screengrabbing mac stuff as Stephen adds them |
03:39
🔗
|
SketchCow |
- gently stand over db48x smiling gently |
07:31
🔗
|
|
datajerk has quit IRC (Read error: Operation timed out) |
07:35
🔗
|
|
datajerk has joined #jsmess |
09:50
🔗
|
ted______ |
sorry i was sleeping |
09:51
🔗
|
ted______ |
Vito`: that testjoystick.c doesn't seem to actually handle a device being added after the fact? |
09:52
🔗
|
ted______ |
like SDL_JOYDEVICEADDED |
09:52
🔗
|
ted______ |
it wants to find a device connected on startup and then use that |
10:47
🔗
|
|
phe has joined #jsmess |
10:49
🔗
|
ted______ |
SketchCow: FTR, I am on another IRC channel with vito where i don't just idle 24/7 :) |
15:15
🔗
|
SketchCow |
A hah |
15:15
🔗
|
SketchCow |
Just being sure, as usual |