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: Site for PC-to-Hardware serial project  (Read 8336 times)

0 Members and 1 Guest are viewing this topic.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Site for PC-to-Hardware serial project
« on: September 16, 2004, 11:47:02 pm »

I've added a link in the left menu of this misc arcade circuit page for starting the serial port PC-to-Hardware interface project:

http://members.rogers.com/druins22/arcade/
http://members.rogers.com/druins22/arcade/CabOS

It's just a skeleton page for now with the brief descriptions of what the concept is about and example uses of a PC controled hardware cabinet setup.

So far I have working visual basic 6 code to let me send/receive on the serial port (tested in XP so far), I have less than 24 hours of visual basic programming experience.

I also already have from a previous project, a hardware microcontroller that can send and receive serial.

Now all I have to do is mesh them and start testing things out.  I haven't posted actual code/schematics yet, that will follow.

Totally open source project idea.  I hope to be able to think of some simpler practical uses for this because right now the only legit use I have would be rotate the monitor, which not a lot of people would make use of...

Why are all of my "ideas" so small-market-niche??  Keeps it personal I guess.
« Last Edit: September 18, 2004, 10:55:28 pm by Druin »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:June 20, 2025, 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Site for PC-to-Hardware serial project
« Reply #1 on: September 17, 2004, 12:22:58 am »
Well I Haven't looked yet, but it might be useful to me.  I have a gorf cabinet that'll probably need a pc (boards are dead)  the gorf machine has a lighted rank bezel that needs controlling.  I've said for ages that a universal i/o system needs to be implemented in mame, but the problem is it has to be a solution that's cross platform and fairly generic.  

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Site for PC-to-Hardware serial project
« Reply #2 on: September 17, 2004, 05:37:08 am »
Cool :)

Thinking about it I suppose this could be used to switch a monitor on/off (I think ArcadeOS can do this, for monitor protection purposes).  While protecting the monitor isn't an issue for me (ArcadeVGA), it would be a good way of hiding POST & Windows startup (& shutdown) screens.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #3 on: September 17, 2004, 07:09:04 am »
Yeah the cabinet could be set up with the monitor's power switch on its own controlled circuit so that a startup program can power it up when windows boots (3rd party in startup folder) or when the FE auto-launches after windows boot if the serial is to be controlled from FE directly.  Then if someone powers on the cabinet, monitor is blank until it's ready and windows is set up to run MAME after boot.  As long as there's no crashing.  The circuit could have a 2 minute timeout so that if it hasn't been instructed to power on within that time, it will come on and then you can see what went wrong  (I posted another project for power on delay triggering, which may be useful in that).
Likewise when shutting down, kill monitor power before anything else to avoid seeing the useless stuff and have a 2 minute time-out that kills everything if it's taking too long and likely crashed anyway.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Site for PC-to-Hardware serial project
« Reply #4 on: September 17, 2004, 09:12:42 am »
Yeah the cabinet could be set up with the monitor's power switch on its own controlled circuit so that a startup program can power it up when windows boots (3rd party in startup folder) or when the FE auto-launches after windows boot if the serial is to be controlled from FE directly.  Then if someone powers on the cabinet, monitor is blank until it's ready and windows is set up to run MAME after boot.  As long as there's no crashing.  The circuit could have a 2 minute timeout so that if it hasn't been instructed to power on within that time, it will come on and then you can see what went wrong  (I posted another project for power on delay triggering, which may be useful in that).
Likewise when shutting down, kill monitor power before anything else to avoid seeing the useless stuff and have a 2 minute time-out that kills everything if it's taking too long and likely crashed anyway.

Exactly :)  I'd certainly be interested in adding stuff to my FE to enable this as I'd like to setup my cab like this...

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #5 on: September 17, 2004, 06:11:55 pm »
Just a matter of time...today I received a Digikey order with a spare micro controller that has the serial port I'm familiar with using on the hardware side, so I can start implementing a protocol like the one I spontaneously devised on the project site yesterday.
I wish the PIC chips were more easily flash-able than they are...maybe I should look more into it, maybe they've gotten more 3rd party support.  It would make it easier for people to clone the project then.  

