Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invaders + galaxian high scores get saved but not read back in (v0.158) . Other roms do work #452

Open
beemandev opened this issue Sep 19, 2023 · 7 comments

Comments

@beemandev
Copy link

beemandev commented Sep 19, 2023

UPDATE:
Having done further testing with other roms (apart from invaders) I discovered that puckman, 1941, ckong DO work with high scores in Retroarch mame (latest) core whereas both invaders and galaxian high scores get saved but are not read back in when games are re-run (bad luck I started testing solely with invaders!)

Note, all roms, high scores work correctly using standalone Mame 0.158 + 0.158 merged rom set.

I deduced you also need as a minimum in plugins folder the json folder( along with hiscore folder + boot.lua)

--original post
I've spent about 12+ hours trying to track down why high scores don't get reloaded via mame core, when they do work fine in standalone mame (tested using game=invaders.zip)

I've devoured endless guides, posts, links and experimented with so many settings to no avail. So can only conclude that it's broken. I know I could workaround using save states via autosave option but for now I'll revert to using fbneo, but would much prefer to use Mame.

@sonninnos
Copy link
Collaborator

I've had zero issues using the hiscore plugin..

@beemandev
Copy link
Author

beemandev commented Sep 19, 2023

Can you confirm that both invaders.zip and galaxian.zip high scores work properly on your system?

I updated op with new info

@beemandev beemandev changed the title High Scores get saved but not read back in when re-running game on latest libretto mame core (0.158) High Scores get saved but not read back in for invaders + galaxian on libretro MAME (latest) core (0.158) - Others work Sep 19, 2023
@beemandev beemandev changed the title High Scores get saved but not read back in for invaders + galaxian on libretro MAME (latest) core (0.158) - Others work invaders + galaxian high scores get saved but not read back in (0.158) , other roms work Sep 19, 2023
@beemandev beemandev changed the title invaders + galaxian high scores get saved but not read back in (0.158) , other roms work invaders + galaxian high scores get saved but not read back in (v0.158) . Other roms do work Sep 19, 2023
@sonninnos
Copy link
Collaborator

sonninnos commented Sep 20, 2023

Indeed, those games always show 0 even though something is saved. Pretty weird if they would work with the standalone, since this core does nothing different with plugins. The version is 0.258 though.

@beemandev
Copy link
Author

beemandev commented Sep 20, 2023

Yes, it is weird, but definitely happens. I can rename/revert C:\Emu\Mame\hiscore\invaders.hi and see the high scores go and return with MAME standalone.

re 0.258, yes I did all testing with standalone MAME v0.258 + RetroArch (both stable and nightly) + MAME (latest) core using MAME 0.258 merged roms from archive.org.

I tried other early games, asteroids high scores work fine, but headon doesn't save in RetroArch (Mame latest) or RetroArch (FBNeo) Or Standalone Mame. For that I'd have to turn autosave states on for just that rom I guess.

@grant2258
Copy link

grant2258 commented Sep 21, 2023

Done a little digging and found the frame notify is not getting triggered for lua. It could possibly be something missing in the runloop. It doesnt run regardless of the high scores working or not.

uncomment this https://github.com/libretro/mame/blob/3d612fb19eb95c0ae322c3cab343857b14a65a9c/plugins/hiscore/init.lua#L313C4-L313C4 (it shows up as not working better if you add a print comment as the top for the case of debugging)

Games will fail to initialize at all if the memory test doesn't pass at the start as the recursive call isint working for lua.

https://github.com/libretro/mame/blob/3d612fb19eb95c0ae322c3cab343857b14a65a9c/plugins/hiscore/init.lua#L358C1-L361C6

@beemandev some hi scores only save the tables so if you save a high score and check the tables, it might be the case that only the tables are saved for that game(headon).

edit confirmed its disabled

mame/src/emu/video.cpp

Lines 260 to 263 in 3d612fb

#if !defined(__LIBRETRO__)
// perform tasks for this frame
machine().call_notifiers(MACHINE_NOTIFY_FRAME);
#endif

@sonninnos
Copy link
Collaborator

sonninnos commented Sep 29, 2023

That MACHINE_NOTIFY_FRAME is in running_machine::retro_loop() in src/emu/machine.cpp though. Found a few more where the scores aren't read back, or the save data is garbage since the file size is similarily small, such as "warpwarp" and "geebee".

The script indeed seems a bit weird, since a lot of stuff isn't even run (based on adding some verbose logging) when the hiscores are working properly..

So is the filesize the same with standalone, and does the same saved file work with standalone?

@grant2258
Copy link

grant2258 commented Oct 1, 2023

The libretro core makes a pig ear of the galaxian hi sore that was saved on standalone, if thats what your asking. I haven't really looked into issue at all apart from the initial debugging the notify events arent happening.

edit:
I would probably need to check more into how the output module connects up and if its related to that. Im Pretty sure the standard one should work fine though. Ill try enable it and test when I have the time to compile mame again.

https://github.com/libretro/mame/blob/master/src/osd/modules/output/console.cpp

This is just pure guess work without tracing things properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants