Jump to content

SAM Build with modular DMD drivers for pindmd1,2,3 and PIN2DMD


lucky1

Recommended Posts

  • Replies 578
  • Created
  • Last Reply
1 hour ago, jesperpark said:

Okay I'm terrible with acronyms, and why are pinball tables all known by 2 or 3 letters :wacko:

Anyway So what is JIT? What does it do if i disable?  How do i disable? 

Thanks,

JIT stands for "Just in time" compiling.    It translates the ARM processor code into native x86 code and runs it directly.   The non-JIT code, in contrast, is a standard C program that looks at each instruction and simulates its behavior.    JIT specifically refers to the way the translation happens - it translates things on the fly as needed - "just in time" for use. 

JIT is significantly faster.   I think MJR added this to VPM to better support the sound board in WhiteStar II games, which was later promoted to be the primary CPU in SAM.

When I started working on the LE lighting for SAM, I discovered that I needed to emulate a serial port.   Serial ports rely on something called an IRQ - Interrupt ReQuest - a hardware signal that tells the processor "Stop what you're doing!" - that some event (such as: "data has arrived and is waiting!") has occurred and needs to be handled.     The IRQ support in the existing SAM and ARM processor emulation was very basic - up until the serial port, it was basically only being used for timers, and those are very predictable.    To make the serial port work correctly, it required more frequent checking on each executed instruction that could possibly trigger an event.  

This meant that SAM emulation was going to slow way down unless I found a solution to make it go faster.    So I spent a good solid month trying to track down various bugs in this existing JIT compiler that were preventing SAM games from running properly.  

JIT gave me more overhead to check for IRQ events on essentially every possible case that might trigger one.   So, the non-JIT code works, but may not work as well.  You might find stuff like slow DMD frames or the light strings "dying".  Those are timing sensitive problems that took a long time to iron out completely on the JIT side.  Fixing them might come at the expense of an even bigger performance hit. 

TL:DR = If you want all this to work right, I strongly recommend you install Windows 10.  This is seriously complicated stuff, so a fix is probably not coming soon.    At least not from me, since I don't currently have an environment to repro it. 

Link to comment
Share on other sites

I'll image my drive in cabinet #1 and upgrade to Windows 10 over the weekend and see how it goes.    @DJRobX On the other topic of the LE colored roms currently not outputting AUX data until the timeout occurs, am I correct to assume that a new VPM will be required which has additional game specific hacks in it?

Link to comment
Share on other sites

19 hours ago, DozerAUS said:

I'll image my drive in cabinet #1 and upgrade to Windows 10 over the weekend and see how it goes.    @DJRobX On the other topic of the LE colored roms currently not outputting AUX data until the timeout occurs, am I correct to assume that a new VPM will be required which has additional game specific hacks in it?

I fixed that a couple weeks ago, but I guess it would help if I alerted @CarnyPriest to make a build.   :) 

That was easy peasy.   Just a matter of the game specific hack looking for "mt_145h" and the "mt_145hc" name not matching.   I changed it to be 'anything that starts with mt_145h" and now it works fine with the color ROM.

Mustang Pro and LE are the only ROMs that really require the game specific hack.   TWD uses a "default hack" of blasting garbage data ta the serial port.    Star Trek LE, Metallica LE, and AC/DC do not appear to look for any response from the serial port, so they don't need hacks.

I hope some day, someone gets bored and determines what the real response the game wants from the serial LED boards is. :)

 

Link to comment
Share on other sites

I remembered that I do have one other WIn7 x64 machine hooked up to a TV with 8GB and a Radeon graphics chip that does load VP.   Unfortunately no luck so far reproducing the crash issue.    I hate it when I can't reproduce issues other people have.   :angry:

 

Link to comment
Share on other sites

25 minutes ago, DJRobX said:

I remembered that I do have one other WIn7 x64 machine hooked up to a TV with 8GB and a Radeon graphics chip that does load VP.   Unfortunately no luck so far reproducing the crash issue.    I hate it when I can't reproduce issues other people have.   :angry:

 

