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

Optimized 16 color for pindmd3 #119

Closed
sverrewl opened this issue Jul 9, 2018 · 571 comments · Fixed by #217
Closed

Optimized 16 color for pindmd3 #119

sverrewl opened this issue Jul 9, 2018 · 571 comments · Fixed by #217

Comments

@sverrewl
Copy link

sverrewl commented Jul 9, 2018

There is still a small delay that makes mini games like the video mode in afm not playable with *.vni enabled. Possible to fix ?

http://vpuniverse.com/forums/topic/3461-sambuild31-beta-thread/?do=findComment&comment=39918

@djrobx
Copy link
Contributor

djrobx commented Aug 12, 2018

Specifically, it appears that "RenderColoredGray4(ColoredFrame frame)" currently just upscales to 24-bit color, instead of using a palette with a smaller stream of data, which is likely adding the latency.

Someone with access to a pindmd3 and knows its api could probably implement an indexed 16 color renderer instead.

@freezy
Copy link
Owner

freezy commented Aug 12, 2018

The problem is that PinDMD3's firmware doesn't support that. It's either 2-bit palette-based or full 24 bit...

@russdx
Copy link

russdx commented Aug 19, 2018

There is a 4bit mode as this is how newer stern games work. Ill find the relevant methods / packet structure.

@freezy
Copy link
Owner

freezy commented Aug 19, 2018

Well yes there is, but AFAIK there is no way to set the 16 colors of the palette individually. I think we talked about this and your answer was a firmware upgrade (which would be good too!).

@russdx
Copy link

russdx commented Aug 20, 2018

Ah yes indeed that would be 16 shades of one colour. I can certainly add a 16colour mode if this is now required? But from testing(long ago) the 24bit mode could easily handle upto 30fps usb data stream without any lag so i wouldn't of thought the display is causing any latency issues? unless the framerate is higher then 30fps?

@djrobx
Copy link
Contributor

djrobx commented Aug 20, 2018

VPM sends out frames up to 60fps. The lag goes away if colorizations are not used. Pin2DMD does not have this issue either in 16 indexed color mode. So I do think we need this feature added to solve the issue correctly.

@russdx
Copy link

russdx commented Aug 20, 2018

Pin2DMD is very different hardware/software so will behave differently.

Is there a reason for the 60fps as no pinball rom i am aware of ever goes above 24-30fps?

Is this a constant 60fps stream or only sends a frame if different to the previous frame(saves load of usb bandwidth) if done this way and this is how i initially coded it in pinMAME.

@djrobx
Copy link
Contributor

djrobx commented Aug 20, 2018

Sure. The point is that it doesn't have the lag issue, so it rules out issues with the coloring system. Reviewing VPM recordings in the colorization tool, I regularly see frame changes at ~16ms. There are a lot of slower ones too, of course.

Freezy's code also will ignore and not send dupe frames. The particular sequence that triggered this request is AFM's video mode.

@russdx
Copy link

russdx commented Aug 20, 2018

Sounds like adding a 4bit frame data plus the 16 colours mode to the firmware might help? This will only be 16 bytes bigger then the current 4bit mode.

@djrobx
Copy link
Contributor

djrobx commented Aug 20, 2018

Yep sounds good.

@russdx
Copy link

russdx commented Aug 21, 2018

Give me a few days its been a loooong time since i compiled this firmware..... :)

@russdx
Copy link

russdx commented Aug 26, 2018

I have not forgotten just been a bit busy! :) I hope to get this done this week! (once i remember how to compile the firmware again :D)

@freezy
Copy link
Owner

freezy commented Aug 26, 2018

Cheers!

@djrobx
Copy link
Contributor

djrobx commented Aug 26, 2018

Development cobwebs are the worst to dust off. :)

@russdx
Copy link

russdx commented Aug 31, 2018

Can now compile the firmware which is a good first step :D now to add the extra function :)

@russdx
Copy link

russdx commented Sep 3, 2018

New buffer format

[0x32]
[shade0_R]
[shade0_G]
[shade0_B]
[shade1_R]
[shade1_G]
[shade1_B]
[shade2_R]
[shade2_G]
[shade2_B]
[shade3_R]
[shade3_G]
[shade3_B]
[shade4_R]
[shade4_G]
[shade4_B]
[shade5_R]
[shade5_G]
[shade5_B]
[shade6_R]
[shade6_G]
[shade6_B]
[shade7_R]
[shade7_G]
[shade7_B]
[shade8_R]
[shade8_G]
[shade8_B]
[shade9_R]
[shade9_G]
[shade9_B]
[shade10_R]
[shade10_G]
[shade10_B]
[shade11_R]
[shade11_G]
[shade11_B]
[shade12_R]
[shade12_G]
[shade12_B]
[shade13_R]
[shade13_G]
[shade13_B]
[shade14_R]
[shade14_G]
[shade14_B]
[shade15_R]
[shade15_G]
[shade15_B]
[2098]
.........[2048 bytes of frame data.....]

