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. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Hello,

not so long ago I coded a litte plugin for MALA and tinkel a littel hardware witch can turn the rotateable arcade monitor in a German arcadecab called "Quadro" automatically to the according orientation of the choosen MAME-game. Now some user asked me to port this plugin for GAMEEX. Here is my question:

Where can I get information about coding plugins for GAMEEX?

In MALA there is a plugin-sdk, is there something compareble existing for GAMEEX?

Thanks in advance for your answeres and please excuse my bad english.

Greetings from Germany,

André

Posted

Hi,

All we have for GameEx right now is sample plugin source code. This does have all the available functions in it. Yourlll find the source for c# and vb in the plugins folder. If you need any more help please dont hesitate to ask.

Thanks.

Tom.

Posted
Hello Tom,

thanks for the information.

André

No problem, and I am happy to answer any questions, coding based or anything else.

If you decide your going to have a go at this, I am happy to provide you with a free license. Just let me know.

Posted
Hello,

not so long ago I coded a litte plugin for MALA and tinkel a littel hardware witch can turn the rotateable arcade monitor in a German arcadecab called "Quadro" automatically to the according orientation of the choosen MAME-game. Now some user asked me to port this plugin for GAMEEX. Here is my question:

Where can I get information about coding plugins for GAMEEX?

In MALA there is a plugin-sdk, is there something compareble existing for GAMEEX?

Thanks in advance for your answeres and please excuse my bad english.

Greetings from Germany,

André

Hi There,

i am using the rotate Hardware for a rotateable arcademonitor too. But I use a different hardware.

We use the keyboard Led: SCR for rotating.

If the keyboard led SCR is lid, the arcademonitor rotates to vertical (pivot) position.

If the keyboard led SCR is not lid, the arcademonitor rotates to "normal" horizontal position.

At the moment it works with Mala, and I will try to make it work with gameEx too.

@Ede

thanks for your help and great Idea of autorotate an Arcadescreen!

Have a nice day

Posted

Hi Tom,

in case of a succsseful coding I will provide the plugin freely to the comunity as well as the plugin for mala.

I have downloaded the newest version of GameEx and had a quick look into the plugin folder. Unfortunately I'am a bad C coder :( so I have a another question: I'am looking for a list of events sending by GameEx. For the MALA plugin I used four events:

- MALAStart (is triggert when MALA starts. This is needed to control the parallelport)

- MALAGameselect (is triggert every time a different game is choosen in the actual list. This event returns the orientation of the choosen game also.)

- MALAGamestart (is triggert when the choosen game is started. This is the time to rotate the monitor to the orientation given by the return of the Gameselect event.)

- MALAQuit (is triggert when MALA quits. This is needed to control the parallelport too)

Are there such events / returns in GameEx? Espacially the return of the choosen game is important.

Again thanks in advance for your answere.

André

No problem, and I am happy to answer any questions, coding based or anything else.

If you decide your going to have a go at this, I am happy to provide you with a free license. Just let me know.

Posted

I think that the information you want is in the registry: HKEY_LOCAL_MACHINE, Software\GameEx\LCD

I wrote a couple of utilities that shows what happens to the values in the registry as you navigate in GameEx. Both of the utilities write the changes to a text file.

Registry.exe will make a note everytime any value changes.

Registry1.0.exe makes a note as a value changes while you are starting a game.

The .ahk (Auto Hot Key) files are the source files, and the .txt files are from the last time I ran the programs.

I know you are new here, but I get beat up alot. If this information does not help you, I apologize in advance.

Posted

Yes, you can do all that. Look at either the visual basic or c# projects. You will see the events.

In steps.

1. Extract the vb.net source code archive.

2. Open with Visual Studio 2005 or equivalent

3. Go to the Plugin.vb

3 A. Gameselect

Public Sub Event_GameSelect(ByVal InfoPtr As IntPtr)

Dim Info As Game_Info = CType(Marshal.PtrToStructure(InfoPtr, Info.GetType), Game_Info)

End Sub

Info contains the game info. When the sub is called in a MAME list the info.emulatorname will be "MAME"

