#jsmess 2018-03-23,Fri

↑back Search

Time Nickname Message
00:13 🔗 SketchCow It's nice to see what can be done, with graceful fails
00:13 🔗 SketchCow Proof of concept followed by refinement is always good
00:14 🔗 oscar Well, modules wouldn't likely be a graceful fail.
00:14 🔗 oscar But worth thinking about.
01:19 🔗 DFJustin 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 🔗 Vito` 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 🔗 oscar Hmm, DEFCON event for tomorrow might not happen.
03:34 🔗 oscar But I'm still trying to grind something out tonight.
03:40 🔗 SketchCow Great
04:35 🔗 datajerk has quit IRC (Read error: Operation timed out)
04:39 🔗 datajerk has joined #jsmess
05:21 🔗 db48x oscar: I can help test
05:21 🔗 db48x oscar: you can send me a pull request
05:23 🔗 oscar Will do!
05:25 🔗 db48x awesome
05:26 🔗 db48x now I must sleep
05:26 🔗 db48x probably to dream annoying dreams, since I haven't slept in two days
05:42 🔗 oscar I gotta sleep soon too.
05:43 🔗 oscar Weirdly, it's breaking on loading from Zip files.
05:43 🔗 oscar I'll get it behaving on multiple .dsk files first.
05:53 🔗 oscar Hum, maybe Wasteland wasn't the ideal one to test on, since the necessary copy operation seems to crash on the emulator.
06:10 🔗 oscar 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 🔗 oscar 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 🔗 oscar 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 🔗 oscar Then I can actually get the media swap going.
06:17 🔗 oscar After that: creating blank disks, then maybe eventually saving them somewhere?
06:18 🔗 oscar 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 🔗 oscar_ Hooray, iOS IRC client.
11:53 🔗 oscar_ 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 🔗 SketchCow db48x and bai - if you have a chance.
16:22 🔗 bai SketchCow: sup?
16:30 🔗 bai 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 🔗 bai 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 🔗 balrog oscar: did my messages go through? :)
17:57 🔗 balrog nvm :D
20:36 🔗 oscar Ah nuts, I was hoping it wouldn't involve rebuilding MAME. :-)
20:36 🔗 oscar It might not still, depending.
20:37 🔗 oscar 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 🔗 oscar I'll try to figure out how to tackle media switching after.
20:38 🔗 oscar MAME lets you load Lua plugins, which can read/write over stdin/out; any advice on hooking those using JS?
20:39 🔗 oscar I imagine I can figure it out given time, but if anyone has a quick pointer it'll speed things up.
20:40 🔗 bai it requires a relink, not a whole rebuild
20:41 🔗 bai 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 🔗 oscar Yes, that's just a command line arg.
20:42 🔗 oscar I'm talking about talking to stdin/stdout from the MAME process.
20:42 🔗 bai oh right. hmmm...I think emscripten provides that mechanism but 've never used it
20:42 🔗 oscar On a desktop, it's easy. It would be easy enough in Python. I don't know how emscripten handles those.
20:42 🔗 oscar Ah, well, I'll look into it.
20:43 🔗 oscar 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 🔗 bai https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#setting-up-standard-i-o-devices
20:46 🔗 bai 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 🔗 oscar Oh, sweet.
20:57 🔗 oscar I mean, one character at a time isn't *great*, but it'll do.
20:57 🔗 oscar Thanks!
20:58 🔗 oscar 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 🔗 oscar I'm beginning to strongly suspect that the script blocker I use is terrible.
21:08 🔗 oscar 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 🔗 oscar Plus it won't involve quite so much skullduggery on the .js side.
21:14 🔗 bai it seems like emscripten at least supports line buffering for those, eg, by default stdout calls console.log() and is line buffered
21:15 🔗 bai the docs for FS.init seem to say it'll get called ince per character and sometimes with null to flush
21:21 🔗 oscar 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 🔗 oscar 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 🔗 oscar Wish there were a better way of doing it out of band, though, that seems kinda hackish.
21:23 🔗 oscar Other than directly calling the Lua, obviously.
22:15 🔗 azakai has joined #jsmess
23:39 🔗 DFJustin https://github.com/mamedev/mame/commit/49b5ad8f6bede1002c89dff44c332eae595fa735
23:55 🔗 oscar Oh, FS.registerDevice() looks more or less exactly like what I want.
23:56 🔗 oscar Pity there's no ioctl operation, but this separates WAY better from the console.
23:59 🔗 oscar Oh wait, maybe there is?

irclogger-viewer