Thanks again, CrazyC!

I am having such a blast fiddling with lua and mame. I haven't had this much fun programming for a long time.

I am still learning lua but it's so forgiving. And the console has auto-completion. Awesome! TAB for the win! This is pure genius.


I haven't quite figured out what the difference is between : and .

According to something I read, "The colon is for implementing methods that pass self as the first parameter. So x:bar(3,4) should be the same as x.bar(x,3,4)."


To start up the machine if you have the debugger active:
Code
manager:machine().devices[":maincpu"]:debug():go() 

And in trying to figure out the syntax I invariably interchange : with .

Code
print(manager:machine().devices[":maincpu"]:debug())
sol.device_debug*: 0x559857771518

but if I call the same thing, without the colon syntax, it blows with a segfault.

Code
print(manager:machine().devices[":maincpu"].debug())
Segmentation fault (core dumped)



The console plug in history is only 10 entries, but we can fix that easily by changing the line in plugins/console.init.lua
ln.historysetmaxlen(10) to something like 30.