Main > Software Forum
johnny 5 (or CPViewer) for non-mame
<< < (6/8) > >>
papaschtroumpf:

--- Quote from: Howard_Casto on October 05, 2005, 04:56:41 pm ---I just wanted to clarify some things. 

I made j5 as generic as possible because I had always planned on expanding it for other uses.  J5 is a data translator, with a very few exceptions, there are no constants in j5 that prevent you from "making" other physical inputs.  The list of possible inputs are stored and read from a simple text file and it looks for those inputs in the ini cfg/ect files.  It doesn't look to see if they are valid, nor does it care.  A search string is a search string. 

I did this because mame also supports "non mame" inputs.  Mame outputs these extra controls on a joystick/keyboard as whatever the windows driver labels them.  Since I have no way of knowing every possible input every odd-ball joystick puts out, this had to be done. 


To officially add these labels to the layout viewer simply open up the "keycode constants.txt" in the data files folder and add them at the bottom. (I would suggest adding a nice header like "PC Inputs Only:  ") This is also how you add static labels btw, just remember to put a "*" first in the case fo static labels.

--- End quote ---


I tried to add "START1=test" in controls.ini since START1 is one of the official MAME controls defined in my CTRLR file for MAME. More exactly it is defined as KEYCODE_1 or KEYCODE_ENTER. I think the default for MAME is just KEYCODE_1 but I have it set up as ENTER in my keyboard encoder, because ENTER is commonly needed in PC Games, especially for menu selections, which makes it fitting to be mapped to START1.

I added a KEYCODE_ENTER label in my layout, expecting it to show up in the generated picture but it didn't work.
I tried to run johnny5 with the -debug option and saw nothing in the debug window that referenced looking for START1.

what am I mising?
papaschtroumpf:

--- Quote from: jcrouse on October 05, 2005, 04:11:15 pm ---
I have made contact with the CPVW author and we are planning on some changes. For starters adding P3 and P4 buttons. We will also probably make about 12 labels per user AND a generic set of labels, probably eight or ten, you can use as you want. I will make a special layout designer specificall for the application to rid out the massive overhead of CPViewer. The designer will still require the .Net framework. However, you could create the layout by hand. I did that over the weekend.

Also, for some reason CPVW, as it is now, needs the alternating field and it must be set to either one or two. I'm not sure why but that seems to be the way it is.

I'll post more news as it materializes.

John

--- End quote ---

I'm not at home right now so I can't check, but I don't think I had anything special to do with the "alternating=" line, even thoguh I saw your comment in your email. My cab is an upright, is yours a cocktail? could it be why alternating seems to matter for you but not me? I'm not quite sure what the viewer setup wizard does under the hood, but cabinet style and orientation does seem to matter a lot.

Edit: the additional buttons sound great!
Howard_Casto:

--- Quote from: papaschtroumpf on October 05, 2005, 06:33:34 pm ---
--- Quote from: Howard_Casto on October 05, 2005, 04:56:41 pm ---I just wanted to clarify some things.
--- End quote ---

--- End quote ---
papaschtroumpf:

--- Quote from: papaschtroumpf on October 05, 2005, 06:33:34 pm ---I tried to add "START1=test" in controls.ini since START1 is one of the official MAME controls defined in my CTRLR file for MAME. More exactly it is defined as KEYCODE_1 or KEYCODE_ENTER. I think the default for MAME is just KEYCODE_1 but I have it set up as ENTER in my keyboard encoder, because ENTER is commonly needed in PC Games, especially for menu selections, which makes it fitting to be mapped to START1.

I added a KEYCODE_ENTER label in my layout, expecting it to show up in the generated picture but it didn't work.
I tried to run johnny5 with the -debug option and saw nothing in the debug window that referenced looking for START1.

what am I mising?

--- End quote ---


Is this what you mean?



--- Quote from: Howard_Casto on October 05, 2005, 10:49:49 pm ---  And of course start1 has to be somewhere in the p1controltype string setup properly in the format.  Viewers know which labels to read from an entry by the controltype entry at the beginning. 

--- End quote ---

I don't understand what this means, so it maybe it's the problem, but I can't fix it until I know what you mean. where is the "p1controltype" string?
Howard_Casto:
In the controls.ini of course.....  (P1Controls= )

This entry is always read first and tells the viewer how many and what kinds of virtual inputs this game uses.  If the mame constant of a label description isn't included, it never gets read.

To add a "virtual" control you have to have three things:

A label description in the controls.ini (P1Start=Start)

A Virtual/Physical link tacked onto the control type string (|Player 1 Start+P1Start)

A cfg/ctrlr/Std.ini entry that defines said virtual keys mame constant to a physical keyboard key (P1Start=KEYCODE_ENTER)



Please note that I have no clue if P1Start is a real constant, I'm just using it as an example. 


Also note that it doesn't have to be a real mame constant, it just has to be in the same name in the cfgs  and both places in the controls.ini.  And of course it has to have a real key assigned to it in said mame cfgs.

The easiest way to add "fake" virtual inputs is to define a bunch in your std.ini which may or may not be in your current mame build, but will be read by the viewer if you include one.

Navigation
Message Index
Next page
Previous page

Go to full version