Jump to content
LaunchBox Community Forums
Jason Carr

Troubleshooting MAME High Scores

Recommended Posts

On 4/16/2020 at 5:33 PM, Jason Carr said:

Hi Claudio, this puzzles me. Have you confirmed that you're actually able to upload high scores that way? Because looking at the code, I'm not sure how that could ever work.

if so, it would be better to fix it because with retroarch you can use cheats

Share this post


Link to post
Share on other sites
Posted (edited)

Hello guys :)

Centiped hiscores files analysis:

centiped shows 8 top scores.

mame is storing natively a nvram file (named earom) containing only the 3 top scores.

embedded hiscore.dat file into mame hiscore lua plugin is describing how to store the 5 remaining scores.

depending on what you do (by removing file, making a high score in the first 3, or one in the 5 last, or no hiscore at all), we can have any of the following results:

  • 1 nvram file + 1 .hi file
  • 1 nvram file only
  • 1 .hi file only

With 2 files, hi2txt will extract 8 scores:

RANK|SCORE|NAME
1|25569|ABC
2|24610|ABS
3|23385|ABT
4|22158|ABU
5|21821|ABV
6|20272|ABW
7|19476|ABX
8|18864|ABY

With nvram only:

RANK|SCORE|NAME
1|25569|ABC
2|24610|ABS
3|23385|ABT

With .hi file only:

RANK|SCORE|NAME
1||
2||
3||
4|22158|ABU
5|21821|ABV
6|20272|ABW
7|19476|ABX
8|18864|ABY

In this case, it is recommended that a front-end calls hi2txt without checking .hi file or nvram file existence, as hi2txt is able to find them if called with "-r <mame_install_folder>\hi\<game>".

A front-end must also be able to deal with the 3 possible outputs (all 8 scores, 3 top scores only, 5 lower scores only).

If it can help, I can improve the "5 lower scores only" output like this:

RANK|SCORE|NAME
4|22158|ABU
5|21821|ABV
6|20272|ABW
7|19476|ABX
8|18864|ABY

Another possibility is to not take into account the .hi file (whatever will be written or not inside) when decoding centiped hiscores by hi2txt, and extract only the 3 top scores from the nvram, if this file content is more stable. Anyway, if the .hi score stays "frozen", it is perhaps not a big deal as you still have the possibility to make a hiscore in the first 3 :)

Currently, all my tests is showing an updated .hi file (as any new hiscores changes the lower 5 scores), so I am not yet able to reproduce the issue. Still trying...

I am also not able to "freeze" the nvram file, and the 3 top scores are always saved if I make a new one.

If you have any "procedure" explaining how to reproduce it each time, it will help a lot.

Regards.

 

Edited by GreatStone
  • Like 2

Share this post


Link to post
Share on other sites

[FIXED] pspikes: very interesting game, for which the letter entered by the player is encoded differently than the one set by default.

An improved xml file is ready, attached here, and will be part of the next hi2txt release.

Please, test it to see if your name is now correctly displayed with this new xml file (hi2txt.zip file embedded into LaunchBox to be updated with this file inside).

pspikes.xml

  • Like 2

Share this post


Link to post
Share on other sites

gorf: hi2txt is merging the 2 decoded hiscores tables ("3 ships" game, "6 ships" game, depending on the credits you enter).

RANK|SCORE|SCORE 6C
1|1550|5660
2|1200|0
3|1100|0
4|0|0
5|0|0

Is LaunchBox able to decode such txt output?

One possibility can be to change the way hi2txt is displaying the scores by separating the 2 tables:

# 3 SHIPS
RANK|SCORE
1|1550
2|1200
3|1100
4|0
5|0

# 6 SHIPS
RANK|SCORE
1|5660
2|0
3|0
4|0
5|0

There is also a note inside hiscore.dat file with a warning: ";gorf:* resetting screws up 2 scores and top score"

So, resetting game in mame is not recommended at all :)

Note that I am not able to reproduce a "frozen" .hi file: it is updated correctly each time I relaunch mame to play.

If you have any "procedure" explaining how to reproduce it each time, it will help a lot.

Regards.

  • Like 1

Share this post


Link to post
Share on other sites
57 minutes ago, GreatStone said:

[FIXED] pspikes: very interesting game, for which the letter entered by the player is encoded differently than the one set by default.

An improved xml file is ready, attached here, and will be part of the next hi2txt release.

Please, test it to see if your name is now correctly displayed with this new xml file (hi2txt.zip file embedded into LaunchBox to be updated with this file inside).

pspikes.xml 4.97 kB · 1 download

Fixed! Thanks m8

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, GreatStone said:

