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: act-labs autofire idea  (Read 4363 times)

0 Members and 1 Guest are viewing this topic.

hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
act-labs autofire idea
« on: July 28, 2003, 09:48:42 pm »
Now that I'm addicted to Op. Wolf, I'm thinking of getting an Act-Labs lightgun.  I've read that it functions basically like a mouse, but I've heard it doesn't autofire.  Autofire works with a normal mouse, though, so I assume that the gun has some circuit that makes each press momentary only.  To fix it, is there anything wrong with stringing a wire down from the trigger to the control panel to make a normal pushbutton trigger, bypassing the momentary-only circuit?  Has anyone tried this (and succeeded or failed?)
There is SO a spoon.

TheTick

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 411
  • Last login:December 21, 2009, 12:24:27 pm
  • I.P. Daley
Re:act-labs autofire idea
« Reply #1 on: July 28, 2003, 10:20:45 pm »
I think you're missing something... how the light gun functions.
Everytime you squeeze the trigger, the screen flashes. Holding down the button (clickin' the mouse button) will only give you the single flash, hence the single shot.

You could modify the wiring to the trigger, and put a mini-circuit with a capacitor/transistor combo (or something... its been a few years) to essentially discharge every few microseconds and recomplete the circuit. As for as the guns circuit would be concerned you've been squeezing away at the trigger.

Otherwise hack a positional gun.
Mucal invader, is there no end to your oozing?!

hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #2 on: July 28, 2003, 11:30:11 pm »
oh I get it... I always thought that flash was just for effect.
I COULD add a little circuit, but that wouldn't be authentic either.  yucky.
There is SO a spoon.

hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #3 on: July 29, 2003, 12:05:33 am »
ooo ooo ooo just thought of something (yeah how annoying am I?)

this would require programming mame to do some special output, but heck someone programmed the recoil in T2 so...

unattach one side of the trigger from the gun circuit and string three wires down to your comp - trigger, trigger circuit and ground for both of them.  The trigger (and ground, smart people)  become a pushbutton, then program MAME to output to trigger circuit (and ground) when the gun fires (each pulse of the autofire).  Connect trigger and trigger circuit together when you want normal shooting mode.

Unfortunately, I'm not quite good enough at programming for this.  Smart MAME people, take note!
There is SO a spoon.

TheTick

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 411
  • Last login:December 21, 2009, 12:24:27 pm
  • I.P. Daley
Re:act-labs autofire idea
« Reply #4 on: July 29, 2003, 12:29:38 am »
that doesn't make sense!?

You want to physically fire the gun without activating the light sensor, and than have mame modified to  trigger the sensor on the light gun after the shot has already taken place?

Quit with the light gun, it isn't gonna do what you want it too.
Mucal invader, is there no end to your oozing?!

hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #5 on: July 29, 2003, 12:32:40 am »
no no no, pressing the trigger WOULDN'T set the thing off.  It would activate the button in mame.  then, mame would respond by setting the gun off, in machine gun fashion if the game supports it.  I think this is really how the arcades do it.

*

let me add some more info.  I'm really afraid of losing this idea.

Break the wire between the trigger and the circuit, and insert mame in the middle   8)  The trigger functions as a normal button ... the gun would fire in-game even if the light gun was away.  But, there's no sense in that.  What you need the rest of the gun for is positioning the cursor when you do fire.  MAME outputs to the trigger circuit each time a shot is made - this gives you the light flash and sends you the position of the gun.  It also gives you a left click each time, but forget that, as that isn't needed.  It's like pulling the trigger as fast as you can even though you have the machine gun.  What you need is a button that is steadily pressed down and a screen flash + position signal each time a bullet is shot.
« Last Edit: July 29, 2003, 12:48:11 am by hooded_paladin »
There is SO a spoon.

AlanS17

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5382
  • Last login:December 02, 2019, 08:35:48 am
  • I won't even pretend to be clever...
    • AlanS17
Re:act-labs autofire idea
« Reply #6 on: July 29, 2003, 02:05:27 am »
You can't remap a button because the the trigger press is in the gun fires off the shot independant of what MAME is doing. It's strictly an input device.

I don't think you could wire an autofire circuit, either. The screen would be constantly white washed and the gun wouldn't be able to detect where on the screen a shot was fired. It would be similar to the problem 2 light guns can have firing at the same time. Without autofire you are phsyically limited by how fast you can squeeze the trigger and the gun can actually keep up with that.


hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #7 on: July 29, 2003, 02:08:57 am »
that's why you physically disconnect one wire of the trigger...
then, pulling the trigger just activates a button in mame.  Mame then actually makes the gun circuit fire, but only to get the screen flash / positional signal.

No one gets it, do they?
There is SO a spoon.

AlanS17

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5382
  • Last login:December 02, 2019, 08:35:48 am
  • I won't even pretend to be clever...
    • AlanS17
Re:act-labs autofire idea
« Reply #8 on: July 29, 2003, 02:16:16 am »
The gun is an input device. It doesn't take orders from the computer. it only tells the computer what to do. As far as I know it can't share tasks. It just does its one thing and that's all.

The way the gun works is that it causes the screen to flash white with a video pass-through and then records the time it takes the rescan to reach the gun's sensor. This gives you a position. MAME can not tell the gun what to do and it's the gun that has to fire the white screen through the video pass-through. It can't work.


hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #9 on: July 29, 2003, 02:30:06 am »
The gun is an input device:  true.  It doesn't take orders from the computer, it takes orders from your finger.  BUT if you wire that trigger up to MAME, it can.  Mame tells it when to fire.  When mame tells it to fire, the screen flashes white and the mouse driver is sent the gun's position and a left click.

The way to program MAME for it is, whenever the arcade board says to query the light gun for input, MAME "pulls the trigger" of the light gun.  What this does is give it the position.  The physical trigger is now wired to a pushbutton or similar, making the game rom feel right at home - the pushbutton is being held down, the lightgun is giving it positional info several times a second and that positional info is used to aim a machine gun bullet.

Please, be open minded.  Just because the gun isn't made to accept input from the computer doesn't mean it can't.  This IS bypassing the "normal" function of the gun.
There is SO a spoon.

AlanS17

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5382
  • Last login:December 02, 2019, 08:35:48 am
  • I won't even pretend to be clever...
    • AlanS17
Re:act-labs autofire idea
« Reply #10 on: July 29, 2003, 02:32:44 am »
What I'm saying is the gun is "pushing" the game. The game is not "pulling" the gun. The game is not asking the gun for an input. The gun is just giving the game an input. I see where you're trying to go with this, but I can't picture it working.

U-Rebelscum is online around here somewhere... He could clear this up.
« Last Edit: July 29, 2003, 02:33:12 am by AlanS17 »


hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #11 on: July 29, 2003, 02:37:11 am »
in my special simplified version of an arcade board's i/o section, there's a common situation where the chips query the lightgun for positional info.  I anticipate that this is less than an inch farther from the truth.  To simulate this, MAME "fires" the gun and is then given the positional value, rather than having a direct link to the gun and 'asking' for the information.  This is a bit more indirect, but can work.

What you're talking about is tradition.  Traditionally, MAME can't ASK the gun for input.  The trigger gets pulled and the input gets sent to it.  but if mame controls the trigger, it can ask for input whenever it wants.
« Last Edit: July 29, 2003, 02:40:10 am by hooded_paladin »
There is SO a spoon.

AlanS17

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5382
  • Last login:December 02, 2019, 08:35:48 am
  • I won't even pretend to be clever...
    • AlanS17
Re:act-labs autofire idea
« Reply #12 on: July 29, 2003, 02:39:56 am »
If it were to work it would require a reprogramming of MAME and a rewiring of the trigger, thus rendering the trigger useless and defeating half the purpose of the gun.

On top of that, if it's not true to the original hardware then it will never be officially included in MAME.

How much do you like Operation Wolf? That much?


hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #13 on: July 29, 2003, 02:43:19 am »
If you connect the wires together (trigger and trigger circuit) you have a normally functioning gun.

It is extremely true to the arcade hardware.  MAME just has to replace "ignore querying the lightgun because we don't have a real lightgun" to " "pull the trigger" and get the input"

I'm not a good programmer, but a good one could pull it off.  C'mon, one more command line option, one more checkbox!

I'm going to bed.  I'd love to argue ... err... debate some more.  Really, it's not a traditional setup but it has real merit.  Does ANYONE get it?
« Last Edit: July 29, 2003, 02:52:01 am by hooded_paladin »
There is SO a spoon.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:act-labs autofire idea
« Reply #14 on: July 29, 2003, 05:00:39 am »
hooded_paladin, I think I "get it".  I also think you're trying too hard. ;)  Mame has enough on its hands, and the actlab lightgun is a little more "hardwared" than you seem to discribe.

