The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: Howard_Casto on July 21, 2007, 10:33:24 pm

Title: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 21, 2007, 10:33:24 pm
Ok the time is finally here.... as of .117u1 the new input system is finally out.  I haven't really ran it through it's paces yet, but from what I can tell it's really good. 


Ok I'll just post the quotes and explain what this means to our community (in terms of changes and improvments)

-----------------
Added two new options: -multikeyboard and -multimouse. By default,
    both options are OFF. When OFF, the core will combine all keyboard
    or mouse input into a single keyboard or mouse device. When ON,
    these options instruct the core to keep inputs for each keyboard
    and/or mouse independent.
------------------

Ok first off, you know a few months back how the new "improved" mouse system came out and totally ruined it for those of us with a single trackball/spinner/whatever?  Well this fixes it.  Just as I suggested way back then, the raw-mouse code is finally optional!  The new multi-keyboard is fairly useless from my point of view (who needs more than 256 inputs?) but since it's optional it won't hurt anything.  Viewer devs will have to add support for multiple keybaords eventually, but as-is, things should work with the current setups. 


-------------------
* Added new option: -joystick_map. This option allows for a 9x9 grid
    to be specified which controls analog-to-digital mapping of
    joystick inputs.
-------------------

Now I haven't played with this yet, but this is frikkin awesome!  For those of you who don't get it... Now you can use an analog joystick for a shifter, make custom plates, and map a DIGITAL shift button to each position!  Bascially it means one shifter to rule them all.

I have no clue how it's implemented, I'll have to really look at it.  No clue how this could be addded to controls viewers. 


Judging by the replies, this is more of an analog-to-digital converter, al-la the "sticky" option, but more advanced.  In theory it could still be used for such a thing, but not exactly in the way I described.

It's more for blocking out directions for 4-ways and 45 degree 4-ways and what-not.

------------------------
* Changed the Windows implementation of input handling to fully
    support the raw input interfaces for keyboard and mouse.
    DirectInput is still used for all joystick inputs, as well as for
    keyboard and mouse inputs on pre-Windows XP systems. This allows
    for multiple keyboards and mice to be supported. Also changed
    keyboard and mouse behavior to use non-exclusive mode in
    DirectInput, and to keep the devices alive during pause for more
    consistent input handling.
------------------------

This one is very specific to devs... basically it means you can send input to mame in a more reliable manner, which is a good thing.  Again, I haven't tested it yet, so it might end up making things worse, but from what I get, it's a good thing.....

So good news all around... I'm no expert on any of this, but post your questions and I'll try to answer them or get them answered.
Title: Re: .117u1 and What it means to control viewers...
Post by: Angry_Radish on July 21, 2007, 10:51:28 pm
Sounds VERY interesting!
Thanks for filtering it so it makes sense to me   :cheers:
Title: Re: .117u1 and What it means to control viewers...
Post by: headkaze on July 22, 2007, 01:27:42 am
Quote
This one is very specific to devs... basically it means you can send input to mame in a more reliable manner, which is a good thing.  Again, I haven't tested it yet, so it might end up making things worse, but from what I get, it's a good thing.....

Actually it's the opposite AFAIK. You can send input to Mame in current versions but you can't send input to the RAW input interface. I believe it was the GetAsyncKeyState() code in wininput_poll() that made it possible previously. Mame not being in exclusive mode doesn't really mean much for sending keys either, it just means you can use DirectInput to READ input at the same time (non-exclusive). But sending input through the DirectInput interface is as hard as it ever was. CoinDrop is the only app that ever did it and it used APIHook to inject keycodes into the IDirectInputDevice_GetDeviceState() function.

Oh btw I have started work on the Mame Input Bible, just finding it hard to get time to work on it. I'm going to put as much info as I know into it then send it to you. These latest additions will obviously add another level of information to cover, but it shouldn't be too hard to figure out eventually.

Thanks for the update.
Title: Re: .117u1 and What it means to control viewers...
Post by: MKChamp on July 22, 2007, 02:30:23 am
Not sure if this is an issue for anyone using Johnny5...maybe I am running an old version...but anyways...
With the new 'mame' browser, just running mame.exe no longer gives the verison info...it now launches the browser. The easy fix (for me anyways) was to blank out the getVersion.bat file (which is generated dynamically by Johnny5) and then set the attributes of it to read only.
Hope that helps anyone that may be in the same situation I was in.
Title: Re: .117u1 and What it means to control viewers...
Post by: headkaze on July 22, 2007, 02:39:34 am
It will probably have to change to "Mame.exe -help"
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 22, 2007, 10:09:44 am
Quote
This one is very specific to devs... basically it means you can send input to mame in a more reliable manner, which is a good thing.  Again, I haven't tested it yet, so it might end up making things worse, but from what I get, it's a good thing.....

