summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2018-04-20 16:37:06 -0500
committer cracyc <cracyc@users.noreply.github.com>2018-04-20 16:39:20 -0500
commit031c9ca8fb846c2da292ee48614d1e1e075ba205 (patch)
tree0ed85ed5b2b465e7fc063dffe324632b09c95283
parent5fa87ba20e70b7420fee748b5f313a5f1570c421 (diff)
plugins/hiscore: fix cpu tags and print detailed errors (nw)
-rw-r--r--plugins/hiscore/hiscore.dat11
-rw-r--r--plugins/hiscore/init.lua12
2 files changed, 10 insertions, 13 deletions
diff --git a/plugins/hiscore/hiscore.dat b/plugins/hiscore/hiscore.dat
index 7ec855be09d..04c9105d2cc 100644
--- a/plugins/hiscore/hiscore.dat
+++ b/plugins/hiscore/hiscore.dat
@@ -2596,7 +2596,7 @@ bigrun:
;(scud hammer) (by GeoMan)
scudhamm:
-@:cpu1,program,fd1ea,3c,00,01
+@:maincpu,program,fd1ea,3c,00,01
;(cisco heat)
@@ -4606,7 +4606,7 @@ diverboy:
djboy:
djboya:
djboyj:
-@:maincpu,program,b16a,2d,01,12
+@:mastercpu,program,b16a,2d,01,12
;@s:dkong.cpp
@@ -5515,12 +5515,11 @@ mx5000:
;@s:flower.cpp
-;*** flower / flower j not working - hiscore.dat parse error ??????? ***
flower:
flowerj:
-@:maincpu,program,d060,37,00,20
-@:maincpu,program,c00f,3,00,00
-@:maincpu,program,c010,1,30,30
+@:mastercpu,program,d060,37,00,20
+@:mastercpu,program,c00f,3,00,00
+@:mastercpu,program,c010,1,30,30
;@s:flstory.cpp
diff --git a/plugins/hiscore/init.lua b/plugins/hiscore/init.lua
index a01bdfff280..cf1b3edc430 100644
--- a/plugins/hiscore/init.lua
+++ b/plugins/hiscore/init.lua
@@ -63,8 +63,7 @@ function hiscore.startplugin()
local cputag, space, offs, len, chk_st, chk_ed, fill = string.match(line, '^@([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),?(%x?%x?)');
cpu = manager:machine().devices[cputag];
if not cpu then
- emu.print_verbose("hiscore: " .. cputag .. " device not found")
- return nil
+ error(cputag .. " device not found")
end
local rgnname, rgntype = space:match("([^/]*)/?([^/]*)")
if rgntype == "share" then
@@ -73,8 +72,7 @@ function hiscore.startplugin()
mem = cpu.spaces[space]
end
if not mem then
- emu.print_verbose("hiscore: " .. space .. " space not found")
- return nil;
+ error(space .. " space not found")
end
_table[ #_table + 1 ] = {
mem = mem,
@@ -278,9 +276,9 @@ function hiscore.startplugin()
local dat = read_hiscore_dat()
if dat and dat ~= "" then
emu.print_verbose( "hiscore: found hiscore.dat entry for " .. emu.romname() );
- positions = parse_table( dat );
- if not positions then
- emu.print_error("hiscore: hiscore.dat parse error");
+ res, positions = pcall(parse_table, dat);
+ if not res then
+ emu.print_error("hiscore: hiscore.dat parse error " .. positions);
return;
end
for i, row in pairs(positions) do