src/mess/drivers/pc8801.c
| r10124 | r10125 | |
| 24 | 24 | - American Success: reads the light pen? |
| 25 | 25 | - Alpha (demo): crashes with "illegal function" msg; |
| 26 | 26 | - Balance of Power: attempt to use the SIO port for mouse polling, worked around for now; |
| 27 | | - Balance of Power: moans with a JP msg; |
| 28 | 27 | - Battle Entry: moans with a JP msg then dies if you try to press either numpad 1 or 2 (asks if the user wants to use the sound board (yes 1 / no 2) |
| 29 | 28 | - Bishoujo Baseball Gakuen: checks ym2608 after intro screen; |
| 30 | 29 | - Blue Moon Story: moans with a kanji msg;. |
| r10124 | r10125 | |
| 48 | 47 | - Tobira wo Akete (random crashes in parent pc8801 only) |
| 49 | 48 | |
| 50 | 49 | games that needs to NOT have write-protect floppies (BTANBs): |
| 50 | - Balance of Power |
| 51 | 51 | - Tobira wo Akete (hangs at title screen) |
| 52 | 52 | |
| 53 | 53 | Notes: |
| r10124 | r10125 | |
| 151 | 151 | static UINT8 fdc_irq_opcode; |
| 152 | 152 | static UINT8 ext_rom_bank,gfx_ctrl,vram_sel,misc_ctrl,device_ctrl_data; |
| 153 | 153 | static UINT8 vrtc_irq_mask,rtc_irq_mask,sound_irq_mask; |
| 154 | static UINT8 vrtc_irq_latch,rtc_irq_latch,sound_irq_latch; |
| 154 | 155 | static UINT8 window_offset_bank; |
| 155 | 156 | static UINT8 layer_mask; |
| 156 | 157 | static UINT8 i8214_irq_level,i8214_irq_state; |
| r10124 | r10125 | |
| 909 | 910 | rtc_irq_mask = data & 1; |
| 910 | 911 | vrtc_irq_mask = data & 2; |
| 911 | 912 | |
| 913 | if(rtc_irq_mask && rtc_irq_latch) |
| 914 | { |
| 915 | rtc_irq_latch = 0; |
| 916 | pc8801_raise_irq(space->machine,2); |
| 917 | } |
| 918 | else if(vrtc_irq_mask && vrtc_irq_latch) |
| 919 | { |
| 920 | vrtc_irq_latch = 0; |
| 921 | pc8801_raise_irq(space->machine,1); |
| 922 | } |
| 923 | |
| 912 | 924 | //if(data & 4) |
| 913 | 925 | // printf("IRQ mask %02x\n",data); |
| 914 | 926 | } |
| r10124 | r10125 | |
| 939 | 951 | misc_ctrl = data; |
| 940 | 952 | |
| 941 | 953 | sound_irq_mask = ((data & 0x80) == 0); |
| 954 | |
| 955 | if(sound_irq_mask && sound_irq_latch) |
| 956 | { |
| 957 | sound_irq_latch = 0; |
| 958 | pc8801_raise_irq(space->machine,4); |
| 959 | } |
| 942 | 960 | } |
| 943 | 961 | |
| 944 | 962 | static WRITE8_HANDLER( pc8801_palram_w ) |
| r10124 | r10125 | |
| 1626 | 1644 | { |
| 1627 | 1645 | if(sound_irq_mask) |
| 1628 | 1646 | pc8801_raise_irq(device->machine,4); |
| 1647 | else |
| 1648 | sound_irq_latch = 1; |
| 1629 | 1649 | } |
| 1630 | 1650 | |
| 1631 | 1651 | /* TODO: mouse routing (that's why I don't use DEVCB_INPUT_PORT here) */ |
| r10124 | r10125 | |
| 1674 | 1694 | int level, i; |
| 1675 | 1695 | |
| 1676 | 1696 | level = 0; |
| 1677 | | for (i = 0; i < 8; i++) |
| 1697 | for (i = 8; i > 0; i--) |
| 1678 | 1698 | { |
| 1679 | 1699 | if ((i8214_irq_state & (1<<i))!=0) |
| 1700 | { |
| 1680 | 1701 | level = i; |
| 1702 | } |
| 1681 | 1703 | } |
| 1682 | 1704 | |
| 1683 | 1705 | i8214_irq_state &= ~(1<<level); |
| 1706 | |
| 1684 | 1707 | return level*2; |
| 1685 | 1708 | } |
| 1686 | 1709 | |
| r10124 | r10125 | |
| 1688 | 1711 | { |
| 1689 | 1712 | if(rtc_irq_mask) |
| 1690 | 1713 | pc8801_raise_irq(machine,2); |
| 1714 | else |
| 1715 | rtc_irq_latch = 1; |
| 1691 | 1716 | } |
| 1692 | 1717 | |
| 1693 | 1718 | static MACHINE_START( pc8801 ) |
| r10124 | r10125 | |
| 1737 | 1762 | rtc_irq_mask = 0; |
| 1738 | 1763 | sound_irq_mask = 0; |
| 1739 | 1764 | |
| 1765 | rtc_irq_latch = 0; |
| 1766 | vrtc_irq_latch = 0; |
| 1767 | sound_irq_latch = 0; |
| 1768 | |
| 1740 | 1769 | i8214_irq_level = 0; |
| 1741 | 1770 | i8214_irq_state = 0; |
| 1742 | 1771 | } |
| r10124 | r10125 | |
| 1779 | 1808 | { |
| 1780 | 1809 | if(vrtc_irq_mask) |
| 1781 | 1810 | pc8801_raise_irq(device->machine,1); |
| 1811 | else |
| 1812 | vrtc_irq_latch = 1; |
| 1782 | 1813 | } |
| 1783 | 1814 | |
| 1784 | 1815 | static MACHINE_CONFIG_START( pc8801, driver_device ) |