Preserving Arcade Core High Scores

metalfacemark
Posts: 179
Joined: Mon Jan 04, 2021 12:04 pm
Has thanked: 22 times
Been thanked: 15 times

Re: Preserving Arcade Core High Scores

Unread post by metalfacemark »

Do i need to do something to the config to enable the high score saving feature, i dont see it in the options for the games, my mister is all up to date.
alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Preserving Arcade Core High Scores

Unread post by alanswx »

Save settings saves the scores too
metalfacemark
Posts: 179
Joined: Mon Jan 04, 2021 12:04 pm
Has thanked: 22 times
Been thanked: 15 times

Re: Preserving Arcade Core High Scores

Unread post by metalfacemark »

hmm, saved on moon cresta and it didnt save.
User avatar
redsteakraw
Posts: 245
Joined: Sun May 24, 2020 11:19 pm
Has thanked: 1 time
Been thanked: 41 times

Re: Preserving Arcade Core High Scores

Unread post by redsteakraw »

A cool idea is since this is being saved, we can potentially upload the high scores with the core version and rom hash to a website and potentially have a global or regional highscores, that can be downloaded like the cheats.
Fear is the mind killer!
alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Preserving Arcade Core High Scores

Unread post by alanswx »

redsteakraw wrote: Fri Feb 12, 2021 2:23 pm A cool idea is since this is being saved, we can potentially upload the high scores with the core version and rom hash to a website and potentially have a global or regional highscores, that can be downloaded like the cheats.
Wark91 is working on porting hi2txt to python so we can run it on mister, generate json and/or xml and upload it to misterfpga.org - we need help either integrating it with phpbb or writing something from scratch. I haven't tried to launch a phpbb in a docker to play with it yet.

I was originally thinking we could download the scores back into the core, but the more I think about it.. I think we should use the ID and a has from misterfpga.org, and build an online leaderboard where we have game/username/score listed. A lot of the older games don't have that many high scores. So it would be very kludgy to try to convert a global leaderboard into something we could display in donkey kong, or pac man.
User avatar
Aspie
Posts: 188
Joined: Sat Sep 26, 2020 1:07 pm
Location: Manchester
Has thanked: 20 times
Been thanked: 47 times
Contact:

Re: Preserving Arcade Core High Scores

Unread post by Aspie »

What a brilliant idea alanswx. I'm really looking forward to this
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Preserving Arcade Core High Scores

Unread post by thorr »

I love it! This sounds like a wonderful addition and give us all more reasons to play our favorite games together and do as well as we can. I used to enjoy the high score challenges on atariage. I got my highest score ever in Keystone Kapers. https://atariage.com/forums/topic/23917 ... mer-quest/ Doing high score saves to leaderboards for consoles is probably way over the top at the moment but it will be great for arcade games!

One suggestion: It would make sense to also store the dip switch settings with the high score. I like to play Donkey Kong with the maximum number of lives.
zakk4223
Posts: 289
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 120 times

Re: Preserving Arcade Core High Scores

Unread post by zakk4223 »

It's not just dip switches: any game with nvram based settings has a potential of having different settings that make scores incomparable. Typically communities just come up with standard settings for these things, or split leaderboards based on particular settings. Unfortunately this is a deep deep drama filled rabbit hole depending on the game. It'll likely require moderation too :(


I'd like to repeat my request that the high score data be saved separately from "nvram". Especially with this new feature. For games that actually have nvram based settings it would be be best if those could be copied/removed/etc without bringing along high scores (also in the case of the CPS 1.5 core, they are purposefully in the same format as mame's nvram saves, which is nice)

I'm willing to do the Main Mister work if we can agree upon a sane scheme. Maybe just allow multiple nvram 'slots' and standardize high scores to index=99?
alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Preserving Arcade Core High Scores

Unread post by alanswx »

zakk4223 wrote: Fri Feb 12, 2021 10:00 pm It's not just dip switches: any game with nvram based settings has a potential of having different settings that make scores incomparable. Typically communities just come up with standard settings for these things, or split leaderboards based on particular settings. Unfortunately this is a deep deep drama filled rabbit hole depending on the game. It'll likely require moderation too :(


I'd like to repeat my request that the high score data be saved separately from "nvram". Especially with this new feature. For games that actually have nvram based settings it would be be best if those could be copied/removed/etc without bringing along high scores (also in the case of the CPS 1.5 core, they are purposefully in the same format as mame's nvram saves, which is nice)

I'm willing to do the Main Mister work if we can agree upon a sane scheme. Maybe just allow multiple nvram 'slots' and standardize high scores to index=99?
In the MRA we would just have two NVRAM entries, with different indices, and add a "filename" parameter. But Sorg said he didn't want us to patch it to do that. He said to concatenate the files. So we will do that for now. Most games right now have one or the other.
zakk4223
Posts: 289
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 120 times

Re: Preserving Arcade Core High Scores

Unread post by zakk4223 »

Well that's unfortunate; it'll make things more difficult for some upcoming cores. Oh well.


