Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

DirectOutput DOF plugin development


swisslizard

Recommended Posts

Hi

After some initial trouble, I have managed to build a plugin for PBX which can call the DirectOutput framework (DOF). Now I need to start working on the details:

  • First of all, I'm still not sure if I'm really working with the latest version of the plugin template. My code is based on the vb.net plugin template which is installed with PinballX 1.9. Is this the latests version?
  • Is there a C# version of the plugin template? Where? In my install there is no such template.
  • Is there a way, how a plugin can determine whats actually going on in PBX? I'm looking for a way to find out about events like Quit, Left, Right, Page Left, Page Right, Pause, Select, Exit Emulator, Instructions (Basically the Actions you define in the Input Settings). I'm aware of Event_Input, but this does only return the keys resp. buttons, but not the action which is associated with them.
  • When does the Event_GameExit fire? After the emulator has been quit or before that? I need some kind of signal, after the exit of the emulator.
  • I'm still not sure if there is a way how to get the rom name of a table in the Event_GameSelect and Event_GameRun methods? If it is possible, where can I find that rom name? The data structure I receive for these event there is no field for the rom name.

Thanks for any hints and help.

All the best

Swisslizard / Tom

  • Like 1
Link to comment
Share on other sites

1. Yes.

2. I'll have a look, if there isn't I'll put one together.

3. The Event_Input can be set up to do certain things at certain key presses using a Select Case. Give me an example of what you want to do and I'll show you a quick and dirty block.

4. Immediately after you exit the game and right before it falls back to PBX.

5. The rom variable has been added but it was after I used the plugin template. I would have to look into when it fires, but the hiscore plugin uses it so I know it's there.

Link to comment
Share on other sites

Well all the c# template would be is a converted version of the vb.net one which is how GameEx did it. PBX is developed in vb.net mainly anyway. Either way it should be in there if it's not.

I also answered the rest of your questions.

Link to comment
Share on other sites

Thanks for your answers.

3. DOF is built to trigger effects based on events in the software using it. Therefore it is helpfull if DOF can learn as much as possible about the things that are going on in the hosting app (in this case pbx). this means that I'm looking for a way to get information about things like the wheel shifting left or right, pageing left right and if thats possible also about other actions that occur in pbx (eg. context menu open/close).

So if any examples exist how to get that info, I would be glad to have a look.

5. I have also read about the highscore template, but it is not yet clear to me how to access that rom variable. Also here a code example or other info would be most helpfull.

Link to comment
Share on other sites

Well all you're going to see is the input being passed, not the function that input is tied to. So the event passes, say, the right arrow key. The plugin doesn't see that this condition is tied to the wheel in any way.

The way I got around that in GameEx is by using the menu change event and snatched what menu it was on from there.

Is the problem that you can't see the table rom variable at all or you don't know when it gets passed?

Link to comment
Share on other sites

The struct with the game info which I found in the plugin template doesnt have a rom variable. The struct is also different from the one found in the thread you have mentioned in your previous post. My struct does have some highscore tags which are not found in the other struct. Thats why I am a bit lost here.

Regarding the actions of pbx:

You have mentioned a menu change event. This event does not exist in the template I have used. Does it exist in pbx to?

Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...