本文整理汇总了C++中emu_timer类的典型用法代码示例。如果您正苦于以下问题:C++ emu_timer类的具体用法?C++ emu_timer怎么用?C++ emu_timer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了emu_timer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: device_timer
void pcjr_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch(id)
{
case TIMER_IRQ_DELAY:
m_maincpu->set_input_line(0, param ? ASSERT_LINE : CLEAR_LINE);
break;
case TIMER_WATCHDOG:
if(m_pcjr_dor & 0x20)
m_pic8259->ir6_w(1);
else
m_pic8259->ir6_w(0);
break;
case TIMER_KB_SIGNAL:
m_raw_keyb_data = m_raw_keyb_data >> 1;
m_signal_count--;
if ( m_signal_count <= 0 )
{
m_keyb_signal_timer->adjust( attotime::never, 0, attotime::never );
m_transferring = 0;
}
break;
}
}
开发者ID:ccmurray,项目名称:mame,代码行数:27,代码来源:ibmpcjr.cpp
示例2: device_timer
void scv_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch (id)
{
case TIMER_VB:
{
int vpos = machine().primary_screen->vpos();
switch( vpos )
{
case 240:
m_maincpu->set_input_line(UPD7810_INTF2, ASSERT_LINE);
break;
case 0:
m_maincpu->set_input_line(UPD7810_INTF2, CLEAR_LINE);
break;
}
m_vb_timer->adjust(machine().primary_screen->time_until_pos((vpos + 1) % 262, 0));
}
break;
default:
assert_always(FALSE, "Unknown id in scv_state::device_timer");
}
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:26,代码来源:scv.c
示例3: device_timer
void maple_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
if(id != TIMER_ID)
return;
timer.adjust(attotime::never);
reply_ready();
}
开发者ID:NULUSIOS,项目名称:mame,代码行数:8,代码来源:mapledev.cpp
示例4:
void naomi_g1_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
timer.adjust(attotime::never);
if(!gdst)
return;
gdst = 0;
irq_cb(DMA_GDROM_IRQ);
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:8,代码来源:naomig1.c
示例5:
void naomi_g1_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
timer.adjust(attotime::never);
if(!gdst)
return;
gdst = 0;
if(irq_cb)
irq_cb(machine());
}
开发者ID:clobber,项目名称:UME,代码行数:9,代码来源:naomig1.c
示例6: emu_fatalerror
void goupil_g1_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch (id)
{
case TIMER_SCANLINE:
m_ef9364->update_scanline((uint16_t)m_screen->vpos());
m_scanline_timer->adjust(m_screen->time_until_pos(m_screen->vpos() + 10));
break;
default:
throw emu_fatalerror("Unknown id in goupil_g1_state::device_timer");
}
}
开发者ID:Octocontrabass,项目名称:mame,代码行数:12,代码来源:goupil.cpp
示例7:
void s6_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
switch(id)
{
case TIMER_IRQ:
if(param == 1)
{
m_maincpu->set_input_line(M6808_IRQ_LINE, ASSERT_LINE);
m_irq_timer->adjust(attotime::from_ticks(32,3580000/4),0);
m_pia28->ca1_w(BIT(ioport("DIAGS")->read(), 2)); // Advance
m_pia28->cb1_w(BIT(ioport("DIAGS")->read(), 3)); // Up/Down
}
else
{
m_maincpu->set_input_line(M6808_IRQ_LINE, CLEAR_LINE);
m_irq_timer->adjust(attotime::from_ticks(980,3580000/4),1);
m_pia28->ca1_w(1);
m_pia28->cb1_w(1);
}
break;
}
}
开发者ID:SailorSat,项目名称:cabmame,代码行数:22,代码来源:s6.cpp
示例8: clock
void scc8530_t::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
Chan *pChan = &channel[id];
int brconst = pChan->reg_val[13]<<8 | pChan->reg_val[14];
int rate;
if (brconst)
{
rate = clock() / brconst;
}
else
{
rate = 0;
}
// is baud counter IRQ enabled on this channel?
// always flag pending in case it's enabled after this
pChan->baudIRQPending = 1;
if (pChan->baudIRQEnable)
{
if (pChan->extIRQEnable)
{
pChan->extIRQPending = 1;
pChan->baudIRQPending = 0;
updateirqs();
}
}
// reset timer according to current register values
if (rate)
{
attotime attorate = attotime::from_hz(rate);
timer.adjust(attorate, 0, attorate);
}
else
{
timer.adjust(attotime::never, 0, attotime::never);
}
}
开发者ID:RalfVB,项目名称:mame,代码行数:39,代码来源:8530scc.cpp
示例9:
void pv1000_state::machine_reset()
{
m_io_regs[5] = 0;
m_fd_data = 0;
m_irq_on_timer->adjust(m_screen->time_until_pos(195, 0));
m_irq_off_timer->adjust(attotime::never);
}
开发者ID:Robbbert,项目名称:store1,代码行数:7,代码来源:pv1000.cpp
示例10: machine_start
void gamate_state::machine_start()
{
m_cart_ptr = memregion("maincpu")->base() + 0x6000;
if (m_cart->exists())
{
// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
m_cart_ptr = m_cart->get_rom_base();
membank("bankmulti")->set_base(m_cart->get_rom_base()+1);
membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset
}
// m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback
card_protection.set=false;
bank_multi=0;
card_protection.unprotected=false;
timer2->enable(TRUE);
timer2->reset(m_maincpu->cycles_to_attotime(1000));
#if 0
save_item(NAME(m_video.data));
save_item(NAME(m_video.index));
save_item(NAME(m_video.x));
save_item(NAME(m_video.y));
save_item(NAME(m_video.mode));
save_item(NAME(m_video.delayed));
save_item(NAME(m_video.pixels));
save_item(NAME(m_ports));
save_item(NAME(m_ram));
#endif
}
开发者ID:hstampfl,项目名称:mame,代码行数:28,代码来源:gamate.c
示例11: machine_start
void gamate_state::machine_start()
{
timer2->enable(true);
timer2->reset(m_maincpu->cycles_to_attotime(1000));
save_item(NAME(m_card_available));
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:7,代码来源:gamate.cpp
示例12:
void noki3310_state::machine_reset()
{
// according to the boot rom disassembly here http://www.nokix.pasjagsm.pl/help/blacksphere/sub_100hardware/sub_arm/sub_bootrom.htm
// flash entry point is at 0x200040, we can probably reassemble the above code, but for now this should be enough.
m_maincpu->set_state_int(ARM7_R15, 0x200040);
memset(m_mad2_regs, 0, 0x100);
m_mad2_regs[0x01] = 0x01; // power-on flag
m_mad2_regs[0x0c] = 0x0a; // disable FIQ and IRQ
m_mad2_regs[0x03] = 0xff; // disable MAD2 watchdog
m_ccont.watchdog = 0; // disable CCONT watchdog
m_ccont.dc = false;
m_fiq_status = 0;
m_irq_status = 0;
m_timer1_counter = 0;
m_timer0_counter = 0;
m_timer0->adjust(attotime::from_hz(33055 / (255 + 1)), 0, attotime::from_hz(33055 / (255 + 1))); // programmable through port 0x0f
m_timer1->adjust(attotime::from_hz(1057), 0, attotime::from_hz(1057));
m_timer_watchdog->adjust(attotime::from_hz(1), 0, attotime::from_hz(1));
m_timer_fiq8->adjust(attotime::from_hz(1000), 0, attotime::from_hz(1000));
// simulate power-on input
if (machine().system().name && (machine().system().name[4] == '8' || machine().system().name[4] == '5'))
m_power_on = ~0x10;
else
m_power_on = ~0x02;
}
开发者ID:DragonMinded,项目名称:mame,代码行数:29,代码来源:nokia_3310.cpp
示例13:
void goupil_g1_state::machine_reset()
{
goupil_base_state::machine_reset();
m_scanline_timer->adjust(m_screen->time_until_pos(m_screen->vpos() + 10));
m_old_state_ca2 = 0;
m_via_video_pbb_data = 0;
}
开发者ID:Octocontrabass,项目名称:mame,代码行数:7,代码来源:goupil.cpp
示例14: machine_start
INPUT_PORTS_END
void cops_state::machine_start()
{
m_ld_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cops_state::ld_timer_callback),this));
m_ld_timer->adjust(attotime::from_hz(167*5), 0, attotime::from_hz(167*5));
}
开发者ID:Eduardop,项目名称:mame,代码行数:7,代码来源:cops.c
示例15: machine_reset
void mgolf_state::machine_reset()
{
m_interrupt_timer->adjust(m_screen->time_until_pos(16), 16);
m_mask = 0;
m_prev = 0;
}
开发者ID:hstampfl,项目名称:mame,代码行数:7,代码来源:mgolf.c
示例16: machine
void pb1000_state::machine_start()
{
membank("bank1")->set_base(memregion("rom")->base());
m_kb_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pb1000_state::keyboard_timer),this));
m_kb_timer->adjust(attotime::from_hz(192), 0, attotime::from_hz(192));
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:7,代码来源:pb1000.c
示例17: machine_start
void ngp_state::machine_start()
{
UINT8 *cart = memregion("cart")->base();
m_flash_chip[0].data = cart;
m_flash_chip[0].org_data[0] = m_flash_chip[0].data[0];
m_flash_chip[0].org_data[1] = m_flash_chip[0].data[1];
m_flash_chip[0].org_data[2] = m_flash_chip[0].data[2];
m_flash_chip[0].org_data[3] = m_flash_chip[0].data[3];
m_flash_chip[0].org_data[4] = m_flash_chip[0].data[0x7c000];
m_flash_chip[0].org_data[5] = m_flash_chip[0].data[0x7c001];
m_flash_chip[0].org_data[6] = m_flash_chip[0].data[0x7c002];
m_flash_chip[0].org_data[7] = m_flash_chip[0].data[0x7c003];
m_flash_chip[0].org_data[8] = m_flash_chip[0].data[0xfc000];
m_flash_chip[0].org_data[9] = m_flash_chip[0].data[0xfc001];
m_flash_chip[0].org_data[10] = m_flash_chip[0].data[0xfc002];
m_flash_chip[0].org_data[11] = m_flash_chip[0].data[0xfc003];
m_flash_chip[0].org_data[12] = m_flash_chip[0].data[0x1fc000];
m_flash_chip[0].org_data[13] = m_flash_chip[0].data[0x1fc001];
m_flash_chip[0].org_data[14] = m_flash_chip[0].data[0x1fc002];
m_flash_chip[0].org_data[15] = m_flash_chip[0].data[0x1fc003];
m_flash_chip[1].data = cart + 0x200000;
m_flash_chip[1].org_data[0] = m_flash_chip[1].data[0];
m_flash_chip[1].org_data[1] = m_flash_chip[1].data[1];
m_flash_chip[1].org_data[2] = m_flash_chip[1].data[2];
m_flash_chip[1].org_data[3] = m_flash_chip[1].data[3];
m_flash_chip[1].org_data[4] = m_flash_chip[1].data[0x7c000];
m_flash_chip[1].org_data[5] = m_flash_chip[1].data[0x7c001];
m_flash_chip[1].org_data[6] = m_flash_chip[1].data[0x7c002];
m_flash_chip[1].org_data[7] = m_flash_chip[1].data[0x7c003];
m_flash_chip[1].org_data[8] = m_flash_chip[1].data[0xfc000];
m_flash_chip[1].org_data[9] = m_flash_chip[1].data[0xfc001];
m_flash_chip[1].org_data[10] = m_flash_chip[1].data[0xfc002];
m_flash_chip[1].org_data[11] = m_flash_chip[1].data[0xfc003];
m_flash_chip[1].org_data[12] = m_flash_chip[1].data[0x1fc000];
m_flash_chip[1].org_data[13] = m_flash_chip[1].data[0x1fc001];
m_flash_chip[1].org_data[14] = m_flash_chip[1].data[0x1fc002];
m_flash_chip[1].org_data[15] = m_flash_chip[1].data[0x1fc003];
m_seconds_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ngp_state::ngp_seconds_callback),this));
m_seconds_timer->adjust( attotime::from_seconds(1), 0, attotime::from_seconds(1) );
save_item(NAME(m_io_reg));
save_item(NAME(m_old_to3));
// TODO: check if these are handled correctly...
save_item(NAME(m_flash_chip[0].present));
save_item(NAME(m_flash_chip[0].manufacturer_id));
save_item(NAME(m_flash_chip[0].device_id));
save_item(NAME(m_flash_chip[0].org_data));
save_item(NAME(m_flash_chip[0].state));
save_item(NAME(m_flash_chip[0].command));
save_item(NAME(m_flash_chip[1].present));
save_item(NAME(m_flash_chip[1].manufacturer_id));
save_item(NAME(m_flash_chip[1].device_id));
save_item(NAME(m_flash_chip[1].org_data));
save_item(NAME(m_flash_chip[1].state));
save_item(NAME(m_flash_chip[1].command));
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:59,代码来源:ngp.c
示例18: machine_reset
void alphatro_state::machine_reset()
{
// do what the IPL does
// UINT8* RAM = machine().device<ram_device>("ram")->pointer();
UINT8* ROM = memregion("maincpu")->base();
cpu_set_reg(m_maincpu, STATE_GENPC, 0xe000);
memcpy(m_p_ram, ROM, 0xf000); // copy BASIC to RAM, which the undumped IPL is supposed to do.
memcpy(m_p_videoram, ROM+0x1000, 0x1000);
// membank("bank1")->set_base(RAM);
// probably not correct, exact meaning of port is unknown, vblank/vsync is too slow.
m_sys_timer->adjust(attotime::from_usec(10),0,attotime::from_usec(10));
m_serial_timer->adjust(attotime::from_hz(500),0,attotime::from_hz(500)); // USART clock - this is a guesstimate
m_timer_bit = 0;
beep_set_state(m_beep, 0);
beep_set_frequency(m_beep, 950); /* piezo-device needs to be measured */
}
开发者ID:kleopatra999,项目名称:mess-svn,代码行数:17,代码来源:alphatro.c
示例19: machine_reset
void techno_state::machine_reset()
{
m_vector = 0x88;
m_digit = 0;
attotime freq = attotime::from_hz(XTAL_8MHz / 256); // 31250Hz
m_irq_set_timer->adjust(freq, 0, freq);
m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
}
开发者ID:qwijibo,项目名称:mame,代码行数:9,代码来源:techno.cpp
示例20: machine_reset
void rastersp_state::machine_reset()
{
m_irq_status = 0;
m_dpyaddr = 0;
// Halt the 486 on reset - the DSP will release it from reset
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
// Set IRQ1 line to cause DSP to boot from 0x400000
m_dsp->set_input_line(TMS3203X_IRQ1, ASSERT_LINE);
m_dsp->set_input_line(TMS3203X_IRQ1, CLEAR_LINE);
// Reset DSP internal registers
m_tms_io_regs[SPORT_GLOBAL_CTL] = 0;
m_tms_timer1->adjust(attotime::never);
m_tms_tx_timer->adjust(attotime::never);
}
开发者ID:MASHinfo,项目名称:mame,代码行数:18,代码来源:rastersp.cpp
注:本文中的emu_timer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论