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

Pages: 1

Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 883
Loc: The Room Next To You
Send PM


Inputs Syntax
#377566 - 07/10/18 11:11 PM


I'm in the process of adding working buttons to all of my files, and some of these have me stumped. The game in question at present is aliens. The only reference I can find in the driver source is thus:

PORT_START("DSW1")
KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Credits", SW1)
/* "No Credits" = both coin slots open, but no effect on coin counters */

PORT_START("DSW2")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x03, "1" )
PORT_DIPSETTING( 0x02, "2" )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0004, "SW2:3" ) /* Listed as "Unused" */
PORT_DIPUNUSED_DIPLOC( 0x0008, 0x0008, "SW2:4" ) /* Listed as "Unused" */
PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW2:5" ) /* Listed as "Unused" */
PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6,7")
PORT_DIPSETTING( 0x60, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x40, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )

PORT_START("DSW3")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW3:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW3:2" ) /* Listed as "Unused" */
PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW3:3" )
PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW3:4" ) /* Listed as "Unused" */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

PORT_START("P1")
KONAMI8_B12_COIN_START(1)

PORT_START("P2")
KONAMI8_B12_COIN_START(2)

From this, I can't determine what to put in the .lay file to get it to read the Player 1 start, Player 2 start, and buttons 1 and 2 for each player. The .cfg file wasn't much help either. Rather than ask how to find it for this particular game, since I'm going to be doing hundreds of these I'll ask instead what methodology you'd use to find it? Is there some kind of reverse hook app available?



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn



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


Re: Inputs Syntax new [Re: Nightvoice]
#377572 - 07/12/18 08:37 AM


I am not an expert... but I "think" I did figure this one out.

Typically, if you don't see the inputs for a game in the main driver, they will be in a separate linked file... in this particular case:

Line 14: #include "includes/konamipt.h"

After reading the file, it looks like many Konami games are going to link back here for reference (e.g. Finalizer).

Your last lines below list the inputs you're worried about:

> PORT_START("P1")
> KONAMI8_B12_COIN_START(1)
>
> PORT_START("P2")
> KONAMI8_B12_COIN_START(2)

Go back to konamipt.h and search for each line, and you'll find:

#define KONAMI8_B12_COIN_START( player ) \
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(player) \
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(player) \
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(player) \
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(player) \
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(player) \
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(player) \
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN##player ) \
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START##player )


Your inputtags are P1 and P2; your inputmasks are listed above... that "should" work, if I'm reading this right. (I don't have ability to test right now).

------------------------------------------------------------------
> I'm in the process of adding working buttons to all of my files, and some of these
> have me stumped. The game in question at present is aliens. The only reference I can
> find in the driver source is thus:
>
> PORT_START("DSW1")
> KONAMI_COINAGE_LOC(DEF_STR( Free_Play ), "No Credits", SW1)
> /* "No Credits" = both coin slots open, but no effect on coin counters */
>
> PORT_START("DSW2")
> PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
> PORT_DIPSETTING( 0x03, "1" )
> PORT_DIPSETTING( 0x02, "2" )
> PORT_DIPSETTING( 0x01, "3" )
> PORT_DIPSETTING( 0x00, "5" )
> PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0004, "SW2:3" ) /* Listed as "Unused" */
> PORT_DIPUNUSED_DIPLOC( 0x0008, 0x0008, "SW2:4" ) /* Listed as "Unused" */
> PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW2:5" ) /* Listed as "Unused" */
> PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:6,7")
> PORT_DIPSETTING( 0x60, DEF_STR( Easy ) )
> PORT_DIPSETTING( 0x40, DEF_STR( Normal ) )
> PORT_DIPSETTING( 0x20, DEF_STR( Hard ) )
> PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) )
> PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8")
> PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
> PORT_DIPSETTING( 0x00, DEF_STR( On ) )
>
> PORT_START("DSW3")
> PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW3:1")
> PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
> PORT_DIPSETTING( 0x00, DEF_STR( On ) )
> PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW3:2" ) /* Listed as "Unused" */
> PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW3:3" )
> PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW3:4" ) /* Listed as "Unused" */
> PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
> PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
> PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
> PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
>
> PORT_START("P1")
> KONAMI8_B12_COIN_START(1)
>
> PORT_START("P2")
> KONAMI8_B12_COIN_START(2)
>
> From this, I can't determine what to put in the .lay file to get it to read the
> Player 1 start, Player 2 start, and buttons 1 and 2 for each player. The .cfg file
> wasn't much help either. Rather than ask how to find it for this particular game,
> since I'm going to be doing hundreds of these I'll ask instead what methodology you'd
> use to find it? Is there some kind of reverse hook app available?




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




Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 883
Loc: The Room Next To You
Send PM


Re: Inputs Syntax new [Re: Mr. Do]
#377573 - 07/12/18 10:23 AM


Thanks. This was immensely helpful. Haven't had a chance to try it with other games, but so far it works for Aliens.

I'm in the process of re-doing all of my control panels with working HAPP buttons and I'm alphabetically done with the numerals/A's (this will take a while). I'm going with the grouping idea you used for Rygar and Bank Panic because it's a lot more practical for when people do custom edits later (as they invariably will). I'm assuming a default button size of 250 for most games unless the CPO or the panel scale dictate otherwise.



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn


Pages: 1

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

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