Jump to content

Pin2Dmd Editor


lucky1

Recommended Posts

  • Content Provider
3 hours ago, Rockdude233 said:

A couple of questions just for curiosity.

1.  I know that it is impossible to assign a keyframe to a hashtag that already has a keyframe assigned to it, but it is possible to assign 2 (or more) different masked keyframes to the same frame.  How does the software/firmware choose which one to use in that case?

2. I notice that the mask dropdown box goes up to 24.  I know there is only 10 masks allowable now, but does this mean this number might be increasing in the future?  I know the masks take a lot of memory, but it sure would be nice to have a few more available.

1. Could you describe a usecase for that ? I can´t imagine where it would make sense to use that.

2. You can increase the numbers of masks already but better choose the area of the masks clever and reuse them as often as possible.

Link to comment
Share on other sites

4 hours ago, lucky1 said:

1. Could you describe a usecase for that ? I can´t imagine where it would make sense to use that.

2. You can increase the numbers of masks already but better choose the area of the masks clever and reuse them as often as possible.

1.  There really is no useful case, I was just curious how it worked.  Like if I had a particular scene that I had keyed using mask #2.  Then, let's say I have a bad memory, and a month later (forgetting that I had already keyed  that frame,), I color the scene differently, then use mask #9 to key it.  Then when I run the game, the frame won't change to the  colors I want (because it's using the previous key that I forgot about), and now I'm frustrated because I can't figure out why the scene doesn't work the way I want it to.   Like I say, I'm just curious how that works. and thought you might know offhand.

EDIT:  I just thought of a case where this might actually be useful.  Let's say you have a scene that has 20 frames in it, and all the frames in that scene, although they are dynamically changing, can be colored using a single frame animation and  keying that frame by using  mask #2 in a certain area of the frame that never changes (so hashtag is always  constant).   Now, on the very last frame of this scene, let's say you want to change the color of an object, so you need to make another single frame animation with the color change.  Now to trigger the color change on this one frame, you use mask #9 which is on another part of the frame and is unique to only that last frame to key it.   So, now this last frame of the scene has two independent keys that apply to it.  Will it work?  Will the the last frame change color because of masked keyframe #9 or will it not change color because it uses masked keyframe #2?

 

2.  So you can already use 25 masks (0 through 24) in a project right now? 

Edited by Rockdude233
Added scenario for 2 masked keyframes.
Link to comment
Share on other sites

  • Content Provider

1. Keyframes need to be unique. The scene of the first keyframe that matches is applied. Even if you have a bad memory I think it is not so hard to find duplicate keyframes of the same scene in a project ;)

2. Theoretically yes ,but it is recommended to use as few as possible. I think 10 were enough for every project released so far. 

Link to comment
Share on other sites

9 hours ago, lucky1 said:

2. Theoretically yes ,but it is recommended to use as few as possible. I think 10 were enough for every project released so far. 

I tried to add just 1 more mask (for a total of 11), and it did not work.  Are you sure the software/firmware doesn't limit to 10?

Link to comment
Share on other sites

On 7/14/2018 at 10:45 AM, Rockdude233 said:

I tried to add just 1 more mask (for a total of 11), and it did not work.  Are you sure the software/firmware doesn't limit to 10?

Masks 11 and 12 seem to be working for me, I will let you know if I find otherwise.

Link to comment
Share on other sites

On 7/13/2018 at 10:36 PM, lucky1 said:

1. Keyframes need to be unique. The scene of the first keyframe that matches is applied. Even if you have a bad memory I think it is not so hard to find duplicate keyframes of the same scene in a project ;)

2. Theoretically yes ,but it is recommended to use as few as possible. I think 10 were enough for every project released so far. 

 

if this is the case; how do we trigger the same scene if its always going to have a different  keyframe.

I noticed some scenes that start with dynamic scores + animation I like to color,

the hash tag on the starting frame is always different  (all 4 of them).  the replacement scene or color mask scene is never triggered given that the hash tag selected does not match the scene.

Link to comment
Share on other sites

  • Content Provider
Quote
On 28.6.2018 at 7:19 PM, DJRobX said:

