MAMEWorld >> MAME Artwork: Official
View all threads Index   Threaded Mode Threaded  

Pages: 1

Vaughan
Wanna Bezel?
Reged: 03/14/15
Posts: 419
Loc: UK
Send PM


Cisco Heat - Gear Lever Question
#344757 - 09/04/15 12:44 PM


Hello all.

I have a question about the gear lever shown in a lot of games, including Cisco Heat.

I'm new to this, so am a bit lost.

Firstly Cisco Heat has the option to display the gear lever even if you have no artwork file - from what I can fathom, this was built directly into the driver by a certain Mr. Angelo Salese

Since I don't know how to access the built in lever with my Bezel, I set about creating my own. Creating the lever in a lay file is simple enough, but it's the - (I assume) - inputtag and inputmask that is catching me out. In other words, I can draw the gear lever just fine, but it doesn't actually work.

Am I on the right track with the Inputtag/inputmask? If so, how can I find out the correct value to use? Either way, how could I have found the necessary information myself without troubling you good folk?

Sorry to be a nuisance, curious minds need to know, and Big Karnak needs appeasing.



Mr. DoAdministrator
MAME Art Editor
Reged: 09/21/03
Posts: 4875
Loc: California
Send PM


Re: Cisco Heat - Gear Lever Question new [Re: Vaughan]
#344760 - 09/04/15 04:02 PM Attachment: tmyk.jpg 55 KB (4 downloads)


> Hello all.
>
> I have a question about the gear lever shown in a lot of games, including Cisco Heat.
>
> I'm new to this, so am a bit lost.
>
> Firstly Cisco Heat has the option to display the gear lever even if you have no
> artwork file - from what I can fathom, this was built directly into the driver by a
> certain Mr. Angelo Salese
>
> Since I don't know how to access the built in lever with my Bezel, I set about
> creating my own. Creating the lever in a lay file is simple enough, but it's the - (I
> assume) - inputtag and inputmask that is catching me out. In other words, I can draw
> the gear lever just fine, but it doesn't actually work.
>
> Am I on the right track with the Inputtag/inputmask? If so, how can I find out the
> correct value to use? Either way, how could I have found the necessary information
> myself without troubling you good folk?
>
> Sorry to be a nuisance, curious minds need to know, and Big Karnak needs appeasing.

Any game that has a built-in LAY file, you can find the LAY file here:

https://github.com/mamedev/mame/tree/master/src/mame/layout

From there, you can copy and paste.

To further answer your question... let's look at two specific files, so you understand how it works.

Here is the built-in LAY file for Cisco Heat:

https://github.com/mamedev/mame/blob/master/src/mame/layout/cischeat.lay

Here is the driver for Cisco Heat:

https://github.com/mamedev/mame/blob/master/src/mame/drivers/cischeat.c

First... different driver files may or may not be commented as well as other driver files. So keep that in mind.

Every driver file will have a section for "Input Ports." In this one, it starts at Line 707.

Go down through that section, to find the inputs for the specific game your looking for. In this case, Line 850. The actual code begins at line 858, where the code starts at "static INPUT_PORTS_START"

This particular game has six input ports defined as "IN1" to "IN6."

We need to review each port, to find which button controls the gear shift. In this case, it is "IN2."

In that section, you'll see different individual inputs defined. The shifter is at Line 871, which is set at PORT_BIT 0x02.

Also notice on that line where the PORT_NAME is defined. This is what the control will be named in the TAB menu when playing the game in MAME. (That's a hint on how to find the INPUT you are looking for).

Back to the LAY file: at Line 55 is where you are defining which element to use to display the shifter on screen. In this same line is where you will link that element back to the defined input.

"inputtag" will match the INPUT_PORT in the driver, in this case, IN2.

"inputmask" will match the PORT_BIT within that INPUT_PORT, in this case, 0x02.

And there you go.

[ATTACHED IMAGE]

Attachment




RELAX and just have fun. Remember, it's all about the games.




Vaughan
Wanna Bezel?
Reged: 03/14/15
Posts: 419
Loc: UK
Send PM


Re: Cisco Heat - Gear Lever Question new [Re: Mr. Do]
#344761 - 09/04/15 05:41 PM


First and foremost, thank you Mr. Do for taking the time explaining this to me. You wouldn't believe how close I was to getting this, but I just didn't have that bit of knowledge to stitch it together. It would have helped greatly if I hadn't typed 0x20 instead of 0x02 in my tests - but we won't go there.

I've got it now, and am more knowledgeable all around, which is a win-win as far as I'm concerned.

Talking of winning - by the time Big Karnak reads this the new ZIP will be in my dropbox and he has his wish fulfilled. Just use the old link, I think dropbox overwrites the file.

Thanks for both Mr.Do and BK - one for the knowledge, and the other for pushing me that little bit farther, I always enjoy learning.



Big Karnak
Part-time Lurker
Reged: 05/22/13
Posts: 1011
Loc: Mount St. Lurkling
Send PM


Re: Cisco Heat - Gear Lever Question new [Re: Vaughan]
#344772 - 09/05/15 05:13 AM


I thank you both as well.


Pages: 1

MAMEWorld >> MAME Artwork: Official
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Mr. Do 
0 registered and 324 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1906