One UI thing that people should be currently aware of: in a lot of the cores if you use the 'core' reset menu entry it will wipe the HS table to default. You just have to be careful to not save settings until you've fully reloaded the core so your on-disk saved scores don't get overwritten.

It also just occurred to me on games that do have nvram based settings this is going to present a real problem. Many of them will re-initialize when exiting the test menu, which means they reset the HS table to default. So they'll be no way to make settings changes without nuking saved scores. I'm not sure what current 'official' cores this is relevant for. Cave is all I know of off the top of my head.
alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Preserving Arcade Core High Scores

Unread post by alanswx »

Jimmy has added some better reset logic. We need to think through this. Or we can backup the high scores to the server and restore them I guess.
zakk4223
Posts: 289
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 120 times

Re: Preserving Arcade Core High Scores

Unread post by zakk4223 »

Mame gets around this by reading the memory locations before initial restore and then refusing to save the score data if it is equal to that first read. Maybe that's feasible here too, although the concatenated nvram situation might complicate things later. Probably the best way to ensure you never save or restore a default score table (it also means you don't have a bunch of garbage uploads to the server that are just saved default score tables)
User avatar
jimmystones
Core Developer
Posts: 218
Joined: Sun Nov 22, 2020 1:26 pm
Location: Reading, UK
Has thanked: 32 times
Been thanked: 251 times
Contact:

Re: Preserving Arcade Core High Scores

Unread post by jimmystones »

@zakk4223 I've added some extra logic to Zaxxon (just until it is tested and working, then I'll roll it back to other cores) which should handle the in-core reset situation. Appreciate any testing you can give it as I'm getting paranoid about it occasionally not loading scores, but then whenever I check again it does :shock:
zakk4223
Posts: 289
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 120 times

Re: Preserving Arcade Core High Scores

Unread post by zakk4223 »

Unfortunately I'm very bad at Zaxxon so I'm not sure how much testing I can actually do!

I did have an incident earlier where Scramble restored all zeros, but I need to do more testing there because it's possible my modified Main_Mister could have caused it. I'll file a proper bug if I can reliably reproduce it on vanilla mister code
User avatar
jimmystones
Core Developer
Posts: 218
Joined: Sun Nov 22, 2020 1:26 pm
Location: Reading, UK
Has thanked: 32 times
Been thanked: 251 times
Contact:

Re: Preserving Arcade Core High Scores

Unread post by jimmystones »

Hah, I know the feeling (and I know alanswx does too!), getting a high score on every game to test it is half the challenge :)

Any help testing is always appreciated, I'd rather make sure the module is solid before we put it into too many more cores.
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Preserving Arcade Core High Scores

Unread post by LamerDeluxe »

Maybe an infinite lives cheat rom patch for development would be an idea.
alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Preserving Arcade Core High Scores

Unread post by alanswx »

We can edit the high scores file in a hex editor. That is what I did with centipede when I originally wrote the high score save code. Everything about this has become long and monotonous!
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Preserving Arcade Core High Scores

Unread post by LamerDeluxe »

alanswx wrote: Sat Feb 13, 2021 1:35 pm We can edit the high scores file in a hex editor. That is what I did with centipede when I originally wrote the high score save code. Everything about this has become long and monotonous!
But very much appreciated. It makes the arcade games much more authentic and it adds a sense of progress when playing them.
User avatar
jimmystones
Core Developer
Posts: 218
Joined: Sun Nov 22, 2020 1:26 pm
Location: Reading, UK
Has thanked: 32 times
Been thanked: 251 times
Contact:

Re: Preserving Arcade Core High Scores

Unread post by jimmystones »