Well if this is the type of control you want over a cabinet, that is what you will ultimately have, if I have to burn you a chip myself in the end.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:June 20, 2025, 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Site for PC-to-Hardware serial project
« Reply #6 on: September 17, 2004, 06:25:51 pm »
Another possible use.... combine the interface with an Ir emitter and use it to "auto set" problem televisions.  Many tvs don't stay in aux mode when they are powered down.  It would be nice to have a device that changes the channel for you upon bootup.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #7 on: September 17, 2004, 08:37:45 pm »
That's sort of the inspiration of the power on delay timer project - without having to bother with IR (protocols, different vendors..etc)   if a TV has a physical switch that can be interfaced with, then by configuring the number of times a switch needs to be pressed to set a TV in a certain mode after power on, the circuit can do that by hard wiring to the switch and taking control.  

If all TVs had the same IR code that would be feasible to try to copy...but a switch can be commanded instantly.

Of course one can always try to learn the IR code of a given device by having it send its pattern into a receiver and then replicate that for output....but it's much more fun and simple to just hack the switches to bits...and if the "function" change is only available on the TV's remote.....then lodge it in a fixed location aimed at the TV detector, hack its button on the remote....and control that.

I think within the scope of of these sorts of projects, a circuit to learn IR codes would be more feasible by buying a cheap learning-remote and have that custom programmed to a required remote button, then hack the hell out of that slave remote and command it electronically (preserving the native remote).....unless someone were particularly interested in designing a learning-IR circuit and had the time for that.

Anything is possible. IT's just a question of how to do it best.
« Last Edit: September 17, 2004, 08:41:32 pm by Druin »

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #8 on: September 19, 2004, 11:29:33 pm »
Over the weekend I managed to do a small tryout of the protocol I'm developing for the PC to Hardware project.  I started writing News on the main page, which outlines that I updated the Hardware page with some sample code.

http://members.rogers.com/druins22/arcade/CabOS/

So far it's been about half a week since I decided to start this project and so far I've had working VB serial port code and microcontroller code with a partial implementation of the command protocol.  

Depending how much time I have in the days to come, by the weekend I could possibly have an operational project that people could begin to use if they had a need and the resources to use this stuff (chip programming mostly).


danny_galaga

  • Grand high prophet of the holy noodle.
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 8519
  • Last login:June 21, 2025, 01:55:06 am
  • because the mail never stops
    • dans cocktail lounge