Actually it's the opposite AFAIK. You can send input to Mame in current versions but you can't send input to the RAW input interface. I believe it was the GetAsyncKeyState() code in wininput_poll() that made it possible previously. Mame not being in exclusive mode doesn't really mean much for sending keys either, it just means you can use DirectInput to READ input at the same time (non-exclusive). But sending input through the DirectInput interface is as hard as it ever was. CoinDrop is the only app that ever did it and it used APIHook to inject keycodes into the IDirectInputDevice_GetDeviceState() function.

Oh btw I have started work on the Mame Input Bible, just finding it hard to get time to work on it. I'm going to put as much info as I know into it then send it to you. These latest additions will obviously add another level of information to cover, but it shouldn't be too hard to figure out eventually.

Thanks for the update.

Well I'm not so sure about that.... because it's non exclusive mode it can still be sent, just in a different way.  What I was referring to was the part where it states that the input system is no longer reset when mame goes dormant (due to a pause or whatever) that means you can send input even if it's minimized or resizing. 
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 22, 2007, 10:14:31 am
Not sure if this is an issue for anyone using Johnny5...maybe I am running an old version...but anyways...
With the new 'mame' browser, just running mame.exe no longer gives the verison info...it now launches the browser. The easy fix (for me anyways) was to blank out the getVersion.bat file (which is generated dynamically by Johnny5) and then set the attributes of it to read only.
Hope that helps anyone that may be in the same situation I was in.

Somebody's in a hurry!  Remember, .117u1 isn't an official build.  I won't post a release until .118 comes out probably. 

I'll look into the -help flag, but my understanding was that it wasn't in earlier builds.  Anyone know when it was added?
Title: Re: .117u1 and What it means to control viewers...
Post by: headkaze on July 22, 2007, 10:22:31 am
Quote
This one is very specific to devs... basically it means you can send input to mame in a more reliable manner, which is a good thing.  Again, I haven't tested it yet, so it might end up making things worse, but from what I get, it's a good thing.....

Actually it's the opposite AFAIK. You can send input to Mame in current versions but you can't send input to the RAW input interface. I believe it was the GetAsyncKeyState() code in wininput_poll() that made it possible previously. Mame not being in exclusive mode doesn't really mean much for sending keys either, it just means you can use DirectInput to READ input at the same time (non-exclusive). But sending input through the DirectInput interface is as hard as it ever was. CoinDrop is the only app that ever did it and it used APIHook to inject keycodes into the IDirectInputDevice_GetDeviceState() function.

Oh btw I have started work on the Mame Input Bible, just finding it hard to get time to work on it. I'm going to put as much info as I know into it then send it to you. These latest additions will obviously add another level of information to cover, but it shouldn't be too hard to figure out eventually.

Thanks for the update.

Well I'm not so sure about that.... because it's non exclusive mode it can still be sent, just in a different way.  What I was referring to was the part where it states that the input system is no longer reset when mame goes dormant (due to a pause or whatever) that means you can send input even if it's minimized or resizing. 

How would you send keys to Mame then? The fact it's in exclusive or non-exclusive mode has nothing to do with being able to send keys to Mame. It just means other programs can share DirectInput to _read_ keys/joysticks. The main problem is that DirectInput does not work through the standard Windows message loop. If you know a way to send keys to a DirectInput app without using something like APIHook I'm interested in hearing it.

Also I'm interested in how the input system being active while mame goes dormant can be a benefit. However I can think of a number of ways that it could cause problems to a CP viewer. The main issue is how unpause works, does Mame now unpause if you press any key or joystick button now or does it still only unpause when you press the assigned pause key? I'm really hoping this hasn't changed.

Sorry not sure when -help was added.
Title: Re: .117u1 and What it means to control viewers...
Post by: MKChamp on July 22, 2007, 05:05:58 pm

Somebody's in a hurry!  Remember, .117u1 isn't an official build.  I won't post a release until .118 comes out probably. 

I'll look into the -help flag, but my understanding was that it wasn't in earlier builds.  Anyone know when it was added?


Hehe...no rush from me. I understand it wouldn't be worth your time to release a version everytime a u build is released ;-) I just wanted to provide an extremely easy 'temp' solution for people like me that basically use the u releases as their 'main' version on their cabs.
Just curious, but is the version bat soley for debug purposes? I didn't see where/why that was needed to get Johnny to do what it is intended to do.

P.S. I consider myself an extremely proficient 'search' guru, but I couldn't for the live of me find any info on what version the "help" option was implemented in mame searching mame.net and mameworld.net.
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 22, 2007, 05:48:06 pm
Well, j5 still supports (or psuedo supports) the old style ini files, it does a version check to determinie which method to use.  I could always take it out and use a checkbox, but I wanted to make it easier on the user.
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 22, 2007, 06:46:45 pm
Just some more info...

