INPUT_PORTS_END /****************************** * machine reset * ******************************/ void fireball_state::machine_reset() { int_timing=1; output_set_digit_value(5, 0x3f); output_set_digit_value(6, 0x3f); output_set_value("Hopper1", 0); output_set_value("Hopper2", 0); output_set_value("Hopper3", 0); output_set_value("GameOver", 0); output_set_value("Title", 0); output_set_value("Credit", 0); output_set_value("SS", 0); output_set_value("C_LOCK", 0); output_set_value("SV", 0); output_set_value("FBV", 0); output_set_value("RV", 0); }
void tehkanwc_state::gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 led,int player) { if (led&0x80) output_set_digit_value(player, led&0x7f); else output_set_digit_value(player, 0x00); }
void sc2_state::sc2_update_display() { UINT8 digit_data = BITSWAP8( m_digit_data,7,0,1,2,3,4,5,6 ) & 0x7f; if (!BIT(m_led_selected, 0)) { output_set_digit_value(0, digit_data); m_led_7seg_data[0] = digit_data; output_set_led_value(0, BIT(m_digit_data, 7)); } if (!BIT(m_led_selected, 1)) { output_set_digit_value(1, digit_data); m_led_7seg_data[1] = digit_data; output_set_led_value(1, BIT(m_digit_data, 7)); } if (!BIT(m_led_selected, 2)) { output_set_digit_value(2, digit_data); m_led_7seg_data[2] = digit_data; } if (!BIT(m_led_selected, 3)) { output_set_digit_value(3, digit_data); m_led_7seg_data[3] = digit_data; } }
static void gridiron_draw_led(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 led,int player) { if (led&0x80) output_set_digit_value(player, led&0x7f); else output_set_digit_value(player, 0x00); }
void fidelz80_state::update_display(running_machine &machine) { // data for the 4x 7seg leds, bits are 0bxABCDEFG UINT8 out_digit = BITSWAP8( m_digit_data,7,0,1,2,3,4,5,6 ) & 0x7f; if (m_led_selected&0x04) { output_set_digit_value(0, out_digit); output_set_led_value(1, m_led_selected & 0x01); } if (m_led_selected&0x08) { output_set_digit_value(1, out_digit); output_set_led_value(0, m_led_selected & 0x01); } if (m_led_selected&0x10) { output_set_digit_value(2, out_digit); } if (m_led_selected&0x20) { output_set_digit_value(3, out_digit); } }
ADDRESS_MAP_END // port A: front panel // bits 0-2: column select from 0-7 // bits 3/4 = right and left LED enable // bits 5/6/7 keypad rows 0/1/2 return WRITE8_MEMBER(mirage_state::mirage_via_write_porta) { UINT8 seg = data & 7; static const int segconv[8] = { 16, 8, 32, 2, 1, 64, 128, 4 }; // printf("PA: %02x (PC=%x)\n", data, m_maincpu->pc()); // left LED selected? if ((data & 0x10) == 0x10) { // if the segment number is lower than last time, we've // started a new refresh cycle if ((seg < m_l_hi) || (seg == 0)) { m_l_segs = segconv[seg]; } else { m_l_segs |= segconv[seg]; } m_l_hi = seg; output_set_digit_value(0, m_l_segs); // printf("L LED: seg %d (hi %d conv %02x, %02x)\n", seg, m_l_hi, segconv[seg], m_l_segs); } // right LED selected? if ((data & 0x08) == 0x08) { // if the segment number is lower than last time, we've // started a new refresh cycle if ((seg < m_r_hi) || (seg == 0)) { m_r_segs = segconv[seg]; } else { m_r_segs |= segconv[seg]; } m_r_hi = seg; output_set_digit_value(1, m_r_segs); // printf("R LED: seg %d (hi %d conv %02x, %02x)\n", seg, m_r_hi, segconv[seg], m_r_segs); } }
void device_output_interface::set_digit_value(int value) { if (m_output_name) output_set_value(m_output_name, value); else output_set_digit_value(m_output_index, value); }
INPUT_PORTS_END // diagnostic display off WRITE8_MEMBER( wico_state::dled0_w ) { m_diag_on = 0; output_set_digit_value(9, 0); }
static TIMER_CALLBACK( update_display ) { ut88_state *state = machine.driver_data<ut88_state>(); int i; for (i=0;i<6;i++) { output_set_digit_value(i, hex_to_7seg[state->m_lcd_digit[i]]); } }
static TIMER_CALLBACK( tec1_kbd_callback ) { static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3" }; tec1_state *state = machine.driver_data<tec1_state>(); UINT8 i; // Display the digits. Blank any digits that haven't been refreshed for a while. // This will fix the problem reported by a user. for (i = 0; i < 6; i++) { if (BIT(state->m_digit, i)) { state->m_refresh[i] = 1; output_set_digit_value(i, state->m_segment); } else if (state->m_refresh[i] == 0x80) { output_set_digit_value(i, 0); state->m_refresh[i] = 0; } else if (state->m_refresh[i]) state->m_refresh[i]++; } // 74C923 4 by 5 key encoder. // if previous key is still held, bail out if (input_port_read(machine, keynames[state->m_kbd_row])) if (state->tec1_convert_col_to_bin(input_port_read(machine, keynames[state->m_kbd_row]), state->m_kbd_row) == state->m_kbd) return; state->m_kbd_row++; state->m_kbd_row &= 3; /* see if a key pressed */ if (input_port_read(machine, keynames[state->m_kbd_row])) { state->m_kbd = state->tec1_convert_col_to_bin(input_port_read(machine, keynames[state->m_kbd_row]), state->m_kbd_row); cputag_set_input_line(machine, "maincpu", INPUT_LINE_NMI, HOLD_LINE); state->m_key_pressed = TRUE; } else state->m_key_pressed = FALSE; }
static WRITE8_HANDLER ( write_lcd ) { mephisto_state *state = space->machine().driver_data<mephisto_state>(); if (state->m_led7 == 0) output_set_digit_value(state->m_lcd_shift_counter,data); // 0x109 MM IV // 0x040 MM V //output_set_digit_value(state->m_lcd_shift_counter,data ^ state->m_ram[0x165]); // 0x109 MM IV // 0x040 MM V state->m_lcd_shift_counter--; state->m_lcd_shift_counter &= 3; }
void poly880_state::update_display() { int i; for (i = 0; i < 8; i++) { if (BIT(m_digit, i)) output_set_digit_value(7 - i, m_segment); } }
void lc80_state::update_display() { int i; for (i = 0; i < 6; i++) { if (!BIT(m_digit, i)) output_set_digit_value(5 - i, m_segment); } }
INPUT_PORTS_END TIMER_CALLBACK_MEMBER(amico2k_state::led_refresh) { if (m_ls145_p > 3) { output_set_digit_value(m_ls145_p - 4, m_segment); } }
INPUT_PORTS_END /* Video */ TIMER_DEVICE_CALLBACK_MEMBER(cosmicos_state::digit_tick) { m_digit = !m_digit; output_set_digit_value(m_digit, m_segment); }
INPUT_PORTS_END /* M6532 Interface */ TIMER_CALLBACK_MEMBER(beta_state::led_refresh) { if (m_ls145_p < 6) { output_set_digit_value(m_ls145_p, m_segment); } }
static WRITE16_HANDLER( glasgow_lcd_w ) { glasgow_state *state = space->machine().driver_data<glasgow_state>(); UINT8 lcd_data = data >> 8; if (state->m_led7 == 0) output_set_digit_value(state->m_lcd_shift_counter, lcd_data); state->m_lcd_shift_counter--; state->m_lcd_shift_counter &= 3; }
void update_leds(void) { for (int i=0; i<16; i++) { for (int bit=0;bit<16;bit++) { int data = ((m_leds[i] << bit)&0x8000)>>15; output_set_digit_value((i*16)+bit, data ); } } }
INPUT_PORTS_END /* Video */ static TIMER_DEVICE_CALLBACK( digit_tick ) { cosmicos_state *state = timer.machine().driver_data<cosmicos_state>(); state->m_digit = !state->m_digit; output_set_digit_value(state->m_digit, state->m_segment); }
INPUT_PORTS_END /* M6532 Interface */ static TIMER_CALLBACK( led_refresh ) { beta_state *state = machine.driver_data<beta_state>(); if (state->m_ls145_p < 6) { output_set_digit_value(state->m_ls145_p, state->m_segment); } }
INPUT_PORTS_END void pve500_state::machine_start() { io_LD = 0; io_SC = 0; io_LE = 0; io_SEL = 0; io_KY = 0; for (int i=0; i<27; i++) output_set_digit_value(i, 0x00); }
ADDRESS_MAP_END //static ADDRESS_MAP_START( techno_sub_map, AS_IO, 8, techno_state ) // no ram here, must be internal to the cpu // AM_RANGE(0x0000, 0x3fff) AM_READ(rd_r) // to TKY2016A audio processor which has its own 3.58MHz clock // AM_RANGE(0x4000, 0x7fff) AM_WRITE(wr_w) // A11=LED;A12=WR2 (DAC) ;A13=WR1 (TKY2016A as above) // AM_RANGE(0x4000, 0xbfff) AM_ROM // 4000-7FFF is same as 8000-BFFF; 4x 16k ROMS bankswitched // AM_RANGE(0xc000, 0xffff) AM_ROM // another 16k ROM //ADDRESS_MAP_END WRITE16_MEMBER( techno_state::disp1_w ) { output_set_digit_value(m_digit, BITSWAP16(data, 12, 10, 8, 14, 13, 9, 11, 15, 7, 6, 5, 4, 3, 2, 1, 0)); }
void eacc_state::eacc_display() { UINT8 i; char lednum[6]; for (i = 3; i < 7; i++) if (BIT(m_digit, i)) output_set_digit_value(i, m_segment); if (BIT(m_digit, 7)) for (i = 0; i < 8; i++) { sprintf(lednum,"led%d",i); output_set_value(lednum, BIT(m_segment, i)^1); } }
INPUT_PORTS_END TIMER_DEVICE_CALLBACK_MEMBER(mk2_state::update_leds) { int i; for (i=0; i<4; i++) output_set_digit_value(i, m_led[i]); output_set_led_value(0, BIT(m_led[4], 3)); output_set_led_value(1, BIT(m_led[4], 5)); output_set_led_value(2, BIT(m_led[4], 4)); output_set_led_value(3, BIT(m_led[4], 4) ? 0 : 1); m_led[0]= m_led[1]= m_led[2]= m_led[3]= m_led[4]= 0; }
INPUT_PORTS_END static TIMER_DEVICE_CALLBACK( update_leds ) { mk2_state *state = timer.machine().driver_data<mk2_state>(); int i; for (i=0; i<4; i++) output_set_digit_value(i, state->m_led[i]); output_set_led_value(0, BIT(state->m_led[4], 3)); output_set_led_value(1, BIT(state->m_led[4], 5)); output_set_led_value(2, BIT(state->m_led[4], 4)); output_set_led_value(3, BIT(state->m_led[4], 4) ? 0 : 1); state->m_led[0]= state->m_led[1]= state->m_led[2]= state->m_led[3]= state->m_led[4]= 0; }
INPUT_PORTS_END /* Intel 8255A Interface */ TIMER_CALLBACK_MEMBER(mpf1_state::led_refresh) { if (BIT(m_lednum, 5)) output_set_digit_value(0, param); if (BIT(m_lednum, 4)) output_set_digit_value(1, param); if (BIT(m_lednum, 3)) output_set_digit_value(2, param); if (BIT(m_lednum, 2)) output_set_digit_value(3, param); if (BIT(m_lednum, 1)) output_set_digit_value(4, param); if (BIT(m_lednum, 0)) output_set_digit_value(5, param); }
INPUT_PORTS_END /* Intel 8255A Interface */ static TIMER_CALLBACK( led_refresh ) { mpf1_state *state = machine.driver_data<mpf1_state>(); if (BIT(state->m_lednum, 5)) output_set_digit_value(0, param); if (BIT(state->m_lednum, 4)) output_set_digit_value(1, param); if (BIT(state->m_lednum, 3)) output_set_digit_value(2, param); if (BIT(state->m_lednum, 2)) output_set_digit_value(3, param); if (BIT(state->m_lednum, 1)) output_set_digit_value(4, param); if (BIT(state->m_lednum, 0)) output_set_digit_value(5, param); }
static TIMER_DEVICE_CALLBACK( display_callback ) { tm990189 *state = timer.machine().driver_data<tm990189>(); UINT8 i; char ledname[8]; // since the segment data is cleared after being used, the old_segment is there // in case the segment data hasn't been refreshed yet. for (i = 0; i < 10; i++) { state->m_old_segment_state[i] |= state->m_segment_state[i]; sprintf(ledname,"digit%d",i); output_set_digit_value(i, state->m_old_segment_state[i]); state->m_old_segment_state[i] = state->m_segment_state[i]; state->m_segment_state[i] = 0; } for (i = 0; i < 7; i++) { sprintf(ledname,"led%d",i); output_set_value(ledname, !BIT(state->m_LED_state, i)); } }
MACHINE_RESET_MEMBER( ravens_state, ravens2 ) { m_term_data = 0x80; output_set_digit_value(6, 0); }
void aim65_update_ds5(device_t *device, int digit, int data) { output_set_digit_value(16 + (digit ^ 3), data); }