mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
hiscore: fix segaxbd games and improve error (nw)
This commit is contained in:
parent
6cfc1ac0fc
commit
b49334e70a
@ -82,8 +82,8 @@ berzerkf:
|
||||
gprider:
|
||||
gprideru:
|
||||
gpriderj:
|
||||
@:maincpu,program,280192,aa,34,30
|
||||
@:maincpu,program,9c708,8,01,20
|
||||
@:mainpcb:maincpu,program,280192,aa,34,30
|
||||
@:mainpcb:maincpu,program,9c708,8,01,20
|
||||
|
||||
spider:
|
||||
@:maincpu,program,6f6c,13,50,00
|
||||
@ -2188,8 +2188,8 @@ smgpu1:
|
||||
smgpu:
|
||||
smgp5:
|
||||
smgp6:
|
||||
@:maincpu,program,fff500,7e,21,02
|
||||
@:maincpu,program,fffe85,1,08,08
|
||||
@:mainpcb:maincpu,program,fff500,7e,21,02
|
||||
@:mainpcb:maincpu,program,fffe85,1,08,08
|
||||
|
||||
wrally: ;******world rally (set1)
|
||||
wrallya: ;******world rally (set 2)
|
||||
@ -3974,7 +3974,7 @@ kaitein: ;******kaitei takara sagashi
|
||||
loffire: ;******line of fire / bakudan yarou (world, fd1094 317-0136)
|
||||
loffireu: ;******Line of Fire / Bakudan Yarou (US, FD1094 317-0135)
|
||||
loffirej: ;******Line of Fire / Bakudan Yarou (japan, FD1094 317-0134)
|
||||
@:maincpu,program,a3800,18f,01,49
|
||||
@:mainpcb:maincpu,program,a3800,18f,01,49
|
||||
|
||||
;******lethal enforcers II,gun fighters (ver uaa)
|
||||
le2u:
|
||||
@ -4862,7 +4862,7 @@ riot:
|
||||
;******thunder blade (fd1094 317-0056)
|
||||
thndrbld:
|
||||
thndrbld1: ;******thunder blade (japan)
|
||||
@:maincpu,program,a3b00,64,01,01
|
||||
@:mainpcb:maincpu,program,a3b00,64,01,01
|
||||
|
||||
;********segac2.c (bloxeed (c system))
|
||||
bloxeedc:
|
||||
@ -4904,8 +4904,8 @@ dbrkr:
|
||||
|
||||
;******Racing Hero (FD1094 317-0144)
|
||||
rachero:
|
||||
@:maincpu,program,ff89be,51,10,01
|
||||
@:maincpu,program,ff89ae,4,10,00
|
||||
@:mainpcb:maincpu,program,ff89be,51,10,01
|
||||
@:mainpcb:maincpu,program,ff89ae,4,10,00
|
||||
|
||||
;********bloodbro.c
|
||||
bloodbro:
|
||||
@ -13219,13 +13219,13 @@ wbmlb:
|
||||
|
||||
;********system16.c
|
||||
aburner:
|
||||
@:maincpu,program,ff846e,117,00,00
|
||||
@:maincpu,program,ff857f,1,4f,4f
|
||||
@:mainpcb:maincpu,program,ff846e,117,00,00
|
||||
@:mainpcb:maincpu,program,ff857f,1,4f,4f
|
||||
|
||||
aburner2:
|
||||
aburner2g:
|
||||
@:maincpu,program,ff846e,117,00,00
|
||||
@:maincpu,program,ff846f,1,70,70
|
||||
@:mainpcb:maincpu,program,ff846e,117,00,00
|
||||
@:mainpcb:maincpu,program,ff846f,1,70,70
|
||||
|
||||
fantzone:
|
||||
fantzoneta:
|
||||
|
@ -41,10 +41,12 @@ function hiscore.startplugin()
|
||||
cputag, space, offs, len, chk_st, chk_ed = string.match(line, '^@([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+)');
|
||||
cpu = manager:machine().devices[cputag];
|
||||
if not cpu then
|
||||
return nil;
|
||||
emu.print_verbose("hiscore: " .. cputag .. " device not found")
|
||||
return nil
|
||||
end
|
||||
mem = cpu.spaces[space];
|
||||
if not mem then
|
||||
emu.print_verbose("hiscore: " .. space .. " space not found")
|
||||
return nil;
|
||||
end
|
||||
_table[ #_table + 1 ] = {
|
||||
@ -129,14 +131,14 @@ function hiscore.startplugin()
|
||||
|
||||
|
||||
local function write_scores ( posdata )
|
||||
emu.print_verbose("write_scores")
|
||||
emu.print_verbose("hiscore: write_scores")
|
||||
local output = io.open(get_file_name(), "wb");
|
||||
if not output then
|
||||
-- attempt to create the directory, and try again
|
||||
lfs.mkdir( hiscore_path );
|
||||
output = io.open(get_file_name(), "wb");
|
||||
end
|
||||
emu.print_verbose("write_scores output")
|
||||
emu.print_verbose("hiscore: write_scores output")
|
||||
if output then
|
||||
for ri,row in ipairs(posdata) do
|
||||
t = {};
|
||||
@ -147,7 +149,7 @@ function hiscore.startplugin()
|
||||
end
|
||||
output:close();
|
||||
end
|
||||
emu.print_verbose("write_scores end")
|
||||
emu.print_verbose("hiscore: write_scores end")
|
||||
end
|
||||
|
||||
|
||||
@ -184,10 +186,10 @@ function hiscore.startplugin()
|
||||
if check_mem( positions ) then
|
||||
default_checksum = check_scores( positions );
|
||||
if read_scores( positions ) then
|
||||
emu.print_verbose( "scores read", "OK" );
|
||||
emu.print_verbose( "hiscore: scores read", "OK" );
|
||||
else
|
||||
-- likely there simply isn't a .hi file around yet
|
||||
emu.print_verbose( "scores read", "FAIL" );
|
||||
emu.print_verbose( "hiscore: scores read", "FAIL" );
|
||||
end
|
||||
scores_have_been_read = true;
|
||||
current_checksum = check_scores( positions );
|
||||
@ -246,10 +248,10 @@ function hiscore.startplugin()
|
||||
emu.print_verbose("Starting " .. emu.gamename())
|
||||
local dat = read_hiscore_dat()
|
||||
if dat and dat ~= "" then
|
||||
emu.print_verbose( "found hiscore.dat entry for " .. emu.romname() );
|
||||
emu.print_verbose( "hiscore: found hiscore.dat entry for " .. emu.romname() );
|
||||
positions = parse_table( dat );
|
||||
if not positions then
|
||||
emu.print_error("hiscore.dat parse error");
|
||||
emu.print_error("hiscore: hiscore.dat parse error");
|
||||
return;
|
||||
end
|
||||
found_hiscore_entry = true
|
||||
|
Loading…
Reference in New Issue
Block a user