3 B. GameLaunch

' Return true to tell GameEx process the event

' Return false to tell GameEx NOT to process the event

Public Function Event_GameRun(ByVal InfoPtr As IntPtr) As Boolean

Return True

End Function

Note Game info is passed here so to get it do

Dim Info As Game_Info = CType(Marshal.PtrToStructure(InfoPtr, Info.GetType), Game_Info)

When the sub is called in a MAME list the info.emulatorname will be "MAME"

The rom name is info.romname

3 C. GameEx Start

' return false if plugin does not initialize and GameEx will disable it

Public Function Initialize(ByVal InfoPtr As IntPtr) As Boolean

end function

3 D. GameEx Exit

Public Sub Event_App_Exit()

End Sub

The only real problem you have is finding out which games should be rotated. Your app needs to build the MAME game list, or it can read Gamelist.txt in the data folder. Yourll see the "V" and "H" in it. Then just match that to info.romname.

It will be be best to rotate the display on Game Launch.

Posted
I know you are new here, but I get beat up alot. If this information does not help you, I apologize in advance.
Yes, you can do all that.

Tom - You hit like a girl. :lol:

Posted

I've written a few plugins and I can help write this one if you like. I have a couple of methods to write to the lpt port in C#/VB.NET.

It should be a very easy plugin to write. Have you got the source to the original plugin? I can read Delphi fine, would just need the to know what needs to be sent to the lpt port.

Posted

Wow,

what a support!

@headkaze:

You're right, it is a very little and simple one, only a few lines to code. I think you will make a few german guys very happy if you can make it! :)

You can find the source at

www.members.dokom.net/aklasener/rotatescreen.zip

I can give you an "english" dokumentation of the whole project too.

You can see the plugin at work on my Cab in the link in my signature.

Posted

I thought I'd have a play about with the VB.net source but I can't seem to get it to do much.

It's like the plugin is working but GameEx is just ignoring anything I put it :)

I've modified Tom's Random Sound plugin, I haven't removed any of his code, all I done is uncommented and removed the trailing ; from the line

'App_RunCommand(App_CMD_Type.MsgBox, 0, "Hello Line 1", "Hello Line 2");

in Event_GameShowInfo

So I was expecting this to pop up a message when I went into a GameInfo screen but I get nothing.

I then copied the line and pasted it just before the 'Return True' in the Initialize function, this works as I get a message a soon as GameEx loads but still none in the GameInfo screen.

I also tried pasting it in the Event_Timer sub just before Toms line that plays the sound yet even though I can hear GameEx playing the random sound it doesn't display a message.

I've compiled in VS2008

Any ideas?

Stu

Posted

@headkaze or other programmer

I am using the same cabinet but with another hardware:

It would be great if you can make 2 plugins for the different hardware!

-one for ede with parallel port

-one for me with using one keyboard led for rotate (the SCR LED).

-or one with both (sending to parallel port and display the state via SCR-LED)

I add the source code for mala plugin here. It is done in Microsoft C++ 2008

http://wolfsoft.de/download/RotateScreenViaSCR.zip

// MaLaExternal.cpp : defines entry of DLL
//

#include "stdafx.h"
#include <iostream>
#include "MaLaEventLogger.h"


#ifdef _MANAGED
#pragma managed(push, off)
#endif

#define DLL __declspec(dllexport)

BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}

/******************************************************************************
* Rollen is the german word for SCREEN KEY
* this function make it possible to set the state of the SCREEN LED
******************************************************************************/


void SetRollen( BOOL bState )
{
BYTE keyState[256];

GetKeyboardState((LPBYTE)&keyState);
if( (bState && !(keyState[VK_SCROLL] & 1)) ||
(!bState && (keyState[VK_SCROLL] & 1)) )
{
// Simulate a key press
keybd_event( VK_SCROLL,
0x46,
KEYEVENTF_EXTENDEDKEY | 0,
0 );

// Simulate a key release
keybd_event( VK_SCROLL,
0x46,
KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
0);
}
}

