Previous 15994 Revisions Next

r7008 Monday 11th January, 2010 at 22:09:14 UTC by Barry Rodewald
[FMTOWNS] Added display plane functionality, and mirror of the video ports at 0xcff80 in I/O space.
[src/mess/drivers]fmtowns.c
[src/mess/video]fmtowns.c

src/mess/video/fmtowns.c
r7007r7008
113113static UINT8 towns_kanji_code_h;
114114static UINT8 towns_kanji_code_l;
115115static rectangle towns_crtc_layerscr[2];  // each layer has independent sizes
116static UINT8 towns_display_plane;
117static UINT8 towns_display_page_sel;
116118
117119extern UINT32* towns_vram;
118120extern UINT8* towns_gfxvram;
r7007r7008
260262         return towns_crtc_mix;
261263      case 0x01:  // read/write plane select (bit 0-3 write, bit 6-7 read)
262264         return ((towns_vram_rplane << 6) & 0xc0) | towns_vram_wplane;
265      case 0x02:  // display planes (bits 0-2,5), display page select (bit 4)
266         return towns_display_plane | towns_display_page_sel;
263267      case 0x03:  // VRAM page select (bit 5)
264268         if(towns_vram_page_sel != 0)
265269            return 0x10;
r7007r7008
300304         towns_update_video_banks(space);
301305         logerror("VGA: VRAM wplane select = 0x%02x\n",towns_vram_wplane);
302306         break;
307      case 0x02:  // display plane (bits 0-2), display page select (bit 4)
308         towns_display_plane = data & 0x27;
309         towns_display_page_sel = data & 0x10;
310         break;
303311      case 0x03:  // VRAM page select (bit 4)
304312         towns_vram_page_sel = data & 0x10;
305313         break;
r7007r7008
814822   else
815823      linesize = towns_crtc_reg[24] * 4;
816824
825   if(towns_display_page_sel != 0)
826      off = 0x20000;
817827   if(layer != 0)
818828   {
819829      if(!(towns_video_reg[0] & 0x10))
r7007r7008
883893   UINT8 colour;
884894   int hzoom = 1;
885895
886   if(towns_vram_page_sel != 0)
896   if(towns_display_page_sel != 0)
887897      off = 0x20000;
888898   if(layer != 0)
889899   {
r7007r7008
947957   int hzoom = 1;
948958   int linesize;
949959
950//   if(towns_vram_page_sel != 0)
951//      off = 0x20000;
960   if(towns_display_page_sel != 0)
961      off = 0x20000;
952962   if(layer == 0)
953963      linesize = towns_crtc_reg[20] * 4;
954964   else
src/mess/drivers/fmtowns.c
r7007r7008
17591759  AM_RANGE(0x41fc,0x41ff) AM_READ8(towns_41ff_r,0xff000000)
17601760  // CRTC / Video (again)
17611761  AM_RANGE(0xfd90,0xfda3) AM_READWRITE8(towns_video_fd90_r, towns_video_fd90_w, 0xffffffff)
1762  AM_RANGE(0xff80,0xff83) AM_READWRITE8(towns_video_ff81_r, towns_video_ff81_w, 0x0000ff00)
1762  AM_RANGE(0xff80,0xffff) AM_READWRITE8(towns_video_cff80_r,towns_video_cff80_w,0xffffffff)
17631763
17641764ADDRESS_MAP_END
17651765

Previous 15994 Revisions Next


© 1998-2018 The MESS Team