To start off, AFAIK, Actlabs lightgun "trigger circuit" is closed the whole time you hold the trigger down; the "lightgun video box" is where the signal is changed to a single click.  Background: lightgun is connected to box, box also has video in from computer, video out to monitor, and a USB to computer (total 4 connections).  The lightgun "talks" to the box, the box itself is where all the possition computing occurs and sends the USB mouse signal.  

To do what you're saying needs a way for the computer to output a open/close circuit to simulate the trigger, edit mame so that it can open and close said circuit, and edit mame so it knows when to open and close circuit.  Inputs and non-sound non-video are spots mame doesn't emulate most of the original hardware, but "lets" the OS dictate how they are handled out of necessity due to OS limits.  Ask other programmers here on how hard it is to get windows to output a simple pulse for a Q-bert knocker.


An easier and, IMO, better solution would be to also wire the trigger to a second wire that instead of going to the box, goes to hacked joystick button or ipac/other encoder.  (The original wire to the box should be left in place, too.)  Then you can map "mouse button 1 OR joy1 button 1" as the game's shoot button.  Only problem will be the cursor won't move until you release and pull the trigger again, but at least you could see what's happening and the game keeps shooting until you release the trigger.

(I don't suggest wiring the trigger to a second mouse/ optipac because of windows sorry mouse input handling: if the second mouse sends its mouse button press before the lightgun box sends its mouse button unpress, windows will think the second mouse in not pressed anymore.)


If you don't mind only seeing a white screen, a different hack would be to add a cap or other pulsing circuit so the box sees a held trigger as pulses.  The plus would be it's the easiest, the cursor will track where you point the gun, and no need to edit mame.  BTW, this would look exactly the same as your suggestion (white screen as long as trigger is pressed).


Of course, the real arcade lightguns worked differently than actlabs' work.  They worked very much like you want mame to.  If you want to use real arcade lightguns, mame would need to do something like you say, but also with the help of a special arcade lightgun driver & extra circuits and wires.
Robin
Knowledge is Power

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:act-labs autofire idea
« Reply #15 on: July 29, 2003, 08:26:03 am »
btw, you CAN play it pretty well with a lightgun.... as long as you don't use bombs.

You place the other button on the gun as the normal trigger also.  So you hold that down and press the main button just to move the cursor.

but remember that you can buy a true op wolf gun for your computer for around 40 bucks on ebay (they come up pretty often.. been the going price) and 15 bucks for a hack.

I'm hoping to start work on another solution soon.  I've been really busy and haven't had any time.  My wife might squash my idea because my daughter (3) makes guns out of everything and says bang... my wife HATES it and thinks if I start working on a gun system for mame she will get worse.... Sigh....  I'm trying to tell her that I will hack a straw for the  until I get it working...


hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #16 on: July 29, 2003, 10:50:12 am »
U-Rebelscum, you're, um, CLOSER on track.  You explained that it's hard to emulate non-video or non-sound sound in MAME, which is something I didn't know.  But you have the wrong idea of how I want it to work.  I don't want the screen to stay white, or to fire an ungodly amount of bullets even in non-automatic games just by building an oscillator circuit.

You're idea of hacking the trigger to a button is halfway there - the machine gun keeps firing, but stays in the same place until you let go of the trigger and press it again.

Solution?  Disconnect that trigger from the circuit and have mame output a pulse, pressing and releasing the trigger each time a bullet is fired.  You get screen flash and positional data several times a second (whatever the rate of the in-game gun is)  but, to the game board, the trigger (a normal button) is being held down, just like normal.
Yes, if I were to use a real arcade gun, MAME would need to do exactly this.  But with a hack like this, you don't need an arcade gun and special drivers.  If someone wants to program it, yippee.  But don't faint and call me Satan just for proposing something somewhat nontraditional.

Lilwolf - what exactly are you planning?  sounds interesting
There is SO a spoon.

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:act-labs autofire idea
« Reply #17 on: July 29, 2003, 11:41:36 am »
Simple.... maybe

Put a UV light in the end of a gun... Then hook 3 sensers around the monitor.  So smooth tracking.  

Troubles are

1) A->D converts are expensive.  But I have someone who is selling a chip that will do it for 8 bucks each.   The trouble is that he doesn't have any reference boards to sell... so getting a prototype board will suck.

