trunk/src/mess/drivers/pc9801.c
| r19324 | r19325 | |
| 37 | 37 | - Microsoft Windows 1.0 MSDOS.SYS error (can be bypassed by loading MS-DOS first) |
| 38 | 38 | |
| 39 | 39 | List of per-game TODO: |
| 40 | | - Absolutely Mahjong: GRCG doesn't seem to work at all, also Epson splash screen doesn't appear at all; |
| 40 | - Absolutely Mahjong: Epson splash screen doesn't appear at all, why? |
| 41 | 41 | - Dragon Buster: has lots of gfx artifacts; |
| 42 | 42 | - Far Side Moon: doesn't detect neither mouse nor sound board; |
| 43 | 43 | - First Queen: has broken text display; |
| r19324 | r19325 | |
| 397 | 397 | DECLARE_WRITE8_MEMBER(pc9801_gvram_w); |
| 398 | 398 | DECLARE_READ8_MEMBER(pc9801_mouse_r); |
| 399 | 399 | DECLARE_WRITE8_MEMBER(pc9801_mouse_w); |
| 400 | | DECLARE_READ8_MEMBER(pc9801rs_grcg_r); |
| 401 | | DECLARE_WRITE8_MEMBER(pc9801rs_grcg_w); |
| 400 | inline UINT8 m_pc9801rs_grcg_r(UINT32 offset,int vbank); |
| 401 | inline void m_pc9801rs_grcg_w(UINT32 offset,int vbank,UINT8 data); |
| 402 | 402 | DECLARE_READ8_MEMBER(pc9801_opn_r); |
| 403 | 403 | DECLARE_WRITE8_MEMBER(pc9801_opn_w); |
| 404 | 404 | DECLARE_READ8_MEMBER(pc9801rs_wram_r); |
| r19324 | r19325 | |
| 1381 | 1381 | return (offset) + (((i+1)*0x8000) & 0x1ffff) + (m_vram_bank*0x20000); |
| 1382 | 1382 | } |
| 1383 | 1383 | |
| 1384 | | READ8_MEMBER(pc9801_state::pc9801rs_grcg_r) |
| 1384 | inline UINT8 pc9801_state::m_pc9801rs_grcg_r(UINT32 offset,int vbank) |
| 1385 | 1385 | { |
| 1386 | 1386 | UINT8 res; |
| 1387 | 1387 | |
| 1388 | 1388 | if((m_grcg.mode & 0x80) == 0 || (m_grcg.mode & 0x40)) |
| 1389 | | res = m_video_ram_2[offset+0+m_vram_bank*0x20000]; |
| 1389 | res = m_video_ram_2[offset+vbank*0x8000+m_vram_bank*0x20000]; |
| 1390 | 1390 | else |
| 1391 | 1391 | { |
| 1392 | 1392 | int i; |
| r19324 | r19325 | |
| 1404 | 1404 | return res; |
| 1405 | 1405 | } |
| 1406 | 1406 | |
| 1407 | | WRITE8_MEMBER(pc9801_state::pc9801rs_grcg_w) |
| 1407 | inline void pc9801_state::m_pc9801rs_grcg_w(UINT32 offset,int vbank,UINT8 data) |
| 1408 | 1408 | { |
| 1409 | 1409 | if((m_grcg.mode & 0x80) == 0) |
| 1410 | | m_video_ram_2[offset+0+m_vram_bank*0x20000] = data; |
| 1410 | m_video_ram_2[offset+vbank*0x8000+m_vram_bank*0x20000] = data; |
| 1411 | 1411 | else |
| 1412 | 1412 | { |
| 1413 | 1413 | int i; |
| r19324 | r19325 | |
| 1648 | 1648 | if ( offset <= 0x0009ffff) { return pc9801rs_wram_r(space,offset); } |
| 1649 | 1649 | else if(offset >= 0x000a0000 && offset <= 0x000a3fff) { return pc9801_tvram_r(space,offset-0xa0000); } |
| 1650 | 1650 | else if(offset >= 0x000a4000 && offset <= 0x000a4fff) { return pc9801rs_knjram_r(space,offset & 0xfff); } |
| 1651 | | else if(offset >= 0x000a8000 && offset <= 0x000bffff) { return pc9801_gvram_r(space,offset-0xa8000); } |
| 1652 | | else if(offset >= 0x000e0000 && offset <= 0x000e7fff) { return pc9801rs_grcg_r(space,offset & 0x7fff); } |
| 1651 | else if(offset >= 0x000a8000 && offset <= 0x000affff) { return m_pc9801rs_grcg_r(offset & 0x7fff,1); } |
| 1652 | else if(offset >= 0x000b0000 && offset <= 0x000b7fff) { return m_pc9801rs_grcg_r(offset & 0x7fff,2); } |
| 1653 | else if(offset >= 0x000b8000 && offset <= 0x000bffff) { return m_pc9801rs_grcg_r(offset & 0x7fff,3); } |
| 1654 | else if(offset >= 0x000e0000 && offset <= 0x000e7fff) { return m_pc9801rs_grcg_r(offset & 0x7fff,0); } |
| 1653 | 1655 | else if(offset >= 0x000e0000 && offset <= 0x000fffff) { return pc9801rs_ipl_r(space,offset & 0x1ffff); } |
| 1654 | 1656 | else if(offset >= 0x00100000 && offset <= 0x00100000+m_ram_size-1) { return pc9801rs_ex_wram_r(space,offset-0x00100000); } |
| 1655 | 1657 | else if(offset >= 0xfffe0000 && offset <= 0xffffffff) { return pc9801rs_ipl_r(space,offset & 0x1ffff); } |
| r19324 | r19325 | |
| 1667 | 1669 | if ( offset <= 0x0009ffff) { pc9801rs_wram_w(space,offset,data); } |
| 1668 | 1670 | else if(offset >= 0x000a0000 && offset <= 0x000a3fff) { pc9801_tvram_w(space,offset-0xa0000,data); } |
| 1669 | 1671 | else if(offset >= 0x000a4000 && offset <= 0x000a4fff) { pc9801rs_knjram_w(space,offset & 0xfff,data); } |
| 1670 | | else if(offset >= 0x000a8000 && offset <= 0x000bffff) { pc9801_gvram_w(space,offset-0xa8000,data); } |
| 1671 | | else if(offset >= 0x000e0000 && offset <= 0x000e7fff) { pc9801rs_grcg_w(space,offset & 0x7fff,data); } |
| 1672 | else if(offset >= 0x000a8000 && offset <= 0x000affff) { m_pc9801rs_grcg_w(offset & 0x7fff,1,data); } |
| 1673 | else if(offset >= 0x000b0000 && offset <= 0x000b7fff) { m_pc9801rs_grcg_w(offset & 0x7fff,2,data); } |
| 1674 | else if(offset >= 0x000b8000 && offset <= 0x000bffff) { m_pc9801rs_grcg_w(offset & 0x7fff,3,data); } |
| 1675 | else if(offset >= 0x000e0000 && offset <= 0x000e7fff) { m_pc9801rs_grcg_w(offset & 0x7fff,0,data); } |
| 1672 | 1676 | else if(offset >= 0x00100000 && offset <= 0x00100000+m_ram_size-1) { pc9801rs_ex_wram_w(space,offset-0x00100000,data); } |
| 1673 | 1677 | //else |
| 1674 | 1678 | // printf("%08x %08x\n",offset,data); |