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

Mr. DoAdministrator
MAME Art Editor
Reged: 09/21/03
Posts: 4856
Loc: California
Send PM
Re: Inputs Syntax
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.








Entire thread
Subject Posted by Posted on
* Inputs Syntax Nightvoice 07/10/18 11:11 PM
. * Re: Inputs Syntax Mr. DoAdministrator  07/12/18 08:37 AM
. * Re: Inputs Syntax Nightvoice  07/12/18 10:23 AM

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