Lines Matching refs:timers

256     MOS6522Timer *ti = &s->timers[0];  in mos6522_timer1()
266 MOS6522Timer *ti = &s->timers[1]; in mos6522_timer2()
303 if (now >= s->timers[0].next_irq_time) { in mos6522_read()
304 mos6522_timer1_update(s, &s->timers[0], now); in mos6522_read()
307 if (now >= s->timers[1].next_irq_time) { in mos6522_read()
308 mos6522_timer2_update(s, &s->timers[1], now); in mos6522_read()
340 val = get_counter(s, &s->timers[0]) & 0xff; in mos6522_read()
345 val = get_counter(s, &s->timers[0]) >> 8; in mos6522_read()
349 val = s->timers[0].latch & 0xff; in mos6522_read()
353 val = (s->timers[0].latch >> 8) & 0xff; in mos6522_read()
356 val = get_counter(s, &s->timers[1]) & 0xff; in mos6522_read()
361 val = get_counter(s, &s->timers[1]) >> 8; in mos6522_read()
433 s->timers[0].latch = (s->timers[0].latch & 0xff00) | val; in mos6522_write()
434 mos6522_timer1_update(s, &s->timers[0], in mos6522_write()
438 s->timers[0].latch = (s->timers[0].latch & 0xff) | (val << 8); in mos6522_write()
440 set_counter(s, &s->timers[0], s->timers[0].latch); in mos6522_write()
443 s->timers[0].latch = (s->timers[0].latch & 0xff00) | val; in mos6522_write()
444 mos6522_timer1_update(s, &s->timers[0], in mos6522_write()
448 s->timers[0].latch = (s->timers[0].latch & 0xff) | (val << 8); in mos6522_write()
450 mos6522_timer1_update(s, &s->timers[0], in mos6522_write()
454 s->timers[1].latch = (s->timers[1].latch & 0xff00) | val; in mos6522_write()
460 s->timers[1].latch = (s->timers[1].latch & 0xff) | (val << 8); in mos6522_write()
462 set_counter(s, &s->timers[1], s->timers[1].latch); in mos6522_write()
469 mos6522_timer1_update(s, &s->timers[0], in mos6522_write()
490 mos6522_timer1_update(s, &s->timers[0], in mos6522_write()
492 mos6522_timer2_update(s, &s->timers[1], in mos6522_write()
507 uint16_t t1counter = get_counter(s, &s->timers[0]); in qmp_x_query_via_foreach()
508 uint16_t t2counter = get_counter(s, &s->timers[1]); in qmp_x_query_via_foreach()
527 s->timers[0].latch & 0xff); in qmp_x_query_via_foreach()
530 s->timers[0].latch >> 8); in qmp_x_query_via_foreach()
555 s->timers[0].frequency, in qmp_x_query_via_foreach()
559 s->timers[0].latch, in qmp_x_query_via_foreach()
560 s->timers[0].load_time, in qmp_x_query_via_foreach()
561 get_next_irq_time(s, &s->timers[0], now)); in qmp_x_query_via_foreach()
568 s->timers[1].frequency, in qmp_x_query_via_foreach()
571 s->timers[1].latch, in qmp_x_query_via_foreach()
572 s->timers[1].load_time, in qmp_x_query_via_foreach()
573 get_next_irq_time(s, &s->timers[1], now)); in qmp_x_query_via_foreach()
639 VMSTATE_STRUCT_ARRAY(timers, MOS6522State, 2, 0,
660 s->timers[0].frequency = s->frequency; in mos6522_reset_hold()
661 s->timers[0].latch = 0xffff; in mos6522_reset_hold()
662 set_counter(s, &s->timers[0], 0xffff); in mos6522_reset_hold()
663 timer_del(s->timers[0].timer); in mos6522_reset_hold()
665 s->timers[1].frequency = s->frequency; in mos6522_reset_hold()
666 s->timers[1].latch = 0xffff; in mos6522_reset_hold()
667 timer_del(s->timers[1].timer); in mos6522_reset_hold()
681 for (i = 0; i < ARRAY_SIZE(s->timers); i++) { in mos6522_init()
682 s->timers[i].index = i; in mos6522_init()
685 s->timers[0].timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, mos6522_timer1, s); in mos6522_init()
686 s->timers[1].timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, mos6522_timer2, s); in mos6522_init()
695 timer_free(s->timers[0].timer); in mos6522_finalize()
696 timer_free(s->timers[1].timer); in mos6522_finalize()