Re:Site for PC-to-Hardware serial project
« Reply #9 on: September 20, 2004, 09:02:59 am »
rotating monitor is right up my alley (",)


ROUGHING UP THE SUSPECT SINCE 1981

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #10 on: September 20, 2004, 06:44:29 pm »
rotating monitor is right up my alley (",)

That image is what I am planning to make a reality in a stand up cab version...

I'm going to try hacking up a little wooden test-bed to support the LCD and just test out the project on that with a monitor sitting there cocktail style and try it all out, since I have no real cabinet.

I have a feeling there' s   a trip to home depot in the near future for some "scrap" wood and rotation-support casters.

I already have a hefty DC motor and power supply that can handle 9 amps continuous/20 amps peak from scrap parts at work (Good to work at a place that designs stuff based on electronic-controlled electromechanical machines (Photocopiers))

SirPeale

  • Green Mountain Man
  • Global Moderator
  • Trade Count: (+23)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 12963
  • Last login:August 04, 2023, 09:51:57 am
  • Arcade Repair in New England
    • Arcade Game and Other Coin-Op Projects
Re:Site for PC-to-Hardware serial project
« Reply #11 on: September 20, 2004, 08:56:43 pm »
(",)

What is that, exactly?  You keep putting it in your messages.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Yesterday at 08:15:15 pm
  • The Bears Still Suck!
Re:Site for PC-to-Hardware serial project
« Reply #12 on: September 21, 2004, 12:26:07 am »
I suppose one could control a qbert knocker with this...

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #13 on: September 21, 2004, 12:58:44 am »
Is there something implemented that can flag when a knocker should actuate at loss of life?  I forget what I read somewhere about how Mame handles that, I thought I saw that there's some kind of support for it.

froggerman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 311
  • Last login:March 01, 2015, 03:23:14 am
  • You want how many buttons?!
Re:Site for PC-to-Hardware serial project
« Reply #14 on: September 21, 2004, 01:56:54 am »
I believe someone modified MAME to activate the Caps lock light at loss of life and then built a solenoid driver and used the Caps lock to trigger it.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:June 20, 2025, 12:57:54 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Site for PC-to-Hardware serial project
« Reply #15 on: September 22, 2004, 02:25:52 am »
Which is bad as other games use that light and if you are typing (or in xp) the knocker can get stuck in the on position, thus burning it out


Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #16 on: September 22, 2004, 06:49:28 am »
Which is bad as other games use that light and if you are typing (or in xp) the knocker can get stuck in the on position, thus burning it out

Or you can use the technique I plan to use for knowing when to rotate a monitor by launching mame from a batch file where you  sense the game and if it is Qbert, launch a commandline version of the PC com software that will enable some hardware address and then the kicker will only fire when caps lock says so AND the hardware enable says you're using caps lock in Qbert.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #17 on: September 26, 2004, 04:42:32 am »
I just updated the site with a tryout hardware schematic for the microcontroller and the latest firmware for the chip.

I have it setup with 8 logic channels that have an LED on each channel for confirmation and I tested the program through Hyperterminal.  I was able to turn the channels on and off, and request the status of each successfully.

Now I'll go back to work on the Visual basic program to control the serial port commands.  The hardware could be put to use as-is now if only 8 channels or less were needed.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Yesterday at 08:15:15 pm
  • The Bears Still Suck!
Re:Site for PC-to-Hardware serial project
« Reply #18 on: September 26, 2004, 09:52:51 pm »
i know exactly how to have qbert work with this given some details (or more reading on my part).  Kelsey and I were looking into this with a real gottlieb solenoid.  The biggest problem was testing it as he developed the hardware and I was working on the software.  Also the 27v to power the knocker inside a PC run arcade cabinet.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #19 on: September 26, 2004, 10:46:49 pm »
Do you know more specs on that solenoid, like the running current?  Is there a data sheet around the net?
I wonder if a simple voltage doubler type of circuit would work that could take a PC 12 volt supply and step it up with enough current.    

I was involved in some DC voltage doubling circuits back when I experimented with Helium Neon lasers and it used a 555 based oscillator and some capacitors/diodes to stack the supply voltage....with the tradeoff being lower output current at higher voltages.  

Of course an inductor requires nice current and I don't have practical experience in power boosting for that, but it may be worth some research.  The solenoids I use at work are 1amp or less, I don't know how they'd perform for kickers. They run on 24volts.

In the end, the trade off may be - do we want to really have to stick to PC power and then go out of our way to source and assemble all kinds of fancy power doubling components...or do we just want to say buy/build a 27 volt power supply and be done with it.

When we start getting into this stuff we may have to accept that we need to add more hardware and tear away from the PC foundation as a serve all resource...

I'm fortunate enough to have a scrap power supply from work that puts out 5volts at 4amps and 24volts at 9amps average, 20amps peak, so I can rotate my monitor, kick as many solenoids as I want, probably run a basement full of cabs off of it, so I haven't worried about power but I'll see if I can find out anything about running solenoids on a budget.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8187
  • Last login:Yesterday at 08:15:15 pm
  • The Bears Still Suck!
Re:Site for PC-to-Hardware serial project
« Reply #20 on: September 26, 2004, 11:24:06 pm »
All i can tell you is what is on the instruction manual for wbert.
http://www.klov.com/game_detail.php?letter=Q&game_id=9182

Kelsey might now more or have a spec sheet.  I'll point this thread out to him.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #21 on: September 27, 2004, 07:36:13 pm »
Today I looked around and found a solenoid made by Solen, and it had a spring for the plunger and a plastic end cap as well on the plunger, good for kicking with, so I wired it up straight to 24 volts just to check it out.  When this kind actuates it pulls the plunger in, and when power is released the spring will provide the kick out.  

The particular spring I have, I don't think is meant for this solenoid, it's a bit too much force, so I found I had to help push in the plunger until it has less than 10mm to go, then it sucks in with a great force finally (I think it's also not the proper plunger but it's all I have for experimenting).

So I held the solenoid above my desk (wood) with power off, and pushed it towards the desk, compressing the spring until there was about 10mm to go in the plunger travel towards pull-in, so the plastic end cap is making contact with the desk at this point and the spring has tension.

I gave it power and the plunger sucked in, then I let power go and the plunger kicked the desk with an ok impact noise.  I don't know how it would work with a cabinet environment, and ambient game noise, if a stronger solenoid would be needed or several smaller ones like this one, but it is also impacted by what the kicker is hitting. WHen I tried a more solid 1" wood target, it was more of a little click noise of course, but with the other table, it was ok for a first try.

Either way it's the concept we're looking to validate and when I'm ready I can use it to do the Qbert tryouts.

Being a 24volt solenoid, I tried at 12 volts just for the hell of it.  It was pitiful.  If you want to use a solenoid you have to give it the proper voltage it needs for sure, and a few amps.  There's no way around it.  I'm using a lab power supply that can put out up to 30volts and 6 amps and I have it set for 24v for this.  

« Last Edit: September 27, 2004, 07:59:34 pm by Druin »

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #22 on: September 27, 2004, 08:03:43 pm »
I managed to make a quick video clip of that solenoid in action as described with holding it close to the desk to get it to pull in, then letting it whack.



It sounds a lot louder in person than on the clip.

So to use a solenoid in this fashion, keeping it idle with spring tension pushing against the kick target and requiring a pull in-and-release in order to kick, a control circuit would just turn on the power for a half second to pull it in, then release to kick with the spring as the driving force.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #23 on: October 14, 2004, 01:19:41 am »
I've been putting spare time into the PC to Hardware project for the past 2 weeks on the PC software end and so far I have a working GUI with simple on/off functions, plus a skeleton of a command line version that would allow running from a batch file, sending commands and exiting without GUI.

I'm going to clean up the source and finish off some features and then post the source code.  That would finalize a working PC and Hardware project that could be customized as needed, but of Course I'll continue expanding it, showing more elaborate hardware control techniques rather than simple logic hi/lo outputs.  

Here's a screenshot of one of the visual basic prototypes.  

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Site for PC-to-Hardware serial project
« Reply #24 on: October 14, 2004, 04:55:28 am »
Great news!  Looks like your getting on well with VB... :)

I was just looking at the your hardware page - how difficult is it to make the circuit?  I'm quite happy with simple wiring but my experiences with making circuit boards usually resulted in things being broken!  :D

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #25 on: October 14, 2004, 07:09:08 am »
My success in VB is the result of 3 things so far:
Planet source code
Programmers Heaven
XtremeVBtalk (Did I see your name over there when I was searching on a few topics?? Something about mouse stuff and math stuff. I think I came across that when I was trying to figure out "Why can't I scroll in the source code text editor with the damn mouse wheel?")

The circuit in this case is VERY simple to solder up, not really a mess of wires etc.  Suppose you had the microcontroller and other parts, recommending to use chip sockets too.  Well, solder in the chip socket, then the supporting components for the micro are the crystal and 2 capacitors for it (or a crystal with built in capacitors, even easier, I discovered those at Digikey recently), and that's it, just wires from outputs to whatever is going to be controlled.

Of course also required is to solder the RS232 circuit, which is again just a chip socket and 5 or 6 capacitors to solder, and wire it up to the micro and to an RS232 connector.

Maybe eventually I'd solder a prototype and document the way I did it with pictures.  Building the other stuff like the actual power side driver circuits being controlled may be a bit more stressful like if someone had to build a fancy DC motor bidirectional controller from scratch for a rotating monitor, there's a bunch of discreet components to solder up in the way I'd do it and I'd find it annoying myself but I can take scrap drivers from work so I'm going to shortcut that.

I never looked into those "easy" things like the web site with the circuit board making facility where you can create a schematic AND board layout with their own software and then order the board, I don't know if it is cost effective but if so, it should be easy to build the circuits that way and have a board made if people wanted, then it's definitely easy to solder.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Site for PC-to-Hardware serial project
« Reply #26 on: October 15, 2004, 06:25:12 am »
XtremeVBtalk (Did I see your name over there when I was searching on a few topics?? Something about mouse stuff and math stuff. I think I came across that when I was trying to figure out "Why can't I scroll in the source code text editor with the damn mouse wheel?")

Quite possibly, I do post in some of the VB boards occasionally - don't recall XtremeVB tho...

Quote
Maybe eventually I'd solder a prototype and document the way I did it with pictures.  Building the other stuff like the actual power side driver circuits being controlled may be a bit more stressful like if someone had to build a fancy DC motor bidirectional controller from scratch for a rotating monitor, there's a bunch of discreet components to solder up in the way I'd do it and I'd find it annoying myself but I can take scrap drivers from work so I'm going to shortcut that.

That would be great...I'd like to see it :)  I'm mainly interested in powering my monitor on/off, so hopefully that wouldn't be too difficult...

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #27 on: October 15, 2004, 05:03:09 pm »
Depends how the monitor power switch is setup, if it's an AC switch or a logic enable kind of power switch....you could either way use a Relay for a quick fix no matter what kind of power switch it has since a relay IS a mechanical switch.
Then the interface circuit for the hardware control is simple, just a digital output port line connected to a series resistor, going to a transistor, which is in series with the relay coil and associated power/protection minor hookups.  Then connect the monitor power switch wires to the relay switch wires. Done.  

I'll be drawing up schematics for any of these applications that people come up with.

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #28 on: October 17, 2004, 04:12:42 am »
I just posted the VB6 source code and a compiled setup install file on the site for the PC program as it stands right now.

I implemented the commandline mode so the program can be launched stand alone with a GUI for manual hardware control or from batch file/command line prompt to go send a command to serial port and quit automatically.

It's been tested with my breadboarded hardware and test LEDs so I know it does send the commands successfully in GUI and command line mode.  

The project has officially reached its functional stage. Now it just needs to be enhanced as time goes on.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Site for PC-to-Hardware serial project
« Reply #29 on: October 18, 2004, 06:14:47 am »
The project has officially reached its functional stage. Now it just needs to be enhanced as time goes on.

Cool :)  I just added the ability to launch up to 3 apps from MAMEWAH, either by keypress (or mouse/joy) or by auto-launching prior to emulator launch.  This could be used to launch your app. using a commandline to rotate monitor etc...

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #30 on: October 19, 2004, 03:03:38 am »
And since I don't HAVE a cab, and it may be too tedious to rig up my desktop LCD to rotate for experiments...maybe I'll hook up a motor to a piece of cardboard with a Galaga ship hand drawn on it and rotate that for the purpose of testing it all out...see if I can get mamewah to help auto rotate something.  Then someone else can turn the fantasy into reality until I get to do that myself

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Site for PC-to-Hardware serial project
« Reply #31 on: October 19, 2004, 07:27:12 am »
From what I can tell I think you could do it like this...

In \mamewah\ini\mame.ini:

### External Application Settings ###
app_1_executable                          c:\cabos\cabos.bat
app_1_default_options                   [orientation]

auto_launch_apps                           1


Now in cabos.bat (pseudo-code ::) ):


