Previous 15994 Revisions Next

r7608 Saturday 20th March, 2010 at 10:57:43 UTC by Barry Rodewald
[FMTOWNS] Implemented 'spherical' scroll (SSF2 title screen).
[src/mess/video]fmtowns.c

src/mess/video/fmtowns.c
r7607r7608
876876   UINT16 colour;
877877   int hzoom = 1;
878878   int linesize;
879   UINT32 scroll;
879880
880881   if(layer == 0)
881882      linesize = towns_crtc_reg[20] * 4;
r7607r7608
888889   {
889890      if(!(towns_video_reg[0] & 0x10))
890891         return;
891      off += (towns_crtc_reg[21]) << 2;  // initial offset
892      if(!(towns_crtc_reg[28] & 0x10))
893         off += (towns_crtc_reg[21]) << 2;  // initial offset
894      else
895      {
896         scroll = ((towns_crtc_reg[21] & 0xfc00) << 2) | (((towns_crtc_reg[21] & 0x3ff) << 2));
897         off += scroll;
898      }
892899      if(towns_crtc_reg[27] & 0x0100)
893900         hzoom = 2;
894901   }
895902   else
896903   {
897      off += (towns_crtc_reg[17]) << 2;  // initial offset
904      if(!(towns_crtc_reg[28] & 0x20))
905         off += (towns_crtc_reg[17]) << 2;  // initial offset
906      else
907      {
908         scroll = ((towns_crtc_reg[17] & 0xfc00) << 2) | (((towns_crtc_reg[17] & 0x3ff) << 2));
909         off += scroll;
910      }
898911      if(towns_crtc_reg[27] & 0x0001)
899912         hzoom = 2;
900913   }
r7607r7608
953966   UINT8 colour;
954967   int hzoom = 1;
955968   int linesize;
969   UINT32 scroll;
956970
957971   if(towns_display_page_sel != 0)
958972      off = 0x20000;
r7607r7608
965979   {
966980      if(!(towns_video_reg[0] & 0x10))
967981         return;
968      off += towns_crtc_reg[21];  // initial offset
982      if(!(towns_crtc_reg[28] & 0x10))
983         off += towns_crtc_reg[21];  // initial offset
984      else
985      {
986         scroll = ((towns_crtc_reg[21] & 0xfc00) << 2) | (((towns_crtc_reg[21] & 0x3ff) << 2));
987         off += scroll;
988      }
969989      if(towns_crtc_reg[27] & 0x0100)
970990         hzoom = 2;
971991   }
972992   else
973993   {
974      off += towns_crtc_reg[17];  // initial offset
994      if(!(towns_crtc_reg[28] & 0x20))
995         off += towns_crtc_reg[17];  // initial offset
996      else
997      {
998         scroll = ((towns_crtc_reg[17] & 0xfc00) << 2) | (((towns_crtc_reg[17] & 0x3ff) << 2));
999         off += scroll;
1000      }
9751001      if(towns_crtc_reg[27] & 0x0001)
9761002         hzoom = 2;
9771003   }
r7607r7608
10211047   UINT8 colour;
10221048   int hzoom = 1;
10231049   int linesize;
1050   UINT32 scroll;
10241051
10251052   if(towns_display_page_sel != 0)
10261053      off = 0x20000;
r7607r7608
10331060   {
10341061      if(!(towns_video_reg[0] & 0x10))
10351062         return;
1036      off += towns_crtc_reg[21];  // initial offset
1063      if(!(towns_crtc_reg[28] & 0x10))
1064         off += towns_crtc_reg[21];  // initial offset
1065      else
1066      {
1067         scroll = ((towns_crtc_reg[21] & 0xfc00)<<2) | (((towns_crtc_reg[21] & 0x3ff)<<2));
1068         off += scroll;
1069      }
10371070      if(towns_crtc_reg[27] & 0x0100)
10381071         hzoom = 2;
10391072   }
10401073   else
10411074   {
1042      off += towns_crtc_reg[17];  // initial offset
1075      if(!(towns_crtc_reg[28] & 0x20))
1076         off += towns_crtc_reg[17];  // initial offset
1077      else
1078      {
1079         scroll = ((towns_crtc_reg[17] & 0xfc00)<<2) | (((towns_crtc_reg[17] & 0x3ff)<<2));
1080         off += scroll;
1081      }
10431082      if(towns_crtc_reg[27] & 0x0001)
10441083         hzoom = 2;
10451084   }
r7607r7608
13681407#endif*/
13691408
13701409#ifdef CRTC_REG_DISP
1371   popmessage("CRTC: %i %i %i %i %i %i %i %i %i\n%i %i %i %i | %i %i %i %i\n%i %i %i %i | %i %i %i %i\nZOOM: %04x\nVideo: %02x %02x\nText=%i Spr=%02x",
1410   popmessage("CRTC: %i %i %i %i %i %i %i %i %i\n%i %i %i %i | %i %i %i %i\n%04x %i %i %i | %04x %i %i %i\nZOOM: %04x\nVideo: %02x %02x\nText=%i Spr=%02x\nReg28=%04x",
13721411      towns_crtc_reg[0],towns_crtc_reg[1],towns_crtc_reg[2],towns_crtc_reg[3],
13731412      towns_crtc_reg[4],towns_crtc_reg[5],towns_crtc_reg[6],towns_crtc_reg[7],
13741413      towns_crtc_reg[8],
r7607r7608
13761415      towns_crtc_reg[13],towns_crtc_reg[14],towns_crtc_reg[15],towns_crtc_reg[16],
13771416      towns_crtc_reg[17],towns_crtc_reg[18],towns_crtc_reg[19],towns_crtc_reg[20],
13781417      towns_crtc_reg[21],towns_crtc_reg[22],towns_crtc_reg[23],towns_crtc_reg[24],
1379      towns_crtc_reg[27],towns_video_reg[0],towns_video_reg[1],towns_tvram_enable,towns_sprite_reg[1] & 0x80);
1418      towns_crtc_reg[27],towns_video_reg[0],towns_video_reg[1],towns_tvram_enable,towns_sprite_reg[1] & 0x80,
1419      towns_crtc_reg[28]);
13801420#endif
13811421
13821422    return 0;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team