Compiled a version of u1 just to see what I was in for, control-wise.

The constants are exactly the same, assuming you are mapping stuff to keyboard1:

It's KEYCODE_(Key) , with (Key) being the constant name....  This is good as thankfully, we don't have to re-edit all of our cfg/ctrlr files.

Now even when using -multikeyboard, the first keyboard uses the old standard, which is good.  Subsequent keyboards use a number to denote the keyboard, much like joysticks and mice do to give an example of mapping a button to lctrl on the second keyboard:

KEYCODE_2_LCTRL

It's that simple! aside from finding a clever way to add all those constants as options in the viewer, changing the actual parsing code should be quite simple, no major changes so nothing major to change, aside from the fact that when the user is NOT using multikeyboard, the number in the middle has to be ignored... same for multimouse.


Now the interesting thing is that mice are NOT setup this way.  When mapping functions to mouse 1, It's always:

MOUSECODE_1_(input)

So keep that in mind.

I'll add more as I discover more... this is much easier for me than tracking notes.
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 22, 2007, 07:42:54 pm
Just a quick note.... there is a bug in .117u1 causing ctrlr files to crash if they don't use a "remap" entry somewhere... you'll get a "malloc zero bytes" error. 

Just thought I would mention it. 

Getting back on topic... I have no clue how the new joystick_map function works... the only two options seem to be "auto" and "auto_select" so I'll have to look through the source.  This would be our most drastic change and therefore needs to be addressed. 
Title: Re: .117u1 and What it means to control viewers...
Post by: headkaze on July 22, 2007, 07:55:13 pm
Hey Howard do you want me to send what I've written so far for the Input Bible?

Right now I'm just getting the main information into a html file (you got something like FrontPage I hope), so perhaps you can start adding bits and pieces and we can merge them later?
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 22, 2007, 08:24:02 pm
Sure...you can send it on over....

Actually no, I'm old school... use notepad for html.  :)
Title: Re: .117u1 and What it means to control viewers...
Post by: u_rebelscum on July 23, 2007, 04:45:03 pm
Getting back on topic... I have no clue how the new joystick_map function works... the only two options seem to be "auto" and "auto_select" so I'll have to look through the source.  This would be our most drastic change and therefore needs to be addressed. 

Check out the new docs/config.txt file.  It goes into pretty good depth.
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 23, 2007, 05:54:57 pm
Thanks man, ugh though... I think I'm more confused then when I didn't know.  :)

I get the concept, but all these shorthand shortcuts and mirroring and what-not, I'm not sure.
Title: Re: .117u1 and What it means to control viewers...
Post by: u_rebelscum on July 23, 2007, 09:18:39 pm
Thanks man, ugh though... I think I'm more confused then when I didn't know.  :)

I get the concept, but all these shorthand shortcuts and mirroring and what-not, I'm not sure.

Pretty much my thoughts on first read. :D  The longhand is easy to get, if big.  I haven't looked the decode shorthand section of the source, but after letting the doc digest since last night, I understand it a lot more than immediately after the first read.  OTOH, I'll need to see the source to have a hope on understanding on how it's done.  I'm sort of busy now, though, so I'm going to wait until u2 with fixes before I dive in.


Overall, it wasn't as drastic a change as I hoped/feared, but so for looks good.  When I get to the code I'll probably see some "I wish this was also done", but.... :dunno
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 23, 2007, 10:12:54 pm
Well my biggest question is are the numpad keys the only thing you can map to?  I mean 0-9 and a-z are all one digit/character deals so they'll fit in the matrix, but what about up/down/left/right and keys like spacebar alt and ctrl?
Title: Re: .117u1 and What it means to control viewers...
Post by: u_rebelscum on July 24, 2007, 12:43:00 pm
Well my biggest question is are the numpad keys the only thing you can map to?  I mean 0-9 and a-z are all one digit/character deals so they'll fit in the matrix, but what about up/down/left/right and keys like spacebar alt and ctrl?

No testing or anything, but I took it as it gets mapped to joystick up, down, up+right, ect, and '7' doesn't mean the keyboard '7', but the joystick position equivalent to 7 on the number pad (in this case "joycode up & left").  And the only character you can use is 's', which means sticky, not the char 's'. 