If you have any "procedure" explaining how to reproduce it each time, it will help a lot.

I am not sure I followed all of the logic you listed above, but the way I can recreate the issue is to play the game a bunch of times within the same MAME session before exiting and then LaunchBox/BigBox no longer sees any scores.  If I delete the .hi file and play through once or twice, it sees the scores.  If I play a bunch of times and fill all (or some) of the hi-scores show in Centipede, when I exit, LaunchBox/BigBox sees nothing when it attempts to process the file.

Share this post


Link to post
Share on other sites
On 4/14/2020 at 5:21 PM, iSelfishGene said:

Hi Jason, Thanks for coming back. I have resolved the issue after downloading hiscore.dat file for mame220. For people who might be running mameui64, here it goes: There should be a folder named "hi" in the main installation directory, for example in my case H:\Games\Arcade Games\MAMEUI64\hi . You need to download the hiscore.dat file from https://highscore.mameworld.info/. You need to place your hiscore.dat in "hi" folder. Next step is to open mame.ini file and enable plugins, for example 

#
# CORE SEARCH PATH OPTIONS
#

pluginspath               plugins
 

Then you need to put this config below in the same mame.ini

#
# CORE MISC OPTIONS

plugins                   1
plugin                    hiscore
 

I hope it will resolve the issue for anyone having trouble uploading the high scores to launchbox database. Now I need to go and enjoy myself.

going step through step i overlooked this because... I saw the lines were already in another section. adding them to this section though (in addition to maybe doing a second thing mentioned along the way in this thread) managed to fix it and my scores are posting now. Thank  You! It is cool to have this in addtion to retroachievements

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, GreatStone said:

gorf: hi2txt is merging the 2 decoded hiscores tables ("3 ships" game, "6 ships" game, depending on the credits you enter).


RANK|SCORE|SCORE 6C
1|1550|5660
2|1200|0
3|1100|0
4|0|0
5|0|0

Is LaunchBox able to decode such txt output?

One possibility can be to change the way hi2txt is displaying the scores by separating the 2 tables:


# 3 SHIPS
RANK|SCORE
1|1550
2|1200
3|1100
4|0
5|0

# 6 SHIPS
RANK|SCORE
1|5660
2|0
3|0
4|0
5|0

There is also a note inside hiscore.dat file with a warning: ";gorf:* resetting screws up 2 scores and top score"

So, resetting game in mame is not recommended at all :)

Note that I am not able to reproduce a "frozen" .hi file: it is updated correctly each time I relaunch mame to play.

If you have any "procedure" explaining how to reproduce it each time, it will help a lot.

Regards.

Yes, the .hi file is getting updated correctly, it's just not uploading it to launchbox high scores. (no new scores to upload). Thanks for looking at it.

Share this post


Link to post
Share on other sites

Im seeing this on a couple of games:

ERROR: unable to find a structure from the xml definition that matches size and hiscore.dat definition' for game 'ccastles'

(Obviously they dont all say ccastles :) )

I've looked at several versions of the hiscore.dat and the values for ccastles doesnt look to have changed (im using mame 220). 

Is there a way I can suss out whats amiss ? (There are some scores showing for ccastles so its clearly working for some folks).

 

On a related note there seems to be something amiss with Asteroids deluxe. Top score is showing as 151,515,151,515 - pretty sure you cant get a score that high in asteroids :)

 

 

Share this post


Link to post
Share on other sites

@HomerRamone I will need the exact mame version, if you use the embedded hiscore.dat, and the list of the games rom name (like 'ccastles').

hi2txt is checking that the hiscore decoding algorithm is based on a hiscore file it knows, by checking if the .hi file or nvram file have the expected size, AND if the hiscore.dat used describe the memory location has expected.

In other words, if hiscores file size doesn't match the size recorded into hi2txt.zip:<game>.xml, AND/OR if game:<memory location> inside hiscore.dat doesn't match the one recorded also into hi2txt.zip:<game>.xml, hi2txt will complain that it cannot process the file.

Very often, if either mame that have changed the way it is dumping nvram, or hiscore.dat the way it is dumping the .hi file, or a previous .hi corrupted file.

Activating debug mode of hi2txt is giving some clue about what is going wrong (call "hi2txt.exe -rd ..." instead of "hi2txt.exe -r ...", but I do not know how/if LaunchBox allows to customize this call). Give me more details, and I will investigate for all these games.

Regards.

Share this post


Link to post
Share on other sites

Thought id share as my scores were not uploading using retro arch, libretro, i downloaded mame 64 and pointed the roms there, the ones that ran uploaded the scores straight away.... seems retro arch isnt suported, now i have the task of findings all the chds etc to get the games that wont run to run again, its a shame as had my set up perfect but want the scores so ill have to get all the arcade roms configured to run directly through mame, is a bit odd as always folowed launch boxs advice of using retro arch its weird how its not supported for this, maybe its easier to cheat using it i dont know.

 

Share this post


Link to post
Share on other sites
6 minutes ago, darren180913 said:

Thought id share as my scores were not uploading using retro arch, libretro, i downloaded mame 64 and pointed the roms there, the ones that ran uploaded the scores straight away.... seems retro arch isnt suported, now i have the task of findings all the chds etc to get the games that wont run to run again, its a shame as had my set up perfect but want the scores so ill have to get all the arcade roms configured to run directly through mame, is a bit odd as always folowed launch boxs advice of using retro arch its weird how its not supported for this, maybe its easier to cheat using it i dont know.

 

Its been stated many times that this is for MAME only and wont work with retroarch. Also if you ask most people around these parts if you should use MAME or Retroarch for Arcade most would tell you MAME. If all your games were already working in Retroarch you dont need any additional files, the same files will work in MAME, as thats actually what they are made to be used with.

And yes its not supported as we cant check for cheaters like we can in actual MAME.

Share this post


Link to post
Share on other sites

i didn't realise it had been stated many times, I thought it was a new update, but thanks for clarifying it dosent work with retro arch. im assuming all future tutorials regarding mame wont be incorparating retro arch if its no longer supported by launch box.

Thanks.

Share this post


Link to post
Share on other sites
2 hours ago, neil9000 said:

Its been stated many times that this is for MAME only and wont work with retroarch. Also if you ask most people around these parts if you should use MAME or Retroarch for Arcade most would tell you MAME. If all your games were already working in Retroarch you dont need any additional files, the same files will work in MAME, as thats actually what they are made to be used with.

And yes its not supported as we cant check for cheaters like we can in actual MAME.

What about this post? Are you investigating?

https://forums.launchbox-app.com/topic/54483-troubleshooting-mame-high-scores/?do=findComment&comment=346345

Share this post


Link to post
Share on other sites

Thanks all. There are two known issues that I am aware of from the LaunchBox side of things regarding the high scores, that are affecting a handful of games:

  • Games where negative scores are actually "higher" scores (golf for instance) are not tracked properly, because the system currently always identifies higher scores as higher scores
  • Games that use multiple high scores tables are problematic, because we currently only have one high scores leaderboard per game. Gorf is an example of this.

I'll be looking into both of these issues to try and get them resolved here soon. The multiple tables thing is a doozy though because it has the potential to over-complicate everything. Going to try and come up with a solution though.

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, HomerRamone said:

 

On a related note there seems to be something amiss with Asteroids deluxe. Top score is showing as 151,515,151,515 - pretty sure you cant get a score that high in asteroids :)

 

Same thing happened to me on Centipede. I didn't even get a low level high score in the game and I got  a 151,515,151,515 score in the leaderboards.

Share this post


Link to post
Share on other sites
8 minutes ago, Underoath13 said:

Same thing happened to me on Centipede. I didn't even get a low level high score in the game and I got  a 151,515,151,515 score in the leaderboards.

I just looked at the database and removed 5 scores like that. I also added code to prevent those specific values from being added again. I'm still not sure why or how those scores are getting parsed, but at least it's solved going forward for those specific scenarios.

  • Like 1

Share this post


Link to post
Share on other sites

Also, I *think* I just resolved the issue where scores with funky characters were not submitting properly.

Share this post


Link to post
Share on other sites
Posted (edited)

@Jason Carr

99% sure this guy is cheating with the dip switches or some other means, but probably the dip switches. Last time I looked he had a score of around 88,000, a far cry from the current score. If he's not cheating props to him, but nonetheless there is the issue with the dip switches.

I understand that the dip switches are stored in the cfg. Is there any way to check the cfg for code relating to a change in the dip switches? If not, on a more extreme measure that may not be so extreme if well implemented and people are warned ahead of time if they turn high score sharing on, the game specific cfg file could be deleted upon launch of the game to insure everyone is playing with default dip switches. As long as people are using a global cfg and understand that they need a global cfg in order to upload high scores, it seems like a pretty simple way to stop dipswitch cheating.

What do you think?

Edit: This is for Dig Dug, in which the dip switch options allow huge potential for cheating. Ms. Pac-Man on the other hand only lets you cheat by having 5 lives instead of 3, a small difference, and the same guy is still behind me.

digdug leaderboard.PNG

Edited by Underoath13

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...