mirror of
https://github.com/holub/mame
synced 2025-06-06 12:53:46 +03:00
plugins/hiscore: fix cpu tags and print detailed errors (nw)
This commit is contained in:
parent
5fa87ba20e
commit
031c9ca8fb
@ -2596,7 +2596,7 @@ bigrun:
|
|||||||
|
|
||||||
;(scud hammer) (by GeoMan)
|
;(scud hammer) (by GeoMan)
|
||||||
scudhamm:
|
scudhamm:
|
||||||
@:cpu1,program,fd1ea,3c,00,01
|
@:maincpu,program,fd1ea,3c,00,01
|
||||||
|
|
||||||
|
|
||||||
;(cisco heat)
|
;(cisco heat)
|
||||||
@ -4606,7 +4606,7 @@ diverboy:
|
|||||||
djboy:
|
djboy:
|
||||||
djboya:
|
djboya:
|
||||||
djboyj:
|
djboyj:
|
||||||
@:maincpu,program,b16a,2d,01,12
|
@:mastercpu,program,b16a,2d,01,12
|
||||||
|
|
||||||
|
|
||||||
;@s:dkong.cpp
|
;@s:dkong.cpp
|
||||||
@ -5515,12 +5515,11 @@ mx5000:
|
|||||||
|
|
||||||
;@s:flower.cpp
|
;@s:flower.cpp
|
||||||
|
|
||||||
;*** flower / flower j not working - hiscore.dat parse error ??????? ***
|
|
||||||
flower:
|
flower:
|
||||||
flowerj:
|
flowerj:
|
||||||
@:maincpu,program,d060,37,00,20
|
@:mastercpu,program,d060,37,00,20
|
||||||
@:maincpu,program,c00f,3,00,00
|
@:mastercpu,program,c00f,3,00,00
|
||||||
@:maincpu,program,c010,1,30,30
|
@:mastercpu,program,c010,1,30,30
|
||||||
|
|
||||||
|
|
||||||
;@s:flstory.cpp
|
;@s:flstory.cpp
|
||||||
|
@ -63,8 +63,7 @@ function hiscore.startplugin()
|
|||||||
local cputag, space, offs, len, chk_st, chk_ed, fill = string.match(line, '^@([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),?(%x?%x?)');
|
local cputag, space, offs, len, chk_st, chk_ed, fill = string.match(line, '^@([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),?(%x?%x?)');
|
||||||
cpu = manager:machine().devices[cputag];
|
cpu = manager:machine().devices[cputag];
|
||||||
if not cpu then
|
if not cpu then
|
||||||
emu.print_verbose("hiscore: " .. cputag .. " device not found")
|
error(cputag .. " device not found")
|
||||||
return nil
|
|
||||||
end
|
end
|
||||||
local rgnname, rgntype = space:match("([^/]*)/?([^/]*)")
|
local rgnname, rgntype = space:match("([^/]*)/?([^/]*)")
|
||||||
if rgntype == "share" then
|
if rgntype == "share" then
|
||||||
@ -73,8 +72,7 @@ function hiscore.startplugin()
|
|||||||
mem = cpu.spaces[space]
|
mem = cpu.spaces[space]
|
||||||
end
|
end
|
||||||
if not mem then
|
if not mem then
|
||||||
emu.print_verbose("hiscore: " .. space .. " space not found")
|
error(space .. " space not found")
|
||||||
return nil;
|
|
||||||
end
|
end
|
||||||
_table[ #_table + 1 ] = {
|
_table[ #_table + 1 ] = {
|
||||||
mem = mem,
|
mem = mem,
|
||||||
@ -278,9 +276,9 @@ function hiscore.startplugin()
|
|||||||
local dat = read_hiscore_dat()
|
local dat = read_hiscore_dat()
|
||||||
if dat and dat ~= "" then
|
if dat and dat ~= "" then
|
||||||
emu.print_verbose( "hiscore: found hiscore.dat entry for " .. emu.romname() );
|
emu.print_verbose( "hiscore: found hiscore.dat entry for " .. emu.romname() );
|
||||||
positions = parse_table( dat );
|
res, positions = pcall(parse_table, dat);
|
||||||
if not positions then
|
if not res then
|
||||||
emu.print_error("hiscore: hiscore.dat parse error");
|
emu.print_error("hiscore: hiscore.dat parse error " .. positions);
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
for i, row in pairs(positions) do
|
for i, row in pairs(positions) do
|
||||||
|
Loading…
Reference in New Issue
Block a user