2) The inputs for the 3 light sensers will be a 3 axis joystick.  So I would have to modify mame to take the three inputs and convert them to screen inputs.  This shouldn't be all that hard, but if I can't come up with a easy way to configure it, then it would be a solution for me only.

3) How do I get a second gun?  Well there are two ideas.  One is two have a different light range (one UV and one infrred) or the second is too have two different light patterns being sent... but that would make it so I couldn't use my A-D chip I'm hoping to use....  So I'm hoping to get both a UV and an inferred solution... and allow them to work together....   But let me get one working first :)

Also, the A-D converter would also work for true arcade analog devices.  So if I can come up with a soltion for those at the same time, the board might be down right useful... But if I'm doing them by hand, I don't think it would be cost effective with the 1up starwars hack being about 20bucks with ebay items.

Will it have the accuracy needed?  depends on the optics.  Definatlely there, but will cheap optics be able to do it?  I will have to find out.



 

hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #18 on: July 29, 2003, 11:50:19 am »
that's a good idea ... sounds very, masterglove (although I know it didn't work like that)  all I can say is, depending on the distance of the gun, you'd get different ratios and amounts of light, unless you focus the beam well.  and if you focus the beam well, it won't ever hit all the sensors the way you anticipate(??!!)  good luck.

I still think just hacking the lightgun is the "arcade authentic" way... cuz the screen would flash just like it always does.  Heck, someone could add a solenoid and make it recoil.  Dreaming, yes.  But please please please someone get this into MAME.
There is SO a spoon.

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re:act-labs autofire idea
« Reply #19 on: July 29, 2003, 01:29:39 pm »
many modern shooters doesn't do it that way anymore..  

But yes, being able to configure it will be the problem... But they sensers have angle ranges that they will accept light.  The now have some that have a very wide range.  

This is why I'm trying to get a simple test case to find out really how bad the configuration issues will be.  I'm hoping that if you can configure it where you are standing, it will be pretty accurate while you are there... So if you don't move more then a foot or something it will be fine.  

btw, I don't believe this will be the best way to deal with sharp shooters since you will need to reconfigure it instead of screen res changes, but when you physically move.  But hopefully will work for them.  I'm more hoping for the machine gun type games... where your not looking down the trigger.  These will be MUCH more forgiving with small moves..

But once I get the time, I will try it and see if it's even doable.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 06:13:49 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:act-labs autofire idea
« Reply #20 on: July 29, 2003, 08:56:44 pm »
Man, this post is a mess.  Sorry, it's ust hard to follow.  

Answering the questions at hand:

Yes you could wire up an auto-fire circuit.  You could not, however, bypass the flash, as it's what is used to detect the position.  So bypassing the flash wouldn't do any good (duh).  However if the autofire curcuit is slow enough it might be bearable.  Let us not forget that t2 had a lighbulb in it's cab to simulate the flashing, so it's not too distracting.  

I think however, that the autofire ciruite would have to at lest be twice as slow as the autofire out there to make the game playable.  

Ok I'm done, just my 2 cents.  

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:act-labs autofire idea
« Reply #21 on: July 29, 2003, 11:09:47 pm »
Long post, in two parts.

U-Rebelscum, you're, um, CLOSER on track.  You explained that it's hard to emulate non-video or non-sound sound in MAME, which is something I didn't know.  But you have the wrong idea of how I want it to work.  I don't want the screen to stay white, or to fire an ungodly amount of bullets even in non-automatic games just by building an oscillator circuit.

How about instead: adjusting the pulse rate of the oscillator I suggested adding?  Easily done with a POT.  This way, it does not matter what game is being played, and very easy.