IOW, all this does is replace the old analog to digital conversion method (which wasn't the best), with this 9x9 grid.  AFAICT :dunno
Title: Re: .117u1 and What it means to control viewers...
Post by: ahofle on July 24, 2007, 06:12:50 pm
IOW, all this does is replace the old analog to digital conversion method (which wasn't the best), with this 9x9 grid.  AFAICT :dunno

Doesn't this mean that someone can come up with a grid similar to what RandyT did with his GP49  software that will allow a better analog to digital map for games like Tron?  In other words, make it more difficult to hit the diagonals in this case?  If so, YES!!!!!!!!!!!!
Title: Re: .117u1 and What it means to control viewers...
Post by: AaronGiles on July 24, 2007, 07:30:39 pm
IOW, all this does is replace the old analog to digital conversion method (which wasn't the best), with this 9x9 grid.  AFAICT :dunno
Fundamentally, yes, that's all it does. It's a way to control how the analog X/Y axes map to digital left/right/up/down controls. It has nothing to do with mapping to keys. I only use the numpad analogy as a means of specifying directions in a string.

I apologize that the symmetry stuff makes it confusing; I was just looking for a way to compact the strings that describe them. You don't have to understand any of that, however. You can just specify the full 9x9 grid in a giant string like this:

aaaaaaaaa.bbbbbbbbb.ccccccccc.ddddddddd.eeeeeeeee.fffffffff.ggggggggg.hhhhhhhhh.iiiiiiiii

And yes, you can easily make maps that make it easier/harder to hit diagonals. There are 3 built-in maps that are auto-selected. One is for 8-way joysticks, one is for 4-way joysticks, and one is for 4-way diagonal joysticks (rotated for Q*Bert). If you run a game with the -verbose option you can see what map is selected (except maybe I don't print it for the standard 8-way case).
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 24, 2007, 10:24:22 pm
Ok you just lost me after the abc example....

The numpad I got after rebel explained it, but now your telling me it doesn't matter which characters/numbers you use?  In that case how is one supposed to know which character represents up/left and which one represents neutral, ect...

Headkaze and I are trying to make a detailed writeup of all the various mame input settings so it's easier for the user to understand and eaiser for the third party developer to interface with.  Unfortunately, that means I kind of do need to know how all of it works.  I figure if I can understand it then anyone can. ;)
Title: Re: .117u1 and What it means to control viewers...
Post by: NickG on July 25, 2007, 01:14:52 am
Does this mean that I might someday be able to use two keyboard encoders that, for example, both use the Left CTRL key as separate inputs?  Would that be KEYCODE_1_LCTRL and KEYCODE_2_LCTRL respectively?  This makes it possible for any johnny-come- lately to buy two identical two-player keyboard encoder-based controllers for a four-player setup for MAME, yeah? 
Title: Re: .117u1 and What it means to control viewers...
Post by: headkaze on July 25, 2007, 01:16:47 am
A celebrity just entered the thread! 8)
Title: Re: .117u1 and What it means to control viewers...
Post by: Minwah on July 25, 2007, 05:33:20 am
Does this mean that I might someday be able to use two keyboard encoders that, for example, both use the Left CTRL key as separate inputs?  Would that be KEYCODE_1_LCTRL and KEYCODE_2_LCTRL respectively?  This makes it possible for any johnny-come- lately to buy two identical two-player keyboard encoder-based controllers for a four-player setup for MAME, yeah? 

I would say yes, from what I have read in this thread.

Has there been any changes to the ctrlr file operation?  One old gripe of mine was that analog sensitivity and those kind of settings did not take effect when set in ctrlr files, when IMO they probably should.

Like the sound of the multimouse option...
Title: Re: .117u1 and What it means to control viewers...
Post by: headkaze on July 25, 2007, 06:34:30 am
Wow good to see you on here MinWah.. did you fall in love and get married or something?

I love your music on MySpace btw, you have a great voice :)

I am a big fan of Bob Dylan and you have a voice that sounds great.

You probably wouldn't believe it, but you should check out a pic of Howard Casto I found on some old website of his. He looks like a musician too hehe. I guess the stereo type of a programmer is out the window these days.
Title: Re: .117u1 and What it means to control viewers...
Post by: youki on July 25, 2007, 07:16:08 am

nothing really to see with the subject , but i have to correct HeadKaze on that.

Quote
But sending input through the DirectInput interface is as hard as it ever was. CoinDrop is the only app that ever did it and it used APIHook to inject keycodes into the IDirectInputDevice_GetDeviceState() function

AtomicFe Pro version was doing that months before you came with your Coin-Drop.
I had to remove the AtomicFe Pro version from my website for , i think , the same reasons you removed your coin-drop. AtomicFE Pro allowed to make real exploitation of Mame , It was able to insert credit in MAME (using the DirectInput hook) , and was able to transfert credit from one game to other game automatically. (if you quit one game with some credit left, you come back on Atomic and then if you run another game Credit appear in the new game).
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 25, 2007, 02:42:16 pm
Does this mean that I might someday be able to use two keyboard encoders that, for example, both use the Left CTRL key as separate inputs?  Would that be KEYCODE_1_LCTRL and KEYCODE_2_LCTRL respectively?  This makes it possible for any johnny-come- lately to buy two identical two-player keyboard encoder-based controllers for a four-player setup for MAME, yeah? 

I would say yes, from what I have read in this thread.

Has there been any changes to the ctrlr file operation?  One old gripe of mine was that analog sensitivity and those kind of settings did not take effect when set in ctrlr files, when IMO they probably should.

Like the sound of the multimouse option...

Not that I've seen.  Heh you are really out of the loop, multimouse has been in there for a while... the problem was up until now it wasn't optional, causing headaches for people with hot-swappable panels and admin mice.
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on July 25, 2007, 02:45:51 pm
You probably wouldn't believe it, but you should check out a pic of Howard Casto I found on some old website of his. He looks like a musician too hehe. I guess the stereo type of a programmer is out the window these days.

Heh, that's an ooooold picture, I was like 18 in it.  Up until about three months ago I had hair down to my lower back and the same goatee.  Got my hair caught in some glue and had to chop it off.  I look fairly normal now, but then I did look like the stereo-typical programmer, just the lone gunman variety instead of the dilbert sect.
Title: Re: .117u1 and What it means to control viewers...
Post by: Minwah on July 26, 2007, 04:20:14 am
Wow good to see you on here MinWah.. did you fall in love and get married or something?

I love your music on MySpace btw, you have a great voice :)

I am a big fan of Bob Dylan and you have a voice that sounds great.

You probably wouldn't believe it, but you should check out a pic of Howard Casto I found on some old website of his. He looks like a musician too hehe. I guess the stereo type of a programmer is out the window these days.

Haha, no I didn't get married! It's been a bit of a combination of moving, getting a new job, restoring my mini and putting more time into music stuff.  I still don't have my cabinet at my house...although I recently put made some plans to move it, but now we are hit by floods I am quite glad I didn't!!  I'm making a little app for the PacDrive output board to get me back into things...I really am missing my cabinet!

Thanks for the compliment  :)
Title: Re: .117u1 and What it means to control viewers...
Post by: Minwah on July 26, 2007, 04:22:52 am
Heh you are really out of the loop, multimouse has been in there for a while... the problem was up until now it wasn't optional, causing headaches for people with hot-swappable panels and admin mice.

