trunk/src/mess/drivers/mz2500.c
| r242481 | r242482 | |
| 18 | 18 | - Dust Box vol. 1-3: they die with text garbage, might be bad dumps; |
| 19 | 19 | - Dust Box vol. 4: window effect transition is bugged; |
| 20 | 20 | - Dust Box vol. n: three items returns "purple" text, presumably HW failures (DFJustin: joystick "digital", mouse "not installed", HDD "not installed"); |
| 21 | | - LayDock: hangs by reading the FDC status and expecting it to become 0x81; |
| 21 | - LayDock: hangs at title screen due of a PIT bug (timer irq dies for whatever reason); |
| 22 | 22 | - Moon Child: needs mixed 3+3bpp tvram supported, kludged for now (not a real test case); |
| 23 | 23 | - Moon Child: window masking doesn't mask bottom part of the screen? |
| 24 | 24 | - Moon Child: appears to be a network / system link game, obviously doesn't work with current MAME / MESS framework; |
| r242481 | r242482 | |
| 95 | 95 | UINT8 m_irq_sel; |
| 96 | 96 | UINT8 m_irq_vector[4]; |
| 97 | 97 | UINT8 m_irq_mask[4]; |
| 98 | UINT8 m_irq_pending[4]; |
| 98 | 99 | UINT8 m_kanji_bank; |
| 99 | 100 | UINT8 m_dic_bank; |
| 100 | 101 | UINT8 m_fdc_reverse; |
| r242481 | r242482 | |
| 204 | 205 | DECLARE_WRITE8_MEMBER(opn_porta_w); |
| 205 | 206 | DECLARE_WRITE_LINE_MEMBER(pit8253_clk0_irq); |
| 206 | 207 | DECLARE_WRITE_LINE_MEMBER(mz2500_rtc_alarm_irq); |
| 208 | IRQ_CALLBACK_MEMBER( mz2500_irq_ack ); |
| 207 | 209 | |
| 208 | 210 | void draw_80x25(bitmap_ind16 &bitmap,const rectangle &cliprect,UINT16 map_addr); |
| 209 | 211 | void draw_40x25(bitmap_ind16 &bitmap,const rectangle &cliprect,int plane,UINT16 map_addr); |
| r242481 | r242482 | |
| 1795 | 1797 | |
| 1796 | 1798 | /* disable IRQ */ |
| 1797 | 1799 | for(i=0;i<4;i++) |
| 1800 | { |
| 1798 | 1801 | m_irq_mask[i] = 0; |
| 1799 | | |
| 1802 | m_irq_pending[i] = 0; |
| 1803 | } |
| 1800 | 1804 | m_kanji_bank = 0; |
| 1801 | 1805 | |
| 1802 | 1806 | m_cg_clear_flag = 0; |
| r242481 | r242482 | |
| 1853 | 1857 | INTERRUPT_GEN_MEMBER(mz2500_state::mz2500_vbl) |
| 1854 | 1858 | { |
| 1855 | 1859 | if(m_irq_mask[0]) |
| 1856 | | device.execute().set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[0]); |
| 1857 | | |
| 1860 | { |
| 1861 | m_irq_pending[0] = 1; |
| 1862 | m_maincpu->set_input_line(0, ASSERT_LINE); |
| 1863 | } |
| 1858 | 1864 | m_cg_clear_flag = 0; |
| 1859 | 1865 | } |
| 1860 | 1866 | |
| 1867 | IRQ_CALLBACK_MEMBER(mz2500_state::mz2500_irq_ack) |
| 1868 | { |
| 1869 | int i; |
| 1870 | for(i=0;i<4;i++) |
| 1871 | { |
| 1872 | if(m_irq_mask[i] && m_irq_pending[i]) |
| 1873 | { |
| 1874 | m_irq_pending[i] = 0; |
| 1875 | m_maincpu->set_input_line(0, CLEAR_LINE); |
| 1876 | return m_irq_vector[i]; |
| 1877 | } |
| 1878 | } |
| 1879 | return 0; |
| 1880 | } |
| 1881 | |
| 1861 | 1882 | READ8_MEMBER(mz2500_state::mz2500_porta_r) |
| 1862 | 1883 | { |
| 1863 | 1884 | logerror("PPI PORTA R\n"); |
| r242481 | r242482 | |
| 2032 | 2053 | |
| 2033 | 2054 | WRITE_LINE_MEMBER(mz2500_state::pit8253_clk0_irq) |
| 2034 | 2055 | { |
| 2035 | | if(m_irq_mask[1]/* && state & 1*/) |
| 2036 | | m_maincpu->set_input_line_and_vector(0, HOLD_LINE,m_irq_vector[1]); |
| 2056 | if(m_irq_mask[1] && state & 1) |
| 2057 | { |
| 2058 | m_irq_pending[1] = 1; |
| 2059 | m_maincpu->set_input_line(0, ASSERT_LINE); |
| 2060 | } |
| 2037 | 2061 | } |
| 2038 | 2062 | |
| 2039 | 2063 | WRITE_LINE_MEMBER(mz2500_state::mz2500_rtc_alarm_irq) |
| r242481 | r242482 | |
| 2049 | 2073 | MCFG_CPU_PROGRAM_MAP(mz2500_map) |
| 2050 | 2074 | MCFG_CPU_IO_MAP(mz2500_io) |
| 2051 | 2075 | MCFG_CPU_VBLANK_INT_DRIVER("screen", mz2500_state, mz2500_vbl) |
| 2076 | MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(mz2500_state,mz2500_irq_ack) |
| 2052 | 2077 | |
| 2053 | 2078 | MCFG_DEVICE_ADD("i8255_0", I8255, 0) |
| 2054 | 2079 | MCFG_I8255_IN_PORTA_CB(READ8(mz2500_state, mz2500_porta_r)) |
| r242481 | r242482 | |
| 2071 | 2096 | MCFG_DEVICE_ADD("pit", PIT8253, 0) |
| 2072 | 2097 | MCFG_PIT8253_CLK0(31250) |
| 2073 | 2098 | MCFG_PIT8253_OUT0_HANDLER(WRITELINE(mz2500_state, pit8253_clk0_irq)) |
| 2099 | // TODO: is this really right? |
| 2074 | 2100 | MCFG_PIT8253_CLK1(0) |
| 2075 | | MCFG_PIT8253_CLK2(16) //CH2, trusted, used by Super MZ demo / The Black Onyx and a bunch of others (TODO: timing of this) |
| 2101 | MCFG_PIT8253_CLK2(16) //CH2, used by Super MZ demo / The Black Onyx and a few others (TODO: timing of this) |
| 2076 | 2102 | MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pit", pit8253_device, write_clk1)) |
| 2077 | 2103 | |
| 2078 | 2104 | MCFG_DEVICE_ADD("mb8877a", MB8877, 0) |