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: easy coding, i'll pay you $40!  (Read 6762 times)

0 Members and 1 Guest are viewing this topic.

tony.silveira

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 697
  • Last login:September 27, 2024, 03:04:35 pm
    • my baby
easy coding, i'll pay you $40!
« on: June 25, 2012, 09:46:48 am »
hey guys,

i'm about to start my build of a new panel and am adding a servo to auto switch joysticks from 8 to 4 way.  daoldman has written a great plug in for mala but in all honesty, i'm happy using mamewah and the task of moving 30+ emu's from one FE to another is not something i'm looking forward to.

from an older post, user "terahawk" seems to have created a bat file that calls to an edited text file containing the names of 4 way games.  if his bat doesn't find the name, it assumes 8 way and adjusts the servo accordingly.  that sounds great but i dont want to have to edit a txt file everytime i update mame.

so, if anyone out there is willing to tackle this, i'd be happy to throw $40 your way for your time.  i *think* it could be relatively easy.  my thought is that the servo bat would check controls.ini file for the rom name, and adjust the servo based on results.  obviously it would only be looking for "4 way" and "8 way" so there would have to be soemthing in there that would just ignore other stick/trackball/spinner, etc. control types.

any takers?  here is the sample code from the post by "terahawk"

@echo off
d:
cd d:\mame

findstr /b /r "%1$" game-stick-mapping.txt > result.txt

for /f %%A in ("result.txt") do if %%~zA NEQ 0 goto four

echo 8-way
usccmd --sub 0,8
goto end

:four
echo 4-way
usccmd --sub 0,4
:end


mame "%1"

spoot

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:June 15, 2015, 10:36:18 am
  • Destroyer of electronics
Re: easy coding, i'll pay you $40!
« Reply #1 on: June 25, 2012, 03:12:25 pm »
Could writeup a quick utility to export the mame xml and parse it for 4way in the controls I spose.  We'll see if I get bored enough in the next few days.    :lol

tony.silveira

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 697
  • Last login:September 27, 2024, 03:04:35 pm
    • my baby
Re: easy coding, i'll pay you $40!
« Reply #2 on: June 26, 2012, 12:19:56 am »
Could writeup a quick utility to export the mame xml and parse it for 4way in the controls I spose.  We'll see if I get bored enough in the next few days.    :lol

come on boredom!

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:June 14, 2025, 06:26:06 pm
  • <insert personal text here>
Re: easy coding, i'll pay you $40!
« Reply #3 on: June 26, 2012, 12:53:09 am »
Just throwing it out there but Joychoose won a BYOAC UCA.  I'm sure something similar ported for other FE's would be well received by many out there.  I know a lot of the HS crowd would kill for this functionality... that and to be able to tate their FE on the fly. 


DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: easy coding, i'll pay you $40!
« Reply #4 on: June 26, 2012, 06:23:47 am »
Thinking...........

Mysterioii

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 398
  • Last login:August 31, 2018, 11:44:34 am
Re: easy coding, i'll pay you $40!
« Reply #5 on: June 26, 2012, 08:22:43 am »
that and to be able to tate their FE on the fly. 

Is that a typo Chuck?  Tate?

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: easy coding, i'll pay you $40!
« Reply #6 on: June 26, 2012, 08:26:54 am »
that and to be able to tate their FE on the fly. 

Is that a typo Chuck?  Tate?

Nope, that's what the kids these days say. ::)

tony.silveira

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 697
  • Last login:September 27, 2024, 03:04:35 pm
    • my baby
Re: easy coding, i'll pay you $40!
« Reply #7 on: June 26, 2012, 08:53:44 am »
Thinking...........

if your thinking, let me throw this out there...  PLEASE!  :)

also, if there would be any way to make it command line.  i know i'm living in the past with mamewah but i spent a long time tweaking that FE to get countless emu's to run on it and am happy with the way it is

Mysterioii

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 398
  • Last login:August 31, 2018, 11:44:34 am
