#jsmess 2018-10-06,Sat

↑back Search

Time Nickname Message
00:11 🔗 Sgeo Neohabitat now works in the browser
00:11 🔗 Sgeo (Only on non-https hosts for now, sadly)
00:14 🔗 SketchCow Sgeo: I totally expect it to sound choppy
00:14 🔗 SketchCow What I'd like is if you hit "performance" and said what the percent in the upper right said
00:14 🔗 SketchCow Before and after the fun
00:14 🔗 SketchCow This is our huge speed test
00:40 🔗 Sgeo SketchCow, I don't see any improvement, and I don't know why not
00:40 🔗 SketchCow Well, that's your litmus
00:40 🔗 SketchCow It's why we keep it around. :)
00:41 🔗 SketchCow It runs at 10-30% and so if we get jumps in quality, it'll show
00:43 🔗 Sgeo Build defines 1: LSB_FIRST=1 MAME_NOASM=1
00:43 🔗 Sgeo Is that MAME_NOASM=1 intentional?
00:44 🔗 SketchCow DFJustin can tell you
01:53 🔗 SketchCow I'm now "finalizing" tons of items, that is, they're screenshot, verified as booting, and then being set to vice-resid as the emulator.
01:53 🔗 SketchCow So that was at 10,500 and is now well past 12,500
01:53 🔗 SketchCow Screenshotter is now going to the demos because I believe I nailed almost all the games.
01:54 🔗 SketchCow 12,649
02:22 🔗 Sgeo So, interesting thing: Websockets do NOT follow the web's Same-Origin Policy. This means that in theory, the Internet Archive could host an Internet-enabled C64 game, as long as it's pointed at a websocket.
02:22 🔗 Sgeo Which could be anywhere, anyone who wants to run, say, a websockify endpoint
03:26 🔗 Sgeo What's higher priority, fast warp/autoload or gamepad support?
03:27 🔗 SketchCow Of those two, gamepad
03:28 🔗 Sgeo Thanks
03:28 🔗 SketchCow Also: proof of concept of media swap
03:28 🔗 SketchCow (I just need us to find two sides and put them together in the system)
03:29 🔗 SketchCow Other stuff keeps pulling me away, if you could point out two items that are that, I'll make the changes, we prove it, and I'll write the settings
03:30 🔗 Sgeo https://archive.org/details/10_Years_HVSC_2006-11-28_HVSC_Crew_Side_A and https://archive.org/details/10_Years_HVSC_2006-11-28_HVSC_Crew_Side_B
03:31 🔗 Sgeo (I already uploaded a single item version)
03:32 🔗 Sgeo Gah, Emscripten already has setImmediate support, so I might just get that over with now, then look at gamepad
03:35 🔗 SketchCow https://archive.org/details/10_Years_HVSC_2006-11-28_HVSC_Crew_Side_A
03:36 🔗 SketchCow I absolutely can not press Alt-N and flip any disk.
03:36 🔗 SketchCow Chrome. Windows 10.
03:39 🔗 DFJustin that's a really old compile, I dunno if we enable MAME_NOASM specifically anymore, but it was intentional
03:41 🔗 Sgeo SketchCow, what happens when you press alt-n on this website? https://w3c.github.io/uievents/tools/key-event-viewer.html
03:42 🔗 SketchCow It sees a key. What column info do you need
03:43 🔗 Sgeo Modifiers: getModifierState and alt
03:43 🔗 SketchCow Meta
03:43 🔗 SketchCow Nothing checked in alt.
03:44 🔗 SketchCow so - Meta - - Meta Meta Meta
03:44 🔗 Sgeo Huh. What keyboard layout are you using?
03:44 🔗 SketchCow Tried second keyboard (long story)
03:44 🔗 SketchCow GetModifier is - Alt Alt Alt
03:44 🔗 SketchCow And Alt is X check check check
03:44 🔗 SketchCow Code is AltLeft
03:45 🔗 Sgeo Try that keyboard with Alt-N for flipping disk
03:47 🔗 SketchCow OK
03:47 🔗 SketchCow One moment.
03:54 🔗 SketchCow Nope
03:54 🔗 SketchCow No dice
03:54 🔗 SketchCow I'm sure it's a basic misunderstanding. This is absolutely vice-resid
03:55 🔗 SketchCow Maybe I'm behind you in versions?
03:56 🔗 Sgeo For this demo, you pressed space after alt-n? (Most games do require any key, some don't and magically detect the flipped disk)
03:57 🔗 Sgeo I'm not running any local version stuff
03:57 🔗 SketchCow https://archive.org/details/0007a2091422
03:58 🔗 SketchCow This might be the miscommunication
03:58 🔗 SketchCow So it doesn't bring up a selection to flip media?
03:59 🔗 Sgeo No, it goes to the next item defined in the fliplist
03:59 🔗 SketchCow Are you able to go to that item and have it work the way I set it?
03:59 🔗 Sgeo yes
03:59 🔗 SketchCow Oh man, without feedback, that's trouble
04:02 🔗 Sgeo Could define another hotkey to go to the drive attach disk menu. Could add a VICE message when disk flipped.
04:03 🔗 SketchCow Yeah, without feedback, it's probably working but I get nothing onscreen
04:17 🔗 Sgeo F12 is more feedback-y
04:18 🔗 Sgeo But more annoying
04:18 🔗 Sgeo Could attach a hotkey anywhere in the menu
04:25 🔗 Sgeo Well, I didn't manage to focus on gamepad first, so now there's a build that autoloads (warps) very quickly
04:27 🔗 SketchCow What does it do to do that
04:29 🔗 Sgeo Uses Emscripten's built-in setImmediatemode shim
04:29 🔗 Sgeo https://github.com/Sgeo/vice32.js/commit/9f6ee0a5739836d60966ae8209c0977bbdda3d52
04:30 🔗 SketchCow Does it sound better?
04:30 🔗 SketchCow Or does this only affect that autowarp
04:31 🔗 Sgeo Only effects autowarp, haven't tried mixing setImmediate with sound. I do know that setImmediate could fix the problem with the tab being minimized or backgrounded, but that's not in this build.
04:32 🔗 SketchCow I'm constantly paying attention to this stuff...
04:32 🔗 SketchCow I wonder if it affects the MAME build of escripten
04:32 🔗 SketchCow If it's something that would make it run faster
04:33 🔗 SketchCow We didn't see it in the experiments we did in dfjustin... maybe it went in wrong?
04:35 🔗 Sgeo It should only make a difference if the emulator's performant already. setTimeout (which I think is what older Emscripten used) has a minimum delay of 4 or 10 milliseconds, setImmediate can be faster. But only if the main slowness was caused by the setTimeout delay
04:36 🔗 SketchCow It was a sleep
04:38 🔗 Sgeo hm?
04:38 🔗 SketchCow That's the big delay in MAME
04:38 🔗 SketchCow bai can explain
04:46 🔗 Sgeo ...vice32.js had more ability to recognize my gamepad than SDLVICE on my machine did
04:46 🔗 Sgeo (although the former still isn't working)
05:18 🔗 Sgeo ?qybe I should re,ove the French keyboqrd lqyout fro, ,y syste, zhere I cqn eqsily qctivqte it by qccident
05:34 🔗 bai hmm. trying to link the doc about mame timing stuff but google docs just gives me an empty clipboard when I select "copy url"
05:51 🔗 SketchCow 13,073
05:55 🔗 Sgeo Doing another build which will fix the blur problem (where things just pause and die when the tab loses focus). If sound sounds BETTER while the tab is out of focus, that would be interesting
05:55 🔗 SketchCow This will also speed autowarp, right
05:55 🔗 Sgeo yes
05:56 🔗 Sgeo (Well, that was already built, this is in the same general area and approach)
05:57 🔗 SketchCow Well, let me know - I'm going to be driving to where I'm staying soon
06:01 🔗 Sgeo ....It's random whether or not it works.
06:02 🔗 Sgeo Sometimes switching tabs is fine, sometimes not. And I know why. I don't know how to fix without forcing setImmediate all the time
06:03 🔗 SketchCow The tab thing
06:05 🔗 Sgeo Forcing setImmediate all the time should fix the tab thing a lot better, and it will be less code, but I don't know what it would do to battery life etc
06:12 🔗 SketchCow Your call. I likely have to go now
06:12 🔗 SketchCow Want to do just the autowarp speedup?
06:14 🔗 Sgeo https://raw.githubusercontent.com/Sgeo/sgeo.github.io/77af6bfd67f79a2f9cd627904100308940cd4162/experimental/vice32/x64.js
06:14 🔗 Sgeo Is just autowarp speedup
06:15 🔗 Sgeo (And networking stuff that IA doesn't care about. Hopefully no one gets weirded out by that Network entry in F12)
06:24 🔗 SketchCow Is there a way to tell it kicked in?
06:25 🔗 SketchCow Like a console message or something
06:25 🔗 Sgeo Statusbar, when showing W, should also show a very high percentage, like 999
06:25 🔗 Sgeo Without this change, it's around 120
06:26 🔗 Sgeo (Alt-B / F12->status bar)
06:27 🔗 SketchCow Yeah, it's not in yet.
06:28 🔗 SketchCow (When you upload, it goes in, and it takes IA a little while)
06:29 🔗 Sgeo I see the Network menu item, which is new
06:31 🔗 SketchCow Whoops, there was a blow-up
06:31 🔗 SketchCow Repairing
06:44 🔗 Sgeo ?
07:20 🔗 Sgeo Ugh maybe that's the wrong version
07:23 🔗 Sgeo http://sgeo.github.io/experimental/vice32/x64.js is latest, but it also has the only 50% chance "can music play while backgrounded" thing
07:42 🔗 Sgeo VICE uses SDL_InitSubSystem when it decides it wants joystick input. Emscripten SDL1 stubs that out and it does nothing.
07:43 🔗 Sgeo I keep wondering if I should just burn SDL1 to the ground and switch to SDL2
07:57 🔗 Sgeo I have gamepad working with one caveat: The user has to press a button on the gamepad before starting the emulator
08:23 🔗 Sgeo SDLJoystick: Warning - Axis 0 exceeds threshold, mapping to NONE
08:25 🔗 Sgeo http://sgeo.github.io/experimental/vice32/x64.js now has my current gamepad code. Still requires going to F12 to change from numpad to gamepad. Pressing a button only after the emulator loads works fine. What doesn't work fine is moving the stick: It confuses the init code into thinking that that axis is damaged, and so VICE ignores it
08:27 🔗 Sgeo Ok even the latest build isn't doing the warping right
08:33 🔗 Sgeo Warp problem has something to do with manual vs autoload: The setImmediate is kicking in with Alt-W warp but not autoload warp
08:33 🔗 Sgeo I should sleep a few hours ago
18:24 🔗 SketchCow Huzzah
18:24 🔗 SketchCow So, let me know when that bit works.
18:24 🔗 SketchCow Are you comfortable with x64.js being put in
18:44 🔗 Sgeo Yes
18:47 🔗 Sgeo I still don't know whether I should just give in and force setImmediate mode all the time. It's certainly less code to do so and would be less buggy, but I keep thinking that there's a reason it's recommended against
18:48 🔗 Sgeo bai, can you shed some light on this note?
18:48 🔗 Sgeo "Note that this mode is strongly not recommended to be used when deploying Emscripten output to the web, since it depends on an unstable web extension that is in draft status, browsers other than IE do not currently support it, and its implementation has been considered controversial in review."
18:48 🔗 Sgeo Well, except for the fact that it's not true because in non-IE, Emscripten shims it with postMessage
18:49 🔗 bai https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate
18:49 🔗 bai This method is not expected to become standard, and is only implemented by recent builds of Internet Explorer and Node.js 0.10+. It meets resistance both from Gecko (Firefox) and Webkit (Google/Apple).
18:50 🔗 SketchCow Asking about http://sgeo.github.io/experimental/vice32/x64.js
18:50 🔗 SketchCow I'm triple asking just because when we slam this in, 14,000 items change their nature. :)
18:51 🔗 Sgeo SketchCow, it should be safe (assuming no bugs) and will support gamepads
18:52 🔗 Sgeo bai, in the notes it mentions a polyfill. Emscripten already comes with something like that polyfill
18:55 🔗 bai sure, it sounds like it has a workaround for the fact that it doesn't exist in most browsers
18:56 🔗 bai I guess the question is whether setImmediate emulated by postMessage is better that rAF and setTimeout / setInterval
18:56 🔗 Sgeo It's certainly faster.
18:57 🔗 bai interesting
18:57 🔗 Sgeo Faster might not be the point though. Does it kill battery on mobile devices? Does it screw up things that rAF wouldn't?
18:58 🔗 Sgeo Faster is certainly better during warp. So I wanted to use it during warp only, but that has a cost of higher chance of bugs (as with autoload)
19:02 🔗 bai yeah. if I were to hazard a guess, with only a cursory understanding of what setImmediate does, they're probably emulating it by having a tight loop running in a worker, posting messages to the main thread on some very fast interval, which is a way to work around some of the fudge-factor of using the browser's timeout scheduler which starts getting less accurate whwn you try to use intervals less than about
19:02 🔗 bai 5ms
19:03 🔗 bai so that would probably kill battery on mobile and possibly hurt performance in constrained circumstances
19:05 🔗 Sgeo What are the negative consequences of using setTimeout instead of requestAnimationFrame?
19:05 🔗 Sgeo setTimeout isn't as affected by the background tab thing, so that's nice right off the bat
19:18 🔗 bai yeah setTimeout() will drop to 1s minimum interval in a background tab, while rAF goes to 0. rAF is better for graphics, since it gives you a window of time where you can output graphics to the screen in a way that works nicely with vsync - less tearing, etc
19:18 🔗 bai tying emulation speed to the graphics card speed is probably not how we should be doing it, honestly
19:19 🔗 bai the ideal emulator for the web would run the entire emulator in a worker, and graphics would be handled in another worker using OffscreenCanvas
19:21 🔗 bai the emulator running in a worker could then skip the setTimeout/rAF nonsense entirely, and run as a traditional tight loop like your emulator normally would on a native platform
19:22 🔗 bai the difficulty is getting graphics and sound to output, browsers have been dragging their feet with the ability to do those two things from workers
19:22 🔗 bai chrome now ships with OffscreenCanvas, firefox has it behind a flag, and IE support is nowhere to be found
19:23 🔗 bai safari also has no sign of support
19:25 🔗 Sgeo What are WebSid and the like doing?
19:27 🔗 bai not sure, but generally the options are either run your sound and video code in the main thread, or move as much of the number crunching off into a worker as possible and just pipe data from workers into audio contexts on the main thread
20:49 🔗 SketchCow I used the one you said and the percentage doesn't increase.
20:49 🔗 SketchCow Try any item with vice-resid.
21:14 🔗 Sgeo SketchCow, yeah, warp on autostart isn't working, I'm not sure why. Try alt-w twice, that will turn off and on warp manually, which seems to work
21:15 🔗 Sgeo The latest update does support gamepads though
21:47 🔗 Sgeo ...VICE does something odd. I plugged in "Joystick" into both control port 1 and 2. The right stick controls 1 and the left stick controls 2
21:47 🔗 Sgeo So someone could play a local multiplayer game... if they're willing to share a gamepad
21:48 🔗 Sgeo It also makes things a bit awkward for Neohabitat, which uses control port 1
21:50 🔗 Sgeo This is different behavior from WinVICE
22:16 🔗 bai yes, in the browser, gamepads need.to have a button pressed in order for them to show up. emscripten should handle hotplugging after the fact though, and ad l9ng as the underlying app handled gamepad hotplugging, it should work
22:16 🔗 bai but yeah, might introduce ordering problemd...
22:21 🔗 Sgeo bai, VICE wasn't handling gamepad hotplugging, I made a small change so that it can
23:32 🔗 Sgeo bai, Emscripten is yelling at me
23:34 🔗 bai how rude
23:34 🔗 Sgeo "Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"
23:36 🔗 Sgeo Also the logs say I am switching to setImmediate on autostart, which I was attributing to another line I added, but I was still capped at 120%
23:46 🔗 azakai has joined #jsmess

irclogger-viewer