本文整理汇总了C++中set_led_status函数的典型用法代码示例。如果您正苦于以下问题:C++ set_led_status函数的具体用法?C++ set_led_status怎么用?C++ set_led_status使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_led_status函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: WRITE8_HANDLER
static WRITE8_HANDLER( jingbell_leds_w )
{
set_led_status(0, data & 0x01); // stop_1
set_led_status(1, data & 0x02); // stop_2
set_led_status(2, data & 0x04); // stop_3
set_led_status(3, data & 0x08); // stop
// data & 0x10?
out[2] = data;
show_out();
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:11,代码来源:igs009.c
示例2: WRITE8_HANDLER
static WRITE8_HANDLER( lamps1_w )
{
/* button lamps */
set_led_status(0,data & 0x01);
set_led_status(1,data & 0x02);
set_led_status(2,data & 0x04);
set_led_status(3,data & 0x08);
set_led_status(4,data & 0x10);
/* bit 5 toggles all the time - extra lamp? */
}
开发者ID:CrouchingLlama,项目名称:openlase-mame,代码行数:11,代码来源:usgames.c
示例3: WRITE8_HANDLER
static WRITE8_HANDLER( lamps1_w )
{
/* button lamps */
set_led_status(space->machine, 0,data & 0x01);
set_led_status(space->machine, 1,data & 0x02);
set_led_status(space->machine, 2,data & 0x04);
set_led_status(space->machine, 3,data & 0x08);
set_led_status(space->machine, 4,data & 0x10);
/* bit 5 toggles all the time - extra lamp? */
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:11,代码来源:usgames.c
示例4: dragrace_update_misc_flags
static void dragrace_update_misc_flags( address_space &space )
{
dragrace_state *state = space.machine().driver_data<dragrace_state>();
/* 0x0900 = set 3SPEED1 0x00000001
* 0x0901 = set 4SPEED1 0x00000002
* 0x0902 = set 5SPEED1 0x00000004
* 0x0903 = set 6SPEED1 0x00000008
* 0x0904 = set 7SPEED1 0x00000010
* 0x0905 = set EXPLOSION1 0x00000020
* 0x0906 = set SCREECH1 0x00000040
* 0x0920 - 0x0927 = clear 0x0900 - 0x0907
* 0x0909 = set KLEXPL1 0x00000200
* 0x090b = set MOTOR1 0x00000800
* 0x090c = set ATTRACT 0x00001000
* 0x090d = set LOTONE 0x00002000
* 0x090f = set Player 1 Start Lamp 0x00008000
* 0x0928 - 0x092f = clear 0x0908 - 0x090f
* 0x0910 = set 3SPEED2 0x00010000
* 0x0911 = set 4SPEED2 0x00020000
* 0x0912 = set 5SPEED2 0x00040000
* 0x0913 = set 6SPEED2 0x00080000
* 0x0914 = set 7SPEED2 0x00100000
* 0x0915 = set EXPLOSION2 0x00200000
* 0x0916 = set SCREECH2 0x00400000
* 0x0930 = clear 0x0910 - 0x0917
* 0x0919 = set KLEXPL2 0x02000000
* 0x091b = set MOTOR2 0x08000000
* 0x091d = set HITONE 0x20000000
* 0x091f = set Player 2 Start Lamp 0x80000000
* 0x0938 = clear 0x0918 - 0x091f
*/
set_led_status(space.machine(), 0, state->m_misc_flags & 0x00008000);
set_led_status(space.machine(), 1, state->m_misc_flags & 0x80000000);
discrete_sound_w(state->m_discrete, space, DRAGRACE_MOTOR1_DATA, ~state->m_misc_flags & 0x0000001f); // Speed1 data*
discrete_sound_w(state->m_discrete, space, DRAGRACE_EXPLODE1_EN, (state->m_misc_flags & 0x00000020) ? 1: 0); // Explosion1 enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_SCREECH1_EN, (state->m_misc_flags & 0x00000040) ? 1: 0); // Screech1 enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_KLEXPL1_EN, (state->m_misc_flags & 0x00000200) ? 1: 0); // KLEXPL1 enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_MOTOR1_EN, (state->m_misc_flags & 0x00000800) ? 1: 0); // Motor1 enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_MOTOR2_DATA, (~state->m_misc_flags & 0x001f0000) >> 0x10); // Speed2 data*
discrete_sound_w(state->m_discrete, space, DRAGRACE_EXPLODE2_EN, (state->m_misc_flags & 0x00200000) ? 1: 0); // Explosion2 enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_SCREECH2_EN, (state->m_misc_flags & 0x00400000) ? 1: 0); // Screech2 enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_KLEXPL2_EN, (state->m_misc_flags & 0x02000000) ? 1: 0); // KLEXPL2 enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_MOTOR2_EN, (state->m_misc_flags & 0x08000000) ? 1: 0); // Motor2 enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_ATTRACT_EN, (state->m_misc_flags & 0x00001000) ? 1: 0); // Attract enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_LOTONE_EN, (state->m_misc_flags & 0x00002000) ? 1: 0); // LoTone enable
discrete_sound_w(state->m_discrete, space, DRAGRACE_HITONE_EN, (state->m_misc_flags & 0x20000000) ? 1: 0); // HiTone enable
}
开发者ID:clobber,项目名称:UME,代码行数:53,代码来源:dragrace.c
示例5: dragrace_update_misc_flags
static void dragrace_update_misc_flags(void)
{
/* 0x0900 = set 3SPEED1 0x00000001
* 0x0901 = set 4SPEED1 0x00000002
* 0x0902 = set 5SPEED1 0x00000004
* 0x0903 = set 6SPEED1 0x00000008
* 0x0904 = set 7SPEED1 0x00000010
* 0x0905 = set EXPLOSION1 0x00000020
* 0x0906 = set SCREECH1 0x00000040
* 0x0920 - 0x0927 = clear 0x0900 - 0x0907
* 0x0909 = set KLEXPL1 0x00000200
* 0x090b = set MOTOR1 0x00000800
* 0x090c = set ATTRACT 0x00001000
* 0x090d = set LOTONE 0x00002000
* 0x090f = set Player 1 Start Lamp 0x00008000
* 0x0928 - 0x092f = clear 0x0908 - 0x090f
* 0x0910 = set 3SPEED2 0x00010000
* 0x0911 = set 4SPEED2 0x00020000
* 0x0912 = set 5SPEED2 0x00040000
* 0x0913 = set 6SPEED2 0x00080000
* 0x0914 = set 7SPEED2 0x00100000
* 0x0915 = set EXPLOSION2 0x00200000
* 0x0916 = set SCREECH2 0x00400000
* 0x0930 = clear 0x0910 - 0x0917
* 0x0919 = set KLEXPL2 0x02000000
* 0x091b = set MOTOR2 0x08000000
* 0x091d = set HITONE 0x20000000
* 0x091f = set Player 2 Start Lamp 0x80000000
* 0x0938 = clear 0x0918 - 0x091f
*/
set_led_status(0, dragrace_misc_flags & 0x00008000);
set_led_status(1, dragrace_misc_flags & 0x80000000);
discrete_sound_w(0x06, ~dragrace_misc_flags & 0x0000001f); // Speed1 data*
discrete_sound_w(0x04, (dragrace_misc_flags & 0x00000020) ? 1: 0); // Explosion1 enable
discrete_sound_w(0x00, (dragrace_misc_flags & 0x00000040) ? 1: 0); // Screech1 enable
discrete_sound_w(0x0a, (dragrace_misc_flags & 0x00000200) ? 1: 0); // KLEXPL1 enable
discrete_sound_w(0x08, (dragrace_misc_flags & 0x00000800) ? 1: 0); // Motor1 enable
discrete_sound_w(0x07, (~dragrace_misc_flags & 0x001f0000) >> 0x10); // Speed2 data*
discrete_sound_w(0x05, (dragrace_misc_flags & 0x00200000) ? 1: 0); // Explosion2 enable
discrete_sound_w(0x01, (dragrace_misc_flags & 0x00400000) ? 1: 0); // Screech2 enable
discrete_sound_w(0x0b, (dragrace_misc_flags & 0x02000000) ? 1: 0); // KLEXPL2 enable
discrete_sound_w(0x09, (dragrace_misc_flags & 0x08000000) ? 1: 0); // Motor2 enable
discrete_sound_w(0x0c, (dragrace_misc_flags & 0x00001000) ? 1: 0); // Attract enable
discrete_sound_w(0x02, (dragrace_misc_flags & 0x00002000) ? 1: 0); // LoTone enable
discrete_sound_w(0x03, (dragrace_misc_flags & 0x20000000) ? 1: 0); // HiTone enable
}
开发者ID:Ezio-PS,项目名称:mame2003-libretro,代码行数:52,代码来源:dragrace.c
示例6: dragrace_update_misc_flags
static void dragrace_update_misc_flags(void)
{
/* 0x0900 = set 3SPEED1 0x00000001
* 0x0901 = set 4SPEED1 0x00000002
* 0x0902 = set 5SPEED1 0x00000004
* 0x0903 = set 6SPEED1 0x00000008
* 0x0904 = set 7SPEED1 0x00000010
* 0x0905 = set EXPLOSION1 0x00000020
* 0x0906 = set SCREECH1 0x00000040
* 0x0920 - 0x0927 = clear 0x0900 - 0x0907
* 0x0909 = set KLEXPL1 0x00000200
* 0x090b = set MOTOR1 0x00000800
* 0x090c = set ATTRACT 0x00001000
* 0x090d = set LOTONE 0x00002000
* 0x090f = set Player 1 Start Lamp 0x00008000
* 0x0928 - 0x092f = clear 0x0908 - 0x090f
* 0x0910 = set 3SPEED2 0x00010000
* 0x0911 = set 4SPEED2 0x00020000
* 0x0912 = set 5SPEED2 0x00040000
* 0x0913 = set 6SPEED2 0x00080000
* 0x0914 = set 7SPEED2 0x00100000
* 0x0915 = set EXPLOSION2 0x00200000
* 0x0916 = set SCREECH2 0x00400000
* 0x0930 = clear 0x0910 - 0x0917
* 0x0919 = set KLEXPL2 0x02000000
* 0x091b = set MOTOR2 0x08000000
* 0x091d = set HITONE 0x20000000
* 0x091f = set Player 2 Start Lamp 0x80000000
* 0x0938 = clear 0x0918 - 0x091f
*/
set_led_status(0, dragrace_misc_flags & 0x00008000);
set_led_status(1, dragrace_misc_flags & 0x80000000);
discrete_sound_w(DRAGRACE_MOTOR1_DATA, ~dragrace_misc_flags & 0x0000001f); /* Speed1 data* */
discrete_sound_w(DRAGRACE_EXPLODE1_EN, (dragrace_misc_flags & 0x00000020) ? 1: 0); /* Explosion1 enable */
discrete_sound_w(DRAGRACE_SCREECH1_EN, (dragrace_misc_flags & 0x00000040) ? 1: 0); /* Screech1 enable */
discrete_sound_w(DRAGRACE_KLEXPL1_EN, (dragrace_misc_flags & 0x00000200) ? 1: 0); /* KLEXPL1 enable */
discrete_sound_w(DRAGRACE_MOTOR1_EN, (dragrace_misc_flags & 0x00000800) ? 1: 0); /* Motor1 enable */
discrete_sound_w(DRAGRACE_MOTOR2_DATA, (~dragrace_misc_flags & 0x001f0000) >> 0x10); /* Speed2 data* */
discrete_sound_w(DRAGRACE_EXPLODE2_EN, (dragrace_misc_flags & 0x00200000) ? 1: 0); /* Explosion2 enable */
discrete_sound_w(DRAGRACE_SCREECH2_EN, (dragrace_misc_flags & 0x00400000) ? 1: 0); /* Screech2 enable */
discrete_sound_w(DRAGRACE_KLEXPL2_EN, (dragrace_misc_flags & 0x02000000) ? 1: 0); /* KLEXPL2 enable */
discrete_sound_w(DRAGRACE_MOTOR2_EN, (dragrace_misc_flags & 0x08000000) ? 1: 0); /* Motor2 enable */
discrete_sound_w(DRAGRACE_ATTRACT_EN, (dragrace_misc_flags & 0x00001000) ? 1: 0); /* Attract enable */
discrete_sound_w(DRAGRACE_LOTONE_EN, (dragrace_misc_flags & 0x00002000) ? 1: 0); /* LoTone enable */
discrete_sound_w(DRAGRACE_HITONE_EN, (dragrace_misc_flags & 0x20000000) ? 1: 0); /* HiTone enable */
}
开发者ID:BirchJD,项目名称:xmame-0.103-RPi,代码行数:52,代码来源:dragrace.c
示例7: WRITE8_HANDLER
static WRITE8_HANDLER( spoker_leds_w )
{
spoker_state *state = space->machine().driver_data<spoker_state>();
set_led_status(space->machine(), 0, data & 0x01); // stop_1
set_led_status(space->machine(), 1, data & 0x02); // stop_2
set_led_status(space->machine(), 2, data & 0x04); // stop_3
set_led_status(space->machine(), 3, data & 0x08); // stop
// data & 0x10?
state->m_out[2] = data;
show_out(state->m_out);
}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:13,代码来源:spoker.c
示例8: WRITE8_HANDLER
static WRITE8_HANDLER( omegrace_leds_w )
{
/* bits 0 and 1 are coin counters */
coin_counter_w(space->machine, 0,data & 0x01);
coin_counter_w(space->machine, 1,data & 0x02);
/* bits 2 to 5 are the start leds (4 and 5 cocktail only) */
set_led_status(space->machine, 0,~data & 0x04);
set_led_status(space->machine, 1,~data & 0x08);
set_led_status(space->machine, 2,~data & 0x10);
set_led_status(space->machine, 3,~data & 0x20);
/* bit 6 flips screen (not supported) */
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:14,代码来源:omegrace.c
示例9: WRITE8_HANDLER
static WRITE8_HANDLER( portrait_ctrl_w )
{
/* bits 4 and 5 are unknown */
coin_counter_w(0, data & 0x01);
coin_counter_w(1, data & 0x02);
coin_counter_w(2, data & 0x04);
/* the 2 lamps near the camera */
set_led_status(0, data & 0x08);
set_led_status(1, data & 0x40);
/* shows the black and white photo from the camera */
output_set_value("photo", (data >> 7) & 1);
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:15,代码来源:portrait.c
示例10: WRITE_HANDLER
static WRITE_HANDLER( starshp1_misc_w )
{
data &= 1;
switch (offset & 7)
{
case 0:
starshp1_ship_explode = data;
break;
case 1:
starshp1_circle_mod = data;
break;
case 2:
starshp1_circle_kill = !data;
break;
case 3:
starshp1_starfield_kill = data;
break;
case 4:
starshp1_write_palette(data);
break;
case 5:
/* BLACK HOLE, not used */
break;
case 6:
starshp1_mux = data;
break;
case 7:
set_led_status(0, !data);
break;
}
}
开发者ID:Ezio-PS,项目名称:mame2003-libretro,代码行数:32,代码来源:starshp1.c
示例11: WRITE8_HANDLER
static WRITE8_HANDLER( kopunch_lamp_w )
{
set_led_status(0,~data & 0x80);
// if ((data & 0x7f) != 0x7f)
// popmessage("port 38 = %02x",data);
}
开发者ID:broftkd,项目名称:historic-mess,代码行数:7,代码来源:kopunch.c
示例12: WRITE8_HANDLER
static WRITE8_HANDLER( kopunch_lamp_w )
{
set_led_status(0,~data & 0x80);
/* if ((data & 0x7f) != 0x7f) */
/* ui_popup("port 38 = %02x",data); */
}
开发者ID:CrouchingLlama,项目名称:openlase-mame,代码行数:7,代码来源:kopunch.c
示例13: msm_led_torch_brightness_set
static void msm_led_torch_brightness_set(struct led_classdev *led_cdev,
enum led_brightness value)
{
if(value > 0)
value = 128 - value;
set_led_status(g_fctrl, value);
};
开发者ID:smoki3,项目名称:RAZORFERRARI,代码行数:7,代码来源:msm_led_flashlight.c
示例14: WRITE8_HANDLER
static WRITE8_HANDLER( videopin_led_w )
{
int i = (video_screen_get_vpos(space->machine->primary_screen) >> 5) & 7;
static const char *const matrix[8][4] =
{
{ "LED26", "LED18", "LED11", "LED13" },
{ "LED25", "LED17", "LED10", "LED08" },
{ "LED24", "LED29", "LED09", "LED07" },
{ "LED23", "LED28", "LED04", "LED06" },
{ "LED22", "LED27", "LED03", "LED05" },
{ "LED21", "LED16", "LED02", "-" },
{ "LED20", "LED15", "LED01", "-" },
{ "LED19", "LED14", "LED12", "-" }
};
output_set_value(matrix[i][0], (data >> 0) & 1);
output_set_value(matrix[i][1], (data >> 1) & 1);
output_set_value(matrix[i][2], (data >> 2) & 1);
output_set_value(matrix[i][3], (data >> 3) & 1);
if (i == 7)
set_led_status(0, data & 8); /* start button */
cputag_set_input_line(space->machine, "maincpu", 0, CLEAR_LINE);
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:25,代码来源:videopin.c
示例15: WRITE8_DEVICE_HANDLER
static WRITE8_DEVICE_HANDLER( sound2_w )
{
/* bit 3,6 - coin lockout, lamp10+11 in selection test mode */
coin_lockout_w(0, ~data & 0x08);
coin_lockout_w(1, ~data & 0x40);
set_led_status(9,data & 0x08);
set_led_status(10,data & 0x40);
/* bit 4,5 - lamps 12, 13 in selection test mode;
12 lights up if dsw maximum bet = 30 an bet > 15 or if dsw maximum bet = 10 an bet = 10 */
set_led_status(11,data & 0x10);
set_led_status(12,data & 0x20);
/* bit 7 goes directly to the sound amplifier */
dac_data_w(devtag_get_device(device->machine, "dac"), ((data & 0x80) >> 7) * 255);
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:16,代码来源:getrivia.c
示例16: WRITE8_HANDLER
static WRITE8_HANDLER( starshp1_misc_w )
{
starshp1_state *state = space->machine().driver_data<starshp1_state>();
data &= 1;
switch (offset & 7)
{
case 0:
state->m_ship_explode = data;
break;
case 1:
state->m_circle_mod = data;
break;
case 2:
state->m_circle_kill = !data;
break;
case 3:
state->m_starfield_kill = data;
break;
case 4:
state->m_inverse = data;
break;
case 5:
/* BLACK HOLE, not used */
break;
case 6:
state->m_mux = data;
break;
case 7:
set_led_status(space->machine(), 0, !data);
break;
}
}
开发者ID:cdenix,项目名称:psmame,代码行数:33,代码来源:starshp1.c
示例17: AY3600_init
int AY3600_init(running_machine &machine)
{
apple2_state *state = machine.driver_data<apple2_state>();
/* Init the key remapping table */
state->m_ay3600_keys = auto_alloc_array_clear(machine, unsigned int, AY3600_KEYS_LENGTH);
/* We poll the keyboard periodically to scan the keys. This is
actually consistent with how the AY-3600 keyboard controller works. */
machine.scheduler().timer_pulse(attotime::from_hz(60), FUNC(AY3600_poll));
/* Set Caps Lock light to ON, since that's how we default it. */
set_led_status(machine,1,1);
state->m_keywaiting = 0;
state->m_keycode = 0;
state->m_keystilldown = 0;
state->m_keymodreg = A2_KEYMOD_CAPSLOCK; // caps lock on
state->m_last_key = 0xff; /* necessary for special repeat key behaviour */
state->m_last_key_unmodified = 0xff; /* necessary for special repeat key behaviour */
state->m_time_until_repeat = MAGIC_KEY_REPEAT_NUMBER;
inputx_setup_natural_keyboard(machine,
AY3600_keyboard_queue_chars,
AY3600_keyboard_accept_char,
NULL);
return 0;
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:29,代码来源:ay3600.c
示例18: switch
void msx_cart_disk_type2::set_control(UINT8 data)
{
UINT8 old_m_control = m_control;
m_control = data;
switch (m_control & 3)
{
case 1:
m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL;
break;
case 2:
m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL;
break;
default:
m_floppy = NULL;
break;
}
if (m_floppy)
{
m_floppy->mon_w((m_control & 0x08) ? 0 : 1);
m_floppy->ss_w((m_control & 0x04) ? 1 : 0);
}
m_fdc->set_floppy(m_floppy);
if ((old_m_control ^ m_control) & 0x40)
{
set_led_status(machine(), 0, !(m_control & 0x40));
}
}
开发者ID:dinkc64,项目名称:mame,代码行数:34,代码来源:disk.c
示例19: WRITE8_HANDLER
static WRITE8_HANDLER( bwidow_misc_w )
{
/*
0x10 = p1 led
0x20 = p2 led
0x01 = coin counter 1
0x02 = coin counter 2
*/
static int lastdata;
if (data == lastdata) return;
set_led_status(0,~data & 0x10);
set_led_status(1,~data & 0x20);
coin_counter_w(0, data & 0x01);
coin_counter_w(1, data & 0x02);
lastdata = data;
}
开发者ID:broftkd,项目名称:historic-mame,代码行数:17,代码来源:bwidow.c
示例20: WRITE8_HANDLER
static WRITE8_HANDLER( bwidow_misc_w )
{
bwidow_state *state = space->machine().driver_data<bwidow_state>();
/*
0x10 = p1 led
0x20 = p2 led
0x01 = coin counter 1
0x02 = coin counter 2
*/
if (data == state->m_lastdata) return;
set_led_status(space->machine(), 0,~data & 0x10);
set_led_status(space->machine(), 1,~data & 0x20);
coin_counter_w(space->machine(), 0, data & 0x01);
coin_counter_w(space->machine(), 1, data & 0x02);
state->m_lastdata = data;
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:17,代码来源:bwidow.c
注:本文中的set_led_status函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论