src/mess/includes/tmc1800.h
| r14837 | r14838 | |
| 141 | 141 | required_device<cdp1864_device> m_cti; |
| 142 | 142 | required_device<cassette_image_device> m_cassette; |
| 143 | 143 | required_device<ram_device> m_ram; |
| 144 | | |
| 144 | |
| 145 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 145 | 146 | virtual void machine_start(); |
| 146 | 147 | virtual void machine_reset(); |
| 147 | 148 | |
| 148 | 149 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 150 | |
| 151 | enum |
| 152 | { |
| 153 | TIMER_ID_EF4 |
| 154 | }; |
| 149 | 155 | |
| 150 | 156 | DECLARE_WRITE8_MEMBER( keylatch_w ); |
| 151 | 157 | DECLARE_WRITE8_MEMBER( bankswitch_w ); |
| r14837 | r14838 | |
| 158 | 164 | |
| 159 | 165 | /* keyboard state */ |
| 160 | 166 | int m_keylatch; /* key latch */ |
| 161 | | |
| 162 | | /* timers */ |
| 163 | | emu_timer *m_ef4_timer; /* EF4 line RC timer */ |
| 164 | 167 | }; |
| 165 | 168 | |
| 166 | 169 | /* ---------- defined in video/tmc1800.c ---------- */ |
src/mess/drivers/tmc1800.c
| r14837 | r14838 | |
| 435 | 435 | { |
| 436 | 436 | // TODO: what are the correct values? |
| 437 | 437 | int t = RES_K(27) * CAP_U(1) * 1000; // t = R26 * C1 |
| 438 | | m_ef4_timer->adjust(attotime::from_msec(t)); |
| 438 | timer_set(attotime::from_msec(t), TIMER_ID_EF4); |
| 439 | 439 | } |
| 440 | 440 | } |
| 441 | 441 | |
| r14837 | r14838 | |
| 609 | 609 | |
| 610 | 610 | // OSCOM Nano |
| 611 | 611 | |
| 612 | | static TIMER_CALLBACK( nano_ef4_tick ) |
| 613 | | { |
| 614 | | cputag_set_input_line(machine, CDP1802_TAG, COSMAC_INPUT_LINE_EF4, ASSERT_LINE); |
| 615 | | } |
| 616 | | |
| 617 | 612 | READ_LINE_MEMBER( nano_state::clear_r ) |
| 618 | 613 | { |
| 619 | 614 | int run = BIT(input_port_read(machine(), "RUN"), 0); |
| r14837 | r14838 | |
| 725 | 720 | |
| 726 | 721 | // OSCOM Nano |
| 727 | 722 | |
| 723 | void nano_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 724 | { |
| 725 | switch (id) |
| 726 | { |
| 727 | case TIMER_ID_EF4: |
| 728 | m_maincpu->set_input_line(COSMAC_INPUT_LINE_EF4, ASSERT_LINE); |
| 729 | break; |
| 730 | } |
| 731 | } |
| 732 | |
| 728 | 733 | void nano_state::machine_start() |
| 729 | 734 | { |
| 730 | | /* allocate monitor timer */ |
| 731 | | m_ef4_timer = machine().scheduler().timer_alloc(FUNC(nano_ef4_tick)); |
| 732 | | |
| 733 | 735 | /* register for state saving */ |
| 734 | 736 | save_item(NAME(m_keylatch)); |
| 735 | 737 | } |