src/mess/drivers/next.c
| r14670 | r14671 | |
| 4 | 4 | |
| 5 | 5 | TODO: |
| 6 | 6 | |
| 7 | | - Find what the sleeping threads are waiting for |
| 8 | | |
| 9 | 7 | - Hook up the mouse (not before the system boots though, see the first problem) |
| 10 | 8 | |
| 11 | 9 | - Find why the kernel doesn't manage to change the nvram at boot (readback error) |
| r14670 | r14671 | |
| 150 | 148 | rtc->ce_w(BIT(scr2, 8)); |
| 151 | 149 | rtc->sdi_w(BIT(scr2, 10)); |
| 152 | 150 | rtc->sck_w(BIT(scr2, 9)); |
| 151 | irq_set(0, scr2 & 0x01000000); |
| 152 | irq_set(1, scr2 & 0x02000000); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | READ32_MEMBER( next_state::scr1_r ) |
| r14670 | r14671 | |
| 660 | 660 | void next_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 661 | 661 | { |
| 662 | 662 | irq_set(29, true); |
| 663 | | if(timer_ctrl & 0x40000000) { |
| 664 | | timer_data = 0xffff0000; // Old value instead? Hard to know, since the kernel uses 0xffff |
| 663 | timer_data = timer_next_data; |
| 664 | if(timer_ctrl & 0x40000000) |
| 665 | 665 | timer_start(); |
| 666 | | } |
| 666 | else |
| 667 | timer_ctrl &= 0x7fffffff; |
| 667 | 668 | } |
| 668 | 669 | |
| 669 | 670 | READ32_MEMBER( next_state::timer_data_r ) |
| r14670 | r14671 | |
| 675 | 676 | |
| 676 | 677 | WRITE32_MEMBER( next_state::timer_data_w ) |
| 677 | 678 | { |
| 678 | | if(timer_ctrl & 0x80000000) |
| 679 | | timer_update(); |
| 680 | | COMBINE_DATA(&timer_data); |
| 681 | | timer_data &= 0xffff0000; |
| 682 | | if(timer_ctrl & 0x80000000) |
| 683 | | timer_start(); |
| 679 | if(timer_ctrl & 0x80000000) { |
| 680 | COMBINE_DATA(&timer_next_data); |
| 681 | timer_next_data &= 0xffff0000; |
| 682 | } else { |
| 683 | COMBINE_DATA(&timer_data); |
| 684 | timer_data &= 0xffff0000; |
| 685 | } |
| 684 | 686 | } |
| 685 | 687 | |
| 686 | 688 | READ32_MEMBER( next_state::timer_ctrl_r ) |
| r14670 | r14671 | |
| 698 | 700 | if(oldact) { |
| 699 | 701 | timer_update(); |
| 700 | 702 | irq_set(29, false); |
| 701 | | } else |
| 703 | } else { |
| 704 | timer_next_data = timer_data; |
| 702 | 705 | timer_start(); |
| 706 | } |
| 703 | 707 | } |
| 704 | 708 | } |
| 705 | 709 | |
| r14670 | r14671 | |
| 831 | 835 | eventc_latch = 0; |
| 832 | 836 | timer_vbase = 0; |
| 833 | 837 | timer_data = 0; |
| 838 | timer_next_data = 0; |
| 834 | 839 | timer_ctrl = 0; |
| 835 | 840 | dma_drq_w(4, true); // soundout |
| 836 | 841 | } |