Not tested yet as left pinDMD at home DOH but here is the bin / installer
DFU.zip
pinDMD3vPin010010.zip

I will test my self tomorrow

Regards
Russell

@sverrewl
Copy link
Author

sverrewl commented Sep 4, 2018

I'm very happy to hear this Russell.

@russdx
Copy link

russdx commented Sep 4, 2018

Did not get round to testing, extremely busy at work but will this week some time :)

@freezy
Copy link
Owner

freezy commented Sep 4, 2018

Cheers! Got an example command how to flush?

EDIT: Also, does the new firmware return a different version? If so, what's the string? I'm currently matching the regex ^rev-vpin-\d+$, so I suppose it's 010010?

@freezy
Copy link
Owner

freezy commented Sep 16, 2018

@russdx any update? Will push out a new version soon and it would be great to have that in! I'm a bit hesitant to flush the firmware without instructions...

So just to be clear, the new frame format is:

  • 0x32 (instruction byte)
  • 48 bytes of palette data
  • 0x2098 (what's this?)
  • 2048 bytes of frame data (4 planes)

Which makes 2098 bytes per frame. So what's the [2098] between the palette and the frame data?

@russdx
Copy link

russdx commented Sep 17, 2018

Sorry ignore the 0x2089, yes the 2048 is the 4 planes of frame data.

0x32 is the new command byte that tells the firmware its going to receive rgb values for each shade and that the rest of the data is offset more then a usual frame.

I am working from home tues-thurs so will get it tested :)

Regards
Russell

@russdx
Copy link

russdx commented Oct 16, 2018

sorry got a bit side tracked with job / was on holiday. back now! will give the firmware a test!

@djrobx
Copy link
Contributor

djrobx commented Oct 16, 2018

We appreciate you taking the time to work on the update. :)

@russdx
Copy link

russdx commented Oct 16, 2018

no worries, i promise i will get round to it! just extremely busy at the moment hehe :)

@sverrewl
Copy link
Author

bump - not meaning you should jump on it. Just a reminder in case you've forgotten about it.

@russdx
Copy link

russdx commented Nov 11, 2018

Yes sorry guys its on my list just finding the time to sit down and test is near impossible at the moment but ill get round to it :)

@russdx
Copy link

russdx commented Dec 15, 2018

Guys i have not forgot! i have 2 weeks off for xmas in a week! i will get this sorted!! :)

@sverrewl
Copy link
Author

One week plus two weeks should be 21 days. Any news ? You should never give a estimated time for something. Then people will start to nag a few days sooner ;)

@russdx
Copy link

russdx commented Jan 10, 2019

this time i just forgot! i actually did the work months ago just did not have time to dig out the pinsmd3 to test it. No estimates! ill try and get this done when i can.

@sverrewl
Copy link
Author

And I'll keep reminding you <3
Thanks again Russel.

@lonchaney1000
Copy link

@russdx You mean the DMDExt test software? Or Pixelcade? I Googled it, Pixelcade is just another kind of pinDMD and I guess the Freezy test software just check that in case I may have it on my machine. Well, if DMDExt talks to the pindmd via COM rather than the vid/pid directly, what should I do, then?

@russdx
Copy link

russdx commented Apr 21, 2022

@slaslayer
http://pindmd.com/sdkffjkgdgr/slaslayer/pinDMD3vPin010014.bin
http://pindmd.com/sdkffjkgdgr/slaslayer/pinDMD3vPin010014R.bin

@lonchaney1000 the error might just be because pinDMD is connected at that point. Does yPinball throw any errors or any logs as to why it's not happy?

@lonchaney1000
Copy link

@russdx Here is the PinballY log about the realdmd. Thanks for your help

21 avril 2022, 12:28:45: Session started
PinballY 1.1.0 (Beta 5), build 9931 (x64, 20210518-0551)

Detecting and configuring real DMD device

  • Searching for dmddevice.dll

Searching for real DMD device DLL

  • Found the 64-bit DLL in the PinballY folder: D:\PinballY\DmdDevice64.dll
  • found DMD interface DLL: D:\PinballY\DmdDevice64.dll
  • retrieving file version info for DLL, to check for special handling
  • Version Info data: version=1.7.2.0, product name="Universal DmdDevice.dll for Visual PinMAME", comments="Universal DmdDevice.dll for Visual PinMAME for all displays, inclusively frame-by-frame coloring support.", copyright="Copyright © 2018 freezy@vpdb.io"
  • This appears to be the dmd-extensions version of the DLL, based on the product/copyright strings
  • Based on the version number, this version has the fix for the PM_GameSettings bug
  • Based on the version number, this version has the fix for the Open/Close bug
  • Checking if dmd-extensions virtual DMD mode is enabled
  • DMDDEVICE_CONFIG environment variable found (D:\Visual Pinball\VPINMAME\DmdDevice.ini)
  • DmdDevice.ini successfully loaded; scanning
  • It looks like virtual dmd mode is disabled in the dmd-extensions DLL, so we're enabling the DLL.
  • dmddevice.dll successfully loaded
  • It looks like virtual dmd mode is disabled in the dmd-extensions DLL, so we're enabling the DLL.

