Previous 15994 Revisions Next

r6974 Friday 8th January, 2010 at 00:41:18 UTC by Barry Rodewald
[FMTOWNS] Implemented FMR-compatible VRAM read interface. This fixes some graphic issues in Prince of Persia.
[src/mess/video]fmtowns.c

src/mess/video/fmtowns.c
r6973r6974
170170
171171READ8_HANDLER( towns_gfx_r )
172172{
173   UINT8 ret = 0;
174   
173175   if(towns_mainmem_enable != 0)
174176      return messram_get_ptr(devtag_get_device(space->machine, "messram"))[offset+0xc0000];
175177
178   offset = offset << 2;
179
176180   if(towns_vram_page_sel != 0)
177181      offset += 0x20000;
178182
179   return 0;
183   ret = (((towns_gfxvram[offset] >> towns_vram_rplane) << 7) & 0x80)
184      | (((towns_gfxvram[offset] >> towns_vram_rplane) << 2) & 0x40)
185      | (((towns_gfxvram[offset+1] >> towns_vram_rplane) << 5) & 0x20)
186      | (((towns_gfxvram[offset+1] >> towns_vram_rplane)) & 0x10)
187      | (((towns_gfxvram[offset+2] >> towns_vram_rplane) << 3) & 0x08)
188      | (((towns_gfxvram[offset+2] >> towns_vram_rplane) >> 2) & 0x04)
189      | (((towns_gfxvram[offset+3] >> towns_vram_rplane) << 1) & 0x02)
190      | (((towns_gfxvram[offset+3] >> towns_vram_rplane) >> 4) & 0x01);
191   
192   return ret;
180193}
181194
182195WRITE8_HANDLER( towns_gfx_w )
r6973r6974
287300         towns_update_video_banks(space);
288301         logerror("VGA: VRAM wplane select = 0x%02x\n",towns_vram_wplane);
289302         break;
290      case 0x03:  // VRAM page select (bit 5)
303      case 0x03:  // VRAM page select (bit 4)
291304         towns_vram_page_sel = data & 0x10;
292305         break;
293306      case 0x14:  // Kanji offset (high)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team