Main > Main Forum

LED-Wiz USB LED and Output Control Device now available. *Blinky lights*

Pages: << < (27/92) > >>

SirPoonga:

Ahhh, right.  First, search msdn for setclipboard data.
then open mame/src/vidhrdw/gottlieb.c

To the includes add

--- Code: ---#include <stdio.h>
#include <windows.h>
--- End code ---

Then find
WRITE8_HANDLER( gottlieb_video_outputs_w )

after the extern statement define this

--- Code: ---HANDLE hText = LocalAlloc(LPTR, 64000 + 1);
char *pText = hText;
--- End code ---
Yeah, it should be more than enough memory for the knocker, probably could cut that 64000 down abit :)

comment out line

--- Code: ---if ((last&0x20) && !(data&0x20)) gottlieb_knocker();
--- End code ---

Now, depending on how often the ledwiz software monitors the clipboard will determin if all of this needs to be implements.  If it doesn't monitor it often enough. delete the second if statement and put in a timed animation for the ledwiz code.
Otherway you will have to supply the appropiate ledwiz command to turn on and off.


--- Code: --- if(data&0x20)
{
//Knocker On
strcpy(pText, "LEDWIZ CODE TO TURN KNOCKER ON");
strcat(pText, "\r\n");
if(!OpenClipboard(NULL))
{
printf("Couldn't open clipboard\n");
}
if(!EmptyClipboard())
{
printf("Couldn't empty clipboard\n");
}
if(!SetClipboardData(CF_TEXT, pText))
{
printf("Couldn't set clipboard\n");

if(!CloseClipboard())
{
printf("Couldn't close clipboard\n");
}   
}
if (!(data&0x20))
{
//Knocker Off
strcpy(pText, "LEDWIZ CODE TO TURN KNOCKER OFF");
strcat(pText, "\r\n");
if(!OpenClipboard(NULL))
{
printf("Couldn't open clipboard\n");
}
if(!EmptyClipboard())
{
printf("Couldn't empty clipboard\n");
}
if(!SetClipboardData(CF_TEXT, pText))
{
printf("Couldn't set clipboard\n");

if(!CloseClipboard())
{
printf("Couldn't close clipboard\n");
}
}
--- End code ---

I am not sure if strcat(pText, "\r\n") is needed, you can try without that.  But it won't hurt.


Toonces:

Thank You SirPoonga! I will play around with this over the weekend. I am also looking forward to any upcoming software you might release. Do you think you might do something like a combined set49way & led program come out of this (something that does both 49 way sticks and led's using the same commandline app)?

Thanks Again,

Toonces

SirPoonga:

Probably not as you can put both in a batch file.  Plus you'd want to run them at different times.
The ledwiz you'd want to run when the game is selected in the frontend.  The set49mode you will want run just before the game is launched.

Cameronj:

OK I just bought a beta version. It will be interesting to see what I can figure out with this sucker. I am not sure of what I want to do yet.

I need to find a good source for bright leds that aren't too expensive.

MrTroy:

Open Beta.....  :-\

* goes to sell a few things for cash*

Pages: << < (27/92) > >>

Go to full version