@russdx
Copy link

russdx commented Apr 21, 2022

Log looks ok, does not appear to fail finding the DMD.
At what point does the pinDMD die? Is it sat on its splash screen ok until you launch pinballY?

@lonchaney1000
Copy link

@russdx Before the update the pindmd splash screen was there untill pinballY starts. Now it stay there. So I have to close PinballY, start a VPX table, and then the splash screen disapears. When I close the table and VPX, I have then a black screen. If I start PinballY after that, I just have the black screen.

@russdx
Copy link

russdx commented Apr 21, 2022

@russdx Before the update the pindmd splash screen was there untill pinballY starts. Now it stay there. So I have to close PinballY, start a VPX table, and then the splash screen disapears. When I close the table and VPX, I have then a black screen. If I start PinballY after that, I just have the black screen.

Yeah sounds like pinballY is no longer talking to the pinDMD, can't think how this update would of affected it like this though. The weird thing is pinballY appears to use freezy .dll but you mentioned this works ok stand alone?

@lonchaney1000
Copy link

@russdx I just found something! I replaced the dmddevice.dll and dmddevice64.dll in the PinballY folder with the newer ones from my Vpinmame folder and now it works! Sounds it was not important until now, but the firmware update changed the rules maybe. The only last thing which doesn't work is when I close a table and get back to the front end, the PinballY splash screen doesn't come back, but I will check later, it certainly a small thing somewhere. Thanks a lot for your help and your time. :)

@russdx
Copy link

russdx commented Apr 21, 2022

Ah yes the firmware update needs the latest version of freezys .dll I should of mentioned that earlier hehe. Glad it’s all working :)

@lonchaney1000
Copy link

@russdx Yes, I'm really happy, thanks again, Russell :)

@bmongiovi
Copy link

@russdx . Greetings, I do need the firmware upgrade: KUID=0780CA98-023E0132-03D48D16
My PINDMDv3 is on COM5. Does this matter?

@RunningMan-01
Copy link

@russdx Just checking, are you still doing the thing where we send in our serial number in order to get Freezy installed on pindmd3? Haven't seen a post since April, just checking before I go dig up my serial.

@bmongiovi
Copy link

bmongiovi commented Sep 21, 2022 via email

@tluppens
Copy link

@russdx Hi i have also a pindmdv3 since 2016 i have still version 1008, do you still make does bin files ? i have my kuid number

@russdx
Copy link

russdx commented Feb 15, 2023

Hello

Yes still, building firmware for all :)
Will build another batch this Friday, send over your KUIDs

@tluppens
Copy link

@russdx that's great good news i buy you a beer for that

KUID=05FCCAAE-020D5139-05A48D16

tnx

@tluppens
Copy link

tluppens commented Feb 16, 2023 via email

@voodooDX
Copy link

I'd really love to make use of all the amazing alt colors : )
KUID=0F68CAB2-022D412B-0FAC8D16

@russdx
Copy link

russdx commented Feb 17, 2023

hmmm site permissions gone a bit funny by the looks of it,
Can you email me at russdx @ gmail . com and i'll pass em over this way thx :)

@tluppens
Copy link

@russdx ok i have sent you a mail from timmy.luppens@telenet.be

@voodooDX
Copy link

Works like a champ. Thank you!

@shdadstl
Copy link

Hello, any chance I could get a firmware build?
KUID=0933CA97-022E2136-03F18D16.

Thanks!

@russdx
Copy link

russdx commented Dec 5, 2023

Hello, any chance I could get a firmware build? KUID=0933CA97-022E2136-03F18D16.

Thanks!

Hello

Yes, i'll sort this out this week for you :)

@russdx
Copy link

russdx commented Dec 13, 2023

@shdadstl
http://pindmd.com/sdkffjkgdgr/shdadstl/pinDMD3vPin010014.bin http://pindmd.com/sdkffjkgdgr/shdadstl/pinDMD3vPin010014R.bin

If links do not work i'll send over email (contact me at russdx @ gmail . com)

@dig65
Copy link

dig65 commented Dec 31, 2023

I would like to get updated firmware for my PINDMD3.

KUID is 0EDBCAE4-023DE123-0F178D16

Thanks!

@russdx
Copy link

russdx commented Jan 4, 2024

russdx @ gmail . com

Hello

Can you email me at russdx @ gmail . com

@Aldiode
Copy link

Aldiode commented Sep 10, 2024

Hi Russ,

I need to get an updated firmware for my PinDMD3 please.
KUID=0E70CABE-023C3124-0F128D16

Thanks.
AL

@russdx
Copy link

russdx commented Sep 11, 2024

Hi Russ,

I need to get an updated firmware for my PinDMD3 please. KUID=0E70CABE-023C3124-0F128D16

Thanks. AL

Can you email me at russdx @ gmail . com

Thanks :)

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

Successfully merging a pull request may close this issue.