I was configuring a machine's slots using the UI, and getting everything "just right", with the different devices and options and then having to figure out the CLI options to launch that from a command line.
Sometimes its really difficult to get the options and names just right.
It should be possible to use the manager:machine().devices table to extract the slot options from the device tag:
function printt(t) for i,j in pairs(t) do print(i,j) end end
function match_string(a) for word in string.gmatch(a,"([%a%d_]+)") do print(word) end end
for i,j in pairs(manager:machine().devices) do print("device "..i) match_string(i) end
which map to the options:
-sl1 parallel -sl1:parallel:pic_ctx ap2000
Of course, there's a lot of devices that aren't relevant and would need to be filtered out like:
and you could inspect the images table to get the mounted floppies and hard drives:
for i,j in pairs(manager:machine().images) do
print("device "..i) match_string(i)
print("filename = "..manager:machine().images[i]:filename())
filename = /home/Downloads/ColorPrintShop.DSK
Just an idea I was playing with.