/******************************************************************************
* here we get the Orientation of the current selected game
******************************************************************************/
extern "C" DLL void MaLaGameSelected(EventGame* g)
{
if (strcmp(g->VideoOrientation, "vertical") == 0)
vertical = 1;
else
vertical = 0;
}

/******************************************************************************
* at gamestart the monitor will be set to the correct position
******************************************************************************/
extern "C" DLL void MaLaGameStart()
{
if (vertical == 1)
SetRollen(true);
else
SetRollen(false);
}

/******************************************************************************
* at frontend start the monitor will be set to horizontal
******************************************************************************/
extern "C" DLL void MaLaStart()
{
SetRollen(false);
}

/******************************************************************************
*
******************************************************************************/
extern "C" DLL void PluginConfigure()
{
Beep(523,500);
// ** Insert Plugin Configure Window code here
}

/******************************************************************************
*
******************************************************************************/
extern "C" DLL void MaLaQuit()
{
}

/******************************************************************************
*
******************************************************************************/
extern "C" DLL const char* PluginName()
{
return "Rotate Screen via SCR";
}

/******************************************************************************
*
******************************************************************************/
extern "C" DLL const char* PluginCopyright()
{
return "2008 by [email protected]";
}

#ifdef _MANAGED
#pragma managed(pop)
#endif


Posted

I've just about finished writing the rotate plugin for GameEx but have hit a small snag. GameEx currently does not send a "VideoOrientation" value to the plugin. So I have sent an e-mail to Tom seeing if we can make a GameEx Plugin Version 1.31 to include some more data about the game including orientation.

PimpDaddyStu: I will release the plugin with source as soon as it's done and you can take a look at it.

Posted
PimpDaddyStu: I will release the plugin with source as soon as it's done and you can take a look at it.

Cheers headkaze

Stu

Posted
@headkaze or other programmer

I am using the same cabinet but with another hardware:

It would be great if you can make 2 plugins for the different hardware!

-one for ede with parallel port

-one for me with using one keyboard led for rotate (the SCR LED).

-or one with both (sending to parallel port and display the state via SCR-LED

Okay I added support for the LED method, so now we just need Tom to add the orientation output and I will release it :)

Posted

@headkaze

great thanks.

We need one more event

Currently I don´t use gameEX (but I will try it in the next days).

I am using a MaLA Theme with both designs (one for horizontal, and one for vertical).

Can you set set the screen to horizontal position and the design of the frontend to horizontal too, after frontend exit?

So we can use windows in an normal way :-)

thanks

Posted

If Tom does make a Version 1.31 plugin format then now is the time to ask him to add any extra events and commands. This would require an extra command to tell GameEx to rotate. This would be an App_CMD_Type.

So another question for Tom, can you add these two commands?

public enum App_CMD_Type : int
{
Exit = 0,
ShutdownPC = 1,
RestartPC = 2,
Minimize = 3,
Restore = 4,
ShowPicture = 5,
ShowWebPage = 6,
PlayAudioFile = 7,
LoadSnapImage = 8,
LoadBackgroundImage = 9,
MsgBox = 10,
RotateHorizontal = 11, // <----
RotateVertical = 12 // <----
}

Posted

Tom will be updating the plugin system soon, so this plugin will be released after the updates have been done.

Please if Ede and wolfsoft could lurk around so that when it is released I can get you guys to test it.

Posted

Cool!

Thanks again for the great support! I'll stay tuned waiting for to test...

  • 2 weeks later...
Posted
Tom will be updating the plugin system soon, so this plugin will be released after the updates have been done.

Please if Ede and wolfsoft could lurk around so that when it is released I can get you guys to test it.

any progress until now?

Until now I didn´t install gameex.

Is there a way to set the view of gameex menu to vertical after leaving a vertical game.

And to set the view of gameex menu to horizontal after leaving a horizontal game ?

look at this video for explanation (until now with mala)

Posted

That looks much better than I thought a rotating screen would look! I don't know what I was expecting, but nice stuff! Also, I didn't think it would be able to switch so quickly. If I build another cab, this is something I will definitely have to consider since I won't likely use another CRT (based on availability).

Guest
This topic is now closed to further replies.
×
×
  • Create New...