trunk/src/mess/machine/nes_event.c
| r22504 | r22505 | |
| 48 | 48 | common_start(); |
| 49 | 49 | event_timer = timer_alloc(TIMER_EVENT); |
| 50 | 50 | event_timer->adjust(attotime::never); |
| 51 | timer_freq = machine().device<cpu_device>("maincpu")->cycles_to_attotime(1); |
| 51 | 52 | |
| 52 | 53 | save_item(NAME(m_latch)); |
| 53 | 54 | save_item(NAME(m_count)); |
| r22504 | r22505 | |
| 156 | 157 | if (!m_timer_on && m_timer_enabled) |
| 157 | 158 | { |
| 158 | 159 | m_timer_count = 0x20000000 | ((m_dsw->read() & 0x0f) << 25); |
| 159 | | event_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); |
| 160 | event_timer->adjust(attotime::zero, 0, timer_freq); |
| 160 | 161 | m_timer_on = 1; |
| 161 | 162 | } |
| 162 | 163 | } |
trunk/src/mess/machine/nes_jy.c
| r22504 | r22505 | |
| 75 | 75 | common_start(); |
| 76 | 76 | irq_timer = timer_alloc(TIMER_IRQ); |
| 77 | 77 | irq_timer->reset(); |
| 78 | timer_freq = machine().device<cpu_device>("maincpu")->cycles_to_attotime(1); |
| 78 | 79 | |
| 79 | 80 | save_item(NAME(m_mul)); |
| 80 | 81 | save_item(NAME(m_latch)); |
| r22504 | r22505 | |
| 499 | 500 | m_irq_down = data & 0x80; |
| 500 | 501 | m_irq_up = data & 0x40; |
| 501 | 502 | if (m_irq_mode == 0) |
| 502 | | irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1)); |
| 503 | irq_timer->adjust(attotime::zero, 0, timer_freq); |
| 503 | 504 | else |
| 504 | 505 | irq_timer->adjust(attotime::never); |
| 505 | 506 | break; |
trunk/src/mess/machine/md_slot.c
| r22504 | r22505 | |
| 901 | 901 | |
| 902 | 902 | const char * base_md_cart_slot_device::get_default_card_software(const machine_config &config, emu_options &options) |
| 903 | 903 | { |
| 904 | | const char *slot_string = "rom"; |
| 905 | | |
| 906 | 904 | if (open_image_file(options)) |
| 907 | 905 | { |
| 908 | | UINT32 len = core_fsize(m_file), offset = 0;; |
| 906 | const char *slot_string = "rom"; |
| 907 | UINT32 len = core_fsize(m_file), offset = 0; |
| 909 | 908 | UINT8 *ROM = global_alloc_array(UINT8, len); |
| 910 | 909 | int type; |
| 911 | 910 | |
trunk/src/mess/machine/nes_tengen.c
| r22504 | r22505 | |
| 84 | 84 | common_start(); |
| 85 | 85 | irq_timer = timer_alloc(TIMER_IRQ); |
| 86 | 86 | irq_timer->reset(); |
| 87 | timer_freq = machine().device<cpu_device>("maincpu")->cycles_to_attotime(4); |
| 87 | 88 | |
| 88 | 89 | save_item(NAME(m_mmc_prg_bank)); |
| 89 | 90 | save_item(NAME(m_mmc_vrom_bank)); |
| r22504 | r22505 | |
| 304 | 305 | case 0x4001: /* $c001 - IRQ scanline latch */ |
| 305 | 306 | m_irq_mode = data & 0x01; |
| 306 | 307 | if (m_irq_mode) |
| 307 | | irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(4)); |
| 308 | irq_timer->adjust(attotime::zero, 0, timer_freq); |
| 308 | 309 | else |
| 309 | 310 | irq_timer->adjust(attotime::never); |
| 310 | 311 | m_irq_reset = 1; |