Bomb Jack now has high score support and I added a pause button as well (needed to support pause for the upcoming Sega System 1 high score support so I thought I might as well add it on my travels through the cores where it doesn't cause issues).
User avatar
Alkadian
Top Contributor
Posts: 728
Joined: Thu May 28, 2020 9:55 am
Has thanked: 294 times
Been thanked: 119 times

Re: Preserving Arcade Core High Scores

Unread post by Alkadian »

alanswx wrote: Fri Feb 12, 2021 1:54 am I added it to irem 62. Can someone test it? I can’t get a high score.
Thanks a lot for this fantastic implementation!

I have tested joujyudn, where I am relatively good at..lol..but my score wasn't saved. I made sure that the High Score Save was set to manual.

Thanks!
alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Preserving Arcade Core High Scores

Unread post by alanswx »

Alkadian wrote: Tue Feb 16, 2021 5:10 pm
alanswx wrote: Fri Feb 12, 2021 1:54 am I added it to irem 62. Can someone test it? I can’t get a high score.
Thanks a lot for this fantastic implementation!

I have tested joujyudn, where I am relatively good at..lol..but my score wasn't saved. I made sure that the High Score Save was set to manual.

Thanks!
Did you do save settings after you got the high score? it doesn't auto-save. It is possible it doesn't work.
User avatar
Alkadian
Top Contributor
Posts: 728
Joined: Thu May 28, 2020 9:55 am
Has thanked: 294 times
Been thanked: 119 times

Re: Preserving Arcade Core High Scores

Unread post by Alkadian »

alanswx wrote: Tue Feb 16, 2021 11:29 pm
Alkadian wrote: Tue Feb 16, 2021 5:10 pm
alanswx wrote: Fri Feb 12, 2021 1:54 am I added it to irem 62. Can someone test it? I can’t get a high score.
Thanks a lot for this fantastic implementation!

I have tested joujyudn, where I am relatively good at..lol..but my score wasn't saved. I made sure that the High Score Save was set to manual.

Thanks!
Did you do save settings after you got the high score? it doesn't auto-save. It is possible it doesn't work.
Yes, I did save the settings. I have tried several times.
Thanks.
User avatar
Alkadian
Top Contributor
Posts: 728
Joined: Thu May 28, 2020 9:55 am
Has thanked: 294 times
Been thanked: 119 times

Re: Preserving Arcade Core High Scores

Unread post by Alkadian »

I have now tested UniWar S and my high score has been saved!

Moon Patrol, as reported by another member, doesn't seem to save either. I am not very good at Lode Runner but I will try to improve my skills and try to beat at least the lowest score and report back :D
catenaccio
Posts: 55
Joined: Tue Aug 18, 2020 9:27 pm
Has thanked: 24 times
Been thanked: 9 times

Re: Preserving Arcade Core High Scores

Unread post by catenaccio »

Kung fu Master high score saving didn´t work for me. I made sure that the High Score Save was set to manual, and then save settings after set the high score
User avatar
jimmystones
Core Developer
Posts: 218
Joined: Sun Nov 22, 2020 1:26 pm
Location: Reading, UK
Has thanked: 32 times
Been thanked: 251 times
Contact:

Re: Preserving Arcade Core High Scores

Unread post by jimmystones »

Evening,

Sega System 1 caused me some headaches, but it's finally done!

That gives you high score save/load and pause for:
- 4-D Warriors
- Block Gal
- Bullfight
- Flicky
- I'm Sorry
- Mister Viking
- My Hero
- Pitfall II
- Rafflesia
- Regulus
- Sega Ninja
- Spatter
- Star Jacker
- Swat
- TeddyBoy Blues
- Up'n Down

Enjoy :)
retrodroid
Posts: 138
Joined: Tue Feb 02, 2021 5:55 pm
Has thanked: 96 times
Been thanked: 19 times

Re: Preserving Arcade Core High Scores

Unread post by retrodroid »

jimmystones wrote: Thu Feb 18, 2021 8:34 pm Evening,

Sega System 1 caused me some headaches, but it's finally done!

That gives you high score save/load and pause for:
- 4-D Warriors
- Block Gal
- Bullfight
- Flicky
- I'm Sorry
- Mister Viking
- My Hero
- Pitfall II
- Rafflesia
- Regulus
- Sega Ninja
- Spatter
- Star Jacker
- Swat
- TeddyBoy Blues
- Up'n Down

Enjoy :)
Cool! How does the Pause feature work?
User avatar
jimmystones
Core Developer
Posts: 218
Joined: Sun Nov 22, 2020 1:26 pm
Location: Reading, UK
Has thanked: 32 times
Been thanked: 251 times
Contact:

Re: Preserving Arcade Core High Scores

Unread post by jimmystones »

If you mean how do you use it, it's on a mappable button like any other control - it should show up on the OSD popup with the other controls

If you mean how does it work, I'm just putting the main Z80 into a wait state, and luckily it works :) An interesting bonus of the system 1 using a separate Z80 for sound is that the music will usually keep playing while it is paused.
retrodroid
Posts: 138
Joined: Tue Feb 02, 2021 5:55 pm
Has thanked: 96 times
Been thanked: 19 times

Re: Preserving Arcade Core High Scores

Unread post by retrodroid »

Okay, had a chance to try out "pause" - fantastic!

Would be nice if the screen could be dimmed as well while paused, I guess that would require some kind of MiSTer system-level function to pull off?
User avatar
jimmystones
Core Developer
Posts: 218
Joined: Sun Nov 22, 2020 1:26 pm
Location: Reading, UK
Has thanked: 32 times
Been thanked: 251 times
Contact:

Re: Preserving Arcade Core High Scores

Unread post by jimmystones »

I know what you mean, it would be nice to have a visual indication that it is paused - although that would mess around with the ability to take screenshots and things of that nature.

I haven't really looked at how the OSD works but it might be possible to do something similar to show a pause symbol in a corner, or something like that. Any other ideas welcome!
retrodroid
Posts: 138
Joined: Tue Feb 02, 2021 5:55 pm
Has thanked: 96 times
Been thanked: 19 times

Re: Preserving Arcade Core High Scores

Unread post by retrodroid »

Well my concern was I run on either an arcade CRT monitor or a plasma HD TV, and either will have burn-in concerns if you leave it up for too long. So ideally some option to dim the screen significantly while paused would be a nice-to-have.

I can see your point about screen-shots though. In any case, having the ability to pause at all is huge step forward in my book. :)
Post Reply