Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: MaLa Plugin compilation with Delphi5  (Read 6680 times)

0 Members and 2 Guests are viewing this topic.

Ede

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:January 25, 2013, 03:33:37 pm
  • Phoenix-Fanatic
    • HOMEPAGE (German only)
MaLa Plugin compilation with Delphi5
« on: October 11, 2007, 02:19:53 am »
Hi,

I would like to write a plugin for rotating my monitor in my Quadro cap automaticaly. I have downloaded the latest MaLa version and the plugin-sdk1.2. Now I try to compile the sample plugin "EventLogger" with Delphi5 but I don't understand the strukture of the plugin files. What are the files with the ending "mplugin"? How do I have to compile the sample plugin?
Would be very nice if someone could give me a little introduction...

Greets, André
In Play: Quadro Games MAME / PCB

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: MaLa Plugin compilation with Delphi5
« Reply #1 on: October 11, 2007, 02:49:30 am »
Hi, i suggest you mode to Delphi 7.

You can find Free version on the net or with some Delphi Book.


fatfingers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 966
  • Last login:April 17, 2025, 05:26:08 pm
  • Got UltraStiks?™
Re: MaLa Plugin compilation with Delphi5
« Reply #2 on: October 11, 2007, 09:14:34 am »

I do not know Delphi of any flavor.  However, speaking from a C++ perspective, the .mplugin files are just renamed .dll files.

Enjoy.

My DK low scores
-------------------
1) 180700
2) 165000
3) 162900
4) 162600
5) 158500


W.W.P.M.D.?                                       I'm here to help ... I just don't do it. ™

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa Plugin compilation with Delphi5
« Reply #3 on: October 11, 2007, 11:05:36 pm »
Hi, i suggest you mode to Delphi 7.

You can find Free version on the net or with some Delphi Book.


Yes indeed I Agree.. Delphi 7 or Turbo Delphi 2006.
Link for Turbo is on the Wiki to download for free...
http://wiki.arcadecontrols.com/wiki/Mala_Plugins


I do not know Delphi of any flavor.  However, speaking from a C++ perspective, the .mplugin files are just renamed .dll files.
Enjoy.

Same with Delphi

Ede

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:January 25, 2013, 03:33:37 pm
  • Phoenix-Fanatic
    • HOMEPAGE (German only)
Re: MaLa Plugin compilation with Delphi5
« Reply #4 on: October 17, 2007, 10:56:36 am »
Thanks for your answer!  :)
Now I see: *.mplugin is a DLL. I've just writen a short program (RotateScreen.dll) which reads out the orientation on a "MaLaGameSelected" event and sets two LEDs on a little window on or off, this works fine so far. The netxt is to control the COM-Port which triggers the electronic that will turn the monitor automaticaly. Hope this will work so fast also.
If everthing works fine I'll present the result here.

Greets, André
In Play: Quadro Games MAME / PCB

SGT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:May 31, 2025, 10:10:32 pm
Re: MaLa Plugin compilation with Delphi5
« Reply #5 on: October 17, 2007, 03:23:14 pm »
The netxt is to control the COM-Port which triggers the electronic that will turn the monitor automaticaly. Hope this will work so fast also.

Interesting.  What kind of hardware are you using to actually turn the monitor?

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa Plugin compilation with Delphi5
« Reply #6 on: October 17, 2007, 07:34:48 pm »
Thanks for your answer!  :)
Now I see: *.mplugin is a DLL. I've just written a short program (RotateScreen.dll) which reads out the orientation on a "MaLaGameSelected" event and sets two LEDs on a little window on or off, this works fine so far. The next is to control the COM-Port which triggers the electronic that will turn the monitor automatically. Hope this will work so fast also.
If everthing works fine I'll present the result here.

Greets, André

Tip 1)  You probably don't want to fire the command to the com port until game start. The game selected value get's changed as you scroll through the list (if you have the options set in options-gui-options-display delay gameselect-event checked). You don't want to run the risk of burning out your motor as you scroll through. I have this option slected on my cab as I want my LEDS and LCD to update value's on the fly becuase it looks cool.  It would not be cool to have the monitor shakking back and forth

Better to have a line to store the orientation on 'game select' into a global variable and just issue a rotate command on game start.

Tip 2)  To avoid loading up MaLa all the time while testing your plug-in. You can use a great tool made by ARZOO.  This app has a button for every MaLa Plug-in trigger.  In your case you should click them in order (eg maLa start -game select- game start)  http://mala.arcadezentrum.com/easytrack.php?id=pluginSDKv1.2