It looks like Lucky has offered to help a couple times, you may want to take him up on that.   That is primarily what I did on the WCS 94 colorization also.  

Masking and dynamic scenes aren't normally too hard once you get a feel for them.      Lets use the score screen as an example.    You will want to start by finding a score frame in the recording and make a 1-frame "animation" out of it.      With most projects that have 4-color original DMDs,  you are looking to draw "blocks" that shift the colors from the 1-4 spots in the palette to other groups.    

So lets say I start with this:

5b3506a50accc_ScreenShot2018-06-28at9_01_23AM.thumb.png.65409427a66e3c1f71559829f35fd837.png

 

This is the "plain" 4 color DMD.  The darker pixels currently have a red hue because of the first 4 palette entries.      But in color mask mode, I can "shift" them to the other 3 palette groups.    You start by picking "Color mask" as indicated by the red arrow.     Then you pick one of the circled colors and "draw" over the frame (I usually use the filled square).   



5b3505b4c3daa_ScreenShot2018-06-28at8_41_28AM.thumb.png.d2806b8561186332ba3279193bc3b6b8.png

Link to comment
Share on other sites

1 hour ago, cb3 said:

Masks 11 and 12 seem to be working for me, I will let you know if I find otherwise.

I'll have to take a closer look at this when I return from my trip (going out of town for a week).  It's possible I just didn't key the frame correctly with the mask .  It wouldn't be the first time!

Link to comment
Share on other sites

56 minutes ago, Rockdude233 said:

I'll have to take a closer look at this when I return from my trip (going out of town for a week).  It's possible I just didn't key the frame correctly with the mask .  It wouldn't be the first time!

It appears after looking more closely at a couple scenes that Mask 11 & 12 are not working, Ho do you open an issue for the editor?

Link to comment
Share on other sites

  • Content Provider

It is like it says a simple change of the palette. triggered by a frame e.g if you want to have a text like REPLAY in a different color like the color of the default palette.

Could also be used on old SAM games which do not support the side channel / com patch  palette switching method of pinball browser to get rid of the pixels of inframe coding.

Link to comment
Share on other sites

Haven't had much success in getting a palette change to work, is the procedure for assigning this particular keyframe the same as color scene?  In theory would a palette switch only work on a frame that has not been edited?  Any  benefit or downside to using this on a "replacement" v "dynamic" content scene?

 

Link to comment
Share on other sites

  • Content Provider

Palette switches have been used in almost every project, so I´m pretty sure it works as expected at least with pin2dmd hardware.
Have a look at other projects. It is assigned exactly the same way as other keyframes. Only difference is that you have to use the palette switch button. 
On a frame you can either use a palette switch OR ColMask OR replacement. Palette switches stops the playback of other modes.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/15/2018 at 3:33 PM, Rockdude233 said:

I'll have to take a closer look at this when I return from my trip (going out of town for a week).  It's possible I just didn't key the frame correctly with the mask .  It wouldn't be the first time!

I tried again, but it doesn't appear that masks 10-24 will work at this time (issue #127 on github).  

Also, has anyone else noticed there seems to  be a problem with output on a real pinball if the number of keyframes gets around 500?    I'm guessing it is the number of keyframes anyway.  Unexpected color changes in frames or the dmd just going blank during gameplay.  Everything looks normal in the editor and no problems exporting the fsq or pal files, but the output on the pinball just goes wonky for some reason.

Link to comment
Share on other sites

  • Content Provider

We currently use a 64k area to store the colorization information. while e.g. keyframes use 16bytes, palettes 64bytes and masks 512bytes.
There should be no problem with 500 keyframes in terms of memory.

Link to comment
Share on other sites

7 hours ago, lucky1 said:

We currently use a 64k area to store the colorization information. while e.g. keyframes use 16bytes, palettes 64bytes and masks 512bytes.
There should be no problem with 500 keyframes in terms of memory.

I do wonder about performance though - the more keyframes there are, the longer the lookups will take.   It has to check numPlanes * numMasks times each frame, too.    I would think B-tree lookups ought to be pretty quick relative to the actual hash calcuation though. 