Sorry I meant the option to disable it...I recall the multiple mouse stuff being added, although I haven't actually used it.  I don't think personally I have much use for it as I don't have the controls for it.  Nice to have the option tho.
Title: Re: .117u1 and What it means to control viewers...
Post by: headkaze on July 26, 2007, 06:34:21 am

nothing really to see with the subject , but i have to correct HeadKaze on that.

Quote
But sending input through the DirectInput interface is as hard as it ever was. CoinDrop is the only app that ever did it and it used APIHook to inject keycodes into the IDirectInputDevice_GetDeviceState() function

AtomicFe Pro version was doing that months before you came with your Coin-Drop.
I had to remove the AtomicFe Pro version from my website for , i think , the same reasons you removed your coin-drop. AtomicFE Pro allowed to make real exploitation of Mame , It was able to insert credit in MAME (using the DirectInput hook) , and was able to transfert credit from one game to other game automatically. (if you quit one game with some credit left, you come back on Atomic and then if you run another game Credit appear in the new game).

Thanks for the correction. I knew you had some sort of credit system you removed from Atomic but I didn't know it was a Direct Input hook. You don't need to use that complex method to send keys to Mame as API functions are sufficient. But if your blocking and injecting then you do need to use that APIHijack. Unfortunetly I found it quite an unstable method, if you shutdown the hook dll before Mame it would crash. The way you describe how credits could be carried over is how CoinDrop worked as well. Boy did that program kick up a fuss. I don't really wan't to think about it anymore  :'(
Title: Re: .118 and What it means to control viewers...
Post by: Shoegazer on August 09, 2007, 12:18:35 am
Now that .118 is out, I'm curious to hear from any of you who have had any success in getting the new analog mapping feature to work.  I have an Ultrastik 360 and it would be really great to just set it to analog mode and let MAME handle the mapping on a per-game basis - but I don't see anywhere that the new MAME lets you do this.  Perhaps in the future Aaron will develop some tools to make it easy to develop maps and bind them on a per-game basis. 

So, have any of you had success with this?

Shoegazer
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on August 09, 2007, 03:02:08 am
For the most part, you set it to "auto" and it does the work for you. 



Getting back on topic, a few final changes in .108 (which is what is delaying an updated j5)

To quote the readme:

"Removed underscores from some keycode token names. Thus,
KEYCODE_0_PAD now becomes KEYCODE_0PAD. This is to prevent confusion
when parsing multiple keyboard items. Due to this change, also removed
imperfect backward compatibility with older configs; some mappings
will still work, but some won't. Note that this change will also
break some existing ctrlr files; new ones will be provided.
[Aaron Giles]"