Thanks for trying to sort it out Rob - it's consistent here, just won't run at all with the JIT compiler flag set on both cabinets.   I played a fair bit of Spider man tonight (PRO) version and didn't notice any issues with it disabled but I think you mentioned it was only for IRQ polling on the LE AUX stuff.   Does raw CPU help in this instance or does the non JIT code not benefit from more host CPU cycles? - I might hold off the Win10 upgrade on the cabs and see if anything turns up with your testing - if it can't be reproduced at your end I'll bite the bullet or just see how it goes with the LE roms disabled which I'll test when @CarnyPriest builds a new VPM.

Link to comment
Share on other sites

  • Administrators
4 hours ago, CarnyPriest said:

It should.

Ok, installed... doesn't seem to exit game and really really really bad flickering.  Tested with 24 v1.5.

Edit - I replaced my pin2dmd dmddevice.dll with the new one from download above. Flickering is gone, but last frame is still displayed on DMD after game exited.

Link to comment
Share on other sites

7 hours ago, DozerAUS said:

Thanks for trying to sort it out Rob - it's consistent here, just won't run at all with the JIT compiler flag set on both cabinets.   I played a fair bit of Spider man tonight (PRO) version and didn't notice any issues with it disabled but I think you mentioned it was only for IRQ polling on the LE AUX stuff.   Does raw CPU help in this instance or does the non JIT code not benefit from more host CPU cycles? - I might hold off the Win10 upgrade on the cabs and see if anything turns up with your testing - if it can't be reproduced at your end I'll bite the bullet or just see how it goes with the LE roms disabled which I'll test when @CarnyPriest builds a new VPM.

Yeah I'm afraid I'm already at the extent of my testing, it does not reproduce on this machine.   That machine hadn't been patched since 2014.  It worked fine initially.   Updated to the latest-everything, continued to work fine.  Tried turning on windows defender and a bunch of other stuff.   PinballX, B2S, DOF, color DMDDevice.dll .... no ill effect, all runs fine.   Tried rebooting several times, even loading multiple tables back to back without closing VP

Raw CPU won't help if you run into timing problems.   What I mean is that bringing the non-JIT code up to functional parity with the JIT code will potentially slow it down a lot more.     

Link to comment
Share on other sites

I just installed this on my cab and I have a question. The unzipped application file is name 'pinmame' the file I'm replacing on my cab is 'pinmame32'. I just changed the name to pinmame32 and everything works fine, but is that ok to do? Or is there another step I should have taken?

Link to comment
Share on other sites

  • Administrators
5 minutes ago, PinballShawn said:

I just installed this on my cab and I have a question. The unzipped application file is name 'pinmame' the file I'm replacing on my cab is 'pinmame32'. I just changed the name to pinmame32 and everything works fine, but is that ok to do? Or is there another step I should have taken?

I believe that pinmame32 is for auditing ROMs and is not the actual executable for playing.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Freezy,

thanks for all the hard work on this!

It is amazing to me how much this adds to the pinball experience

Two questions I am getting a large dmd on the playfield when I use the 1..5 dmddevice.dll even though I have it turned off in pinmame.  Any solutions on how to fix this?

Also is there a list of games currently with pal files associated with them?

 

 

Link to comment
Share on other sites

I have been playing the spiderman with the colored dmd and I am seeing a bug where if I get the DOC Oc's magnet my DOF will vibrate the shaker motor and freeze my rear right solenoid and 3 lights on the light bar..  Could this pinmame related or just a bug in DOF config?

Link to comment
Share on other sites

Sorry I was kind of slow these last weeks, but happy to see your issues resolved. And thanks for reporting your solutions, otherwise people would have spent time trying to resolve them in vain.

 

EDIT: I'm posting this here as well: For those having crashes (probably quite a few), try this new build:

DmdDevice.zip

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...