Previous 199869 Revisions Next

r19325 Wednesday 5th December, 2012 at 04:46:07 UTC by Angelo Salese
Fixed GRCG behaviour
[src/mess/drivers]pc9801.c

trunk/src/mess/drivers/pc9801.c
r19324r19325
3737   - Microsoft Windows 1.0 MSDOS.SYS error (can be bypassed by loading MS-DOS first)
3838
3939   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?
4141   - Dragon Buster: has lots of gfx artifacts;
4242   - Far Side Moon: doesn't detect neither mouse nor sound board;
4343   - First Queen: has broken text display;
r19324r19325
397397   DECLARE_WRITE8_MEMBER(pc9801_gvram_w);
398398   DECLARE_READ8_MEMBER(pc9801_mouse_r);
399399   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);
402402   DECLARE_READ8_MEMBER(pc9801_opn_r);
403403   DECLARE_WRITE8_MEMBER(pc9801_opn_w);
404404   DECLARE_READ8_MEMBER(pc9801rs_wram_r);
r19324r19325
13811381   return (offset) + (((i+1)*0x8000) & 0x1ffff) + (m_vram_bank*0x20000);
13821382}
13831383
1384READ8_MEMBER(pc9801_state::pc9801rs_grcg_r)
1384inline UINT8 pc9801_state::m_pc9801rs_grcg_r(UINT32 offset,int vbank)
13851385{
13861386   UINT8 res;
13871387
13881388   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];
13901390   else
13911391   {
13921392      int i;
r19324r19325
14041404   return res;
14051405}
14061406
1407WRITE8_MEMBER(pc9801_state::pc9801rs_grcg_w)
1407inline void pc9801_state::m_pc9801rs_grcg_w(UINT32 offset,int vbank,UINT8 data)
14081408{
14091409   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;
14111411   else
14121412   {
14131413      int i;
r19324r19325
16481648   if      (                        offset <= 0x0009ffff)                   { return pc9801rs_wram_r(space,offset);               }
16491649   else if(offset >= 0x000a0000 && offset <= 0x000a3fff)                   { return pc9801_tvram_r(space,offset-0xa0000);        }
16501650   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);        }
16531655   else if(offset >= 0x000e0000 && offset <= 0x000fffff)                   { return pc9801rs_ipl_r(space,offset & 0x1ffff);      }
16541656   else if(offset >= 0x00100000 && offset <= 0x00100000+m_ram_size-1)      { return pc9801rs_ex_wram_r(space,offset-0x00100000); }
16551657   else if(offset >= 0xfffe0000 && offset <= 0xffffffff)                   { return pc9801rs_ipl_r(space,offset & 0x1ffff);      }
r19324r19325
16671669   if      (                        offset <= 0x0009ffff)                   { pc9801rs_wram_w(space,offset,data);                  }
16681670   else if(offset >= 0x000a0000 && offset <= 0x000a3fff)                   { pc9801_tvram_w(space,offset-0xa0000,data);           }
16691671   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);        }
16721676   else if(offset >= 0x00100000 && offset <= 0x00100000+m_ram_size-1)      { pc9801rs_ex_wram_w(space,offset-0x00100000,data);    }
16731677   //else
16741678   //  printf("%08x %08x\n",offset,data);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team