Jump to content



Photo

Is it possible to dump the NVRAM file in realtime?


  • Please log in to reply
16 replies to this topic

#1 bgjd

bgjd

    Neophyte

  • Members
  • Pip
  • 2 posts

  • Flag: Netherlands

  • Favorite Pinball: Bride of pinbot

Posted 02 June 2016 - 02:22 PM

Is it possible to dump the NVRAM in real time while playing the game in some sort of debug mode?

Now the .nv file only gets written when the game is closed, but I want to know if it's possible to dump this data while still playing.

 

If possible, how do I do this?

 

Many thanks in advance!

 

- BGJD



#2 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 02 June 2016 - 07:40 PM

Not out of the box. You would have to add it to the PinMAME code as far as i know.



#3 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 04 June 2016 - 10:19 PM

..and this will soon make it to some VPM build..  :)

 

while playing pinball arcade today i wondered how they did the achievements. and then i thought: why not add some functionality to VPM to make something similar possible for table authors?

(and i think for most machines its good enough to just expose the NVRAM to the scripts, then read some specific section(s) in there and detect changes, EDIT: just checked some sterns and WPCs, and indeed the audits/bookkeeping contains A LOT of info that could be used for this)


Edited by toxie, 04 June 2016 - 10:29 PM.


#4 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 05 June 2016 - 08:06 AM

..and works   :)

 

one can then get a list of all changes since the last time asked (similar to lamps, etc).

there is -a lot- of stuff changed all the time though on modern machines (i guess all the time/counters and low level statistics that are tracked), so it will be at least a bit of detective work to find the changes that matter.



#5 mpad

mpad

    Enthusiast

  • Members
  • PipPipPip
  • 335 posts

  • Flag: Germany

  • Favorite Pinball: AFM, TOM; Timeshock (!), Secrets of the Deep (fx2)

Posted 05 June 2016 - 10:26 AM

Awesome news!!! Stupid as it may sound, but I always liked the achievements as sort of long time motivation.
Cool stuff.

#6 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 05 June 2016 - 12:38 PM

wow with achievements, you can basically add rules to an existing game!   This would be super cool if this ever comes out.  Great idea



#7 Joe

Joe

    Pinball Wizard

  • VIP
  • 2,356 posts
  • Location:60016

  • Flag: United States of America

  • Favorite Pinball: New Stern ones

Posted 05 June 2016 - 04:11 PM

you can also use game hack tools to read the ram of the game live.



#8 Shockman

Shockman

    Pinball Fan

  • VIP
  • 1,717 posts
  • Location:Portland Or.

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 05 June 2016 - 04:54 PM

There is no such thing as real time in this case. It will most likely eliminate the micro stutter problem. Embrace Macro stutter. Also if you don't know what you have achieved, you probably would not care to hear or read about it during a game. VPX should emulate Pinball, not PA.



#9 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 05 June 2016 - 05:22 PM

you do not need to use that feature then.

 

i personally like challenges like that. for example, in PA, it makes me play tables that i would not have played as long otherwise, simply because i want to find out how to do a certain challenge. and this way i discovered a bunch of tables that i now learnt to love through that (like Black Hole, Genie, etc).

 

and at least the NVRAM feature does not add any stutter. its a few hundred to thousand bytes that need to be scanned each time. not a big deal at all nowadays. its basically for free to do it.



#10 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 05 June 2016 - 05:31 PM

I'd be looking for states that enable / disable flippers, slingshots, bumpers, etc. for reduced lag and more realistic emulation



#11 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 05 June 2016 - 06:03 PM

Reduced lag sounds unrealistic, as the scripts already get the changes ASAP.

The only even faster way would be to completely turn the whole pipeline upside down and have VPM handle the flipper input and then send that over to VP after handling. But thats way beyond the current possibilities, and also i wonder if it would really help that much (maybe a one-frame reduction of lag or so).

 

btw: there is now support for the NVRAM stuff in both VPM 2.7 (no build posted yet though) and the VP10.1 core scripts (also no build posted yet).

you need to add

UseVPMNVRAM = true