If %1 = "Vertical" goto vertical
If %1 = "Horizontal" goto horizontal

:vertical
rem switch on channel 1 to rotate clockwise
c:\cabos\cabos.exe cC:S:01x
exit

:horizontal
rem switch on channel 2 to rotate anti-clockwise
c:\cabos\cabos.exe cC:S:02x


(Please correct the batch file accordingly, I don't yet fully understand how one would control the rotation via cabos commandlines...)

Launching a game from MAMEWAH would first launch the batch file, replacing [orientation] with the orientation of the selected game, eg 'c:\cabos\cabos.bat Vertical'.  Then CabOS would do it's stuff, and finally the game would be launched :)

BTW the MW stuff above is in my WIP build and not quite finished, email me if you need in to try...

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #32 on: October 19, 2004, 07:40:42 am »
Everything would work except instead of the "Set" command for channel 1 and 2, we'd use the unimplemented momentary trigger command so it will automatically just pulse the channel high and then return to low until next trigger, otherwise we'd have a latched channel that needs to be somehow cleared.
So Mamewah will automatically pass vertical or horizontal info based on the game?  That's very useful for this to work.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Site for PC-to-Hardware serial project
« Reply #33 on: October 19, 2004, 07:45:27 am »
Everything would work except instead of the "Set" command for channel 1 and 2, we'd use the unimplemented momentary trigger command so it will automatically just pulse the channel high and then return to low until next trigger, otherwise we'd have a latched channel that needs to be somehow cleared.

I see, I wondered how it would be 'stopped'!

Quote
So Mamewah will automatically pass vertical or horizontal info based on the game?  That's very useful for this to work.

Well I have just added this feature mainly for sending romnames and parent romnames for the purposes of controls.dat viewer applications.  With your project in mind adding the option to send orientation (& possibly some more info) seems like a good idea :)

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #34 on: October 19, 2004, 05:06:05 pm »
It would be convenient if a front end sent all pertinent discreet details that could be useful in hardware control projects but even if just the game name is passed, that would be useful enough that the batch file could run another program to go digging for that rom set info and find out what it needs to know, or just a user's custom list where he has to manually enter data on each game he wants, such as instead of having a utility automatically rotate vert/horiz, it would check the romset name against a config file and if it's in there, then rotate where specified by hand.