Not a horribly akward change and it will actually make it easier for parsing in the long run.  The thing is, I (or should I say we) need to go through the list of tokens in the source and see if there are any other changes.  Afaik it appears to be only the numpad keys and perhaps the number keys (need to find the new constants to confirm). 
Title: Re: .117u1 and What it means to control viewers...
Post by: headkaze on August 09, 2007, 03:20:25 am
Not a horribly akward change and it will actually make it easier for parsing in the long run.  The thing is, I (or should I say we) need to go through the list of tokens in the source and see if there are any other changes.  Afaik it appears to be only the numpad keys and perhaps the number keys (need to find the new constants to confirm). 

Have you generated a data file with the new constants? I can look into doing that if you don't have the time.
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on August 09, 2007, 11:56:07 am
My internet connection was down most of yesterday so I didn't have access to the source.  I manually changed the numpad constants in my file for j5, but I need to go back and verify that they are correct sometime today.  If you want to give it a go though knock yourself out as it'll save us all time.  The format I use is just a simple text file that lists them one per line.
Title: Re: .117u1 and What it means to control viewers...
Post by: MKChamp on August 10, 2007, 02:48:47 pm
Howard,
A little off topic here, but...
When you release the new johnny5, would I be able to just drop in the exe or are you implementing anything that would cause my current cfgs to need adjusting?
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on August 10, 2007, 05:48:30 pm
Well, just like mame, num_0_pad becomes num_0pad so if you are using the number keys for anything then yes, because you'll also have to do so in mame, all of your ctrlr, cfg, and j5 layout files will have to be changed.

The good news is all three are textual-based cfgs, so you can open them up in notepad and do a simple replace function!
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on August 11, 2007, 01:57:24 am
update:

I can confirm (at least just by reading) that the numpad constants are the only ones that changed. 

Strangely enough, internally they are the same in most places. 
Title: Re: .117u1 and What it means to control viewers...
Post by: MKChamp on August 11, 2007, 02:27:14 am
I guess I'm not affected by the num key change...so even though I am a master of copy/paste, I won't need to execute those skills.
Ok...here comes the pressing question...
When you gonna release an updated version? I'm just curious because I greatly appreciate it's usefulness!
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on August 11, 2007, 03:09:06 am
Within the next week or two.  I've made the changes necessary to have it work with .108 and beyond but I've yet to test it.  Also I intend to use the new built in dde to communicate with mamehooker so that code needs to be added.
Title: Re: .117u1 and What it means to control viewers...
Post by: Shoegazer on August 12, 2007, 06:58:24 pm
@Howard_Casto: I'm no doubt blind, but I don't see where there's a way to actually set the analog-digital mapping feature to "auto".  I guess part of the problem is I prefer to use MAME32, though I would have thought there would be a place to turn on auto-mapping in the MAME32 gui.

Actually, from Aaron's post earlier it looks like MAME simply does this inherently, i.e. without even setting anything at all, though it would be great if we were to see which mapping was actually chosen on a per-game basis, optimally within the <tab> pop-up menu, rather than through -verbose alone.  He also indicates there being three built-in maps for 8-way, 4-way normal and 4-way diagonal (ala q*bert) though it would also be great if it had a 49-way mapping for games like sinistar, and could also leave mapping alone for games that don't need it at all, like food fight and after burner.  Perhaps it does?  Maybe someone here that's spent time with this new feature knows better than I.

Shoegazer
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on August 13, 2007, 01:01:05 am
Just to note I haven't sent any time with the analog in particular.  I just, you know..... RTFM!

(Look in the docs folder). 
Title: Re: .117u1 and What it means to control viewers...
Post by: Shoegazer on August 13, 2007, 08:10:45 am
I noticed that MAME32 does not include the docs/config.txt file (as was suggested earlier) so I had assumed the documentation was either suspended until the functionality/code was complete, or that it wasn't yet completely accurate and was left out for the time being.  In either event I figured it was a "safe to post" question, though I'll also check the regular MAME binary for it.

Thanks,
Shoegazer
Title: Re: .117u1 and What it means to control viewers...
Post by: u_rebelscum on August 13, 2007, 02:26:05 pm
... I don't see where there's a way to actually set the analog-digital mapping feature to "auto".  I guess part of the problem is I prefer to use MAME32....

... looks like MAME simply does this inherently, i.e. without even setting anything at all, though it would be great if we were to see which mapping was actually chosen on a per-game basis, optimally within the <tab> pop-up menu, rather than through -verbose alone.  He also indicates there being three built-in maps for 8-way, 4-way normal and 4-way diagonal (ala q*bert) though it would also be great if it had a 49-way mapping for games like sinistar, and could also leave mapping alone for games that don't need it at all, like food fight and after burner.  Perhaps it does?  Maybe someone here that's spent time with this new feature knows better than I.

