dmd-extensions icon indicating copy to clipboard operation
dmd-extensions copied to clipboard

Pinball FX3 volume 6. Not working

Open pi2i opened this issue 4 years ago • 10 comments

PFX3 WMS VOL. 6 New alphanumeric games from PFX3 don't function, all other PFX3 boards functions. Please advise

pi2i avatar Oct 20 '20 14:10 pi2i

A possible option for this is finding out where in memory the alphanumeric characters are stored and emulating them to the DMD. The only problem I can currently foresee is that we need to know X/Y positions of each digit.

BlackStar-EoP avatar Oct 20 '20 14:10 BlackStar-EoP

Quick check into pinball FX3 showed that when not showing the backbox, the display has 2 rows and a fixed amount of character for all the 3 alphanumeric tables. If I have some time I can take a look at what the data is pointing to (my DMD widget stopped working since upgrading to VS2019/newer QT), wishful thinking here, but if that data is valid and it's pixel data and the resolution is the same, this should be a relatively easy fix :)

BlackStar-EoP avatar Oct 24 '20 10:10 BlackStar-EoP

As described above, DMDEXT doesn't display anything for the three new FX3 alphanumeric games. I'm using an LCD panel not a real DMD. I also noticed that although DMDEXT still works with FX3 DMD games, it doesn't pick up the correct color. For example, in the FX3 game Jaws, the DMD dots should be blue but DMDEXT is displaying them as amber. DMDEXT handled this and displayed the correct color prior to the Pinball FX3 Volume 6 update.

CFTBL avatar Oct 27 '20 17:10 CFTBL

As described above, DMDEXT doesn't display anything for the three new FX3 alphanumeric games. I'm using an LCD panel not a real DMD. I also noticed that although DMDEXT still works with FX3 DMD games, it doesn't pick up the correct color. For example, in the FX3 game Jaws, the DMD dots should be blue but DMDEXT is displaying them as amber. DMDEXT handled this and displayed the correct color prior to the Pinball FX3 Volume 6 update.

I believe a possible culprit is this switch statement: https://github.com/freezy/dmd-extensions/blob/master/LibDmd/Input/PinballFX/PinballFX3MemoryGrabber.cs Lines 141-159, this is not the nicest way of doing this, especially if more tints get added. I wanted to submit a patch for this, but never got around to doing it, but the way I handle this is: https://github.com/BlackStar-EoP/dmdwidget/blob/master/fx3process.cpp @129 I.e. fetch the color from memory and create a color object from this for Qt, this is future proof.

BlackStar-EoP avatar Oct 28 '20 08:10 BlackStar-EoP

I'm not getting any varying colors at all from dmdext's switch statement nor @BlackStar-EoP 's code. Are we sure those memory offsets are correct? If I change the ingame dmd color I'm not getting any different values from colorCode nor from blackstar's r g b variables...

msf567 avatar Jan 21 '21 17:01 msf567

Ideally we would like to have the actual segment data, For the DMD we're grabbing the texture, which works well because we can easily extract the pixel values from that. However, segment data is probably stored differently, so we'll need to find the right position again. I have dropped a message to NoEx.

@BlackStar-EoP Patch welcome.

freezy avatar Jan 31 '21 22:01 freezy

@freezy did you get any response from NoEx ? Or can you implement the patch of BlackStar-eop ?

MikedaSpike avatar Apr 26 '21 03:04 MikedaSpike

Yes, he hasn't forgotten about it, but he's currently short on time.

freezy avatar Apr 26 '21 06:04 freezy

Just tested this using DMDEXT 1.10.2. The issue persists. DMDEXT doesn't display anything for FX3 alphanumeric games on a virtual DMD (i.e. LCD display). Also, with FX3 DMD games, DMDEXT doesn't render the correct color. For example, in an FX3 game like Jaws, the DMD dots should be blue. DMDEXT displays amber dots. DMDEXT detected and displayed the correct color prior to the Pinball FX3 Volume 6 update that introduced alphanumeric games.

CFTBL avatar Apr 10 '22 02:04 CFTBL

Just tested this using DMDEXT 1.10.2. The issue persists. DMDEXT doesn't display anything for FX3 alphanumeric games on a virtual DMD (i.e. LCD display). Also, with FX3 DMD games, DMDEXT doesn't render the correct color. For example, in an FX3 game like Jaws, the DMD dots should be blue. DMDEXT displays amber dots. DMDEXT detected and displayed the correct color prior to the Pinball FX3 Volume 6 update that introduced alphanumeric games.

As far as I can remember, the amber color is the default color if the memory for the color cannot be read. I don't really have a patch at the moment, and it's all a bit foggy. The issue I had with the current implementation is that it's a table and thus by definition is not future-proof on its own. In my own DMD widget I took the 32 bit color, and made it in such a way that if FX3 introduces a new color, it will automatically work. As far as I can tell, FX3 will not be updated anymore so my implementation is pointless.

As stated above, the memory offset for the color table likely changed. I have to look into the code again to see what happened, but I think I have a global idea of how their internal data structure works. If they added a few members into their classes all the offsets change so it's pretty likely the offset is just a couple of bytes from where the current implementation tries to read this.

I might have a look at this this week when I've had a bit more sleep but I can't make any promises. It's just such a shame that Zen never implemented an API where we could subscribe to to get function calls whenever the DMD updates. I understand it from their point of view though since that's yet another subsystem they need to maintain.

BlackStar-EoP avatar Apr 11 '22 13:04 BlackStar-EoP