francisdb / vpxtool

Terminal based frontend and utilities for Visual Pinball
Apache License 2.0
17 stars 4 forks source link

Extracting high scores #35

Open francisdb opened 1 year ago

francisdb commented 1 year ago

depends a lot on the table

LoadValue / SaveValue

Then for roms

De scores worden uitgelezen door de juiste bytes uit te lezen uit de nvrams. Bijvoorbeeld voor bcats_l2 rom In_address(0) = 1824 In_address(1) = 1825 In_address(2) = 1826 Sc_address(0) = 1808 Sc_address(1) = 1809 Sc_address(2) = 1810 Sc_address(3) = 1811

Voor de initialen (1e drie) van de hoogste score en de score zelf (laatste 4)

En die vertaal ik dan naar de echte initialen en score middels score1 = FormatNumber(Hex(score(0)) 1000000 + Hex(score(1)) 10000 + Hex(score(2)) * 100 + Hex(score(3)), 0)

        initials1 = Chr(initial(0)) & Chr(initial(1)) & Chr(initial(2))

But this needs to be done per rom...

So this is going to be a lot of work

francisdb commented 1 year ago

for realtime scores you need to read the pinmame memory at certain locations

eg https://github.com/search?q=repo%3Aneophob%2Fwpc-emu+game_score_p1&type=code&p=2

francisdb commented 1 year ago

see https://github.com/tomlogic/pinmame-nvram-maps

extracting nvram from within a table: https://github.com/vpinball/pinmame/blob/cc4986a97d92d80ab492b2bd3d921e3bf5bb35f5/release/whatsnewVPM.txt#L140

francisdb commented 3 months ago

Non-rom based tables also keep high scores, see below for reading those. https://github.com/syd711/vpin-studio/tree/85318cc1c001822caee45c98c4acec950c60e26c/vpin-studio-server/src/main/java/de/mephisto/vpin/server/highscores/parsing