Page 1 of 1

High Score Table Script

Posted: Sun Jan 30, 2022 1:01 pm
by lagerfeldt
Got a MiSTer a couple of weeks ago. Amazing gadget, and especially the development speed & quality is top notch. So much new stuff all the time.

Anyhoo: A five minute hack job, but it works for me, so I'm sharing the idea.

https://www.youtube.com/watch?v=wZJFcXJTDxE

Since most games don't save high scores I've been keeping score via a spreadsheet and printing it out.

However, having it directly on the MiSTer is a lot easier, though I still need to input the scores manually into the text file that the script is concatenating.

I'm sure high scores will eventually be auto-saved in most games, but it would be sweet to have the top score from selected games all in one place, which what I'm doing (manually) here.

Re: High Score Table Script

Posted: Sun Jan 30, 2022 5:41 pm
by lagerfeldt
I've done it via ssh, but simply press F9 to use the built in shell.

Default login/pass should be "root" and "1".

First I've made a dir in /media/fat called /hiscores:

Code: Select all

$ cd /media/fat
$ mkdir hiscores
Inside this dir I've made a txt file called hiscores.txt which contains the data:

Code: Select all

$ cd hiscores
$ nano hiscores.txt
Put in your own high-score data manually as text (use tabs or spaces for columns).
When you're done press Ctrl+O to write out, then Ctrl+X to exit.

Next I've made a file called hiscores.sh and placed in media/fat/Scripts:

Code: Select all

$ cd /media/fat/Scripts
$ nano hiscores.sh
In the nano editor these two lines need to be inserted:

Code: Select all

#!/bin/bash
cat /media/fat/hiscores/hiscores.txt
Then write out and exit.
Last step is to make the script executable:

Code: Select all

$ chmod +x hiscores.sh
After this the script will show up in the Scripts menu and print out the hi-score table when selected.

Whenever you want to edit the hi-scores you need to go to the shell (F9) and nano edit the txt file. Takes less than 20 seconds.

If anyone has any suggestions, please let me know. I think this should be safe from being overwritten during updates.