Err, the default in mame.ini is "joystick_map auto".  That's pretty self explanatory, I think.   ;)
Not sure how mame32 does it, though; it might not be up to date. :dunno

The option -joystick_map is for translating analog joystick inputs to game's digital joysticks.  If the game used analog inputs, -joystick_map is ignored.  There is no 49-way or analog mapping, since those are not digital (IOW, not 4 switches).  FWIW, mame treats 49-way as analog inputs; instead of 256 or 128 or 2040 values per axis, it has seven.  If you want to change the way a stick works in a 49-way game, see if you can, in the game controls panel, change the slope, deadzone, end point, ect (not sure on the exact terms different manufacturers use).

I noticed that MAME32 does not include the docs/config.txt file (as was suggested earlier) so I had assumed the documentation was either suspended until the functionality/code was complete, or that it wasn't yet completely accurate and was left out for the time being.  In either event I figured it was a "safe to post" question, though I'll also check the regular MAME binary for it.

That mame32 doesn't have the file hints that mame32 hasn't caught up with official mame's new options.  New and changed options are one point that mame32 has to be edited to match, unlike most other changes.

It's a safe question, but no one knows much more than what the doc says, yet.  :)  I've only tested it once and glanced at the source.  I want to get into it more, but can't ATM.
Title: Re: .117u1 and What it means to control viewers...
Post by: hulkster on August 13, 2007, 05:10:43 pm
forgive me if this is a dumb question (which it probably is)....

but because of this analog digital thing....will games like Attack from the Planet of Robot Monsters, and Ikari Warriors work? 
Title: Re: .117u1 and What it means to control viewers...
Post by: Shoegazer on August 13, 2007, 07:46:59 pm
Hey Robin,

Thanks for the info - so yeah, right after I posted earlier today I found this:

http://www.mamedev.org/source/docs/config.txt.html

...and way down near the bottom is a very detailed description of the analog-digital mapping feature, written in Aaron's usual easy-to-understand-even-for-dirt-stupid-beginners style.  Which, by the way, is how I feel ATM.  :/

In any event, totally cool.  He really did some great work with this update!  If I understand right, games that use an analog controller will bypass the digital mappings and handle properly provided that you have "ADStick" set to "Joystick".  And if you are right about 49-way joystick handling in MAME, that takes care of my controller wish list (well, force feedback aside).

Actually, it WOULD be kinda nice of MAME32 were updated to reflect these changes.  It would be nice to have the docs within the MAME32 binary, and to have an option to set the deadzone of the analog controller, and to have a way to set your own maps within the interface.  But hey, as Steven Wright said, you can't have everything, where would you put it...?

I'm going to test this new feature tonight, leaving my U360 set to analog.  I suppose the best test would be q*bert since the control differences would be the most obvious. 

Thanks,
Shoegazer

UPDATE: Tried the new MAME built-in mapping features and so far, they work like a dream.  Tried it with q*bert, food fight, pacman, ms. pacman and sinistar - seems to be a pretty good selection for the different settings.  Thanks Aaron (if you're reading this) for such a fine job!
Title: Re: .117u1 and What it means to control viewers...
Post by: u_rebelscum on August 14, 2007, 11:47:23 am
forgive me if this is a dumb question (which it probably is)....

but because of this analog digital thing....will games like Attack from the Planet of Robot Monsters,

No change here.  You still need an analog joystick, which the original game had.  The difference was Hall Effect sensors instead of POTs, but they are interchangeable in many cases, so mame treating the game as an "analog joystick" is correct.  It's us users that are incorrect when we think POTs are the only way to have analog joysticks. 
(You did mean "Escape from...", right? ;))

Quote
and Ikari Warriors work? 

No change here either.  You still need a rotary stick (or spinner). :-\
Title: Re: .117u1 and What it means to control viewers...
Post by: Joystick Jerk on August 25, 2007, 01:32:01 am
The multimouse function sounds interesting, but is there a way to set up different pointer speeds for each mouse device attached to the computer? With my latest CP, the pointer speed with the trakball is a little slow, and with the spinner is a little too fast. I'd like to set up independant pointer speeds for each, but don't see how I can do it with the stock MS mouse configuration interface.
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on August 25, 2007, 02:17:31 am
Not in the os itself but you can within mame by adjusting the analog sensitivity.  It's been in there for a while btw, this is nothing new.
Title: Re: .117u1 and What it means to control viewers...
Post by: Joystick Jerk on August 26, 2007, 05:31:22 am
Not in the os itself but you can within mame by adjusting the analog sensitivity.  It's been in there for a while btw, this is nothing new.