Re: easy coding, i'll pay you $40!
« Reply #8 on: June 26, 2012, 09:46:28 am »
Command line would be great.  I had a batch file set up in hyperspin (I think I still do... it's been a while...) where I pretended that my mame executable was the bat instead of the exe.  So it gets called with the rom name...  I then called an old control panel viewer passing in the rom name so it could show the proper controls, then when you hit a key to exit it called my real mame executable and passed the rom name along.  I have it on my list of things to do to replace that whole business with CPWizard, but I have  no free time to do anything at the moment.

A command line version of the joystick switcher could easily be integrated in the same way.

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:June 14, 2025, 06:26:06 pm
  • <insert personal text here>
Re: easy coding, i'll pay you $40!
« Reply #9 on: June 26, 2012, 09:54:02 am »
that and to be able to tate their FE on the fly. 

Is that a typo Chuck?  Tate?

Tate = vertical
Yoko = horizontal


BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9272
  • Last login:Today at 03:15:04 pm
  • ...
Re: easy coding, i'll pay you $40!
« Reply #10 on: June 26, 2012, 10:17:48 am »
Rotate = done in software
Tate = physically rotating the monitor putting your monitor on its side (I think that is the more correct usage)
« Last Edit: June 26, 2012, 10:37:24 am by BadMouth »

Mysterioii

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 398
  • Last login:August 31, 2018, 11:44:34 am
Re: easy coding, i'll pay you $40!
« Reply #11 on: June 26, 2012, 10:24:43 am »
Thanks for the info...  That's some slang I'll never use, but at least I'll know what it means now...

brad808

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 818
  • Last login:May 22, 2023, 08:18:15 pm
Re: easy coding, i'll pay you $40!
« Reply #12 on: June 26, 2012, 11:34:54 am »
Nobody should be using the word "tate" it sounds too close close to "taint". That's all i can think of when i read it.

http://m.urbandictionary.com/#define?term=taint

spoot

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:June 15, 2015, 10:36:18 am
  • Destroyer of electronics
Re: easy coding, i'll pay you $40!
« Reply #13 on: June 26, 2012, 12:27:33 pm »
So, the game-stick-mapping.txt is simply a list of romname.zip then?

Edit: Or I'm guessing that's all that would be needed in the result.txt
« Last Edit: June 26, 2012, 03:29:26 pm by spoot »

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2097
  • Last login:March 26, 2024, 01:18:39 pm
Re: easy coding, i'll pay you $40!
« Reply #14 on: June 26, 2012, 01:12:02 pm »
Mmmmmm- Taters. 

spoot

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:June 15, 2015, 10:36:18 am
  • Destroyer of electronics
Re: easy coding, i'll pay you $40!
« Reply #15 on: June 26, 2012, 11:45:47 pm »
Mmmmmm- Taters.  

Dictator's or just regular taters?   ;D

Edit: Build tools installed on new pc......and around 50% of boredom code has been done.   :D

ed12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3972
  • Last login:March 31, 2018, 03:44:39 pm
  • it is what it is..."Nobody Said It Was Easy"....
Re: easy coding, i'll pay you $40!
« Reply #16 on: June 27, 2012, 12:08:59 am »
now i know why

>Yoko = horizontal<

my gawd 30 year's after the fact

ed

Shipping something from the U.S. to Canada for repair/exchange?  Please use USPS to avoid (additional?/excessive?) shipping charges.  PM me if you have any questions.

spoot

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:June 15, 2015, 10:36:18 am
  • Destroyer of electronics
Re: easy coding, i'll pay you $40!
« Reply #17 on: June 27, 2012, 01:20:18 am »
now i know why

And knowing is half the battle.  GI JOE!

lanman31337

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 606
  • Last login:January 10, 2024, 10:36:50 am
  • set to ludacris speed!
Re: easy coding, i'll pay you $40!
« Reply #18 on: June 27, 2012, 08:09:28 am »
I have every device in the house setup for any forum using the proper wording of tate, so here I am.  Kudos Le Chuck Tate

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2097
  • Last login:March 26, 2024, 01:18:39 pm
Re: easy coding, i'll pay you $40!
« Reply #19 on: June 27, 2012, 09:04:18 am »
Mmmmmm- Taters. 

Dictator's or just regular taters?   ;D

Po-taters - just to be clear, wise guy.   :whap

preferably in tater tot form. 

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9272
  • Last login:Today at 03:15:04 pm
  • ...
Re: easy coding, i'll pay you $40!
« Reply #20 on: June 27, 2012, 10:40:48 am »
Since we're already off-topic:

Dictator's or just regular taters?   ;D

Ever wonder where that came from?
It's at 1:39, but the joke starts at the beginning.

CONTAINS PROFANITY...OBVIOUSLY


vanrose72

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 172
  • Last login:June 25, 2018, 11:19:32 am
Re: easy coding, i'll pay you $40!
« Reply #21 on: June 28, 2012, 09:52:37 am »
Anyone else want some mustard and biscuits now?

Mmmm hmmm. And I was thinkin' I could use me another couple cans o' that potted meat if ya got any extree.

lilshawn

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7514
  • Last login:Yesterday at 07:02:41 pm
  • I break stuff...then fix it...sometimes
Re: easy coding, i'll pay you $40!
« Reply #22 on: June 28, 2012, 02:33:42 pm »
Nobody should be using the word "tate" it sounds too close close to "taint". That's all i can think of when i read it.

http://m.urbandictionary.com/#define?term=taint

awww I KNEW what taint was and I STILL clicked the link  :-\

tony.silveira

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 697
  • Last login:September 27, 2024, 03:04:35 pm
    • my baby
Re: easy coding, i'll pay you $40!
« Reply #23 on: June 29, 2012, 07:10:40 pm »
i'll be the party pooper, you guys go talk about taints on another thread :)

spoot / daoldman, either of you have any headway?  spoot, sounds like you actually started working on something?

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:June 14, 2025, 06:26:06 pm
  • <insert personal text here>
Re: easy coding, i'll pay you $40!
« Reply #24 on: June 29, 2012, 07:56:44 pm »
i'll be the party pooper, you guys go talk about taints on another thread :)

spoot / daoldman, either of you have any headway?  spoot, sounds like you actually started working on something?

Yeah guys, better move along or I'll report you to taint, er, I mean saint.

tony.silveira

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 697
  • Last login:September 27, 2024, 03:04:35 pm
    • my baby
Re: easy coding, i'll pay you $40!
« Reply #25 on: June 29, 2012, 08:03:06 pm »
move along, notaint to see here...

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9272
  • Last login:Today at 03:15:04 pm
  • ...
Re: easy coding, i'll pay you $40!
« Reply #26 on: June 29, 2012, 08:14:26 pm »
Another thread tainted.  :dunno

I'm ok with a mod deleting my off-topic posts if they want to clean it up.

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2097
  • Last login:March 26, 2024, 01:18:39 pm
Re: easy coding, i'll pay you $40!
« Reply #27 on: June 29, 2012, 08:22:51 pm »

I'm ok with a mod deleting my off-topic posts if they want to clean it up.

Yes, feel free.  I never post on topic anymore.  my bad.   :-[

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:June 14, 2025, 06:26:06 pm
  • <insert personal text here>
Re: easy coding, i'll pay you $40!
« Reply #28 on: June 29, 2012, 08:37:30 pm »
Tony, in their defense DaOld Man has been around long enough not to be scared off by some light banter about that part that isn't this nor is it that.  If he'll do it he'll do it, if he won't no amount of prodding will move him, he'll just tell you to get off his lawn.

spoot

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:June 15, 2015, 10:36:18 am
  • Destroyer of electronics
Re: easy coding, i'll pay you $40!
« Reply #29 on: June 29, 2012, 08:41:37 pm »
i'll be the party pooper, you guys go talk about taints on another thread :)

spoot / daoldman, either of you have any headway?  spoot, sounds like you actually started working on something?

Yep, command line program that creates the result.txt file with all games that are flagged as joy:4 in the xml output from the mame specified in an argument when running the program.  If the mame isn't specified it will try to determine 32/64 mame to run in the directory this program is run from. 

It's currently completed, but not sure that's what you were really looking for.   :laugh: 

tony.silveira

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 697
  • Last login:September 27, 2024, 03:04:35 pm
    • my baby
Re: easy coding, i'll pay you $40!
« Reply #30 on: June 29, 2012, 09:30:10 pm »
Tony, in their defense DaOld Man has been around long enough not to be scared off by some light banter about that part that isn't this nor is it that.  If he'll do it he'll do it, if he won't no amount of prodding will move him, he'll just tell you to get off his lawn.

i hear ya, i wasn't trying to press, just curious :)

now back to the taints!