diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/cheatfind/init.lua | 333 | ||||
-rw-r--r-- | plugins/console/init.lua | 12 | ||||
-rw-r--r-- | plugins/hiscore/hiscore.dat | 391 | ||||
-rw-r--r-- | plugins/hiscore/init.lua | 50 |
4 files changed, 241 insertions, 545 deletions
diff --git a/plugins/cheatfind/init.lua b/plugins/cheatfind/init.lua index 276193acc13..86fcf04ca49 100644 --- a/plugins/cheatfind/init.lua +++ b/plugins/cheatfind/init.lua @@ -106,9 +106,7 @@ function cheatfind.startplugin() if not step or step <= 0 then step = 1 end - if (olddata.shift < 0) and (step < (1 << -olddata.shift)) then - step = 1 << -olddata.shift; - end + local cfoper = { lt = function(a, b, val) return (a < b and val == 0) or (val > 0 and (a + val) == b) end, gt = function(a, b, val) return (a > b and val == 0) or (val > 0 and (a - val) == b) end, @@ -194,7 +192,7 @@ function cheatfind.startplugin() oldval = old, newval = new, bitmask = bitmask } - ref[addr] = #ret + ref[ret[#ret].addr] = #ret end end end @@ -259,35 +257,18 @@ function cheatfind.startplugin() local devtable = {} local devsel = 1 local devcur = 1 - - - --local formtable = { " I1", " i1", "<I2", ">I2", "<i2", ">i2", "<I4", ">I4", "<i4", ">i4", "<I8", ">I8", "<i8", ">i8", }-- " <f", " >f", " <d", " >d" } - --local formname = { "u8", "s8", "little u16", "big u16", "little s16", "big s16", - -- "little u32", "big u32", "little s32", "big s32", "little u64", "big u64", "little s64", "big s64", } - -- -- "little float", "big float", "little double", "big double" } - -- Reordered into likelyhood of use order: unsigned byte by big endian unsigned by little endian unsigned then unsigned in same order - local formtable = { " I1", ">I2", ">I4", ">I8", "<I2", "<I4", "<I8", " i1", ">i2", ">i4", ">i8", "<i2", "<i4", "<i8", }-- " <f", " >f", " <d", " >d" } - local formname = { "u8", "big u16", "big u32", "big u64", "little u16", "little u32", - "little u64", "s8", "big s16", "big s32", "big s64", "little s16", "little s32", "little s64", } - + local formtable = { " I1", " i1", "<I2", ">I2", "<i2", ">i2", "<I4", ">I4", "<i4", ">i4", "<I8", ">I8", "<i8", ">i8", }-- " <f", " >f", " <d", " >d" } + local formname = { "u8", "s8", "little u16", "big u16", "little s16", "big s16", + "little u32", "big u32", "little s32", "big s32", "little u64", "big u64", "little s64", "big s64", } + -- "little float", "big float", "little double", "big double" } local width = 1 local bcd = 0 local align = 0 local optable = { "lt", "gt", "eq", "ne", "beq", "bne", "ltv", "gtv", "eqv", "nev" } local opsel = 1 local value = 0 - local leftop = 1 + local leftop = 2 local rightop = 1 - local leftop_text = "Slot 1" - local rightop_text = "Slot 1" - local value_text = "" - local expression_text = "Slot 1 < Slot 1" - local pausetable = { "Automatic", "Manual" } - local pausesel = 1 - local pokevaltable = { "Slot 1 Value", "Last Slot Value", "0x00", "0x01", "0x02", "0x03", "0x04", "0x05", "0x06", "0x07", "0x08", "0x09", "0x63 (Decimal 99)", "0x99 (BCD 99)", - "0xFF (Decimal 255)" , "0x3E7 (Decimal 999)", "0x999 (BCD 999)", "0x270F (Decimal 9999)", "0x9999 (BCD 9999)", "0xFFFF (Decimal 65535)" } - local pokevalsel = 1 - local matches = {} local matchsel = 0 local matchpg = 0 @@ -308,7 +289,7 @@ function cheatfind.startplugin() bcd = 0 opsel = 1 value = 0 - leftop = 1 + leftop = 2 rightop = 1 matches = {} matchsel = 0 @@ -351,14 +332,7 @@ function cheatfind.startplugin() emu.register_start(start) - local menu_is_showing = false - local tabbed_out = false - local function menu_populate() - if pausesel == 1 then - emu.pause() - menu_is_showing = true - end local menu = {} local function menu_prepare() @@ -456,8 +430,6 @@ function cheatfind.startplugin() file:close() file = io.open(cheat_save.path .. "/cheat.simple", "a") file:write(string.format(cheat_save.simple, desc)) - -- old cheat .dat format, write support only (for cheat forum posting of new cheats if posted in simple format) - file:write(string.format(cheat_save.dat, desc)) file:close() manager:machine():popmessage(string.format(_("Cheat written to %s and added to cheat.simple"), filename)) end @@ -466,8 +438,6 @@ function cheatfind.startplugin() file = io.open(cheat_save.path .. "/cheat.simple", "a") if file then file:write(string.format(cheat_save.simple, desc)) - -- old cheat .dat format, write support only (for cheat forum posting of new cheats if posted in simple format) - file:write(string.format(cheat_save.dat, desc)) file:close() manager:machine():popmessage(_("Cheat added to cheat.simple")) written = true @@ -501,28 +471,6 @@ function cheatfind.startplugin() end menu[#menu + 1] = function() - local m = { _("Pause Mode"), pausetable[pausesel], 0 } - menu_lim(pausesel, 1, pausetable, m) - local function f(event) - if (event == "left" or event == "right") then - if pausesel == 1 then - pausesel = 2 - menu_is_showing = false - manager:machine():popmessage(_("Manually pause & unpause the game when needed with the pause hotkey")) - else - pausesel = 1 - emu.pause() - end - end - - return true - end - return m, f - end - - - - menu[#menu + 1] = function() local function f(event) local ret = false if event == "select" then @@ -533,26 +481,16 @@ function cheatfind.startplugin() menu_blocks[num] = {} menu_blocks[num][1] = cheat.save(devtable[devcur].space, region.offset, region.size) end - manager:machine():popmessage(_("All slots cleared and current state saved to Slot 1")) + manager:machine():popmessage(_("Data cleared and current state saved")) watches = {} - opsel = 1 - value = 0 - leftop = 1 + leftop = 2 rightop = 1 - leftop_text = "Slot 1" - rightop_text = "Slot 1" - value_text = "" - expression_text = "Slot 1 < Slot 1" matchsel = 0 return true end end - local opsel = 1 return { _("Start new search"), "", 0 }, f end - - - if #menu_blocks ~= 0 then menu[#menu + 1] = function() return { "---", "", "off" }, nil end menu[#menu + 1] = function() @@ -561,28 +499,15 @@ function cheatfind.startplugin() for num, region in ipairs(devtable[devcur].ram) do menu_blocks[num][#menu_blocks[num] + 1] = cheat.save(devtable[devcur].space, region.offset, region.size) end - manager:machine():popmessage(string.format(_("Memory State saved to Slot %d"), #menu_blocks[1])) - - if (leftop == #menu_blocks[1] - 1 and rightop == #menu_blocks[1] - 2 ) then - leftop = #menu_blocks[1] - rightop = #menu_blocks[1]-1 - elseif (leftop == #menu_blocks[1] - 2 and rightop == #menu_blocks[1] - 1 ) then - leftop = #menu_blocks[1]-1 - rightop = #menu_blocks[1] - elseif (leftop == #menu_blocks[1] - 1 ) then - leftop = #menu_blocks[1] - elseif (rightop == #menu_blocks[1] - 1) then - rightop = #menu_blocks[1] - end - leftop_text = string.format("Slot %d", leftop) - rightop_text = string.format("Slot %d", rightop) + manager:machine():popmessage(_("Current state saved")) + leftop = (leftop == #menu_blocks[1]) and #menu_blocks[1] + 1 or leftop + rightop = (rightop == #menu_blocks[1] - 1) and #menu_blocks[1] or rightop devsel = devcur return true end end - return { _("Save Current Memory State to Slot ") .. #menu_blocks[1] + 1, "", 0 }, f + return { _("Save current -- #") .. #menu_blocks[1] + 1, "", 0 }, f end - menu[#menu + 1] = function() return { "---", "", "off" }, nil end menu[#menu + 1] = function() local function f(event) if event == "select" then @@ -598,16 +523,26 @@ function cheatfind.startplugin() if #matches == 0 then matches[1] = {} for num = 1, #menu_blocks do - matches[1][num] = cheat.comp(menu_blocks[num][leftop], menu_blocks[num][rightop], - optable[opsel], formtable[width], value, bcd == 1, step) + if leftop == #menu_blocks[1] + 1 then + matches[1][num] = cheat.compcur(menu_blocks[num][rightop], optable[opsel], + formtable[width], value, bcd == 1, step) + else + matches[1][num] = cheat.comp(menu_blocks[num][leftop], menu_blocks[num][rightop], + optable[opsel], formtable[width], value, bcd == 1, step) + end count = count + #matches[1][num] end else lastmatch = matches[#matches] matches[#matches + 1] = {} for num = 1, #menu_blocks do - matches[#matches][num] = cheat.compnext(menu_blocks[num][leftop], menu_blocks[num][rightop], - lastmatch[num], optable[opsel], formtable[width], value, bcd == 1, step) + if leftop == #menu_blocks[1] + 1 then + matches[#matches][num] = cheat.compcurnext(menu_blocks[num][rightop], lastmatch[num], + optable[opsel], formtable[width], value, bcd == 1, step) + else + matches[#matches][num] = cheat.compnext(menu_blocks[num][leftop], menu_blocks[num][rightop], + lastmatch[num], optable[opsel], formtable[width], value, bcd == 1, step) + end count = count + #matches[#matches][num] end end @@ -618,64 +553,31 @@ function cheatfind.startplugin() return true end end - - if optable[opsel] == "lt" then - if (value == 0 ) then - expression_text = string.format("%s < %s", leftop_text, rightop_text) - else - expression_text = string.format("%s == %s - %d", leftop_text, rightop_text, value) - end - elseif optable[opsel] == "gt" then - if (value == 0 ) then - expression_text = string.format("%s > %s", leftop_text, rightop_text) - else - expression_text = string.format("%s == %s + %d", leftop_text, rightop_text, value) - end - elseif optable[opsel] == "eq" then - expression_text = string.format("%s == %s", leftop_text, rightop_text) - elseif optable[opsel] == "ne" then - if (value == 0 ) then - expression_text = string.format("%s != %s", leftop_text, rightop_text) - else - expression_text = string.format("%s == %s +/- %d", leftop_text, rightop_text, value) - end - elseif optable[opsel] == "beq" then - expression_text = string.format("%s BITWISE== %s", leftop_text, rightop_text) - elseif optable[opsel] == "bne" then - expression_text = string.format("%s BITWISE!= %s", leftop_text, rightop_text) - elseif optable[opsel] == "ltv" then - expression_text = string.format("%s < %d", leftop_text, value) - elseif optable[opsel] == "gtv" then - expression_text = string.format("%s > %d", leftop_text, value) - elseif optable[opsel] == "eqv" then - expression_text = string.format("%s == %d", leftop_text, value) - elseif optable[opsel] == "nev" then - string.format("%s != %d", leftop_text, value) - end - return { _("Perform Compare : ") .. expression_text, "", 0 }, f + return { _("Compare"), "", 0 }, f end - menu[#menu + 1] = function() return { "---", "", "off" }, nil end menu[#menu + 1] = function() - local m = { _(leftop), "", 0 } - menu_lim(leftop, 1, #menu_blocks[1], m) - m[1] = string.format("Slot %d", leftop) - return m, function(event) local r leftop, r = incdec(event, leftop, 1, #menu_blocks[1]) leftop_text = "Slot " .. leftop return r end + local m = { _("Left operand"), leftop, "" } + menu_lim(leftop, 1, #menu_blocks[1] + 1, m) + if leftop == #menu_blocks[1] + 1 then + m[2] = _("Current") + end + return m, function(event) local r leftop, r = incdec(event, leftop, 1, #menu_blocks[1] + 1) return r end end menu[#menu + 1] = function() - local m = { _(optable[opsel]), "", 0 } + local m = { _("Operator"), optable[opsel], "" } menu_lim(opsel, 1, #optable, m) local function f(event) local r opsel, r = incdec(event, opsel, 1, #optable) if event == "left" or event == "right" or event == "comment" then if optable[opsel] == "lt" then - manager:machine():popmessage(_("Left less than right")) + manager:machine():popmessage(_("Left less than right, value is difference")) elseif optable[opsel] == "gt" then - manager:machine():popmessage(_("Left greater than right")) + manager:machine():popmessage(_("Left greater than right, value is difference")) elseif optable[opsel] == "eq" then manager:machine():popmessage(_("Left equal to right")) elseif optable[opsel] == "ne" then - manager:machine():popmessage(_("Left not equal to right")) + manager:machine():popmessage(_("Left not equal to right, value is difference")) elseif optable[opsel] == "beq" then manager:machine():popmessage(_("Left equal to right with bitmask")) elseif optable[opsel] == "bne" then @@ -698,21 +600,15 @@ function cheatfind.startplugin() if optable[opsel]:sub(3, 3) == "v" then return nil end - local m = { _(rightop), "", 0 } + local m = { _("Right operand"), rightop, "" } menu_lim(rightop, 1, #menu_blocks[1], m) - m[1] = string.format("Slot %d", rightop) - return m, function(event) local r rightop, r = incdec(event, rightop, 1, #menu_blocks[1]) rightop_text = "Slot " .. rightop return r end + return m, function(event) local r rightop, r = incdec(event, rightop, 1, #menu_blocks[1]) return r end end menu[#menu + 1] = function() if optable[opsel] == "bne" or optable[opsel] == "beq" or optable[opsel] == "eq" then return nil end - local m - if optable[opsel] == "ltv" or optable[opsel] == "gtv" or optable[opsel] == "eqv" or optable[opsel] == "nev" then - m = { _("Value"), value, "" } - else - m = { _("Difference"), value, "" } - end + local m = { _("Value"), value, "" } local max = 100 -- max value? menu_lim(value, 0, max, m) if value == 0 and optable[opsel]:sub(3, 3) ~= "v" then @@ -726,62 +622,6 @@ function cheatfind.startplugin() menu_lim(width, 1, #formtable, m) return m, function(event) local r width, r = incdec(event, width, 1, #formtable) return r end end - - menu[#menu + 1] = function() - local m = { _("Test/Write Poke Value"), pokevaltable[pokevalsel], 0 } - menu_lim(pokevalsel, 1, #pokevaltable, m) - local function f(event) - local r - pokevalsel, r = incdec(event, pokevalsel, 1, #pokevaltable) - if event == "left" or event == "right" or event == "comment" then - if pokevalsel == 1 then - manager:machine():popmessage(_("Use this if you want to poke the Slot 1 value (eg. You started with something but lost it)")) - elseif pokevalsel == 2 then - manager:machine():popmessage(_("Use this if you want to poke the Last Slot value (eg. You started without an item but finally got it)")) - elseif pokevalsel == 3 then - manager:machine():popmessage(_("Use this if you want to poke 0x00")) - elseif pokevalsel == 4 then - manager:machine():popmessage(_("Use this if you want to poke 0x01")) - elseif pokevalsel == 5 then - manager:machine():popmessage(_("Use this if you want to poke 0x02")) - elseif pokevalsel == 6 then - manager:machine():popmessage(_("Use this if you want to poke 0x03")) - elseif pokevalsel == 7 then - manager:machine():popmessage(_("Use this if you want to poke 0x04")) - elseif pokevalsel == 8 then - manager:machine():popmessage(_("Use this if you want to poke 0x05")) - elseif pokevalsel == 9 then - manager:machine():popmessage(_("Use this if you want to poke 0x06")) - elseif pokevalsel == 10 then - manager:machine():popmessage(_("Use this if you want to poke 0x07")) - elseif pokevalsel == 11 then - manager:machine():popmessage(_("Use this if you want to poke 0x08")) - elseif pokevalsel == 12 then - manager:machine():popmessage(_("Use this if you want to poke 0x09")) - elseif pokevalsel == 13 then - manager:machine():popmessage(_("Use this if you want to poke 0x63 (Decimal 99)")) - elseif pokevalsel == 14 then - manager:machine():popmessage(_("Use this if you want to poke 0x99 (BCD 99)")) - elseif pokevalsel == 15 then - manager:machine():popmessage(_("Use this if you want to poke 0xFF (Decimal 255)")) - elseif pokevalsel == 16 then - manager:machine():popmessage(_("Use this if you want to poke 0x3E7 (Decimal 999)")) - elseif pokevalsel == 17 then - manager:machine():popmessage(_("Use this if you want to poke 0x999 (BCD 999)")) - elseif pokevalsel == 18 then - manager:machine():popmessage(_("Use this if you want to poke 0x270F (Decimal 9999)")) - elseif pokevalsel == 19 then - manager:machine():popmessage(_("Use this if you want to poke 0x9999 (BCD 9999)")) - elseif pokevalsel == 20 then - manager:machine():popmessage(_("Use this if you want to poke 0xFFFF (Decimal 65535)")) - end - end - return r - end - return m, f - end - - menu[#menu + 1] = function() if optable[opsel] == "bne" or optable[opsel] == "beq" then return nil @@ -873,66 +713,10 @@ function cheatfind.startplugin() local function match_exec(match) local dev = devtable[devcur] - + local cheat = { desc = string.format(_("Test cheat at addr %08X"), match.addr), script = {} } local wid = formtable[width]:sub(3, 3) local widchar - local pokevalue local form - - if pokevalsel == 1 then - pokevalue = match.oldval - elseif pokevalsel == 2 then - pokevalue = match.newval - elseif pokevalsel == 3 then - pokevalue = 0 - elseif pokevalsel == 4 then - pokevalue = 1 - elseif pokevalsel == 5 then - pokevalue = 2 - elseif pokevalsel == 6 then - pokevalue = 3 - elseif pokevalsel == 7 then - pokevalue = 4 - elseif pokevalsel == 8 then - pokevalue = 5 - elseif pokevalsel == 9 then - pokevalue = 6 - elseif pokevalsel == 10 then - pokevalue = 7 - elseif pokevalsel == 11 then - pokevalue = 8 - elseif pokevalsel == 12 then - pokevalue = 9 - elseif pokevalsel == 13 then - pokevalue = 99 - elseif pokevalsel == 14 then - pokevalue = 153 - elseif pokevalsel == 15 then - pokevalue = 255 - elseif pokevalsel == 16 and wid == "1" then - pokevalue = 99 - elseif pokevalsel == 17 and wid == "1" then - pokevalue = 153 - elseif pokevalsel == 18 and wid == "1" then - pokevalue = 99 - elseif pokevalsel == 19 and wid == "1" then - pokevalue = 153 - elseif pokevalsel == 20 and wid == "1" then - pokevalue = 255 - elseif pokevalsel == 16 then - pokevalue = 999 - elseif pokevalsel == 17 then - pokevalue = 2457 - elseif pokevalsel == 18 then - pokevalue = 9999 - elseif pokevalsel == 19 then - pokevalue = 39321 - elseif pokevalsel == 20 then - pokevalue = 65535 - end - - local cheat = { desc = string.format(_("Test Cheat %08X:%02X"), match.addr, pokevalue), script = {} } - if wid == "2" then wid = "u16" form = "%08x %04x" @@ -959,15 +743,16 @@ function cheatfind.startplugin() widchar = "b" end + if getmetatable(dev.space).__name:match("device_t") then cheat.ram = { ram = dev.tag } - cheat.script.run = "ram:write(" .. match.addr .. "," .. pokevalue .. ")" + cheat.script.run = "ram:write(" .. match.addr .. "," .. match.newval .. ")" elseif getmetatable(dev.space).__name:match("memory_share") then cheat.share = { share = dev.tag } - cheat.script.run = "share:write_" .. wid .. "(" .. match.addr .. "," .. pokevalue .. ")" + cheat.script.run = "share:write_" .. wid .. "(" .. match.addr .. "," .. match.newval .. ")" else cheat.space = { cpu = { tag = dev.tag, type = dev.sname } } - cheat.script.run = "cpu:write_" .. wid .. "(" .. match.addr .. "," .. pokevalue .. ")" + cheat.script.run = "cpu:write_" .. wid .. "(" .. match.addr .. "," .. match.newval .. ")" end if match.mode == 1 then if not _G.ce then @@ -999,9 +784,8 @@ function cheatfind.startplugin() local json = require("json") cheat.desc = "%s" cheat_save.json = json.stringify({[1] = cheat}, {indent = true}) - cheat_save.xml = string.format("<mamecheat version=\"1\">\n <cheat desc=\"%%s\">\n <script state=\"run\">\n <action>%s.pp%s@%X=%X</action>\n </script>\n </cheat>\n</mamecheat>", dev.tag:sub(2), widchar, match.addr, match.newval) - cheat_save.simple = string.format("%s,%s,%X,%s,%X,%%s\n", setname, dev.tag, match.addr, widchar, pokevalue) - cheat_save.dat = string.format(":%s:40000000:%X:%08X:FFFFFFFF:%%s\n", setname, match.addr, pokevalue) + cheat_save.xml = string.format("<mamecheat version=\"1\">\n<cheat desc=\"%%s\">\n<script state=\"run\">\n<action>%s.pp%s@%X=%X</action>\n</script>\n</cheat>\n</mamecheat>", dev.tag:sub(2), widchar, match.addr, match.newval) + cheat_save.simple = string.format("%s,%s,%X,%s,%X,%%s\n", setname, dev.tag, match.addr, widchar, match.newval) manager:machine():popmessage(string.format(_("Default name is %s"), cheat_save.name)) return true else @@ -1045,7 +829,7 @@ function cheatfind.startplugin() local m = { _("Page"), matchpg, 0 } local max if matchsel == 0 then - max = math.ceil(matches[#matches].count / 100) - 1 + max = math.ceil(matches[#matches].count / 100) else max = #matches[#matches][matchsel] end @@ -1068,11 +852,6 @@ function cheatfind.startplugin() end local function menu_callback(index, event) - if event == "cancel" and pausesel == 1 then - emu.unpause() - menu_is_showing = false - return {0,0,0} - end return menu_func[index](event) end emu.register_menu(menu_callback, menu_populate, _("Cheat Finder")) @@ -1082,19 +861,7 @@ function cheatfind.startplugin() for num, watch in ipairs(watches) do screen:draw_text("left", num * height, string.format(watch.format, watch.addr, watch.func())) end - if tabbed_out and manager:ui():is_menu_active() then - emu.pause() - menu_is_showing = true - tabbed_out = false - end end) - emu.register_periodic(function () - if menu_is_showing and not manager:ui():is_menu_active() then - emu.unpause() - menu_is_showing = false - tabbed_out = true - end - end) end return exports diff --git a/plugins/console/init.lua b/plugins/console/init.lua index 52d54fdcc1a..3cb75f55528 100644 --- a/plugins/console/init.lua +++ b/plugins/console/init.lua @@ -18,16 +18,6 @@ function console.startplugin() local matches = {} local lastindex = 0 local consolebuf - _G.history = function (index) - local history = ln.historyget() - if index then - ln.preload(history[index]) - return - end - for num, line in ipairs(history) do - print(num, line) - end - end print(" _/ _/ _/_/ _/ _/ _/_/_/_/"); print(" _/_/ _/_/ _/ _/ _/_/ _/_/ _/ "); print(" _/ _/ _/ _/_/_/_/ _/ _/ _/ _/_/_/ "); @@ -38,7 +28,7 @@ function console.startplugin() -- linenoise isn't thread safe but that means history can handled here -- that also means that bad things will happen if anything outside lua tries to use it -- especially the completion callback - ln.historysetmaxlen(50) + ln.historysetmaxlen(10) local scr = [[ local ln = require('linenoise') ln.setcompletion(function(c, str, pos) diff --git a/plugins/hiscore/hiscore.dat b/plugins/hiscore/hiscore.dat index dcb14dcd893..a8480580d3e 100644 --- a/plugins/hiscore/hiscore.dat +++ b/plugins/hiscore/hiscore.dat @@ -99,43 +99,6 @@ undoukai: ;@s:8080bw.cpp -alieninvp2: -cosmicin: -galmonst: -invader4: -invaders: -invadersem: -invadrmr: -invasion: -invasiona: -invasiona2: -invasionb: -invasionrz: -invasionrza: -searthin: -searthina: -sicv: -sicv1: -sinvemag: -sinvzen: -sisv: -sisv1: -sisv2: -sisv3: -sitv: -sitv1: -spaceat2: -spaceatt: -spaceatt2k: -spaceattbp: -spacecom: -spacerng: -spceking: -superinv: -ultrainv: -@:maincpu,program,20f4,02,00,00 - - crashrd: @:maincpu,program,233f,03,01,00 @:maincpu,program,2244,0a,02,1b @@ -193,6 +156,42 @@ swipeout: @:maincpu,program,35be,1,41,41 +alieninvp2: +cosmicin: +galmonst: +invader4: +invaders: +invadersem: +invadrmr: +invasion: +invasiona: +invasionb: +invasionrz: +invasionrza: +searthin: +searthina: +sicv: +sicv1: +sinvemag: +sinvzen: +sisv: +sisv1: +sisv2: +sisv3: +sitv: +sitv1: +spaceat2: +spaceatt: +spaceatt2k: +spaceattbp: +spacecom: +spacerng: +spceking: +superinv: +ultrainv: +@:maincpu,program,20f4,02,00,00 + + ozmawarsmr: @:maincpu,program,2043,02,00,00 @:maincpu,program,2023,01,01,01 @@ -1041,7 +1040,7 @@ spacezap: ;gorf:* resetting screws up 2 scores and top score gorf: gorfpgm1: -@:maincpu,:protected_ram/share,0010,22,00,00 +@:maincpu,program,d010,22,00,00 robby: @@ -1150,7 +1149,6 @@ eto: earthjkr: earthjkrp: -earthjkra: @:maincpu,program,103204,2f,00,42 @@ -1438,7 +1436,6 @@ bionicc2: bioniccbl: bioniccbl2: topsecrt: -topsecrt2: @:maincpu,program,fff9e2,4f,00,4d @:maincpu,program,ffc57a,4,00,00 @:maincpu,program,fec0d9,1,20,20 @@ -2267,8 +2264,8 @@ cchasm1: ;@s:cclimber.cpp ;rpatrol:******River Patrol (Orca) -rpatrol: rpatroln: +rpatrol: @:maincpu,program,919b,4,18,0a @:maincpu,program,91ba,6,00,00 @:maincpu,program,921b,4,18,0a @@ -2421,7 +2418,6 @@ centiped: centiped2: centiped3: centipedj: -centipdb2: @:maincpu,program,000b,0f,10,01 @:maincpu,program,0023,0f,04,12 @@ -2600,8 +2596,7 @@ circusce: ;@s:cischeat.cpp f1gpstar: -f1gpstar2: -f1gpstar3: +f1gpstaro: @:cpu1,program,f2803,5e3,04,4d @@ -2860,12 +2855,6 @@ cosmica2: ;@s:cps1.cpp -sf2yyc: -@:maincpu,program,ffd276,28,02,20 -@:maincpu,program,ffd2c6,14,ff,96 -@:maincpu,program,ffd2ee,04,02,53 - - ;street fighter 2 (US 910318)(clone)(by tamphax) sf2: sf2b: @@ -2899,8 +2888,6 @@ sf2uf: sf2ug: sf2ui: sf2uk: -sf2ea: -sf2uh: @:maincpu,program,ffd28a,30,00,20 @:maincpu,program,ffd302,04,00,00 @@ -2947,6 +2934,7 @@ sf2mdtb: sf2rb: sf2rb2: sf2rb3: +sf2yyc: @:maincpu,program,ffd276,28,00,20 @:maincpu,program,ffd2c6,14,ff,96 @:maincpu,program,ffd2ee,04,00,00 @@ -3274,25 +3262,6 @@ lostwrldo: ;@s:cps2.cpp -;xmcotar1d:******X-Men: Children of the Atom (Euro 950105 Phoenix Edition) -xmcota: -xmcotaa: -xmcotaar1: -xmcotaar2: -xmcotab: -xmcotah: -xmcotahr1: -xmcotaj: -xmcotaj1: -xmcotaj2: -xmcotaj3: -xmcotajr: -xmcotar1: -xmcotar1d: -xmcotau: -@:maincpu,program,ffec8e,3c,00,01 - - ssf2: ssf2a: ssf2ar1: @@ -3312,6 +3281,24 @@ ssf2ud: @:maincpu,program,ffd61a,4,00,00 +;xmcotar1d:******X-Men: Children of the Atom (Euro 950105 Phoenix Edition) +xmcota: +xmcotaa: +xmcotaar1: +xmcotab: +xmcotah: +xmcotahr1: +xmcotaj: +xmcotaj1: +xmcotaj2: +xmcotaj3: +xmcotajr: +xmcotar1: +xmcotar1d: +xmcotau: +@:maincpu,program,ffec8e,3c,00,01 + + ;ddsomud:******Dungeons & Dragons: Shadow over Mystara (USA 960619 Phoenix Edition) (bootleg) ddsom: ddsoma: @@ -4952,7 +4939,6 @@ rolcrush: ;*******dragon master drgnmst: -drgnmst2: @:maincpu,program,ff84f0,4,00,00 @:maincpu,program,ff8450,6c,00,01 @@ -5443,7 +5429,6 @@ fantlanda: ;*******galaxy gunners galaxygn: -galaxygnh: @:maincpu,program,01e9c,190,50,00 @:maincpu,program,0202a,1,0a,0a @@ -5705,21 +5690,20 @@ funkybeeb: ;@s:funkyjet.cpp +;(sotsugyo shousho) (by GeoMan) +sotsugyo: +@:maincpu,program,14269c,10,00,32 +@:maincpu,program,1426ac,50,04,00 + + ;funkyjetj:******Funky Jet (Japan) funkyjet: funkyjeta: -funkyjetb: funkyjetj: @:maincpu,program,143a01,20,00,10 @:maincpu,program,143a21,140,12,00 -;(sotsugyo shousho) (by GeoMan) -sotsugyo: -@:maincpu,program,14269c,10,00,32 -@:maincpu,program,1426ac,50,04,00 - - ;@s:funybubl.cpp ;funybublc:******Funny Bubble (Comad version) @@ -5943,24 +5927,6 @@ galaxiac: ;@s:galaxian.cpp -;amidar:[Special thanks to Cananas for enhancing this entry] -amidar: -amidar1: -amidarb: -amidaro: -amidaru: -amigo: -amigo2: -scobra: -scobrab: -scobrag: -scobraggi: -scobras: -scobrase: -@:maincpu,program,8200,1e,00,01 -@:maincpu,program,80a8,03,00,01 - - ;(zero time) asideral: astrians: @@ -6029,6 +5995,23 @@ froggervd: @:maincpu,program,43ef,0d,63,05 +;amidar:[Special thanks to Cananas for enhancing this entry] +amidar: +amidar1: +amidarb: +amidaro: +amidaru: +amigo: +amigo2: +scobra: +scobrab: +scobrag: +scobras: +scobrase: +@:maincpu,program,8200,1e,00,01 +@:maincpu,program,80a8,03,00,01 + + mshuttlea: @:maincpu,program,808a,57,00,24 @@ -7039,11 +7022,12 @@ hvyunitu: ;@s:hyperspt.cpp +;roadf (& clones) fixed thanks to thomas busse roadf: roadf2: roadf3: @:maincpu,program,3bd0,b0,01,20 -@:maincpu,program,3066,3,01,00 +@:maincpu,program,3004,0,01,01 ;@s:hyprduel.cpp @@ -7203,13 +7187,6 @@ junofrstg: ;@s:kaneko16.cpp -;(Blaze On) (by tamphax) -blazeon: -blazeonj: -@:maincpu,program,304fb0,77,00,0d -@:maincpu,program,30020c,8,00,00 - - ;*******bakuretsu breaker ;******Explosive Breaker bakubrkr: @@ -7230,6 +7207,12 @@ wingforc: @:maincpu,program,30d7e7,13f,00,35 +;(Blaze On) (by tamphax) +blazeon: +@:maincpu,program,304fb0,77,00,0d +@:maincpu,program,30020c,8,00,00 + + berlwall: berlwallk: berlwallt: @@ -8033,7 +8016,6 @@ rtypejp: loht: lohtb2: lohtj: -lohtb3: @:maincpu,program,a3af4,32,36,20 @:maincpu,program,a3adc,02,36,11 @@ -8575,10 +8557,6 @@ genesis,tf3: ;@s:megadriv_acbl.cpp -barek3mb: -@:maincpu,program,e0ff31,99,01,04 - - ssf2mdb: @:maincpu,program,fffcb3,29,00,20 @@ -8930,7 +8908,6 @@ mhavoc: mikie: mikiehs: mikiej: -mikiek: @:maincpu,program,2a00,01,1d,1d @:maincpu,program,2a01,01,2c,2c @:maincpu,program,2a02,01,1f,1f @@ -9266,18 +9243,16 @@ mustachei: ;@s:mw8080bw.cpp -;** lagunar - wait until cars race in attract mode for hi-scores to appear *** -lagunar: -@:maincpu,program,2011,9,00,00 -@:maincpu,program,2005,3,00,00 -@:maincpu,program,2031,1,89,89 - - blueshrk: blueshrkmr: @:maincpu,program,200a,05,00,00 +lagunar: +@:maincpu,program,2011,9,00,00 +@:maincpu,program,2005,3,00,00 + + spcenctr: @:maincpu,program,26f0,2,0e,0e @:maincpu,program,202e,2,00,00 @@ -9637,17 +9612,16 @@ blazer: ;@s:namcos11.cpp -xevi3dg: -xevi3dga: -xevi3dgj: -@:maincpu,program,1512b8,3b,48,4b - - tekken: tekkenac: @:maincpu,program,1e0498,17f,04,4b +xevi3dg: +xevi3dgj: +@:maincpu,program,1512b8,3b,48,4b + + tekkenjb: @:maincpu,program,1e0148,17f,04,4e @@ -9990,11 +9964,6 @@ hcrashc: ;@s:neogeo.cpp -viewpoin: -@:100000:2:42:41 -@:1000c8:3d:00:00 - - ;******metal slug 2 turbo ;mslug2:******metal slug 2 mslug2: @@ -10190,15 +10159,6 @@ pclubysa: ;@s:nmk16.cpp -;(bubble 2000) (by GeoMan) -;hotbubl:******Hot Bubble -bubl2000: -bubl2000a: -hotbubl: -hotbubla: -@:maincpu,program,3c0600,50,00,20 - - raphero: @:maincpu,program,1fe601,5b,01,70 @@ -10224,7 +10184,6 @@ rapheroa: hachamfa: -hachamfp: @:maincpu,program,fc000,3df,01,4e @@ -10292,6 +10251,14 @@ mangchi: @:maincpu,program,1c1b02,4c,27,20 +;(bubble 2000) (by GeoMan) +;hotbubl:******Hot Bubble +bubl2000: +hotbubl: +hotbubla: +@:maincpu,program,3c0600,50,00,20 + + ;(many block) (by GeoMan) manybloc: @:maincpu,program,f0050,4,00,19 @@ -10561,13 +10528,6 @@ paclandm2: ;@s:pacman.cpp -;******Crush Roller (Kural TWT) -crush4: -crush5: -@:maincpu,program,4c80,3,00,00 -@:maincpu,program,4c83,1,04,04 - - ;*** puckman/pacman (and clones) for pacmame & regular mame builds ** ;abscam:******Abscam ;mspacmbe:******Ms. Pac-Man (bootleg, (encrypted)) @@ -10770,6 +10730,12 @@ maketrxb: @:maincpu,program,4e40,1e,4b,00 +;******Crush Roller (Kural TWT) +crush4: +@:maincpu,program,4c80,3,00,00 +@:maincpu,program,4c83,1,04,04 + + ;(dream shopper) dremshpr: @:maincpu,program,4c00,f0,00,01 @@ -11457,9 +11423,9 @@ s1945: s1945a: s1945bl: s1945j: +s1945jn: s1945k: s1945n: -s1945nj: @:maincpu,program,fe2af8,78,2d,f8 @@ -12135,7 +12101,6 @@ scotrsht: 800fath: 800fatha: bomber: -kamikazesp: knockout: knockoutb: knockoutc: @@ -12559,20 +12524,6 @@ outrundxj: ;@s:segas16a.cpp -;shinobls:******Shinobi (Star bootleg, System 16A) -shinobi: -shinobi1: -shinobi2: -shinobi3: -shinobi4: -shinobi5: -shinobi6: -shinobld: -shinobls: -@:maincpu,program,fffc00,142,00,54 -@:maincpu,program,fff010,4,00,00 - - fantzone1: fantzonep: fantzonepr: @@ -12629,6 +12580,19 @@ dumpmtmt: @:maincpu,program,fffcfa,1,03,03 +;shinobls:******Shinobi (Star bootleg, System 16A) +shinobi: +shinobi1: +shinobi2: +shinobi3: +shinobi4: +shinobi5: +shinobld: +shinobls: +@:maincpu,program,fffc00,142,00,54 +@:maincpu,program,fff010,4,00,00 + + ;(major league) (by GeoMan) mjleague: @:maincpu,program,ffe000,50,00,20 @@ -12636,13 +12600,6 @@ mjleague: ;@s:segas16b.cpp -fantzone: -fantzonee: -fantzoneta: -@:maincpu,program,fffc00,38,00,52 -@:maincpu,program,ffc22c,4,00,00 - - ;******action fighter (fd1089a 317-0018) afighter: afightera: @@ -12736,6 +12693,12 @@ mvpj: @:maincpu,program,ff3800,8b,01,01 +fantzone: +fantzoneta: +@:maincpu,program,fffc00,38,00,52 +@:maincpu,program,ffc22c,4,00,00 + + hwchamp: hwchampj: @:maincpu,program,fff400,318,10,00 @@ -13154,10 +13117,6 @@ starforce: ;@s:seta.cpp -msgundamb: -@:maincpu,program,20424f,63,01,10 - - simpsonjr: @:maincpu,program,20561e,4f,00,20 @@ -13336,12 +13295,6 @@ pairlove: ;@s:seta2.cpp -;*******guardians/denjin makai II(By Firebrand) -grdians: -grdiansa: -@:maincpu,program,201581,4b,00,01 - - ;*******(penguin brothers (japan)) ablast: penbros: @@ -13358,6 +13311,11 @@ gundamex: @:maincpu,program,2078a7,63,01,50 +;*******guardians/denjin makai II(By Firebrand) +grdians: +@:maincpu,program,201582,4a,c3,01 + + ;@s:sf.cpp sf: @@ -13654,12 +13612,6 @@ skydiver: ;@s:skyfox.cpp -skyfox: -@:maincpu,program,de00,a,00,00 -@:maincpu,program,df00,28,00,00 -@:maincpu,program,c01a,01,79,79 - - exerizer: exerizerb: @:maincpu,program,de00,a,00,00 @@ -13672,6 +13624,11 @@ exerizerb: @:maincpu,program,d36a,1,00,00 +skyfox: +@:maincpu,program,de00,a,00,00 +@:maincpu,program,df00,23,00,00 + + ;@s:skykid.cpp ;(dragon buster) @@ -14292,10 +14249,6 @@ sstrangr2: ;@s:ssv.cpp -pastelis: -@:maincpu,program,2461,34,a0,04 - - ;*******ultra x weapons / ultra keibitai ultrax: ultraxg: @@ -14337,7 +14290,6 @@ dynagear: ;eaglshot:******eagle shot golf eaglshot: -eaglshotj: @:maincpu,program,20,62,48,18 @@ -14583,6 +14535,7 @@ superchsu: ;@s:superqix.cpp +;** this only saves the hiscore table, the top score will stay at default ** sqix: sqixb1: sqixb2: @@ -14590,7 +14543,6 @@ sqixr0: sqixr1: sqixu: @:maincpu,program,f4c0,28,00,03 -@:maincpu,program,f8f1,4,75,00 ;********perestroika girls (japan) @@ -15949,16 +15901,6 @@ horekidb: ;@s:tetrisp2.cpp -;(tetris plus 2(JAPAN)) -tetrisp2: -tetrisp2a: -tetrisp2j: -tetrisp2ja: -@:maincpu,program,10dfb7,b3,01,00 -@:maincpu,program,10e065,1,01,01 -@:maincpu,program,10b0f2,460,03,09 - - ;rocknms:******Rock'n MegaSession (Japan, bootleg) rocknms: @:maincpu,program,1043bd,14d,3d,00 @@ -15983,6 +15925,15 @@ rockn3: @:maincpu,program,1043b1,13b,3d,06 +;(tetris plus 2(JAPAN)) +tetrisp2: +tetrisp2j: +tetrisp2ja: +@:maincpu,program,10dfb7,b3,01,00 +@:maincpu,program,10e065,1,01,01 +@:maincpu,program,10b0f2,460,03,09 + + ;rockn2:******Rock'n Tread 2 (Japan, bootleg) rockn2: @:maincpu,program,104383,13b,3d,06 @@ -16372,18 +16323,6 @@ insectxj: ;@s:toaplan1.cpp -;fireshrkd:******Fire Shark (Korea, set 1, easier) -;fireshrkdh:******Fire Shark (Korea, set 2, harder) -fireshrk: -fireshrka: -fireshrkd: -fireshrkdh: -samesamecn: -@:maincpu,program,c1ae8,194,00,01 -@:maincpu,program,c1c29,1,2d,2d -@:maincpu,program,c1dc5,1d,2d,00 - - samesame: samesamenh: @:maincpu,program,c1778,194,00,01 @@ -16480,13 +16419,18 @@ hellfire1a: @:maincpu,program,42357,21,2e,30 -;@s:toaplan2.cpp +;fireshrkd:******Fire Shark (Korea, set 1, easier) +;fireshrkdh:******Fire Shark (Korea, set 2, harder) +fireshrk: +fireshrka: +fireshrkd: +fireshrkdh: +@:maincpu,program,c1ae8,194,00,01 +@:maincpu,program,c1c29,1,2d,2d +@:maincpu,program,c1dc5,1d,2d,00 -snowbro2: -snowbro2b: -snowbro2b2: -@:maincpu,program,1000a0,28,00,45 +;@s:toaplan2.cpp ghoxjo: @:maincpu,program,805a4,64,00,8e @@ -16522,6 +16466,11 @@ grindstma: @:maincpu,program,100438,4,00,00 +snowbro2: +snowbro2b: +@:maincpu,program,1000a0,28,00,45 + + ;batsugun:[Special thanks to Cananas for making this entry work] batsugun: batsuguna: @@ -16818,10 +16767,6 @@ noahsark: ;@s:tumbleb.cpp -magipur: -@:maincpu,program,4eda,ac,00,20 - - ;******Super Trio Thanks to Mr Valtric for this addition ****** suprtrio: @:maincpu,program,f03308,5a,01,4e diff --git a/plugins/hiscore/init.lua b/plugins/hiscore/init.lua index ded3f0e44d2..a89acfb33e3 100644 --- a/plugins/hiscore/init.lua +++ b/plugins/hiscore/init.lua @@ -33,7 +33,6 @@ function hiscore.startplugin() local mem_check_passed = false; local found_hiscore_entry = false; local timed_save = true; - local delaytime = 0; local positions = {}; -- Configuration file will be searched in the first path defined @@ -60,34 +59,29 @@ function hiscore.startplugin() local function parse_table ( dsting ) local _table = {}; for line in string.gmatch(dsting, '([^\n]+)') do - local delay = line:match('^@delay=([.%d]*)') - if delay and #delay > 0 then - delaytime = emu.time() + tonumber(delay) + local cpu, mem; + local cputag, space, offs, len, chk_st, chk_ed, fill = string.match(line, '^@([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),?(%x?%x?)'); + cpu = manager:machine().devices[cputag]; + if not cpu then + error(cputag .. " device not found") + end + local rgnname, rgntype = space:match("([^/]*)/?([^/]*)") + if rgntype == "share" then + mem = manager:machine():memory().shares[rgnname] else - local cpu, mem; - local cputag, space, offs, len, chk_st, chk_ed, fill = string.match(line, '^@([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),?(%x?%x?)'); - cpu = manager:machine().devices[cputag]; - if not cpu then - error(cputag .. " device not found") - end - local rgnname, rgntype = space:match("([^/]*)/?([^/]*)") - if rgntype == "share" then - mem = manager:machine():memory().shares[rgnname] - else - mem = cpu.spaces[space] - end - if not mem then - error(space .. " space not found") - end - _table[ #_table + 1 ] = { - mem = mem, - addr = tonumber(offs, 16), - size = tonumber(len, 16), - c_start = tonumber(chk_st, 16), - c_end = tonumber(chk_ed, 16), - fill = tonumber(fill, 16) - }; + mem = cpu.spaces[space] + end + if not mem then + error(space .. " space not found") end + _table[ #_table + 1 ] = { + mem = mem, + addr = tonumber(offs, 16), + size = tonumber(len, 16), + c_start = tonumber(chk_st, 16), + c_end = tonumber(chk_ed, 16), + fill = tonumber(fill, 16) + }; end return _table; end @@ -217,7 +211,7 @@ function hiscore.startplugin() local function init () if not scores_have_been_read then - if (delaytime <= emu.time()) and check_mem( positions ) then + if check_mem( positions ) then default_checksum = check_scores( positions ); if read_scores( positions ) then emu.print_verbose( "hiscore: scores read OK" ); |