---steaming pile of meadow muffin---, I honestly never knew you could adjust that sort of thing within Mame.
Title: Re: .117u1 and What it means to control viewers...
Post by: hulkster on August 26, 2007, 08:55:25 am
Not in the os itself but you can within mame by adjusting the analog sensitivity.  It's been in there for a while btw, this is nothing new.

k, so  you are saying that by adjusting some things in mame, those games are playable?  maybe i totally misread your statement, but you gave me a glimmer of hope.  and im guessing i could just make a ctrlr file for each game with the special sensitivity config??  :dunno
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on August 26, 2007, 09:07:20 am
No you have to go into each individual game and do it manually within mame.  Why the ctrlr files don't support it is beyond me. I know that the way mame parses the various files it would be difficult to implement, but it seems important enough that the effort should be made. 


You need to read the mame docs man, this is an old feature.  How you could not know of it is beyond me considering "analog controls" is an option in mame's menu whenever you press tab in a game with any analog controls.
Title: Re: .117u1 and What it means to control viewers...
Post by: hulkster on August 29, 2007, 12:55:47 pm
You need to read the mame docs man, this is an old feature.  How you could not know of it is beyond me considering "analog controls" is an option in mame's menu whenever you press tab in a game with any analog controls.

the reason i dont know about it is because i didnt know the official control type name ikari warriors and robot monsters used.  sorry i dont get my thrills from knowing every conceivable control type for every game.  ikari warriors = analog controls  :dunno  sounds good to me. 

btw, a simple "its in the mame docs, but you just need to set the analog sensitivity for each game in the mame menu" would have sufficed.  but i guess im used to this kinda of crap from you howard  :dizzy:
Title: Re: .117u1 and What it means to control viewers...
Post by: Howard_Casto on August 29, 2007, 02:30:45 pm
btw, a simple "its in the mame docs, but you just need to set the analog sensitivity for each game in the mame menu" would have sufficed.  but i guess im used to this kinda of crap from you howard  :dizzy:

I don't mean to pick on you man, but I'm getting sick and tired of people acting like I've been rude to them when I haven't been.  You para-phrased exactly what I said!

When I said "how you could not know that is beyond me" I didn't mean anything other than exactly what I've said, perhaps you are reading too much into it? 

Analog settings have been in mame for at least 5 years that I know of, and in the tab menu like they are now, so like I said they are nothing new and I honestly don't see how you could miss them seeing as how "analog controls" shows up everytime you go into the menu. Maybe I should have been more clear... analog controls only show up when a game has analog controls, that's how you know you can set them! :)

I really don't appreciate you mocking the fact that I know a lot about controls either.  I don't enjoy it, I had to do it because we didn't get much help with controls.dat.  So thanks a bunch for insulting me for doing all kinds of hard work for YOUR benefit. 

Surely you at least knew that robot monsters wouldn't use a digital controller?

I'm very sorry if I've offended you, but let me nipp this right in the budd.  (I deal with this over at consoles enough, I don't need anybody starting here.)


I am an honest person so you should take what I say in no other form but literally.  If I think you are a jerk, I'll say "I think you are a jerk!"  If I think you are stupid, I'll say "You are stupid"  If I say something like "I don't know how you could have missed it, that is exactly what I mean.

So I apologize if your feelings were hurt.  To use the same phrase again though, how anything that I said could have hurt your feelings is beyond me. :dunno
Title: Re: .117u1 and What it means to control viewers...
Post by: hulkster on August 29, 2007, 04:01:33 pm
ha, well my feelings are not hurt, and im not even sure if its possible for me to be "hurt" on a message board.  if so, then ive got serious emotional issues.  i appreciate your hard work and the fact that you know so much about this stuff...hence the reason i post here...to get answers from the experts.  i never take for granted what other people smarter than me, like yourself, know.  i can appreciate your bluntness in your responses but i just think that  you can phrase your responses a little differently. 

i only "mocked" you because you essentially were mocking me.  i wasnt hurt, i wasnt offended, or off crying some where...but more or less just making fun of you for making fun of me.  you mocked...er...sarcastically responded....to me by basically saying "dude, quit being retarded, the answer is right in front of your face".  well first of all, its only right in front of your face if you know what you are looking at (which i dont).  if someone asked me what type of controls the two games i listed use, analog or digital...i would have no clue.  so anyway, i mocked you for knowing so much about nerdy stuff like this.  if you cant take a little of your own medicine, i apologize and i guess i will leave all sarcastic responses to you because you apparently are the master.

i know my nerdy stuff, and get mocked all the time by my friends.  no big deal because i enjoy it.  you get mocked about this nerdy stuff because you enjoy arcadey stuff, but it shouldnt be any big deal....

but hey, at least i learned where your sore spot is.   ;D  but chill dude, i appreciate your help, hardwork, devotion, etc etc etc and i wouldnt have cool software on my cap (like esc wrappers and such) if it werent for you.  so thanks!  but chill.