本文整理汇总了C++中readinputportbytag函数的典型用法代码示例。如果您正苦于以下问题:C++ readinputportbytag函数的具体用法?C++ readinputportbytag怎么用?C++ readinputportbytag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了readinputportbytag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: READ8_HANDLER
static READ8_HANDLER(read_a00x)
{
switch(offset)
{
case 0x02: return reg_a002;
case 0x04: return readinputportbytag("A004");
case 0x05: return readinputportbytag("A005");
case 0x0c: return input_port_0_r(0); // stats / reset
case 0x0e: return readinputportbytag("A00E");// coin/reset
}
if(offset==0x00) //muxed with A002?
{
switch(reg_a002&0x3f)
{
case 0x3b:
return input_port_2_r(0);//bet10 / pay out
case 0x3e:
return input_port_3_r(0);//TODO : trace f564
case 0x3d:
return input_port_4_r(0);
default:
logerror("A000 read with mux=0x%02x\n",reg_a002&0x3f);
}
}
return 0xff;
}
示例2: READ32_HANDLER
static READ32_HANDLER( analog_port1_r )
{
#if (HACK_TMEK_CONTROLS)
int pots[4];
compute_fake_pots(pots);
return (pots[2] << 24) | (pots[1] << 8);
#else
return (readinputportbytag("IN6") << 24) | (readinputportbytag("IN7") << 8);
#endif
}
示例3: READ8_HANDLER
static READ8_HANDLER( triothep_control_r )
{
switch (trio_control_select) {
case 0: return readinputportbytag("IN0"); /* Player 1 */
case 1: return readinputportbytag("IN1"); /* Player 2 */
case 2: return readinputportbytag("DSW1"); /* Dip 1 */
case 3: return readinputportbytag("DSW2"); /* Dip 2 */
case 4: return readinputportbytag("IN2"); /* VBL */
}
return 0xff;
}
示例4: READ8_HANDLER
static READ8_HANDLER( control_data_r )
{
switch (control_port_select) {
case 0xfe: return readinputportbytag("IN0"); /* Player 1 */
case 0xfd: return readinputportbytag("IN1"); /* Player 2 */
case 0xfb: return readinputportbytag("IN2"); /* Coins */
case 0xf7: return readinputportbytag("DSW2"); /* Dip 2 */
case 0xef: return readinputportbytag("DSW1"); /* Dip 1 */
}
return 0xff;
}
示例5: amiga_read_joy1dat
static UINT16 amiga_read_joy1dat(void)
{
if ( readinputportbytag("config") & 0x10 ) {
/* Joystick */
return readinputportbytag_safe("JOY1DAT", 0xffff);
} else {
/* Mouse */
int input;
input = ( readinputportbytag("P1MOUSEX") & 0xff );
input |= ( readinputportbytag("P1MOUSEY") & 0xff ) << 8;
return input;
}
}
示例6: astrof_p2_controls_r
static UINT32 astrof_p2_controls_r(void *param)
{
UINT32 ret;
/* on an upright cabinets, a single set of controls
is connected to both sets of pins on the edge
connector */
if (readinputportbytag("CAB"))
ret = readinputportbytag("P2");
else
ret = readinputportbytag("P1");
return ret;
}
示例7: tempest_knob_r
static UINT32 tempest_knob_r(void *param)
{
UINT32 ret;
if (tempest_player_select)
{
ret = readinputportbytag(TEMPEST_KNOB_P2_TAG);
}
else
{
ret = readinputportbytag(TEMPEST_KNOB_P1_TAG);
}
return ret;
}
示例8: tempest_buttons_r
static UINT32 tempest_buttons_r(void *param)
{
UINT32 ret;
if (tempest_player_select)
{
ret = readinputportbytag(TEMPEST_BUTTONS_P2_TAG);
}
else
{
ret = readinputportbytag(TEMPEST_BUTTONS_P1_TAG);
}
return ret;
}
示例9: READ16_HANDLER
static READ16_HANDLER( coin_chip_r )
{
if (offset == 1)
return readinputportbytag("COINCHIP");
logerror("%06x:coin_chip_r(%02x) & %04x\n", activecpu_get_pc(), offset, mem_mask ^ 0xffff);
return 0xffff;
}
示例10: INTERRUPT_GEN
static INTERRUPT_GEN( coin_nmi )
{
UINT32 coin = readinputportbytag("COIN");
UINT32 service = readinputportbytag("SERVICE");
/* both the coin input and the serice credit generates an NMI */
if (coin || service)
cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
/* the coin input is also connected to the coin counter */
if (coin)
{
coin_counter_w(0, 1);
coin_counter_w(0, 0);
}
}
示例11: compute_fake_pots
INLINE void compute_fake_pots(int *pots)
{
int fake = readinputportbytag("FAKE");
pots[0] = pots[1] = pots[2] = pots[3] = 0x80;
if (fake & 0x01) /* up */
{
if (fake & 0x04) /* up and left */
pots[3] = 0x00;
else if (fake & 0x08) /* up and right */
pots[1] = 0x00;
else /* up only */
pots[1] = pots[3] = 0x00;
}
else if (fake & 0x02) /* down */
{
if (fake & 0x04) /* down and left */
pots[3] = 0xff;
else if (fake & 0x08) /* down and right */
pots[1] = 0xff;
else /* down only */
pots[1] = pots[3] = 0xff;
}
else if (fake & 0x04) /* left only */
pots[1] = 0xff, pots[3] = 0x00;
else if (fake & 0x08) /* right only */
pots[3] = 0xff, pots[1] = 0x00;
}
示例12: READ8_HANDLER
static READ8_HANDLER( spacduel_IN3_r )
{
int res;
int res1;
int res2;
res1 = readinputportbytag("IN3");
res2 = readinputportbytag("IN4");
res = 0x00;
switch (offset & 0x07)
{
case 0:
if (res1 & IN_SHIELD) res |= 0x80;
if (res1 & IN_FIRE) res |= 0x40;
break;
case 1: /* Player 2 */
if (res2 & IN_SHIELD) res |= 0x80;
if (res2 & IN_FIRE) res |= 0x40;
break;
case 2:
if (res1 & IN_LEFT) res |= 0x80;
if (res1 & IN_RIGHT) res |= 0x40;
break;
case 3: /* Player 2 */
if (res2 & IN_LEFT) res |= 0x80;
if (res2 & IN_RIGHT) res |= 0x40;
break;
case 4:
if (res1 & IN_THRUST) res |= 0x80;
if (res1 & IN_P1) res |= 0x40;
break;
case 5: /* Player 2 */
if (res2 & IN_THRUST) res |= 0x80;
break;
case 6:
if (res1 & IN_P2) res |= 0x80;
break;
case 7:
res = (0x00 /* upright */ | (0 & 0x40));
break;
}
return res;
}
示例13: MACHINE_RESET
static MACHINE_RESET( aquarium )
{
UINT16 *RAM = (UINT16 *)memory_region(REGION_CPU1);
int data = readinputportbytag("FAKE");
/* Language : 0x0000 = Japanese - Other value = English */
RAM[0x000a5c/2] = data;
}
示例14: cidelsa_in_ef
static int cidelsa_in_ef(void)
{
/*
EF1 CDP1869 _PRD
EF2 Test
EF3 Coin 2
EF4 Coin 1
*/
return (cdp1869_prd & 0x01) + (readinputportbytag("EF") & 0xfe);
}
示例15: READ16_HANDLER
static READ16_HANDLER( horekid_IN2_r )
{
int data = readinputportbytag("IN1");
if (!(data & 0x40)) // FAKE button 3 for "Debug Mode"
{
data &= 0x40;
data |= ~0x30;
}
return data;
}