After I find time to sleep I'll start implementing the unimplemented microcontroller features like the momentary thing, toggle on/off from whatever is current state, etc.  I gotta stop going to BED at 5am when I get up to work at 6:30am.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Site for PC-to-Hardware serial project
« Reply #35 on: October 20, 2004, 05:03:12 am »
It would be convenient if a front end sent all pertinent discreet details that could be useful in hardware control projects but

I have added the ability to send: [description] [name] [year] [manufacturer] [cloneof] [romof] [screen] [orientation] [input] [status] [color] [sound] and [category] from MAMEWAH (this is all the info MW holds).

Quote
even if just the game name is passed, that would be useful enough that the batch file could run another program to go digging for that rom set info and find out what it needs to know

Yep, this could cover anything else.

Quote
After I find time to sleep I'll start implementing the unimplemented microcontroller features like the momentary thing, toggle on/off from whatever is current state, etc.  I gotta stop going to BED at 5am when I get up to work at 6:30am.

Jeez, I thought my 2am was bad...you must feel like crap in the mornings, I know I do...

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
Re:Site for PC-to-Hardware serial project
« Reply #36 on: October 20, 2004, 11:38:36 am »
Hmm. I'm trying to wrap my brain around what this project is all about, but being somewhat n00bish I'm having a little bit of trouble.  How is this project different than any of the standard X10 serial interfaces?

