[00:13] It's nice to see what can be done, with graceful fails [00:13] Proof of concept followed by refinement is always good [00:14] Well, modules wouldn't likely be a graceful fail. [00:14] But worth thinking about. [01:19] I think we're already using a fair amount of shiny new stuff [02:06] *** balrog has quit IRC (Read error: Operation timed out) [02:10] I thought there was an issue with discussion about browser minimums on the old jsmess repo, but there wasn't. [02:17] *** balrog has joined #jsmess [02:30] *** balrog has quit IRC (Read error: Operation timed out) [02:32] *** balrog has joined #jsmess [03:34] Hmm, DEFCON event for tomorrow might not happen. [03:34] But I'm still trying to grind something out tonight. [03:40] Great [04:35] *** datajerk has quit IRC (Read error: Operation timed out) [04:39] *** datajerk has joined #jsmess [05:21] oscar: I can help test [05:21] oscar: you can send me a pull request [05:23] Will do! [05:25] awesome [05:26] now I must sleep [05:26] probably to dream annoying dreams, since I haven't slept in two days [05:42] I gotta sleep soon too. [05:43] Weirdly, it's breaking on loading from Zip files. [05:43] I'll get it behaving on multiple .dsk files first. [05:53] Hum, maybe Wasteland wasn't the ideal one to test on, since the necessary copy operation seems to crash on the emulator. [06:10] But, at least, I have multiple files loading now, from the metadata, which is nice. And it's selecting the peripherals to load from the metadata. [06:10] I need to finish the code for getting the media list *out* of the loader and into some UI elements, which won't take long, but I'm too burned out for tonight. [06:11] And then of course we need to talk about how to call functions in MAME from outside it (someone said it was easy). [06:11] Then I can actually get the media swap going. [06:17] After that: creating blank disks, then maybe eventually saving them somewhere? [06:18] Bonus for the time being: you can specify additional peripherals for the media in the extra config metadata and they'll appear rather than cluttering up the front-end metadata. [11:48] *** oscar_ has joined #jsmess [11:50] Hooray, iOS IRC client. [11:53] I didn't get a chance to check my computer before I left, any word on calling functions from outside? [11:56] *** oscar_ has quit IRC (Mutter: www.mutterirc.com) [12:07] *** datajerk has quit IRC (Read error: Operation timed out) [12:36] *** oscar_ has joined #jsmess [12:38] *** oscar__ has joined #jsmess [12:42] *** oscar_ has quit IRC (Ping timeout: 252 seconds) [12:43] *** datajerk has joined #jsmess [12:45] *** oscar__ has quit IRC (Ping timeout: 260 seconds) [14:03] db48x and bai - if you have a chance. [16:22] SketchCow: sup? [16:30] oh yeah, just saw oscar's question. yeah, there's a list somewhere in the mame build files of which functions to export, you'll need to figure out the mangled name, it'll be something like __ZN15_classname_functionname - https://github.com/mamedev/mame/blob/1f80e58a10d54eb58ee952c15eba7069704757cf/scripts/src/main.lua#L155 [16:32] then you can map thrm into the JSMAME namespace in JS - https://github.com/mamedev/mame/blob/785e6f2fc9fd93d9780c4e48bca03b72230c323f/scripts/resources/emscripten/emscripten_post.js [17:56] oscar: did my messages go through? :) [17:57] nvm :D [20:36] Ah nuts, I was hoping it wouldn't involve rebuilding MAME. :-) [20:36] It might not still, depending. [20:37] Well. I'm back early from jury duty, so I'm gonna spend the evening at least getting the disk selection temporary UI elements working. [20:37] I'll try to figure out how to tackle media switching after. [20:38] MAME lets you load Lua plugins, which can read/write over stdin/out; any advice on hooking those using JS? [20:39] I imagine I can figure it out given time, but if anyone has a quick pointer it'll speed things up. [20:40] it requires a relink, not a whole rebuild [20:41] not quite sure how the lua stuff would hook in, but it seems first step is getting the .lua file mapped into the filesystem for the emulator, then it's a matter of configuring mame to use it [20:42] Yes, that's just a command line arg. [20:42] I'm talking about talking to stdin/stdout from the MAME process. [20:42] oh right. hmmm...I think emscripten provides that mechanism but 've never used it [20:42] On a desktop, it's easy. It would be easy enough in Python. I don't know how emscripten handles those. [20:42] Ah, well, I'll look into it. [20:43] My primary motivation here is laziness, because then I don't have to mess with more parts of Emularity than absolutely necessary because I can just use the IA version. :-) [20:44] https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#setting-up-standard-i-o-devices [20:46] so it looks like you call FS.init with callbacks for stdin, stdout, and stderr - and they'll be called and either receive or should return one character at a time [20:56] Oh, sweet. [20:57] I mean, one character at a time isn't *great*, but it'll do. [20:57] Thanks! [20:58] I hadn't gotten to searching yet because I'm trying to figure out what's made Safari eat 60 GB of VMEM. [20:58] I'm beginning to strongly suspect that the script blocker I use is terrible. [21:08] Anyway. If I can make it work through sending commands/receiving status via a Lua script, I don't have to monkey with MAME at all. [21:08] *** azakai has quit IRC (Ping timeout: 255 seconds) [21:08] Plus it won't involve quite so much skullduggery on the .js side. [21:14] it seems like emscripten at least supports line buffering for those, eg, by default stdout calls console.log() and is line buffered [21:15] the docs for FS.init seem to say it'll get called ince per character and sometimes with null to flush [21:21] I don't really mind doing line buffering myself if I have to, I'm used to doing it on embedded serial ports. It's just not ideal from an efficiency standpoint, since the application is doing read() and write() under the hood, generally with more than one char at a time. [21:23] But in any case, it should be OK to scan for special character sequences for disk events (eject, etc.) and pass all the rest on to the console. [21:23] Wish there were a better way of doing it out of band, though, that seems kinda hackish. [21:23] Other than directly calling the Lua, obviously. [22:15] *** azakai has joined #jsmess [23:39] https://github.com/mamedev/mame/commit/49b5ad8f6bede1002c89dff44c332eae595fa735 [23:55] Oh, FS.registerDevice() looks more or less exactly like what I want. [23:56] Pity there's no ioctl operation, but this separates WAY better from the console. [23:59] Oh wait, maybe there is?