to the table script (place before LoadVPM, or otherwise calling core.vbs, as usual) and then the changed content of NVRAM is available (since last update) via the

NVRAMCallback

(gets a three dimensional array: location, new value, old value)



#12 Shockman

Shockman

    Pinball Fan

  • VIP
  • 1,717 posts
  • Location:Portland Or.

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 05 June 2016 - 06:44 PM

You make it sound like flipper lag is a VPM problem. That is very disturbing to read. It is a VPX issue. Physmod 5 and earlier has absolutely zero lag, and VPX can have over half a second. That is not lag, that is delay. Now, I might have the worse lag of anyone, with my otherwise great  A10 at 3.7, but I have read a lot of posts about flipper lag from others as well. I never even saw one before VPX.



#13 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 06 June 2016 - 06:26 AM

i guess this is because in PM5 you get much much higher framerates than in VPX?

if you do not use vsync, then everything depends on how fast you get from frame to frame (even if your display can not show as many FPS). The whole infrastructure in VP to handle keys, etc is coupled to the FPS you can have, so if you have in PM5 for example 240FPS, and in VPX only 60FPS, and your TV is also running at 60Hz, then VPX will feel a tiny bit more laggy than PM5, even though you are running at the full display rate.

Another thing is that the display driver might choose to buffer more frames, as our rendering pipeline now has much more stages (when you enable playfield reflections, bloom and dynamic AO). There you can play around with the 'maximum prerendered frames' setting and trying 0,1 or 2 as values.

 

Apart from that, there is no reason why PM5 should be less laggy than VPX, as there were no real changes to the inputs-code, etc.



#14 Shockman

Shockman

    Pinball Fan

  • VIP
  • 1,717 posts
  • Location:Portland Or.

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 07 June 2016 - 12:47 AM

vsync does help. So does max physics loops set higher. Things like prerendered frames just seem to effect overall running speed (FPS), but not the input lag.

 

I'm ready to buy a GPU and a power supply. Do you have a suggestion for a GPU to put into an A10 running at 3.7 that is at or under $600



#15 bgjd

bgjd

    Neophyte

  • Members
  • Pip
  • 2 posts

  • Flag: Netherlands

  • Favorite Pinball: Bride of pinbot

Posted 07 June 2016 - 06:58 PM

you can also use game hack tools to read the ram of the game live.

 

Hi, I'm not that tech-savy, so can you point me to some of these tools and how that works? Thanks!


Reduced lag sounds unrealistic, as the scripts already get the changes ASAP.

The only even faster way would be to completely turn the whole pipeline upside down and have VPM handle the flipper input and then send that over to VP after handling. But thats way beyond the current possibilities, and also i wonder if it would really help that much (maybe a one-frame reduction of lag or so).

 

btw: there is now support for the NVRAM stuff in both VPM 2.7 (no build posted yet though) and the VP10.1 core scripts (also no build posted yet).

you need to add

UseVPMNVRAM = true

to the table script (place before LoadVPM, or otherwise calling core.vbs, as usual) and then the changed content of NVRAM is available (since last update) via the

NVRAMCallback

(gets a three dimensional array: location, new value, old value)

 

This sounds great! Can you tell me/us when this will be available? And since I'm quite new to VP and Pinmame, can you give some info on how to implement this? Do I need to add this to the code of a game?

 

Thanks!



#16 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 07 June 2016 - 10:40 PM

see here: http://www.vpforums....=18#entry346485

and here: http://www.vpforums....=40#entry346441

and here: http://www.vpforums....=41#entry346496

 

you'll also need to go to the first post in both threads and download the VP10.1 beta (includes the new core scripts) and the VPM2.7 beta to be able to use that.



#17 Joe

Joe

    Pinball Wizard

  • VIP
  • 2,356 posts
  • Location:60016

  • Flag: United States of America

  • Favorite Pinball: New Stern ones

Posted 08 June 2016 - 02:33 AM

I'd be looking for states that enable / disable flippers, slingshots, bumpers, etc. for reduced lag and more realistic emulation

some games use relays for that.