Arcade High Scores in the System Menus, Adapted Grid Theme with videos
-
Hi all,
tl;dr
High scores for Arcade games are read from the binary files and show up in my favourire games descriptions through python and .csv files being used to create customise gamelist.xml files.
Jackanory version:
I've been messing around with a bartop cabinet for the last month, and went down the route of creating a grid view of all my favourite games on all systems, which took me down the route of needing all the different gamelist.xml files to have their games listed in a certain order with a number prefix so they appear in the order I wanted, so for example Bubble Bobble on arcade has a prefix of "060 : Bubble Bobble", Rainbow Islands on arcade is "061 : Rainbow Islands" and Parasol Stars on PC Engine, in a different gamelist.xml is "062 : Parasol Stars" so that when favourites is ordered the games appear in the order I want. To do this I initially had an Excel Document with a VBA macro which went through the games, appending the games into the related system gamelist.xml.
All was working great but I wanted more information in the description. I repeated the name, year, publisher and system, but for arcade games, I thought it would be good to have the high scores in there as well, so that people (Well, just me) could see the high scores without having to load the game and wait for the high score screen to work, so I adapted the marco to read the binary .hi or .nv files and parsed them to get the high scores out. This in turn is added to the descriptions in the gamelist.xml and thus, the highscores show.
This in mind, each hi score data file is different, no one game seems to store it in the same way. I've created one script to deal with the most common types, but some like Robotron, Hypersports and Bombjack have much odder ways that the data is structured. I've got 1941,1942, 1943, Rainbow Islands, Bobble Bubble, R-Type, R-Type 2 , Bank Panic, Pang, Rygar and WonderBoy to use one script that adapts to their variations. If anyone is interested, I may write this up at somepoint as I find it fascinating how early developers logic worked on this.
The solution I now have, thanks to @mitu pointing the way is that all of the games information is stored in a .csv file, and I have a char.csv to store the byte to character references for different games. Then a Python script is run before EmulationStation starts, reading the gameData.csv file, overwriting every systems gamelist.xml with my customised data (includes name, thumbnails, video links and the data to parse the highscores properly), so that ES reads the new data each time it loads up.
-
@r3dstar hi! Nice job! Would definitely be interested in understanding how you extract the high scores from the files!
Cheers,
-
That is fantastic! Would be cool if this was available for other views and themes as well, but I don't know how easy or difficult that would be to implement. Very cool functionality nonetheless.
-
@kiro
I've written up four of the ones I've looked at today, partly to help me remember what I'm doing. It only looks at the structure and not the scripts I'm writing to parse of this. Any feedback on this will be apricated as it's kind of a mind dump at the moment, but there isn't too much written out there on this, so if its of help to someone, then all good.An explaination about how scores maybe stored http://r3dstar.co.uk/?p=327
High Scores (Pang!)
High Scores (Ghost and Goblins)
High Scores (Missile Command)
HighScores (Marble Madness)At some point I'll swing around an write up some of the earlier ones. In addition to these four, I've worked out:
1941,1942,1943, Bank Panic, BombJack, Bubble Bobble, Rainbow Islands, Hypersports, Robotron, R-Type, R-Type 2, Rygar and Wonderboy. -
-
Cool idea and looks nice.
You might consider using
<sortname/>
[1] in the gamelist instead of modifying the display name of the ROM upon preprocessing.What duration adds the preprocessing to the ES start?
Do you rewrite every extra information to the gamelist every time (video, thumbnail, ... and hiscores)? I would assume only rewriting the hiscores would be sufficient as they change more often than the "static" scraped data.
Last but not least: What are your plans to publish the sources?[1] https://github.com/RetroPie/EmulationStation/blob/master/GAMELISTS.md#game
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.