-Steve

Druin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
  • Last login:May 10, 2009, 02:30:37 am
  • I'm a llama!
Re:Site for PC-to-Hardware serial project
« Reply #37 on: October 20, 2004, 05:29:44 pm »
I've never seen an X10 serial interface, maybe it does exactly the same intention, although I'm sure more expensively and less homely...it's nice to have complete control over everything.

What this project does is allow you to hook up a hardware unit to the serial port of course, with a bunch of output channels that you can wire into devices to control, and then you can turn them on/off, momentary on then off, etc... and you can do it by manual program control on screen, or automaticallly in batch files etc with command line parameters.

The benefit, not sure what an X10 equivalent would offer, but we could for instance program this thing to go and set or clear some channels, do other stuff or wait for another event, then go do something else, query the status of any channel, make decisions, etc.  Complete control.

If there's a serial X10 device that can allow total flexibility, then the question is cost feasibility.  I never researched the options available, I just went at it from scratch.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Site for PC-to-Hardware serial project
« Reply #38 on: October 21, 2004, 04:28:04 am »
I'm not sure what X10 is either...but either way this project has the advantage that is is being designed with the sole purpose of arcade cabs in mind :)

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
Re:Site for PC-to-Hardware serial project
« Reply #39 on: October 21, 2004, 09:17:16 am »
Okay, so it sounds like it comes down to cost and the homebrew-ness of this project.  By what you're saying in the above posts, it will be a pretty inexpensive solution to get basic control over external hardware.  That sounds exciting! Kudos on a job well done, and I look forward to being able to implement your hard work in my own cabinet!

-Steve

P.S. You know all those annoying popup ads you (used to) get talking about X10 cameras?  Well X10 is a real protocol for talking to really any piece of hardware, similar to Druin's project. X10 has been around a lot longer (obviously) and, in effect is more mature.  Instead of just wires, you can control over FM, IR, power outlets (wires already in your house, through the walls).  You also get 2-way communication between modules, dimming control, etc. It's pretty cool stuff, IMO, and now that I'm a bonified homeowner, my inner geekness gets giddy when I think about the possibilities :)