ADDED ext/README.md Index: ext/README.md ================================================================== --- /dev/null +++ ext/README.md @@ -0,0 +1,1 @@ +act486auto comes from . ADDED ext/act486auto/init.lua Index: ext/act486auto/init.lua ================================================================== --- /dev/null +++ ext/act486auto/init.lua @@ -0,0 +1,259 @@ +-- license:BSD-3-Clause +-- copyright-holders:sairuk + + +-- maybe should have used natkeyboard but i was in too deep + +local exports = { + name = 'act486auto', + version = '0.0.1', + description = 'act486 auto config demo', + license = 'BSD-3-Clause', + author = { name = 'sairuk' } } + +local act486auto = exports +local reset_subscription +local frame_subscription +local frame = 0 +local lframe = 0 +local fstart = 0 +local fend = 0 +local offset = 0 +local keys = {} +local lcomment = "None" +local ltfield = 0 + +-- allowed to be overriden in software.lua +hud = true + +local function split(s, sep) + local t = {} + if sep == nil then sep = "," end + for str in string.gmatch(s, "([^"..sep.."]+)") do + table.insert(t, str) + end + return t +end + +-- https://www.reddit.com/r/MAME/comments/1aw9h7c/comment/ksow3uj/ +local function press(tfield) + for key, value in pairs(split(tfield)) + do + port = portmap[value][1] + field = portmap[value][2] + manager.machine.ioport.ports[port].fields[field]:set_value(1) + end +end + +local function release(tfield) + for key, value in pairs(split(tfield)) + do + port = portmap[value][1] + field = portmap[value][2] + manager.machine.ioport.ports[port].fields[field]:clear_value() + end +end + +local function attach_image(tag, software) + manager.machine.images[tag]:load_software(software) +end + +local function detach_image(tag) + manager.machine.images[tag]:unload() +end + +local function nothrottle() + manager.machine.video.throttled = false + manager.machine.video.frameskip = 10 +end + +local function throttle() + manager.machine.video.throttled = true + manager.machine.video.frameskip = 0 +end + +local function soft_reset() + manager.machine:soft_reset() +end + +local function hard_reset() + manager.machine:hard_reset() +end + +local function pause() + emu.pause() +end + +local function unpause() + emu.unpause() +end + +local function cassette(action) + + m = manager.machine + for i,v in pairs(m.cassettes) do + d = i + break + end + + if d == nil then + emu.print_error("Could not determine cassette device, manual intervention required") + throttle() + end + + t = m.cassettes[d] + + if action == "play" then + if not t.is_playing then t:play() end + end + +end + +local function exit() + manager.machine:exit() +end + +local function draw_hud() + if hud then + frame_str = string.format("Software: %s\nFrame: %08d\nLast:\n Passed: %08d\n Action: %s\n Comment:%s", software, frame, offset, ltfield, lcomment) + -- print(frame_str) + manager.machine.render.ui_container:draw_text('left', 0, frame_str, 0xffffffff, 0x00000000) + end +end + +function act486auto.startplugin() + + local t + local rport = false + + reset_subscription = emu.add_machine_reset_notifier(function() + + if emu.romname() ~= '___empty' then + if emu.softname() ~= '___empty' then + + t = {} + + -- hackeryd00 + local softscript = exports.name .. '/scripts/software/' .. emu.romname() .. '/' .. emu.softname() + local softfile = manager.machine.options.entries.pluginspath:value():match("([^;]+)") .. "/" .. softscript .. ".lua" + -- local softtest = io.open(os.getenv("HOME") .. "/.mame/" .. softfile, "r") + + -- try plugin path directly, if not + local softtest = io.open(softfile, "r") + if not softtest then + -- try to append to homepath + local homepath = manager.machine.options.entries.homepath:value():match("([^;]+)") .. "/" + softtest = io.open(homepath .. softfile, "r") + end + + -- software script + if softtest then + io.close(softtest) + require(softscript) + for sk, sv in pairs(t_software) do + table.insert(t, sv) + end + else + print("failed to load " .. homepath .. softfile) + exit() + end + + -- preprocess imports + for itk, itv in pairs(t) do + itfield = itv[3] + if string.match(itfield, "import_") then + import = string.gsub(itfield, "import_(.+)", "%1") + require(exports.name .. "/scripts/" .. import) + table.remove(t, itk) + for tdk, tdv in pairs(t_step) do + idx = itk + (tdk - 1) + table.insert(t, idx, tdv) + end + end + end + require(exports.name .. '/portmap/' .. keymap ) + nothrottle() + end + end + end) + + -- for i,v in pairs(manager.machine.images) do print(i) end + frame_subscription = emu.add_machine_frame_notifier(function() + if manager.machine.time.seconds > 0 then + fstart = start + --draw_hud(frame) + for tk, tv in pairs(t) do + tfield = tv[3] + comment = tv[4] + + fstart = fstart + tv[1] + fend = fstart + tv[2] + + if frame == fstart then + -- attach images + if string.match(tfield, "eject_") then + softdev = string.gsub(tfield, "eject_(.+)", "%1") + detach_image(tags[softdev]) + elseif string.match(tfield, "attach_") then + softdev = string.gsub(tfield, "attach_(.+)_(.+)", "%1") + softimg = string.gsub(tfield, "attach_(.+)_(.+)", "%2") + attach_image(tags[softdev], software .. ":" .. softimg) + elseif string.match(tfield, "cass_") then + action = string.gsub(tfield, "cass_(.+)", "%1") + cassette(action) + elseif string.match(tfield, "throttle") then + throttle() + elseif string.match(tfield, "soft_reset") then + soft_reset() + elseif string.match(tfield, "hard_reset") then + hard_reset() + elseif string.match(tfield, "pause") then + pause() + elseif string.match(tfield, "stop") then + exit() + else + print(string.format("%s\t%s\t%s", frame, tfield, comment)) + -- press key, multiple if required + if string.match(tfield,",") then + for key in string.gmatch(tfield, "([^,]+)") do + table.insert(keys, key) + end + else + table.insert(keys, tfield) + end + + if rport == false then + for i, key in pairs(keys) do + press(key) + end + rport = true + end + end + end + + -- release pressed keys + if rport and frame == fend then + for i, key in pairs(keys) do + release(key) + end + keys = {} + rport = false + if comment == "" then + lcomment = "None" + else + lcomment = comment + end + ltfield = tfield + lframe = frame + end + end + frame = frame + 1 + offset = frame - lframe + end + end) + + emu.register_frame_done(draw_hud) + +end + +return exports ADDED ext/act486auto/plugin.json Index: ext/act486auto/plugin.json ================================================================== --- /dev/null +++ ext/act486auto/plugin.json @@ -0,0 +1,10 @@ +{ + "plugin": { + "name": "act486auto", + "description": "[ac]t486 auto config demo", + "version": "0.0.1", + "author": "sairuk", + "type": "plugin", + "start": "false" + } +} ADDED ext/act486auto/portmap/c64kbd.lua Index: ext/act486auto/portmap/c64kbd.lua ================================================================== --- /dev/null +++ ext/act486auto/portmap/c64kbd.lua @@ -0,0 +1,90 @@ +-- for port in pairs(manager.machine.ioport.ports) +-- do +-- for key in pairs(manager.machine.ioport.ports[port].fields) +-- do +-- print('[""] = { "' .. port .. '", "' .. key ..'" },') +-- end +-- end + +portmap = { + ["KEY_SHIFT_LOCK"] = { ":LOCK", "SHIFT LOCK" }, + ["KEY_RESTORE"] = { ":RESTORE", "RESTORE" }, + ["KEY_DOWN"] = { ":ROW0", "Crsr Down Up" }, + ["KEY_ENTER"] = { ":ROW0", "Return" }, + ["KEY_F3"] = { ":ROW0", "F3" }, + ["KEY_F5"] = { ":ROW0", "F5" }, + ["KEY_F7"] = { ":ROW0", "F7" }, + ["KEY_LEFT"] = { ":ROW0", "Crsr Right Left" }, + ["KEY_DEL"] = { ":ROW0", "INST DEL" }, + ["KEY_F1"] = { ":ROW0", "F1" }, + -- ["KEY_"] = { ":ROW0", "Keyboard" }, + ["KEY_W"] = { ":ROW1", "W" }, + ["KEY_Z"] = { ":ROW1", "Z" }, + ["KEY_A"] = { ":ROW1", "A" }, + ["KEY_4"] = { ":ROW1", "4 $" }, + -- ["KEY_"] = { ":ROW1", "Keyboard" }, + ["KEY_E"] = { ":ROW1", "E" }, + ["KEY_LSHIFT"] = { ":ROW1", "Shift (Left)" }, + ["KEY_S"] = { ":ROW1", "S" }, + ["KEY_3"] = { ":ROW1", "3 #" }, + ["KEY_X"] = { ":ROW2", "X" }, + ["KEY_6"] = { ":ROW2", "6 &" }, + ["KEY_F"] = { ":ROW2", "F" }, + -- ["KEY_"] = { ":ROW2", "Keyboard" }, + ["KEY_D"] = { ":ROW2", "D" }, + ["KEY_5"] = { ":ROW2", "5 %" }, + ["KEY_T"] = { ":ROW2", "T" }, + ["KEY_C"] = { ":ROW2", "C" }, + ["KEY_R"] = { ":ROW2", "R" }, + ["KEY_Y"] = { ":ROW3", "Y" }, + ["KEY_H"] = { ":ROW3", "H" }, + ["KEY_G"] = { ":ROW3", "G" }, + ["KEY_V"] = { ":ROW3", "V" }, + ["KEY_7"] = { ":ROW3", "7 '" }, + ["KEY_8"] = { ":ROW3", "8 (" }, + ["KEY_U"] = { ":ROW3", "U" }, + -- ["KEY_"] = { ":ROW3", "Keyboard" }, + ["KEY_B"] = { ":ROW3", "B" }, + ["KEY_I"] = { ":ROW4", "I" }, + ["KEY_9"] = { ":ROW4", "9 )" }, + ["KEY_M"] = { ":ROW4", "M" }, + ["KEY_K"] = { ":ROW4", "K" }, + ["KEY_J"] = { ":ROW4", "J" }, + ["KEY_0"] = { ":ROW4", "0" }, + ["KEY_O"] = { ":ROW4", "O" }, + ["KEY_N"] = { ":ROW4", "N" }, + -- ["KEY_"] = { ":ROW4", "Keyboard" }, + ["KEY_MINUS"] = { ":ROW5", "-" }, + ["KEY_L"] = { ":ROW5", "L" }, + ["KEY_PLUS"] = { ":ROW5", "+" }, + ["KEY_COMMA"] = { ":ROW5", ", <" }, + ["KEY_FULLSTOP"] = { ":ROW5", ". >" }, + ["KEY_P"] = { ":ROW5", "P" }, + ["KEY_COLON"] = { ":ROW5", ": [" }, + ["KEY_@"] = { ":ROW5", "@" }, + -- ["KEY_"] = { ":ROW5", "Keyboard" }, + ["KEY_EQUALS"] = { ":ROW6", "=" }, + ["KEY_ASTERIX"] = { ":ROW6", "*" }, + ["KEY_SLASH"] = { ":ROW6", "/ ?" }, + -- ["KEY_"] = { ":ROW6", "Keyboard" }, + ["KEY_HOME"] = { ":ROW6", "CLR HOME" }, + ["KEY_POUND"] = { ":ROW6", "£" }, + ["KEY_RSHIFT"] = { ":ROW6", "Shift (Right)" }, + ["KEY_COLON"] = { ":ROW6", "; ]" }, + ["KEY_PI"] = { ":ROW6", "↑ Pi" }, + ["KEY_1"] = { ":ROW7", "1 !" }, + ["KEY_Q"] = { ":ROW7", "Q" }, + ["KEY_RUNSTOP"] = { ":ROW7", "RUN STOP" }, + -- ["KEY_"] = { ":ROW7", "Keyboard" }, + ["KEY_2"] = { ":ROW7", '2 "' }, + ["KEY_CBM"] = { ":ROW7", "CBM" }, + ["KEY_BACKSPACE"] = { ":ROW7", "←" }, + ["KEY_SPACE"] = { ":ROW7", "Space" }, + ["KEY_CTRL"] = { ":ROW7", "Ctrl" }, + -- [""] = { ":iec8:c1541:ADDRESS", "Device Address" }, + ["JOY1_LEFT"] = { ":joy2:joy:JOY", "P1 Left" }, + ["JOY1_DOWN"] = { ":joy2:joy:JOY", "P1 Down" }, + ["JOY1_BUTTON1"] = { ":joy2:joy:JOY", "P1 Button 1" }, + ["JOY1_UP"] = { ":joy2:joy:JOY", "P1 Up" }, + ["JOY1_RIGHT"] = { ":joy2:joy:JOY", "P1 Right" }, + } ADDED ext/act486auto/portmap/ms_naturl.lua Index: ext/act486auto/portmap/ms_naturl.lua ================================================================== --- /dev/null +++ ext/act486auto/portmap/ms_naturl.lua @@ -0,0 +1,125 @@ +-- https://github.com/mamedev/mame/blob/master/src/devices/bus/pc_kbd/msnat.cpp + +-- for k, v in pairs(manager.machine.ioport.ports[":kbd:ms_naturl:P1.2"].fields) do print(k) end +portmap = { + -- P2.0 + ["KEY_Y"] = { ":kbd:ms_naturl:P2.0", "Y" }, + ["KEY_H"] = { ":kbd:ms_naturl:P2.0", "H" }, + ["KEY_J"] = { ":kbd:ms_naturl:P2.0", "J" }, + ["KEY_N"] = { ":kbd:ms_naturl:P2.0", "N" }, + ["KEY_M"] = { ":kbd:ms_naturl:P2.0", "M" }, + ["KEY_U"] = { ":kbd:ms_naturl:P2.0", "U" }, + ["KEY_6"] = { ":kbd:ms_naturl:P2.0", "6" }, + ["KEY_7"] = { ":kbd:ms_naturl:P2.0", "7" }, + -- P2.1 + ["KEY_ENTER"] = { ":kbd:ms_naturl:P2.1", "Enter" }, + ["KEY_BACKSLASH"] = { ":kbd:ms_naturl:P2.1", "\\" }, + ["KEY_CLOSEBRACE"] = { ":kbd:ms_naturl:P2.1", "]" }, + ["KEY_LEFT"] = { ":kbd:ms_naturl:P2.1", "Cursor Left" }, + ["KEY_BACKSPACE"] = { ":kbd:ms_naturl:P2.1", "Backspace" }, + ["KEY_F5"] = { ":kbd:ms_naturl:P2.1", "F5" }, + ["KEY_F6"] = { ":kbd:ms_naturl:P2.1", "F6" }, + ["KEY_EQUALS"] = { ":kbd:ms_naturl:P2.1", "=" }, + -- P2.2 + ["KEY_9"] = { ":kbd:ms_naturl:P2.2", "9" }, + ["KEY_O"] = { ":kbd:ms_naturl:P2.2", "O" }, + ["KEY_OPENBRACE"] = { ":kbd:ms_naturl:P2.2", "[" }, + ["KEY_L"] = { ":kbd:ms_naturl:P2.2", "L" }, + ["KEY_STOP"] = { ":kbd:ms_naturl:P2.2", "." }, + ["KEY_MINUS"] = { ":kbd:ms_naturl:P2.2", "-" }, + ["KEY_F7"] = { ":kbd:ms_naturl:P2.2", "F7" }, + ["KEY_F8"] = { ":kbd:ms_naturl:P2.2", "F8" }, + -- P2.3 + ["KEY_0"] = { ":kbd:ms_naturl:P2.3", "0" }, + ["KEY_COLON"] = { ":kbd:ms_naturl:P2.3", ";" }, + ["KEY_QUOTE"] = { ":kbd:ms_naturl:P2.3", "'" }, + ["KEY_SLASH"] = { ":kbd:ms_naturl:P2.3", "/" }, + ["KEY_DOWN"] = { ":kbd:ms_naturl:P2.3", "Cursor Down" }, + ["KEY_P"] = { ":kbd:ms_naturl:P2.3", "P" }, + ["KEY_F9"] = { ":kbd:ms_naturl:P2.3", "F9" }, + ["KEY_F10"] = { ":kbd:ms_naturl:P2.3", "F10" }, + -- P2.4 + ["KEY_UP"] = { ":kbd:ms_naturl:P2.4", "Cursor Up" }, + ["KEY_RWIN"] = { ":kbd:ms_naturl:P2.4", "Right Win" }, + ["KEY_RIGHT"] = { ":kbd:ms_naturl:P2.4", "Cursor Right" }, + ["KEY_SPACE"] = { ":kbd:ms_naturl:P2.4", "Space" }, + -- P2.5 + ["KEY_HOME"] = { ":kbd:ms_naturl:P2.5", "Home" }, + ["KEY_8_PAD"] = { ":kbd:ms_naturl:P2.5", "Keypad 8" }, + ["KEY_5_PAD"] = { ":kbd:ms_naturl:P2.5", "Keypad 5" }, + ["KEY_2_PAD"] = { ":kbd:ms_naturl:P2.5", "Keypad 2" }, + ["KEY_0_PAD"] = { ":kbd:ms_naturl:P2.5", "Keypad 0" }, + ["KEY_END"] = { ":kbd:ms_naturl:P2.5", "End" }, + ["KEY_F11"] = { ":kbd:ms_naturl:P2.5", "F11" }, + ["KEY_F12"] = { ":kbd:ms_naturl:P2.5", "F12" }, + -- P2.6 + ["KEY_INSERT"] = { ":kbd:ms_naturl:P2.6", "Insert" }, + ["KEY_DEL"] = { ":kbd:ms_naturl:P2.6", "Delete" }, + ["KEY_6_PAD"] = { ":kbd:ms_naturl:P2.6", "Keypad 6" }, + ["KEY_3_PAD"] = { ":kbd:ms_naturl:P2.6", "Keypad 3" }, + --["??"] = { ":kbd:ms_naturl:P2.6", "Keypad ." }, + ["KEY_9_PAD"] = { ":kbd:ms_naturl:P2.6", "Keypad 9" }, + ["KEY_F3"] = { ":kbd:ms_naturl:P2.6", "F3" }, + ["KEY_F4"] = { ":kbd:ms_naturl:P2.6", "F4" }, + -- P2.7 + ["KEY_SLASH"] = { ":kbd:ms_naturl:P2.7", "Keypad /" }, + ["KEY_7_PAD"] = { ":kbd:ms_naturl:P2.7", "Keypad 7" }, + ["KEY_4_PAD"] = { ":kbd:ms_naturl:P2.7", "Keypad 4" }, + ["KEY_PLUS_PAD"] = { ":kbd:ms_naturl:P2.7", "Keypad +" }, + ["KEY_1_PAD"] = { ":kbd:ms_naturl:P2.7", "Keypad 1" }, + ["KEY_ASTERIX"] = { ":kbd:ms_naturl:P2.7", "Keypad *" }, + ["KEY_PRTSCR"] = { ":kbd:ms_naturl:P2.7", "Print Screen" }, + ["KEY_MENU"] = { ":kbd:ms_naturl:P2.7", "Menu" }, + -- P1.0 + ["KEY_LWIN"] = { ":kbd:ms_naturl:P1.0", "Left Win" }, + ["KEY_SCRLOCK"] = { ":kbd:ms_naturl:P1.0", "Scroll Lock" }, + ["KEY_ENTER_PAD"] = { ":kbd:ms_naturl:P1.0", "Keypad Enter" }, + -- P1.1 + ["LCONTROL"] = { ":kbd:ms_naturl:P1.1", "Left Ctrl" }, + ["RCONTROL"] = { ":kbd:ms_naturl:P1.1", "Right Ctrl" }, + ["CAPSLOCK"] = { ":kbd:ms_naturl:P1.1", "Caps Lock" }, + -- P1.2 + ["KEY_PGUP"] = { ":kbd:ms_naturl:P1.2", "Page Up" }, + ["KEY_2"] = { ":kbd:ms_naturl:P1.2", "2" }, + ["KEY_W"] = { ":kbd:ms_naturl:P1.2", "W" }, + ["KEY_S"] = { ":kbd:ms_naturl:P1.2", "S" }, + ["KEY_X"] = { ":kbd:ms_naturl:P1.2", "X" }, + ["KEY_PGDOWN"] = { ":kbd:ms_naturl:P1.2", "Page Down" }, + ["KEY_F1"] = { ":kbd:ms_naturl:P1.2", "F1" }, + ["KEY_F2"] = { ":kbd:ms_naturl:P1.2", "F2" }, + -- P1.3 + ["KEY_LALT"] = { ":kbd:ms_naturl:P1.3", "Left Alt" }, + ["KEY_RALT"] = { ":kbd:ms_naturl:P1.3", "Right Alt" }, + ["KEY_MINUS_PAD"] = { ":kbd:ms_naturl:P1.3", "Keypad -" }, + ["KEY_NUMLOCK"] = { ":kbd:ms_naturl:P1.3", "Num Lock" }, + -- P1.4 + ["KEY_I"] = { ":kbd:ms_naturl:P1.4", "I" }, + ["KEY_K"] = { ":kbd:ms_naturl:P1.4", "K" }, + ["KEY_D"] = { ":kbd:ms_naturl:P1.4", "D" }, + ["KEY_C"] = { ":kbd:ms_naturl:P1.4", "C" }, + ["KEY_COMMA"] = { ":kbd:ms_naturl:P1.4", "," }, + ["KEY_E"] = { ":kbd:ms_naturl:P1.4", "E" }, + ["KEY_3"] = { ":kbd:ms_naturl:P1.4", "3" }, + ["KEY_8"] = { ":kbd:ms_naturl:P1.4", "8" }, + -- P1.5 + ["KEY_5"] = { ":kbd:ms_naturl:P1.5", "5" }, + ["KEY_R"] = { ":kbd:ms_naturl:P1.5", "R" }, + ["KEY_F"] = { ":kbd:ms_naturl:P1.5", "F" }, + ["KEY_G"] = { ":kbd:ms_naturl:P1.5", "G" }, + ["KEY_V"] = { ":kbd:ms_naturl:P1.5", "V" }, + ["KEY_B"] = { ":kbd:ms_naturl:P1.5", "B" }, + ["KEY_T"] = { ":kbd:ms_naturl:P1.5", "T" }, + ["KEY_4"] = { ":kbd:ms_naturl:P1.5", "4" }, + -- P1.6 + ["KEY_ESC"] = { ":kbd:ms_naturl:P1.6", "Esc" }, + ["KEY_1"] = { ":kbd:ms_naturl:P1.6", "1" }, + ["KEY_Q"] = { ":kbd:ms_naturl:P1.6", "Q" }, + ["KEY_A"] = { ":kbd:ms_naturl:P1.6", "A" }, + ["KEY_Z"] = { ":kbd:ms_naturl:P1.6", "Z" }, + ["KEY_TAB"] = { ":kbd:ms_naturl:P1.6", "Tab" }, + ["KEY_TILDE"] = { ":kbd:ms_naturl:P1.6", "`" }, + -- P1.7 + ["KEY_LSHIFT"] = { ":kbd:ms_naturl:P1.7", "Left Shift" }, + ["KEY_RSHIFT"] = { ":kbd:ms_naturl:P1.7", "Right Shift" }, + ["KEY_CANCEL"] = { ":kbd:ms_naturl:P1.7", "Break" }, + } ADDED ext/act486auto/portmap/pcipc_kbd.lua Index: ext/act486auto/portmap/pcipc_kbd.lua ================================================================== --- /dev/null +++ ext/act486auto/portmap/pcipc_kbd.lua @@ -0,0 +1,112 @@ +-- mame/src/devices/machine/pckeybrd.cpp + +portmap = { + ["KEY_ESC"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "Esc" }, + ["KEY_1"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "1 !" }, + ["KEY_2"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "2 @" }, + ["KEY_3"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "3 #" }, + ["KEY_4"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "4 $" }, + ["KEY_5"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "5 %" }, + ["KEY_6"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "6 ^" }, + ["KEY_7"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "7 &" }, + ["KEY_8"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "8 *" }, + ["KEY_9"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "9 (" }, + ["KEY_0"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "0 )" }, + ["KEY_MINUS"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "- _" }, + ["KEY_EQUALS"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "= +" }, + ["KEY_BACKSPACE"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "<--" }, + ["KEY_TAB"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_0", "Tab" }, + + ["KEY_Q"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "Q" }, + ["KEY_W"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "W" }, + ["KEY_E"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "E" }, + ["KEY_R"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "R" }, + ["KEY_T"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "T" }, + ["KEY_Y"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "Y" }, + ["KEY_U"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "U" }, + ["KEY_I"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "I" }, + ["KEY_O"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "O" }, + ["KEY_P"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "P" }, + ["KEY_OPENBRACE"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "[ {" }, + ["KEY_CLOSEBRACE"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "] }" }, + ["KEY_ENTER"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "Enter" }, + ["LCONTROL"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "L-Ctrl" }, + ["KEY_A"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "A" }, + ["KEY_S"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_1", "S" }, + + ["KEY_D"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "D" }, + ["KEY_F"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "F" }, + ["KEY_G"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "G" }, + ["KEY_H"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "H" }, + ["KEY_J"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "J" }, + ["KEY_K"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "K" }, + ["KEY_L"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "L" }, + ["KEY_COLON"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "; :" }, + ["KEY_QUOTE"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "' \"" }, + ["KEY_TILDE"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "` ~" }, + ["KEY_LSHIFT"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "L-Shift" }, + ["KEY_BACKSLASH"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "\\ |" }, + ["KEY_Z"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "Z" }, + ["KEY_X"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "X" }, + ["KEY_C"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "C" }, + ["KEY_V"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_2", "V" }, + + ["KEY_B"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "B" }, + ["KEY_N"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "N" }, + ["KEY_M"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "M" }, + ["KEY_COMMA"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", ", <" }, + ["KEY_STOP"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", ". >" }, + ["KEY_SLASH"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "/ ?" }, + ["KEY_RSHIFT"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "R-Shift" }, + ["KEY_ASTERISK"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "KP * (PrtScr)" }, + ["KEY_LALT"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "Alt" }, + ["KEY_SPACE"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "Space" }, + ["KEY_CAPSLOCK"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "Caps" }, + ["KEY_F1"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "F1" }, + ["KEY_F2"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "F2" }, + ["KEY_F3"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "F3" }, + ["KEY_F4"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "F4" }, + ["KEY_F5"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_3", "F5" }, + + ["KEY_F6"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "F6" }, + ["KEY_F7"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "F7" }, + ["KEY_F8"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "F8" }, + ["KEY_F9"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "F9" }, + ["KEY_F10"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "F10" }, + ["KEY_NUMLOCK"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "NumLock" }, + ["KEY_SCRLOCK"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "ScrLock" }, + ["KEY_7_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "KP 7 (Home)" }, + ["KEY_8_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "KP 8 (Up)" }, + ["KEY_9_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "KP 9 (PgUp)" }, + ["KEY_MINUS_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "KP -" }, + ["KEY_4_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "KP 4 (Left)" }, + ["KEY_5_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "KP 5" }, + ["KEY_6_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "KP 6 (Right)" }, + ["KEY_PLUS_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "KP +" }, + ["KEY_1_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_4", "KP 1 (End)" }, + + ["KEY_2_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_5", "KP 2 (Down)" }, + ["KEY_3_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_5", "KP 3 (PgDn)" }, + ["KEY_0_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_5", "KP 0 (Ins)" }, + ["KEY_DEL_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_5", "KP . (Del)" }, + ["KEY_BACKSLASH2"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_5", "(84/102)\\" }, + ["KEY_F11"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_5", "(MF2)F11" }, + ["KEY_F12"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_5", "(MF2)F12" }, + + ["KEY_ENTER_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)KP Enter" }, + ["KEY_RCONTROL"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Right Control" }, + ["KEY_SLASH_PAD"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)KP /" }, + ["KEY_PRTSCR"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)PRTSCR" }, + ["KEY_RALT"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)ALTGR" }, + ["KEY_HOME"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Home" }, + ["KEY_UP"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Cursor Up" }, + ["KEY_PGUP"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Page Up" }, + ["KEY_LEFT"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Cursor Left" }, + ["KEY_RIGHT"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Cursor Right" }, + ["KEY_END"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)End" }, + ["KEY_DOWN"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Cursor Down" }, + ["KEY_PGDN"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Page Down" }, + ["KEY_INSERT"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Insert" }, + ["KEY_DEL"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Delete" }, + ["KEY_PAUSE"] = { ":board4:fdc37c93x:at_keyboard:pc_keyboard_6", "(MF2)Pause" }, +} ADDED ext/act486auto/readme.md Index: ext/act486auto/readme.md ================================================================== --- /dev/null +++ ext/act486auto/readme.md @@ -0,0 +1,54 @@ +# act486auto + +offset (frame) based automation for MAME machines, it is all pretty rough and was built initially for use with at486 and ct486 machines and msdos622 as a demo, so CHS is hardcoded to a 1G size. + +# setup +in `scripts/` +* machine -> create a `machine.lua` with a `t_machine` table +* software -> create a `software.lua` with a `t_software` table + +set any vars your machine or software needs in the respective files with desired scope + +the `t_` tables row format is `{ offset, delay, portmap, "comment" },` + +offsets are offset from 0 based on a start delay per machine, `900` for at486 it is not true frames as we only start after machine time starts + +## commands +* see `portmap.lua` for available key commands +* `stop` and `throttle` are special keywords +* `fd0_softlist_dev` will insert `flop(n)` into floppy drive 1 +* `cd0_softlist_dev` will insert `cdrom` into cdrom drive 1 +* `import_` will preprocess steps from `t_step` table + +## usage +with a blank chd image of CHS `2048,16,63` (1G) install msdos622 +`mame -w at486 -nvram_directory /dev/null msdos622 -hard1 msdos622.chd -skip_gameinfo -ramsize 64M -plugins -plugin act486auto` + +with cdrom device +`./mame -w at486 -nvram_directory /dev/null os2warp3 -hard1 test.chd -skip_gameinfo -ramsize 64M -board3:ide:ide:1 cdrom -cdrom os2warp3 -plugins -plugin act486auto` + + +expect output on the cli based on your machine and software configurations +``` +11627 14400 14410 Insert Floppy Disk 2 +11627 14500 14510 +11627 24500 24510 Insert Floppy Disk 3 +11627 24600 24610 +11627 33600 33610 +11627 33700 33710 +11627 34200 34205 Empty Floppy Disk Drive +11627 37200 37210 Throttle +11627 37210 37220 Exit +``` + +``` +col1 current frame +col2 offset start +col3 offset end (offset + delay) +col4 comment +``` + + +perhaps we should use machine time and natkeyboard, perhaps seconds is enough, perhaps more commands and devices should be supported, perhaps later we will + +sai ADDED ext/act486auto/scripts/at486.lua Index: ext/act486auto/scripts/at486.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/at486.lua @@ -0,0 +1,62 @@ +start = 900 +keymap = "ms_naturl" + +tags = { + screen1 = ":isa1:svga_et4k:screen", + flop1 = ":board1:fdcsmc:fdc:0:35hd", + flop2 = ":board1:fdcsmc:fdc:1:35hd", + hard1 = ":board3:ide:ide:0:hdd:image", + cdrom1 = ":board3:ide:ide:1:cdrom:image", +} + +t_step = { + -- offset, release delay, portmap, comment + -- Enter Bios + { 100, 10, "KEY_F1", "Enter Bios" }, + -- Standard CMOS Setup + { 100, 90, "KEY_ENTER", "Standard CMOS Setup" }, + { 100, 5, "import_dev_hdd_1G", "Import HDD Type" }, + -- Floppies + { 10, 5, "KEY_DOWN", "Configure Floppy Drives" }, + ---- Drive A + { 10, 5, "import_dev_fd_144", "Import Floppy Drive" }, + ---- Drive B + { 10, 5, "import_dev_fd_144", "Import Floppy Drive" }, + -- Exit Standard CMOS Setup + { 10, 10, "KEY_ESC", "Exit Standard CMOS Setup" }, + + -- Advanced CMOS Setup + { 10, 5, "KEY_DOWN", "" }, + { 20, 10, "KEY_ENTER", "Enter Advanced CMOS Setup" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + -- Boot Order + { 10, 5, "KEY_PGUP", "Set Boot Order" }, + -- Exit Advanced CMOS Setup + { 10, 10, "KEY_ESC", "Exit Advanced CMOS Setup" }, + + -- Save and Exit + { 10, 5, "KEY_F10", "Save and Exit" }, + { 10, 5, "KEY_Y", "" }, + { 10, 10, "KEY_ENTER", "" }, +} + +-- board3:ide:ide:0 cdrom ATAPI CD-ROM +-- cf ATA CompactFlash Card +-- cp2024 Conner Peripherals CP-2024 hard disk +-- cr589 Matsushita CR589 CD-ROM Drive +-- hdd IDE Hard Disk +-- px320a PleXCombo PX-320A CD-RW/DVD-ROM Drive +-- xm3301 Toshiba XM-3301 CD-ROM Drive +-- zip100 Iomega Zip 100MB IDE Drive ADDED ext/act486auto/scripts/c64.lua Index: ext/act486auto/scripts/c64.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/c64.lua @@ -0,0 +1,11 @@ +start = 100 +keymap = "c64kbd" + +tags = { + tape = "c1530", + flop1 = "iec8:c1541:uc4:0:525ssqd", + screen1 = ":screen" +} + +t_step = {} + ADDED ext/act486auto/scripts/ct486.lua Index: ext/act486auto/scripts/ct486.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/ct486.lua @@ -0,0 +1,50 @@ +start = 900 +keymap = "ms_naturl" + +tags = { + screen1 = ":isa1:svga_et4k:screen", + flop1 = ":board1:fdcsmc:fdc:0:35hd", + flop2 = ":board1:fdcsmc:fdc:1:35hd", + hard1 = ":board3:ide:ide:0:hdd:image", + cdrom1 = ":board3:ide:ide:1:cdrom:image", +} + +t_step = { + { 100, 10, "KEY_F1", "Enter Bios" }, + { 100, 5, "KEY_ENTER", "Standard CMOS Setup" }, + { 10, 5, "KEY_RIGHT", "" }, + { 10, 5, "KEY_RIGHT", "" }, + { 10, 5, "KEY_RIGHT", "" }, + { 10, 5, "KEY_RIGHT", "" }, + { 10, 5, "KEY_RIGHT", "" }, + { 10, 5, "KEY_RIGHT", "" }, + { 10, 5, "KEY_RIGHT", "" }, + { 100, 5, "import_dev_hdd_1G", "Import HDD Type" }, + { 10, 5, "KEY_RIGHT", "" }, + { 10, 5, "KEY_PGUP", "Configure Floppy Drives" }, + { 10, 5, "import_dev_fd_144", "Import Floppy Drive" }, + { 10, 5, "KEY_PGUP", "" }, + { 10, 5, "import_dev_fd_144", "Import Floppy Drive" }, + { 10, 10, "KEY_ESC", "Exit Standard CMOS Setup" }, + { 10, 5, "KEY_DOWN", "" }, + { 20, 10, "KEY_ENTER", "Enter Advanced CMOS Setup" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_DOWN", "" }, + { 10, 5, "KEY_PGUP", "Set Boot Order" }, + --{ 10, 5000, "pause", "Pause Emulator"}, + { 10, 10, "KEY_ESC", "Exit Advanced CMOS Setup" }, + { 10, 5, "KEY_F10", "Save and Exit" }, + { 10, 5, "KEY_Y", "" }, + { 10, 10, "KEY_ENTER", "" }, +} ADDED ext/act486auto/scripts/dev_fd_144.lua Index: ext/act486auto/scripts/dev_fd_144.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/dev_fd_144.lua @@ -0,0 +1,4 @@ +t_step = { + { 10, 5, "KEY_PGUP", "1.44M Drive" }, + { 10, 5, "KEY_DOWN", "" }, +} ADDED ext/act486auto/scripts/dev_hdd_100M.lua Index: ext/act486auto/scripts/dev_hdd_100M.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/dev_hdd_100M.lua @@ -0,0 +1,18 @@ +t_step = { + { 100, 5, "KEY_PGUP", "Set HDD Type" }, + ---- Cylinders + { 10, 5, "KEY_2", "Cylinders" }, + { 10, 5, "KEY_5", "" }, + { 10, 5, "KEY_6", "" }, + { 50, 5, "KEY_RIGHT" }, + ---- Heads + { 10, 5, "KEY_1", "Heads" }, + { 10, 5, "KEY_6", "" }, + { 50, 5, "KEY_RIGHT", "" }, + { 50, 5, "KEY_RIGHT", "" }, + { 50, 5, "KEY_RIGHT", "" }, + ---- Sectors + { 10, 5, "KEY_5", "Sectors" }, + { 10, 5, "KEY_0", "" }, + { 50, 5, "KEY_RIGHT", "" }, +} ADDED ext/act486auto/scripts/dev_hdd_1G.lua Index: ext/act486auto/scripts/dev_hdd_1G.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/dev_hdd_1G.lua @@ -0,0 +1,19 @@ +t_step = { + { 100, 5, "KEY_PGUP", "Set HDD Type" }, + ---- Cylinders + { 10, 5, "KEY_2", "Cylinders" }, + { 10, 5, "KEY_0", "" }, + { 10, 5, "KEY_4", "" }, + { 10, 5, "KEY_8", "" }, + { 40, 5, "KEY_RIGHT", "" }, + ---- Heads + { 10, 5, "KEY_1", "Heads" }, + { 10, 5, "KEY_6", "" }, + { 50, 5, "KEY_RIGHT", "" }, + { 50, 5, "KEY_RIGHT", "" }, + { 50, 5, "KEY_RIGHT", "" }, + ---- Sectors + { 10, 5, "KEY_6", "Sectors" }, + { 10, 5, "KEY_3", "" }, + { 50, 5, "KEY_RIGHT", "" }, +} ADDED ext/act486auto/scripts/dev_hdd_500M.lua Index: ext/act486auto/scripts/dev_hdd_500M.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/dev_hdd_500M.lua @@ -0,0 +1,19 @@ +t_step = { + { 100, 5, "KEY_PGUP", "Set HDD Type" }, + ---- Cylinders + { 10, 5, "KEY_1", "Cylinders" }, + { 10, 5, "KEY_0", "" }, + { 10, 5, "KEY_1", "" }, + { 10, 5, "KEY_5", "" }, + { 40, 5, "KEY_RIGHT" }, + ---- Heads + { 10, 5, "KEY_1", "Heads" }, + { 10, 5, "KEY_6", "" }, + { 50, 5, "KEY_RIGHT", "" }, + { 50, 5, "KEY_RIGHT", "" }, + { 50, 5, "KEY_RIGHT", "" }, + ---- Sectors + { 10, 5, "KEY_6", "Sectors" }, + { 10, 5, "KEY_3", "" }, + { 50, 5, "KEY_RIGHT", "" }, +} ADDED ext/act486auto/scripts/pcipc.lua Index: ext/act486auto/scripts/pcipc.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/pcipc.lua @@ -0,0 +1,52 @@ +start = 200 +keymap = "pcipc_kbd" + +tags = { + screen1 = ":pci:4:virge:screen", + flop1 = ":board4:fdc37c93x:fdc:0:35hd", + flop2 = ":board4:fdc37c93x:fdc:1:35hd", + hard1 = ":pci:07.1:ide1:0:hdd:image", + cdrom1 = ":pci:07.1:ide2:0:cdrom:image", +} + +-- The date is hard-coded for FreeDOS 1.4's release date. +-- + +t_step = { + -- Enter BIOS + { 50, 10, "KEY_F2", "Enter BIOS" }, + { 550, 1, "KEY_0", "Setting date and time" }, -- Hour + { 4, 2, "KEY_6", "" }, + { 4, 2, "KEY_TAB", "" }, + { 4, 2, "KEY_0", "" }, -- Minute + { 4, 2, "KEY_0", "" }, + { 4, 2, "KEY_TAB", "" }, + { 4, 2, "KEY_0", "" }, -- Second + { 4, 2, "KEY_0", "" }, + { 4, 2, "KEY_DOWN", "" }, + { 4, 2, "KEY_0", "" }, -- Month + { 4, 2, "KEY_4", "" }, + { 4, 2, "KEY_TAB", "" }, + { 4, 2, "KEY_0", "" }, -- Day + { 4, 2, "KEY_5", "" }, + { 4, 2, "KEY_TAB", "" }, + { 4, 2, "KEY_2", "" }, -- Year + { 4, 2, "KEY_0", "" }, + { 4, 2, "KEY_2", "" }, + { 4, 2, "KEY_5", "" }, + { 4, 2, "KEY_DOWN", "" }, + { 4, 2, "KEY_DOWN", "" }, + { 4, 2, "KEY_ENTER", "Setting up second floppy" }, + { 4, 2, "KEY_UP", "" }, + { 4, 2, "KEY_UP", "" }, + { 4, 2, "KEY_ENTER", "" }, + { 4, 2, "KEY_DOWN", "" }, + { 4, 2, "KEY_DOWN", "" }, + { 4, 2, "KEY_DOWN", "" }, + { 4, 2, "KEY_ENTER", "Setting secondary master to auto" }, + { 4, 2, "KEY_MINUS", "" }, + { 4, 2, "KEY_ESC", "" }, + { 4, 2, "KEY_LEFT", "" }, + { 4, 2, "KEY_ENTER", "Exit and save changes" }, + { 4, 2, "KEY_ENTER", "" }, +} ADDED ext/act486auto/scripts/software/at486/freedos13rc4_144.lua Index: ext/act486auto/scripts/software/at486/freedos13rc4_144.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/software/at486/freedos13rc4_144.lua @@ -0,0 +1,13 @@ +software = "freedos13rc4_144" +chd = "import_dev_hdd_500M" + + -- offset, release delay, portmap, comment +t_software = { + -- FREEDOS RC4 + { 10, 5, "import_at486", "Import machine" }, + { 100, 10, "attach_flop1_flop1", "" }, + { 5800, 5, "KEY_Y", "" }, + { 14500, 5, "KEY_Y", "" }, + { 15500, 5, "eject_flop1", "" }, + { 3000, 10, "throttle", "" }, +} ADDED ext/act486auto/scripts/software/at486/msdos622.lua Index: ext/act486auto/scripts/software/at486/msdos622.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/software/at486/msdos622.lua @@ -0,0 +1,25 @@ +software = "msdos622" +chd = "import_dev_hdd_500M" + + -- offset, release delay, portmap, comment +t_software = { + -- MSDOS 622 + { 10, 5, "import_at486", "Import machine" }, + { 10, 10, "attach_flop1_flop1", "Insert Floppy Disk 1" }, + { 2500, 10, "KEY_ENTER", "" }, + { 100, 10, "KEY_ENTER", "" }, + { 100, 10, "KEY_ENTER", "" }, + { 100, 10, "KEY_ENTER", "" }, + { 2800, 10, "KEY_ENTER", "" }, + { 100, 10, "KEY_ENTER", "" }, + { 6900, 10, "attach_flop1_flop2", "Insert Floppy Disk 2" }, + { 100, 10, "KEY_ENTER", "" }, + { 10000, 10, "attach_flop1_flop3", "Insert Floppy Disk 3" }, + { 100, 10, "KEY_ENTER", "" }, + { 9000, 10, "KEY_ENTER", "" }, + { 100, 10, "KEY_ENTER", "" }, + { 500, 5, "eject_flop1", "Empty Floppy Disk Drive" }, + + { 3000, 10, "throttle", "Throttle" }, + { 10, 10, "stop", "Exit" }, +} ADDED ext/act486auto/scripts/software/at486/os2warp3.lua Index: ext/act486auto/scripts/software/at486/os2warp3.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/software/at486/os2warp3.lua @@ -0,0 +1,40 @@ +-- this currently crashes during install, needs more work +software = "os2warp3" +chd = "import_dev_hdd_1G" + +t_software = { + { 10, 5, "import_at486", "Import machine" }, + { 10, 10, "attach_flop1_flop1", "Insert Installation Disk" }, + { 2000, 10, "attach_cdrom1_cdrom1", "Insert CDROM ATAPI" }, + { 1500, 10, "attach_flop1_flop2", "Insert Diskette 1" }, + { 10, 10, "KEY_ENTER", "" }, +-- { 6500, 10, "KEY_E", "Easy Installation" }, + { 6500, 10, "KEY_A", "Advanced Installation" }, + { 30, 10, "KEY_A", "" }, + -- Enter Select Partition + -- Enter Open Menu + -- B Install Boot Manager + -- DOWN Select Unformatted Spaces + -- Enter Open Menu + -- C Create Partition + -- Enter Partition Size + -- P Create Primary Partition + -- +-- { 20, 10, "KEY_A", "" }, +-- { 80, 10, "KEY_F", "" }, +-- { 20, 5, "KEY_ENTER", "" }, + { 50, 5, "eject_flop1", "Empty Floppy Disk Drive 1" }, + { 10, 5, "eject_flop2", "Empty Floppy Disk Drive 2" }, + { 20, 10, "soft_reset", "" }, + { 10, 10, "throttle", "Throttle" }, +-- { 20, 10, "attach_flop1_flop1", "Insert Installation Disk" }, +-- { 150, 10, "throttle", "Throttle" }, +-- { 3500, 10, "attach_flop1_flop2", "Insert Diskette 1" }, +-- { 10, 10, "KEY_ENTER", "" }, +-- { 5200, 5, "eject_flop1", "Empty Floppy Disk Drive 1" }, +-- { 10, 5, "eject_flop2", "Empty Floppy Disk Drive 2" }, +-- { 10, 5, "eject_cdrom1", "Empty Floppy Disk Drive" }, +-- { 10, 10, "KEY_ENTER", "Installer finised" }, +-- { 3000, 10, "throttle", "Throttle" }, +-- { 10, 10, "stop", "Exit" }, +} ADDED ext/act486auto/scripts/software/c64/barbaria.lua Index: ext/act486auto/scripts/software/c64/barbaria.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/software/c64/barbaria.lua @@ -0,0 +1,20 @@ +software = "barbaria" + + -- offset, release delay, portmap, comment +t_software = { + { 100, 5, "import_c64", "Import machine" }, + { 10, 5, "attach_flop1_flop1", "" }, + { 10, 5, "KEY_L", "" }, + { 10, 5, "KEY_O", "" }, + { 10, 5, "KEY_A", "" }, + { 10, 5, "KEY_D", "" }, + { 10, 5, "KEY_LSHIFT,KEY_2", "" }, + { 10, 5, "KEY_ASTERIX", "" }, + { 10, 5, "KEY_LSHIFT,KEY_2", "" }, + { 10, 5, "KEY_COMMA", "" }, + { 10, 5, "KEY_8", "" }, + { 10, 5, "KEY_COMMA", "" }, + { 10, 5, "KEY_1", "" }, + { 10, 5, "KEY_ENTER", "" }, + { 60000, 5, "throttle", "" }, +} ADDED ext/act486auto/scripts/software/c64/bldrdash.lua Index: ext/act486auto/scripts/software/c64/bldrdash.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/software/c64/bldrdash.lua @@ -0,0 +1,21 @@ +software = "bldrdash" +-- hud = true + + -- offset, release delay, portmap, comment +t_software = { + { 100, 5, "import_c64", "Import machine" }, + { 10, 5, "attach_flop1_flop1", "" }, + { 10, 5, "KEY_L", "" }, + { 10, 5, "KEY_O", "" }, + { 10, 5, "KEY_A", "" }, + { 10, 5, "KEY_D", "" }, + { 10, 5, "KEY_LSHIFT,KEY_2", "" }, + { 10, 5, "KEY_ASTERIX", "" }, + { 10, 5, "KEY_LSHIFT,KEY_2", "" }, + { 10, 5, "KEY_COMMA", "" }, + { 10, 5, "KEY_8", "" }, + { 10, 5, "KEY_COMMA", "" }, + { 10, 5, "KEY_1", "" }, + { 10, 5, "KEY_ENTER", "" }, + { 2500, 5, "throttle", "" }, +} ADDED ext/act486auto/scripts/software/c64/turrican.lua Index: ext/act486auto/scripts/software/c64/turrican.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/software/c64/turrican.lua @@ -0,0 +1,22 @@ +software = "turrican" + + -- offset, release delay, portmap, comment + -- we dont call attach for a cassette + +t_software = { + { 100, 5, "import_c64", "Import machine" }, + { 10, 5, "KEY_L", "" }, + { 10, 5, "KEY_O", "" }, + { 10, 5, "KEY_A", "" }, + { 10, 5, "KEY_D", "" }, + { 10, 5, "KEY_LSHIFT,KEY_2", "" }, + { 10, 5, "KEY_ASTERIX", "" }, + { 10, 5, "KEY_LSHIFT,KEY_2", "" }, + { 10, 5, "KEY_ENTER", "" }, + { 10, 5, "cass_play", "" }, + { 3400, 5, "KEY_R", "" }, + { 10, 5, "KEY_U", "" }, + { 10, 5, "KEY_N", "" }, + { 10, 5, "KEY_ENTER", "" }, + { 60000, 5, "throttle", "" }, +} ADDED ext/act486auto/scripts/software/ct486/win2k.lua Index: ext/act486auto/scripts/software/ct486/win2k.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/software/ct486/win2k.lua @@ -0,0 +1,59 @@ +-- mame -w ct486 -nvram_directory /dev/null win2kps4 -flop1 wndws98b -hard1 /mnt/mame-media/media/hdd/test.chd -skip_gameinfo -ramsize 64M -board3:ide:ide:1 cdrom -cdrom1 win2kps4 -uimodekey INSERT -plugins -plugin act486auto +software = "win2k" +chd = "import_dev_hdd_1G" + +t_software = { + { 100, 5, "import_ct486", "Import machine" }, + { 100, 10, "attach_flop1_flop1", "start install" }, + { 7200, 10, "attach_flop1_flop2", "" }, + { 100, 5, "KEY_ENTER", "Disk2" }, + { 15800, 10, "attach_flop1_flop3", "" }, + { 100, 5, "KEY_ENTER", "Disk3" }, + { 11800, 10, "attach_flop1_flop4", "" }, + { 100, 5, "KEY_ENTER", "Disk4" }, + { 13000, 10,"KEY_ENTER", "Start Install" }, + { 100, 5, "KEY_F8", "Agree to terms" }, + { 100, 5, "KEY_ENTER", "Format Disk" }, + { 100, 5, "KEY_ENTER", "NTFS" }, + { 170000, 10,"KEY_ENTER", "Start Install" }, + -- { 17000, 10,"attach_flop1_flop5", "" }, + -- { 100, 5, "KEY_ENTER", "Disk5" }, + -- { 17000, 10, "attach_flop1_flop6", "" }, + -- { 100, 5, "KEY_ENTER", "Disk6" }, + -- { 17000, 10, "attach_flop1_flop7", "" }, + -- { 100, 5, "KEY_ENTER", "Disk7" }, + -- { 17000, 10, "attach_flop1_flop8", "" }, + -- { 100, 5, "KEY_ENTER", "Disk8" }, + -- { 17000, 10, "attach_flop1_flop9", "" }, + -- { 100, 5, "KEY_ENTER", "Disk9" }, + -- { 202000, 5, "eject_flop1", "Empty floppy drive" }, + -- { 100, 5, "KEY_ENTER", "Reboot" }, + -- { 10000, 5, "KEY_ENTER", "" }, + -- { 100, 5, "KEY_F8", "Install" }, + -- { 100, 5, "KEY_ENTER", "Select Partition" }, + -- { 100, 5, "KEY_ENTER", "Leave it intact" }, + -- -- gui (no mouse) + -- { 300000, 5, "KEY_ENTER", "Regional" }, + -- { 100, 5, "KEY_M", "UserName" }, + -- { 100, 5, "KEY_A", "" }, + -- { 100, 5, "KEY_M", "" }, + -- { 100, 5, "KEY_E", "" }, + -- { 100, 5, "KEY_TAB", "" }, + -- { 100, 5, "KEY_TAB", "" }, + -- { 100, 5, "KEY_TAB", "" }, + -- -- product key + -- { 100, 5, "KEY_ENTER", "" }, + -- { 100, 5, "KEY_TAB", "" }, + -- { 100, 5, "KEY_M", "Password" }, + -- { 100, 5, "KEY_A", "" }, + -- { 100, 5, "KEY_M", "" }, + -- { 100, 5, "KEY_E", "" }, + -- { 100, 5, "KEY_TAB", "" }, + -- { 100, 5, "KEY_M", "" }, + -- { 100, 5, "KEY_A", "" }, + -- { 100, 5, "KEY_M", "" }, + -- { 100, 5, "KEY_E", "" }, + -- { 100, 5, "KEY_ENTER", "" }, + -- { 100, 5, "KEY_ENTER", "Timezone" }, + -- { 100, 5, "KEY_ENTER", "ALWAYS" }, +} ADDED ext/act486auto/scripts/software/pcipc/freedos14.lua Index: ext/act486auto/scripts/software/pcipc/freedos14.lua ================================================================== --- /dev/null +++ ext/act486auto/scripts/software/pcipc/freedos14.lua @@ -0,0 +1,25 @@ +software = "freedos14" + +t_software = { + { 10, 5, "import_pcipc", "Import machine" }, + { 4920, 5, "KEY_ENTER", "" }, + { 30, 5, "KEY_ENTER", "" }, + { 100, 5, "KEY_UP", "" }, + { 10, 5, "KEY_ENTER", "Partition hard drive" }, + { 300, 5, "KEY_ENTER", "Reboot" }, + + { 5200, 5, "KEY_ENTER", "English Language" }, + { 30, 5, "KEY_ENTER", "Continue with install" }, + { 55, 5, "KEY_UP", "" }, + { 10, 5, "KEY_ENTER", "Format C:" }, + { 15, 5, "KEY_ENTER", "" }, + { 120, 5, "KEY_ENTER", "US English keyboard layout" }, + { 95, 5, "KEY_ENTER", "Overwrite MBR" }, + { 12, 5, "KEY_ENTER", "Full install" }, + { 12, 5, "KEY_UP", "" }, + { 5, 5, "KEY_ENTER", "Installing FreeDOS" }, + + -- { 58700, 5, "eject_flop1", "Empty floppy disk drive" }, + -- { 0, 5, "KEY_ENTER", "Final reboot ..." }, + -- { 2550, 5, "KEY_ENTER", "" }, +}