I wrote the serial-display plug-in so I'm sure this plug-in is do-able.  But I found serial coms using a dll a bit of a pain in Delphi. But then again I'm a newbie coder.

Good Luck and have fun   ;D

P.S What version of Delphi did you end up using?

« Last Edit: October 17, 2007, 08:37:16 pm by loadman »

Ede

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:January 25, 2013, 03:33:37 pm
  • Phoenix-Fanatic
    • HOMEPAGE (German only)
Re: MaLa Plugin compilation with Delphi5
« Reply #7 on: October 18, 2007, 04:52:29 am »
@SGT:
I'am using a german cab called "Quadro Games". The manufactorer is a german company called "Quadro Games Automatenbau oHG", this cabs are later licensed by Konami. The special thing of this cab is that you can use four JAMMA-games (PCBs) at once and the monitor (Hantarx mtc9000) is turable. Outside the cab on the control panel is a switch to select the game. You can choose the orientation of each game installed on one of four seperate PCBs with a simple "on-off" switch inside the cab, on is horizontal, off is vertical. If you choose one of the four games with the game-select-switch on the CP, the monitor will turn automaticaly to the appointed orientation. When I use MAME I have to set the on-off switch by Hand when I want to play a game with another orientation. Sadly this switch is badly gettable because it is deep inside the cap. So I allways have to open the frontdoor and to fummble in the dark cab ;-).
I could simply bring this switch to the outside of the cab but cause I'am using MaLa I get the idear of turnig the monitor automaticaly even when I use MAME.

@loadman
Thanks for your tips again, this tool (MaLa Stub) is a big easement!
I'am using Delphi5 as said and it works fine so far. To access the COM port I will use a freeware DLL which usese the WinAPI functions.

The lot should be working as follows:
Each time I select a game in MaLA the orientation will be written and given to the elektronic by setting a pin on the COM-port high or low witch stands for a orientation (for example high is horizontal, low is vertical). When I start the game this orientation will be given to another pin witch will be set high for a secound. This will set power to the coil of a "on coil latching relay". This relay will replace the on-off switch on the pcb in the cab. I chose this relay because  it will "remeber" the orientation when the cab power is turning of. On the netxt turn on MaLa starts with the last selected Game and the orientation should fit.
The next weekend I'll finish the program and make the electronic circuit. Next comes the testing. If everything goes well I make a detailed description.
In Play: Quadro Games MAME / PCB

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa Plugin compilation with Delphi5
« Reply #8 on: October 18, 2007, 07:48:45 am »
@loadman
Thanks for your tips again, this tool (MaLa Stub) is a big easement!
I'am using Delphi5 as said and it works fine so far. To access the COM port I will use a freeware DLL which usese the WinAPI functions.
OK Yeah I was avoiding using an external DLL to make it more simple for the end user, but it became more painful for me.  :(

Sounds like you know what your doing and have a good plan   :cheers:  Keep us informed of ypur progress and possibly a pic / video too please :)

Ede

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:January 25, 2013, 03:33:37 pm
  • Phoenix-Fanatic
    • HOMEPAGE (German only)
Update: MaLa Plugin compilation with Delphi5
« Reply #9 on: November 09, 2007, 07:09:49 am »
Short Update:

The hardware is made and tested manually.
The software is written and seams to be ok.
This weekend I'll install hard- and software in the cab and test all together. When it works I'll document everything and make a little video.
In Play: Quadro Games MAME / PCB

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa Plugin compilation with Delphi5
« Reply #10 on: November 09, 2007, 04:48:30 pm »
 :cheers:

Don't forget to post details in the plug-in section of the MaLa Forum  :-)
« Last Edit: November 24, 2007, 07:21:29 pm by loadman »

Ede

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:January 25, 2013, 03:33:37 pm
  • Phoenix-Fanatic
    • HOMEPAGE (German only)
Finally its done!
« Reply #11 on: November 20, 2007, 01:56:32 pm »
Hi there,

finally I made it! :)
The hardware was put together and tested successfuly. The RotateScreen.mplugin works perfect too.
I made a complete documentation with explanatory notes, pictures, plans and the sourcecode also. But right now its written only in german. I'll translate it this week. When its finished, I'll put it on my site for to download.
Here is a little video witch shows my Quadro in aktion:

http://www.members.dokom.net/aklasener/RotateScreen.dvix

Have fun!
Andrč

In Play: Quadro Games MAME / PCB

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: MaLa Plugin compilation with Delphi5
« Reply #12 on: November 20, 2007, 05:19:40 pm »
 :P