#jsmess 2018-03-02,Fri

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
***azakai has joined #jsmess
azakai has quit IRC (Client Quit)
azakai has joined #jsmess
[02:48]
........... (idle for 53mn)
fraveydan has joined #jsmess
fraveydan has left
fraveydan has joined #jsmess
fraveydan has left
sixfiveoh has joined #jsmess
sixfiveoh is now known as oscar
[03:42]
oscarAh, I had forgotten about IRC nick restrictions. Been too long.
Anyway, this is Dave (@6502_ftw), I'll be back in a moment after I park a car in the rain.
[03:48]
..... (idle for 20mn)
OK, now I'm back.
Let's talk about Lua/emulators/disks/flipping.
[04:08]
***gamingrob has quit IRC (Read error: Connection reset by peer)
Ipggi has quit IRC (Write error: Connection reset by peer)
mattl has quit IRC (Read error: Connection reset by peer)
Vito` has quit IRC (Write error: Connection reset by peer)
Ctrl-S___ has quit IRC (Write error: Connection reset by peer)
[04:10]
baioscar: ah, you mean the mame disk swap thing? [04:11]
oscarYes! [04:11]
baicool!
I haven't really dug into the lua system yet so I don't know what's possible
[04:11]
***gamingrob has joined #jsmess
gamingrob has quit IRC (Connection closed)
hook54321 has quit IRC (Ping timeout: 366 seconds)
[04:11]
oscarAside from having *used* the emulator on archive.org, and having used MAME since forever almost solely to play Defender, I don't have much familiarity with what's needed and what's lacking. [04:12]
***hook54321 has joined #jsmess [04:12]
oscarBut Jason said Lua was needed, and I can Lua pretty well and have embedded it in various engines before.
So I thought... maybe?
Anyway, if anyone has thoughts on what's required, or can at least point me to which fork of what is used on the Archive, I'll be glad to bang on it a bit after figuring out what's missing.
I mean, OBVIOUSLY it's JSMESS. But I feel like that's saying "it's computers".
[04:13]
bailet's see. I know there's a section somewhere in the MAME docs about how to use the lua scripting engine
http://docs.mamedev.org/techspecs/luaengine.html
[04:18]
oscarWell, right. Is there a pointer somewhere to what version/fork is being used?
Yes, I'm being lazy, largely because I am getting The Look from my wife because I am not in bed, and it is not The Fun Look.
[04:19]
baithe hard part is going to be figuring out which API functiont o call, I'm not sure if any of it is really documented, this page seems to basically say "you can use lua's introspection functionality to figure out the API" :)
afaik we're on the latest MAME version, db48x or SketchCow would know specifics but we just did a big round of upgrades
official builds, no fork
jsmess as a project doesn't really exist as a separate project now, it was all merged back in and is part of the main MAME project
[04:20]
oscarUndocumented is fine; I can read machine code OK, but we have source here. :-)
OK, that's good to know. No special integrations or external shells for the Archive stuff, then.
The rest of it I should be able to back out of how the Archive page loads it all.
[04:21]
baithere's a wrapper, Emularity, and then some archive.org-specific code to actually present it in their UI [04:22]
oscarAh, Emularity, right. That rings a bell. [04:23]
baiso at some point we'll probably have to figure out how to make emularity secify a custom lua script, do some interface for disk management, etc
specify*
[04:23]
oscarRight.
Ooh, BrowserFS. That name gets my infosec senses all tingly.
OK, so at least Emularity has some pretty decent examples in repo.
I assume we need similar function for DOS games with DOSBox? Or are those still done via MAME?
[04:24]
baiyeah dosbox has its own separate mechanism for doing this
I think in that one you feed it the disk names ahead of time and then there's a key you can press to switch between them
one other approach is that you can actually export the underlying functions from dosbox/mame and expose them to the JS, so hypothetically speaking if there's function map_drive_from_file(drivename, path), you could export that function and call it directly from js
with mame we think that the LUA approach is more flexible, assuming all that underlying stuff is exposed in a way that lets us do what we need
[04:34]
oscarRight, so looking into MAME, it looks like they semi-automatically map the internals to Lua, which is handy.
I'm trying to see what their mechanisms are, but browsing in Github is a little slower than having it locally, so I'll probably look more at that later.
But you can do things like read memory with "manager:machine().devices[":maincpu"].spaces["program"]:read_i8(0xC000)", so hopefully others should be easy.
[04:37]
baiyeah, that's what I was hoping, so it's just a matter of finding the right native calls to make [04:40]
oscarDo you know if there's an easy way to fire up the Lua console on the web app?
One can always be hooked in, obviously, but if there's something existing, so much the better.
[04:40]
bainot sure [04:43]
oscarLooking at how the CLI app does it, it looks like it expects Lua print() to just work and similar, so maybe I'll have to play around with that... not sure how it might react to the debug console in the browser, but that might do a thing. [04:46]
baiyeah, I guess that's the first question, how do we get in the door :D [04:47]
oscarThe entire console is actually implemented as a single Lua script, which is pretty fantastic.
https://github.com/mamedev/mame/blob/master/plugins/console/init.lua
[04:47]
Hm, OK. Well, plenty to look at, but I gotta get to bed. I'll check out more over the next few days. [04:55]
Thanks for the pointers! I'll keep the chat open in case anyone else has anything. [05:00]
baicool, yeah lemme know if you have any other questions. welcome to the project! [05:06]
................ (idle for 1h17mn)
DFJustinoscar: https://github.com/mamedev/mame/blob/master/src/frontend/mame/luaengine.cpp [06:23]
..................................................................... (idle for 5h42mn)
***zino has quit IRC (Read error: Operation timed out)
zino has joined #jsmess
[12:05]
.............. (idle for 1h9mn)
oscarOh yeah, I already dug into the luaengine files. [13:16]
.................. (idle for 1h25mn)
db48xoscar: welcome! [14:41]
oscarThanks! [14:41]
................................. (idle for 2h40mn)
***zino has quit IRC (Read error: Operation timed out) [17:21]
.... (idle for 17mn)
zino has joined #jsmess [17:38]
.......... (idle for 49mn)
zino has quit IRC (Read error: Operation timed out)
zino has joined #jsmess
[18:27]
........................................................... (idle for 4h54mn)
azakai has quit IRC (Ping timeout: 255 seconds) [23:21]
SNDTST has joined #jsmess
fzzzy_ has quit IRC (Read error: Connection reset by peer)
azakai has joined #jsmess
[23:30]
SNDTSTI followed SketchCow to this channel about helping with Emularity, but I'm confused how Lua is involved in getting this working. Is there some overview document that I can chew though to see if I can help? [23:34]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)