I can't seem to get the LUA console working in the browser.

I'm trying to create JS hooks / methods / functions for changing media predominantly, but also things like roms and tape position / status if its possible.

I noticed any disk I've written to, changes are not reflected until the disk is 'ejected'.
I thought that FS.sync might do this but doesn't seem to.

I could (hacky) remove and re-insert the drive whenever saving disk data.



LUA scripting questions: ( exposing webasm / lua console to JS )

1. Is it possible without modifying mame's src?
I could go creating my own hooks but only if there is no current solution.

2. if its possible are there some arguments I'm missing from compiling emcc I don't know about?

3. As I understand it the less desirable way to using lua / hooks is to autoboot a script (which works) and run a main loop.

Thanks in advance.