That's why I liked where you were going with the colormaskseq - then once a sequence starts all those additional frames could just be contained to the one animation.  Seems like a more ideal implementation would have been to just jump to any of the remaining frame hashes within the sequence when seen, that way if one gets missed it could re-sync whenever there's a match. 

Link to comment
Share on other sites

16 hours ago, Rockdude233 said:

Everything looks normal in the editor and no problems exporting the fsq or pal files, but the output on the pinball just goes wonky for some reason.

Have you compared it to a VPin with freezy's?   The nice thing about Freezy's is you can turn on the debug logs and see what caused the color changes.    So if you see an unexpected change, you can look in the log and see what triggered.   For missed changes, if you leave the dmddump going you can also temporarily import the recording and review the points where you thought it should have triggered something.  

Link to comment
Share on other sites

On 7/13/2018 at 3:50 PM, Rockdude233 said:

1.  There really is no useful case, I was just curious how it worked.  Like if I had a particular scene that I had keyed using mask #2.  Then, let's say I have a bad memory, and a month later (forgetting that I had already keyed  that frame,), I color the scene differently, then use mask #9 to key it.  Then when I run the game, the frame won't change to the  colors I want (because it's using the previous key that I forgot about), and now I'm frustrated because I can't figure out why the scene doesn't work the way I want it to.   Like I say, I'm just curious how that works. and thought you might know offhand.

It will go with whatever matches first.    I believe it starts by searching whole frames, then goes through the masks.   However it searches plane by plane, so mask 10, plane 1 will hit before mask 1, plane 2.   So  *probably* the lowest numbered mask will win.   I would not try to rely on the searching behavior to prioritize keyframe hits (but I can think of a few cases where that might be useful :) )

It doesn't matter if multiple things point to the same animation frame as long as it's intentional.   I do it intentionally in WCS often when the ROM has inconsistent transitions. to the "GOAL" animation for example.   There are a few different combinations of things that start the same color mask sequence that is appropriate for all of them.

It would be neat to have a feature where the editor can analyze the project looking for "ambiguous keyframes".   I'm still trying to wrap my head around the editor code, I may implement it someday if I get good enough with the code.    When I look at cb3's project with hundreds of keyframes, trying to figure out places where he might have unintentionally created overly-generic masks that triggers the wrong frame is currently almost impossible to catch without careful playtesting and looking at the logs.  If the editor can check all the combinations and notice that Keyframe X points to animation A but the Keyframe Z pointing to animation B will also trigger on Keyframe X's frame, it would be very useful to help catch bugs. 

 

Link to comment
Share on other sites

5 hours ago, DJRobX said:

I do wonder about performance though - the more keyframes there are, the longer the lookups will take.

I was thinking it might be something along these lines.  I don't pretend to know how it works, but it makes sense that at some point there are just too many triggers to scan between frames, especially ones with short delays between them.

5 hours ago, DJRobX said:

Have you compared it to a VPin with freezy's?

I have not, but I'll take a look at freezy's (after I learn about it) and report what the debug log reveals.

 

Also, thanks for explaining the "pecking order" of multiple triggers for the same animation.

 

Link to comment
Share on other sites

  • 4 weeks later...
On 8/1/2018 at 11:42 AM, DJRobX said:

Have you compared it to a VPin with freezy's?   The nice thing about Freezy's is you can turn on the debug logs and see what caused the color changes.    So if you see an unexpected change, you can look in the log and see what triggered.   For missed changes, if you leave the dmddump going you can also temporarily import the recording and review the points where you thought it should have triggered something.  

In comparing Vpin to real pin, you don't really get the same responses.  For instance, you don't get the dmd going blank in Vpin at all, whereas it will blank out consistently at the same place in the real pin.   Also,  unexpected color anomalies occur in both, but occur at different sequences/frames.  There are no indications of any problems for the unexpected color changes in the debug logs, just info log entries at start and close of the game.

Link to comment
Share on other sites

Oh well, thanks, I appreciate it!:wacko:
I don't think it would help to open an issue for this one since it really isn't a problem with the editor, but apparently more of a limitation of the hardware/firmware.


No, the firmware supports it for some time now but the dlls don’t.

The hardware is capable of 15bit color depth but the editor wasn’t, at least not directly.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...