本文整理汇总了C++中devtag_get_device函数的典型用法代码示例。如果您正苦于以下问题:C++ devtag_get_device函数的具体用法?C++ devtag_get_device怎么用?C++ devtag_get_device使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了devtag_get_device函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: MACHINE_START
static MACHINE_START( actfancr )
{
actfancr_state *state = (actfancr_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:7,代码来源:actfancr.c
示例2: WRITE8_HANDLER
static WRITE8_HANDLER( speech_control_w )
{
UINT8 previous = speech_control;
speech_control = data;
/* bit 0 enables/disables the NMI line */
nmi_state_update(space->machine);
/* bit 1 controls a LED on the sound board */
/* bit 2 goes to 8913 BDIR pin */
if ((previous & 0x04) != 0 && (data & 0x04) == 0)
{
/* bit 3 selects which of the two 8913 to enable */
/* bit 4 goes to the 8913 BC1 pin */
const device_config *ay = devtag_get_device(space->machine, (data & 0x08) ? "ay1" : "ay2");
ay8910_data_address_w(ay, data >> 4, *psg_latch);
}
/* bit 5 goes to the speech chip DIRECT DATA TEST pin */
/* bit 6 = speech chip DATA PRESENT pin; high then low to make the chip read data */
if ((previous & 0x40) == 0 && (data & 0x40) != 0)
{
const device_config *sp = devtag_get_device(space->machine, "sp");
sp0250_w(sp, 0, *sp0250_latch);
}
/* bit 7 goes to the speech chip RESET pin */
if ((previous ^ data) & 0x80)
{
const device_config *sp = devtag_get_device(space->machine, "sp");
device_reset(sp);
}
}
开发者ID:nitrologic,项目名称:emu,代码行数:35,代码来源:gottlieb.c
示例3: MACHINE_START
static MACHINE_START( firetrap )
{
firetrap_state *state = (firetrap_state *)machine->driver_data;
UINT8 *MAIN = memory_region(machine, "maincpu");
UINT8 *SOUND = memory_region(machine, "audiocpu");
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
state->msm = devtag_get_device(machine, "msm");
memory_configure_bank(machine, "bank1", 0, 4, &MAIN[0x10000], 0x4000);
memory_configure_bank(machine, "bank2", 0, 2, &SOUND[0x10000], 0x4000);
state_save_register_global(machine, state->i8751_current_command);
state_save_register_global(machine, state->irq_enable);
state_save_register_global(machine, state->nmi_enable);
state_save_register_global(machine, state->i8751_return);
state_save_register_global(machine, state->i8751_init_ptr);
state_save_register_global(machine, state->msm5205next);
state_save_register_global(machine, state->adpcm_toggle);
state_save_register_global(machine, state->int_latch);
state_save_register_global(machine, state->coin_command_pending);
state_save_register_global_array(machine, state->scroll1_x);
state_save_register_global_array(machine, state->scroll1_y);
state_save_register_global_array(machine, state->scroll2_x);
state_save_register_global_array(machine, state->scroll2_y);
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:27,代码来源:firetrap.c
示例4: MACHINE_START
static MACHINE_START(quakeat)
{
cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"), irq_callback);
quakeat_devices.pic8259_1 = devtag_get_device( machine, "pic8259_1" );
quakeat_devices.pic8259_2 = devtag_get_device( machine, "pic8259_2" );
}
开发者ID:nitrologic,项目名称:emu,代码行数:7,代码来源:quakeat.c
示例5: WRITE8_HANDLER
static WRITE8_HANDLER( tp84_filter_w )
{
int C;
/* 76489 #0 */
C = 0;
if (offset & 0x008) C += 47000; /* 47000pF = 0.047uF */
if (offset & 0x010) C += 470000; /* 470000pF = 0.47uF */
filter_rc_set_RC(devtag_get_device(space->machine, "filter1"),FLT_RC_LOWPASS,1000,2200,1000,CAP_P(C));
/* 76489 #1 (optional) */
C = 0;
if (offset & 0x020) C += 47000; /* 47000pF = 0.047uF */
if (offset & 0x040) C += 470000; /* 470000pF = 0.47uF */
// filter_rc_set_RC(devtag_get_device(space->machine, "filter2"),1000,2200,1000,C);
/* 76489 #2 */
C = 0;
if (offset & 0x080) C += 470000; /* 470000pF = 0.47uF */
filter_rc_set_RC(devtag_get_device(space->machine, "filter2"),FLT_RC_LOWPASS,1000,2200,1000,CAP_P(C));
/* 76489 #3 */
C = 0;
if (offset & 0x100) C += 470000; /* 470000pF = 0.47uF */
filter_rc_set_RC(devtag_get_device(space->machine, "filter3"),FLT_RC_LOWPASS,1000,2200,1000,CAP_P(C));
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:26,代码来源:tp84.c
示例6: MACHINE_START
static MACHINE_START( dietgo )
{
dietgo_state *state = (dietgo_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
state->deco16ic = devtag_get_device(machine, "deco_custom");
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:8,代码来源:dietgo.c
示例7: READ8_HANDLER
static READ8_HANDLER( spcforce_SN76496_select_r )
{
if (~spcforce_SN76496_select & 0x40) return sn76496_ready_r(devtag_get_device(space->machine, "sn1"), 0 );
if (~spcforce_SN76496_select & 0x20) return sn76496_ready_r(devtag_get_device(space->machine, "sn2"), 0 );
if (~spcforce_SN76496_select & 0x10) return sn76496_ready_r(devtag_get_device(space->machine, "sn3"), 0 );
return 0;
}
开发者ID:nitrologic,项目名称:emu,代码行数:8,代码来源:spcforce.c
示例8: WRITE8_HANDLER
static WRITE8_HANDLER( spcforce_SN76496_select_w )
{
spcforce_SN76496_select = data;
if (~data & 0x40) sn76496_w(devtag_get_device(space->machine, "sn1"), 0, spcforce_SN76496_latch);
if (~data & 0x20) sn76496_w(devtag_get_device(space->machine, "sn2"), 0, spcforce_SN76496_latch);
if (~data & 0x10) sn76496_w(devtag_get_device(space->machine, "sn3"), 0, spcforce_SN76496_latch);
}
开发者ID:nitrologic,项目名称:emu,代码行数:8,代码来源:spcforce.c
示例9: DEVICE_START
static DEVICE_START( namco_06xx )
{
const namco_06xx_config *config = (const namco_06xx_config *)device->baseconfig().inline_config;
namco_06xx_state *state = get_safe_token(device);
int devnum;
assert(config != NULL);
/* resolve our CPU */
state->nmicpu = devtag_get_device(device->machine, config->nmicpu);
assert(state->nmicpu != NULL);
/* resolve our devices */
state->device[0] = (config->chip0 != NULL) ? devtag_get_device(device->machine, config->chip0) : NULL;
assert(state->device[0] != NULL || config->chip0 == NULL);
state->device[1] = (config->chip1 != NULL) ? devtag_get_device(device->machine, config->chip1) : NULL;
assert(state->device[1] != NULL || config->chip1 == NULL);
state->device[2] = (config->chip2 != NULL) ? devtag_get_device(device->machine, config->chip2) : NULL;
assert(state->device[2] != NULL || config->chip2 == NULL);
state->device[3] = (config->chip3 != NULL) ? devtag_get_device(device->machine, config->chip3) : NULL;
assert(state->device[3] != NULL || config->chip3 == NULL);
/* loop over devices and set their read/write handlers */
for (devnum = 0; devnum < 4; devnum++)
if (state->device[devnum] != NULL)
{
device_type type = state->device[devnum]->type;
if (type == NAMCO_50XX)
{
state->read[devnum] = namco_50xx_read;
state->readreq[devnum] = namco_50xx_read_request;
state->write[devnum] = namco_50xx_write;
}
else if (type == NAMCO_51XX)
{
state->read[devnum] = namco_51xx_read;
state->write[devnum] = namco_51xx_write;
}
else if (type == NAMCO_52XX)
state->write[devnum] = namco_52xx_write;
else if (type == NAMCO_53XX)
{
state->read[devnum] = namco_53xx_read;
state->readreq[devnum] = namco_53xx_read_request;
}
else if (type == NAMCO_54XX)
state->write[devnum] = namco_54xx_write;
else
fatalerror("Unknown device type %s connected to Namco 06xx", state->device[devnum]->name());
}
/* allocate a timer */
state->nmi_timer = timer_alloc(device->machine, nmi_generate, (void *)device);
state_save_register_device_item(device, 0, state->control);
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:57,代码来源:namco06.c
示例10: MACHINE_START
static MACHINE_START( rainbow )
{
rainbow_state *state = (rainbow_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
state->pc080sn = devtag_get_device(machine, "pc080sn");
state->pc090oj = devtag_get_device(machine, "pc090oj");
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:9,代码来源:rainbow.c
示例11: WRITE8_HANDLER
static WRITE8_HANDLER( cavelon_banksw_w )
{
cavelon_banksw(space->machine);
if ((offset >= 0x0100) && (offset <= 0x0103))
ppi8255_w(devtag_get_device(space->machine, "ppi8255_0"), offset - 0x0100, data);
else if ((offset >= 0x0200) && (offset <= 0x0203))
ppi8255_w(devtag_get_device(space->machine, "ppi8255_1"), offset - 0x0200, data);
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:9,代码来源:scramble.c
示例12: MACHINE_RESET
static MACHINE_RESET( skeetsht )
{
skeetsht_state *state = (skeetsht_state *)machine->driver_data;
state->ay = devtag_get_device(machine, "aysnd");
state->tms = devtag_get_device(machine, "tms");
/* Setup the Bt476 VGA RAMDAC palette chip */
tlc34076_reset(6);
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:10,代码来源:skeetsht.c
示例13: MACHINE_START
static MACHINE_START( boogwing )
{
boogwing_state *state = (boogwing_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
state->deco16ic = devtag_get_device(machine, "deco_custom");
state->oki1 = devtag_get_device(machine, "oki1");
state->oki2 = devtag_get_device(machine, "oki2");
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:10,代码来源:boogwing.c
示例14: READ8_HANDLER
static READ8_HANDLER( cavelon_banksw_r )
{
cavelon_banksw(space->machine);
if ((offset >= 0x0100) && (offset <= 0x0103))
return ppi8255_r(devtag_get_device(space->machine, "ppi8255_0"), offset - 0x0100);
else if ((offset >= 0x0200) && (offset <= 0x0203))
return ppi8255_r(devtag_get_device(space->machine, "ppi8255_1"), offset - 0x0200);
return 0xff;
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:11,代码来源:scramble.c
示例15: WRITE8_HANDLER
static WRITE8_HANDLER( dual_pokey_w )
{
int pokey_num = (offset >> 3) & 0x01;
int control = (offset & 0x10) >> 1;
int pokey_reg = (offset % 8) | control;
if (pokey_num == 0)
pokey_w(devtag_get_device(space->machine, "pokey1"), pokey_reg, data);
else
pokey_w(devtag_get_device(space->machine, "pokey2"), pokey_reg, data);
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:11,代码来源:mhavoc.c
示例16: MACHINE_START
static MACHINE_START( brkthru )
{
brkthru_state *state = (brkthru_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
state_save_register_global(machine, state->bgscroll);
state_save_register_global(machine, state->bgbasecolor);
state_save_register_global(machine, state->flipscreen);
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:11,代码来源:brkthru.c
示例17: READ8_HANDLER
static READ8_HANDLER( dual_pokey_r )
{
int pokey_num = (offset >> 3) & 0x01;
int control = (offset & 0x10) >> 1;
int pokey_reg = (offset % 8) | control;
if (pokey_num == 0)
return pokey_r(devtag_get_device(space->machine, "pokey1"), pokey_reg);
else
return pokey_r(devtag_get_device(space->machine, "pokey2"), pokey_reg);
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:11,代码来源:mhavoc.c
示例18: MACHINE_RESET
static MACHINE_RESET( opwolf )
{
adpcm_b[0] = adpcm_b[1] = 0;
adpcm_c[0] = adpcm_c[1] = 0;
adpcm_pos[0] = adpcm_pos[1] = 0;
adpcm_end[0] = adpcm_end[1] = 0;
adpcm_data[0] = adpcm_data[1] = -1;
msm5205_reset_w(devtag_get_device(machine, "msm1"), 1);
msm5205_reset_w(devtag_get_device(machine, "msm2"), 1);
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:11,代码来源:opwolf.c
示例19: MACHINE_START
static MACHINE_START( f1gp )
{
f1gp_state *state = (f1gp_state *)machine->driver_data;
UINT8 *ROM = memory_region(machine, "audiocpu");
memory_configure_bank(machine, "bank1", 0, 2, &ROM[0x10000], 0x8000);
state->audiocpu = devtag_get_device(machine, "audiocpu");
state->k053936 = devtag_get_device(machine, "k053936");
MACHINE_START_CALL(f1gpb);
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:12,代码来源:f1gp.c
示例20: MACHINE_START
GFXDECODE_END
static MACHINE_START( mouser )
{
mouser_state *state = (mouser_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
state_save_register_global(machine, state->sound_byte);
state_save_register_global(machine, state->nmi_enable);
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:13,代码来源:mouser.c
注:本文中的devtag_get_device函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论