Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVOffset #53

Open
Manuel-K opened this issue Jul 8, 2023 · 17 comments
Open

NVOffset #53

Manuel-K opened this issue Jul 8, 2023 · 17 comments

Comments

@Manuel-K
Copy link

Manuel-K commented Jul 8, 2023

Hi,
since I'm not using discord, I'll ask my question here. I hope that's okay…

Is NVOffset supposed to work in standalone? I've tried several tables with NVOffset(1) without luck – always adding it directly after the .GameName = cGameName line.

Cheers

@jsm174
Copy link
Owner

jsm174 commented Jul 10, 2023

Hello! At the moment, I do not have any of the nvram functions ported to libpinmame. I will add this to my list of things to do.

Note, you can usually work around by commenting out the relevant code. For example, see here

@jsm174
Copy link
Owner

jsm174 commented Jul 10, 2023

btw, can you provide table link, so when I do implement this, I can test?

@Manuel-K
Copy link
Author

It's a function in core.vbs (https://github.com/vpinball/vpinball/blob/standalone/scripts/core.vbs#L2987). Looking at it I'm not surprised that it does not work, since it works by moving files around and it reads a path from the registry.

I don't think that there is a table that uses it per default, but it's supposed switch to a different nv file in order to use different tables that use the same rom.

Btw., I've got a WIP launcher that uses python/tkinter (since that's preinstalled on the Steam Deck) with keyboard/mouse/gamepad (uses xpad, so that part is Linux only) navigation, preview image and nvram reader to access last game/highscore information. Unfortunately the information display is cumbersome, since using PINemHI through wine is really slow and information about the structure is sparse. I've only found a collection of json files for some roms.

@Manuel-K
Copy link
Author

Since I already parse parts of the vbs file for the launcher, I could do the rename before running the table as a workaround.

@francisdb
Copy link
Contributor

@Manuel-K interesting, is your code open source?
Already asked the PINemHI dev for his source but he's currently not willing to open source.

There's https://github.com/neophob/wpc-emu which has some rom memory mappings:
eg https://github.com/neophob/wpc-emu/blob/master/lib/db/t2.js

@Manuel-K
Copy link
Author

Manuel-K commented Jul 10, 2023

@Manuel-K interesting, is your code open source?

Not yet. I'll be away for a week and a half – then I'll be able to do the reorganizing of the code that's necessary.

There's https://github.com/neophob/wpc-emu which has some rom memory mappings:

Yes, I know that one. And there is also https://github.com/tomlogic/pinmame-nvram-maps which is the source for some of those mappings.

That's all that I've found. At the moment I'm at 9 additional json files that I'll try to get added – but some of them need an additional decoding logic, so I've slightly changed the format.

@francisdb
Copy link
Contributor

@Manuel-K ping me if you do, are you on the discord?

@Manuel-K
Copy link
Author

are you on the discord?

No. See top message. ;-)

@Manuel-K
Copy link
Author

Finding the high_score parts is faster than finding the last_game areas in most cases (if the score is close to the initials), so I'm not sure if the PINemHI code would help that much.

@francisdb
Copy link
Contributor

Misread that part, I'm actually interested in tracing the current score/drains/extra balls/ball roll distance/other stuff over time (telemetry) + sharing that online as high score service. Preferably in a generic way that would work for rom/original tables and allow plugging different score keeping backends. (scorbit, ...)

Wondering where your code fits in the current stack.

@Manuel-K
Copy link
Author

Tracking score after VPX has written a nv file is possible from the last_game data for some roms. That's what I'm using it for.

The code is separated in four parts: The table indexer that reads some information from the vbs, the GUI, the nvram parser and a local score keeping backend.

Wondering where your code fits in the current stack.

It makes playing tables on the Steam Deck (and on my desktop) easier…

@jsm174
Copy link
Owner

jsm174 commented Jul 10, 2023

Ah, I did not realize that. I was thinking you wanted get_NVRAM and get_ChangedNVRAM implemented.

Most of FileSystemObject has been implemented, but I would have to double check on copyFile. We could leverage SaveValue and LoadValue instead of using the registry as that writes to VPReg.ini in the ~/.vpinball directory.

@Manuel-K
Copy link
Author

Ah, I did not realize that. I was thinking you wanted get_NVRAM and get_ChangedNVRAM implemented.

I'll probably want those soon…

@francisdb
Copy link
Contributor

francisdb commented May 8, 2024

@Manuel-K did you actually pursue this idea?

Reference for myself:

_ Nfozzy's Space Station (Williams 1987) 1.21 generates score popups during the game using get_NVRAM (would be better it used get_ChangedNVRAM). Note: only in desktop mode
https://www.vpforums.org/index.php?app=downloads&showfile=12717_

He got the idea from https://www.vpforums.org/index.php?showtopic=39255

@Manuel-K
Copy link
Author

Manuel-K commented May 8, 2024 via email

@francisdb
Copy link
Contributor

francisdb commented May 8, 2024

Thanks for the quick reply. Any plans to share that code?

@andremichi
Copy link

I am also interested in contribute on that topic. @francisdb I asked a similar question on the vpx-standalone channel on Discord this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants