- Timestamp:
- Nov 25, 2019 11:02:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/BIOS/vgabios.c
r82205 r82207 967 967 968 968 // -------------------------------------------------------------------------------------------- 969 static void vgamem_copy_linear(uint8_t xstart, uint8_t ysrc, uint8_t ydest, 970 uint16_t cols, uint16_t nbcols, uint8_t cheight) 971 { 972 uint16_t src,dest; 973 uint8_t i; 974 975 src=((ysrc*cheight*nbcols)+xstart)*8; 976 dest=((ydest*cheight*nbcols)+xstart)*8; 977 cols*=8; 978 nbcols*=8; 979 for(i=0;i<cheight;i++) 980 { 981 memcpyb(0xa000,dest+i*nbcols,0xa000,src+i*nbcols,cols); 982 } 983 } 984 985 // -------------------------------------------------------------------------------------------- 986 static void vgamem_fill_linear(uint8_t xstart, uint8_t ystart, uint16_t cols, 987 uint16_t nbcols, uint8_t cheight, uint8_t attr) 988 { 989 uint16_t dest; 990 uint8_t i; 991 992 dest=((ystart*cheight*nbcols)+xstart)*8; 993 cols*=8; 994 nbcols*=8; 995 for(i=0;i<cheight;i++) 996 { 997 memsetb(0xa000,dest+i*nbcols,attr,cols); 998 } 999 } 1000 1001 // -------------------------------------------------------------------------------------------- 969 1002 static void biosfn_scroll(uint8_t nblines, uint8_t attr, uint8_t rul, uint8_t cul, 970 1003 uint8_t rlr, uint8_t clr, uint8_t page, uint8_t dir) … … 1034 1067 else 1035 1068 { 1036 // FIXME gfx mode not complete1037 1069 cheight=video_param_table[line_to_vpti[line]].cheight; 1038 1070 switch(vga_modes[line].memmodel) … … 1100 1132 else 1101 1133 vgamem_copy_cga(cul,i-nblines,i,cols,nbcols,cheight); 1134 if (i>rlr) break; 1135 } 1136 } 1137 } 1138 break; 1139 case LINEAR8: 1140 if(nblines==0&&rul==0&&cul==0&&rlr==nbrows-1&&clr==nbcols-1) 1141 { 1142 memsetb(vga_modes[line].sstart,0,attr,nbrows*nbcols*cheight*8); 1143 } 1144 else 1145 { 1146 // if Scroll up 1147 if(dir==SCROLL_UP) 1148 {for(i=rul;i<=rlr;i++) 1149 { 1150 if((i+nblines>rlr)||(nblines==0)) 1151 vgamem_fill_linear(cul,i,cols,nbcols,cheight,attr); 1152 else 1153 vgamem_copy_linear(cul,i+nblines,i,cols,nbcols,cheight); 1154 } 1155 } 1156 else 1157 {for(i=rlr;i>=rul;i--) 1158 { 1159 if((i<rul+nblines)||(nblines==0)) 1160 vgamem_fill_linear(cul,i,cols,nbcols,cheight,attr); 1161 else 1162 vgamem_copy_linear(cul,i-nblines,i,cols,nbcols,cheight); 1102 1163 if (i>rlr) break; 1103 1164 }
Note:
See TracChangeset
for help on using the changeset viewer.