Almost all games check the inputs between each and every frame, in the hardware.  Since Mame emulates the hardware, this is why I said white screen as long as the trigger is held down.  Mame does not care how many times the ROMs check the inputs (although that's usually between each and every frame, too), nor does mame care how often the ROMs shoots a game per second.

Quote
Solution?  Disconnect that trigger from the circuit and have mame output a pulse, pressing and releasing the trigger each time a bullet is fired.  You get screen flash and positional data several times a second (whatever the rate of the in-game gun is)  but, to the game board, the trigger (a normal button) is being held down, just like normal.

You're still over simplifying "the ROM signals the gun to flash", mame, the original games, and the OS APIs too much.  Mame emulates hardware (CPUs, GPUs, MPUs, and a very few discrete circuits) and lets the original software (ROMs) do it's stuff; what you discribe here involves monitoring or hacking the original software, a "no-no" in mame.

Mame lets the ROM do whatever it wants.  The ROMs, however, determine the "in-game machine gun rate" (if there is one).  If you want to flash the screen when the game shoots for all games as you discribe, you need to hack the ROMs or at least monitor the (emulated) game memory closely (neither of which mame is designed to do).  The ROM determines when the gun goes off, and the location needs to be in "memory" before the ROM shoots, or else the game thinks the gun is shooting at the old location, at the same time the screen is flashed to get the new location (this new location becomes the old location without being used).  So mame needs to know far enough in advance to flash the screen and get the input from the gun, through the OS, into mame.  Assuming the only time limits are the monitor refresh rate, and the rate is @ 60 Hz (1/60 of a sec), mame might need two frames (1/30 of a sec) in advance if mame finds out it needs to flash the screen just after a screen has started, and if the shot is at the lower right hand corner (or off the screen).

Now, games where the ROMs did handle the "trigger -> flash -> location" in the original machines is another story.  Since the ROM already does what you want, no need to hacking the ROMs; Mame "only" needs to add a watch for the "flash now" signal to the drivers, emulation of the hardware in a portable way to the mame core, and add the needed OS specific I/O hooks to the OS depend code in a way the OS can handle.  With windows, this usually includes a driver of some sort.

-continued in next post-
spelling edit
« Last Edit: July 29, 2003, 11:12:49 pm by u_rebelscum »
Robin
Knowledge is Power

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re:act-labs autofire idea
« Reply #22 on: July 29, 2003, 11:11:03 pm »
-continued from last post-

Mmm, to take it form an other angle:

A simplified original arcade was something like this:
ROM <--> CPUs <--> memory <-- input device

While mame tries to fool the ROMS that it's the same, mame's setup is more like this:
ROM <--> emulated CPUs (mame core) <--> emulated memory (mame core) <--> mame (OS specific) <--> OS API <--> input device driver <--> input device.

Depending on hardware, a flash (shown as"~~>") in an original lightgun game went, depending on the game:
gun trigger --> memory --> CPU --> ROM --> CPU --> Video --> monitor ~~> gun sensor --> memory --> CPU --> ROM
or
gun trigger --> gun PCB --> video ~~> gun sensor --> gun PCB <--> memory <--> CPU <--> ROM

Actalabs lightgun is very much like the second way, except for the extra OS steps.
gun trigger --> gun Box --> monitor ~~> gun sensor --> gun Box --> USB driver --> HID mouse driver --> OS memory --> mame (OS specific) --> mame (core) --> ROM.

I thought you wanted:
gun trigger --> input driver --> OS memory --> mame (OS specific) --> output driver --> gun box ~~> gun sensor --> gun box --> USB driver --> mouse driver --> OS memory --> mame (OS specific) --> mame (core) --> ROM

Now I think you want:
gun trigger --> input driver --> OS memory --> mame (OS specific) --> mame (core) --> ROM (hacked?) --> mame (core) --> mame (OS specific) --> output driver --> gun box ~~> gun sensor --> gun box --> USB driver --> mouse driver --> OS memory --> mame (OS specific) --> mame (core) --> ROM

Notice how much longer your idea is if the ROM determines the flash.  There is at least more one frame between the trigger pull and when mame gets the input than the currect actlabs setup, and I'm glossing over the ROM hack/monitor that needs to be done.

Quote
Yes, if I were to use a real arcade gun, MAME would need to do exactly this.

Not necessarily.  Depends on how the gun is connected to computer, the OS, the driver the gun uses.  In order to get the closest to simulating as much as possible in software, yes.  But it should be done in hardware in most cases (ie: non-lightgun games such as OpWolf).

Quote
But with a hack like this, you don't need an arcade gun and special drivers.  If someone wants to program it, yippee.  But don't faint and call me Satan just for proposing something somewhat nontraditional.

Please don't confuse me with other people in this thread.  I don't even think they see you as satan either, but *shrug* it's your veiw.

As for writing stuff, if someone else writes an output directInput or win32 API compatable driver (probably a forcefeedback joystick) to signal the box, and someone does the output wiring to the box, and someone hacks the ROMs or changes the drivers, then I'll make the input/output changes in mame.  Notice: a) I take the easiest part ;D, b) the first two steps are out of my league, and c) hacking the ROMs and/or changing the drivers is the biggest part.
Robin
Knowledge is Power

hooded_paladin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:November 06, 2013, 08:59:01 pm
  • Finch! hahaha
Re:act-labs autofire idea
« Reply #23 on: July 30, 2003, 01:21:39 am »
MAME emulates hardware.  My thinking is, if the drivers used in MAME gloss over the lightgun input because we don't have an arcade lightgun, program part of that cycle to output a pulse.  The way I was describing it was more geared towards changing the roms.  Heck, I could be wrong.  But it seems, if HARDWARE is what MAME emulates than finding the lightgun handling won't be all that much digging.
There is SO a spoon.

grafixmonkey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 743
  • Last login:October 16, 2010, 08:16:50 pm
  • must... tear self... away from... Tron...
    • My graphics/arcade/circuits site!
Re:act-labs autofire idea
« Reply #24 on: July 30, 2003, 01:55:28 pm »
Since someone just posted about a site that had some cool fiber optics for cheap...   could a laser be mounted on a "lightgun" and an angled glass in front of the screen be placed to reflect some of the laser down to a grid of fiber optic cables, which would activate an "X-Y" position using ordinary photo sensors?

It would be a bit of work getting the fibers in place, but no more than building a circuit.

Oh yeah and lilwolf, if your options for A/D are so limited, why not try the oscillator / counter idea I mentioned?  those chips are about $0.75 each, so maybe $1.50 or $2.25 per A/D unit, 3 chips per A/D I think.  Voltage controls rate, pulses are counted every tiny fraction of a second and the pulse count is the D for your A.    Also fine-tuneable with pots.

And what hooded_paladin is getting at is that a trigger press should trigger the Mame software to repeatedly send logic 0 and logic 1 to the parallel port or something, and the parallel port should be connected where the trigger used to be connected.  It'd be a lot simpler to just stick an oscillator chip in the gun and have the trigger turn on the oscillator chip, on/off switchable with a double-throw switch.

Oh and there's no reason the Mame software would have to do that anyway.  Any background program could have a parallel or serial port send repeated on/off pulses when a certain key is held down.  (in windows)

But isn't there a point at which you're going to far too much effort to play like one or two arcade games just ever so slightly better than before?
-----------
-- See my grafix, circuits and cab on my
-- new arcadey page:  http://www.bkgrafix.net

rockhopper

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 116
  • Last login:December 26, 2015, 05:15:36 pm
  • I love orange soda!
Re:act-labs autofire idea
« Reply #25 on: July 30, 2003, 07:33:25 pm »
I Like u_rebelscums idea of the oscillator circuit, they are not that hard to make (probably cost less than $10) and with the pot it will be adjustable.  Hell, you could even make a few, wire them up to your normal buttons, and have an adjustable autofire for a whole heap of shoot-em ups.  Rapid fire Raiden anyone?

.....screw it, i think I'll do this myself  :D

grafixmonkey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 743
  • Last login:October 16, 2010, 08:16:50 pm
  • must... tear self... away from... Tron...
    • My graphics/arcade/circuits site!
Re:act-labs autofire idea
« Reply #26 on: July 31, 2003, 11:01:11 am »
I Like u_rebelscums idea of the oscillator circuit, they are not that hard to make (probably cost less than $10) and with the pot it will be adjustable.  Hell, you could even make a few, wire them up to your normal buttons, and have an adjustable autofire for a whole heap of shoot-em ups.  Rapid fire Raiden anyone?

Wow, it's amazing how fast information gets buried here.  
I posted a whole diagram about how to do exactly that a month or so ago.  Looking for the thread...   it is quite buried...
Since this seems to keep coming up quite a bit, maybe I should try and have it put on the site or something.
-----------
-- See my grafix, circuits and cab on my
-- new arcadey page:  http://www.bkgrafix.net

grafixmonkey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 743
  • Last login:October 16, 2010, 08:16:50 pm
  • must... tear self... away from... Tron...
    • My graphics/arcade/circuits site!
Re:act-labs autofire idea
« Reply #27 on: July 31, 2003, 11:09:27 am »
ok the thread is here:
http://www.arcadecontrols.org/yabbse/index.php?board=1;action=display;threadid=8877;start=msg67005#msg67005

should take you down to where the circuit is posted.
-----------
-- See my grafix, circuits and cab on my
-- new arcadey page:  http://www.bkgrafix.net