Changeset 33173 in vbox for trunk/src/VBox/Devices/Graphics/BIOS/vbe.c
- Timestamp:
- Oct 16, 2010 5:26:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/BIOS/vbe.c
r33041 r33173 1139 1139 Bit16u result=0x0100; 1140 1140 Bit16u ss=get_SS(); 1141 ModeInfoBlock info;1142 1141 ModeInfoListItem *cur_info; 1143 1142 Boolean using_lfb; 1143 Bit8u win_attr; 1144 1144 1145 1145 #ifdef DEBUG … … 1161 1161 printf("VBE found mode %x\n",CX); 1162 1162 #endif 1163 memsetb( ss, &info, 0, sizeof(ModeInfoBlock));1163 memsetb(ES, DI, 0, 256); // The mode info size is fixed 1164 1164 #ifdef VBE_NEW_DYN_LIST 1165 1165 for (i = 0; i < sizeof(ModeInfoBlockCompact); i++) … … 1168 1168 1169 1169 b = in_byte(VBE_EXTRA_PORT, (char *)(&(cur_info->info)) + i); 1170 write_byte( ss, (char *)(&info)+ i, b);1170 write_byte(ES, (char *)DI + i, b); 1171 1171 } 1172 1172 #else 1173 memcpyb(ss, &info, 0xc000, &(cur_info->info), sizeof(ModeInfoBlockCompact)); 1174 #endif 1175 if (info.WinAAttributes & VBE_WINDOW_ATTRIBUTE_RELOCATABLE) { 1176 info.WinFuncPtr = 0xC0000000UL; 1177 *(Bit16u *)&(info.WinFuncPtr) = (Bit16u)(dispi_set_bank_farcall); 1173 memcpyb(ES, DI, 0xc000, &(cur_info->info), sizeof(ModeInfoBlockCompact)); 1174 #endif 1175 win_attr = read_byte(ES, DI + RT_OFFSETOF(ModeInfoBlock, WinAAttributes)); 1176 if (win_attr & VBE_WINDOW_ATTRIBUTE_RELOCATABLE) { 1177 write_word(ES, DI + RT_OFFSETOF(ModeInfoBlock, WinFuncPtr), 1178 (Bit16u)(dispi_set_bank_farcall)); 1179 // If BIOS not at 0xC000 -> boom 1180 write_word(ES, DI + RT_OFFSETOF(ModeInfoBlock, WinFuncPtr) + 2, 0xC000); 1178 1181 } 1179 1180 1182 result = 0x4f; 1181 1183 } … … 1186 1188 #endif 1187 1189 result = 0x100; 1188 }1189 1190 if (result == 0x4f)1191 {1192 // copy updates in mode_info_block back1193 memcpyb(ES, DI, ss, &info, sizeof(info));1194 1190 } 1195 1191
Note:
See TracChangeset
for help on using the changeset viewer.