Changeset 83002 in vbox for trunk/src/VBox/Devices/Graphics/BIOS
- Timestamp:
- Feb 6, 2020 8:58:32 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 136017
- Location:
- trunk/src/VBox/Devices/Graphics/BIOS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/BIOS/inlines.h
r82981 r83002 133 133 parm [dx ax] value [dx ax] modify exact [dx ax] nomemory; 134 134 135 //@todo: Do CLD elsewhere!136 135 extern void memsetb(uint16_t seg, uint16_t offset, uint16_t value, uint16_t count); 137 136 #pragma aux memsetb = \ 138 "cld" \139 137 "jcxz no_copy" \ 140 138 "rep stosb" \ … … 142 140 parm [es] [di] [ax] [cx]; 143 141 144 //@todo: Do CLD elsewhere!145 142 extern void memsetw(uint16_t seg, uint16_t offset, uint16_t value, uint16_t count); 146 143 #pragma aux memsetw = \ 147 "cld" \148 144 "jcxz no_copy" \ 149 145 "rep stosw" \ … … 151 147 parm [es] [di] [ax] [cx]; 152 148 153 //@todo: Do CLD elsewhere!154 149 extern void memcpyb(uint16_t dseg, uint16_t doffset, uint16_t sseg, uint16_t soffset, uint16_t count); 155 150 #pragma aux memcpyb = \ 156 "cld" \157 151 "jcxz no_copy" \ 158 152 "push ds" \ … … 163 157 parm [es] [di] [dx] [si] [cx]; 164 158 165 //@todo: Do CLD elsewhere!166 159 extern void memcpyw(uint16_t dseg, uint16_t doffset, uint16_t sseg, uint16_t soffset, uint16_t count); 167 160 #pragma aux memcpyw = \ 168 "cld" \169 161 "jcxz no_copy" \ 170 162 "push ds" \ -
trunk/src/VBox/Devices/Graphics/BIOS/vberom.asm
r69294 r83002 780 780 test bl, bl 781 781 jnz _fail 782 mov di, 0C000h783 mov es, di782 push cs 783 pop es 784 784 mov di, offset vesa_pm_start 785 785 mov cx, vesa_pm_end - vesa_pm_start -
trunk/src/VBox/Devices/Graphics/BIOS/vgabios.c
r83001 r83002 77 77 78 78 static uint8_t find_vga_entry(); 79 80 extern uint8_t xread_byte(uint16_t seg, uint16_t offset); 79 static void biosfn_load_text_8_16_pat(uint8_t AL, uint8_t BL); 80 81 extern uint8_t readx_byte(uint16_t seg, uint16_t offset); 81 82 82 83 #ifdef VBE … … 85 86 #endif 86 87 87 void set_int_vector(uint8_t int_vec, void *offset)88 void set_int_vector(uint8_t int_vec, void __far *ptr) 88 89 { 89 90 void __far * __far *ivt = 0; 90 91 91 ivt[int_vec] = 0xC000 :> offset;92 ivt[int_vec] = ptr; 92 93 } 93 94 … … 573 574 break; 574 575 case 0x02: 575 ptr = 0xC000 :>vgafont14;576 ptr = vgafont14; 576 577 break; 577 578 case 0x03: 578 ptr = 0xC000 :>vgafont8;579 ptr = vgafont8; 579 580 break; 580 581 case 0x04: 581 ptr = 0xC000 :> (vgafont8 + 128 * 8);582 ptr = vgafont8 + 128 * 8; 582 583 break; 583 584 case 0x05: 584 ptr = 0xC000 :>vgafont14alt;585 ptr = vgafont14alt; 585 586 break; 586 587 case 0x06: 587 ptr = 0xC000 :>vgafont16;588 ptr = vgafont16; 588 589 break; 589 590 case 0x07: 590 ptr = 0xC000 :>vgafont16alt;591 ptr = vgafont16alt; 591 592 break; 592 593 default: … … 878 879 // Should we clear the screen ? 879 880 uint8_t noclearmem=mode&0x80; 880 uint8_t line,mmask,*palette,vpti; 881 uint16_t i,twidth,theightm1,cheight; 882 uint8_t modeset_ctl,video_ctl,vga_switches; 881 uint8_t line,mmask,vpti; 882 uint8_t modeset_ctl; 883 uint8_t *palette; 884 uint16_t i; 883 885 uint16_t crtc_addr; 884 886 … … 910 912 911 913 vpti=line_to_vpti[line]; 912 twidth=video_param_table[vpti].twidth; 913 theightm1=video_param_table[vpti].theightm1; 914 cheight=video_param_table[vpti].cheight; 915 914 915 #if 0 // These are unused, but perhaps they shouldn't be? 916 916 // Read the bios vga control 917 917 video_ctl=read_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL); … … 919 919 // Read the bios vga switches 920 920 vga_switches=read_byte(BIOSMEM_SEG,BIOSMEM_SWITCHES); 921 #endif 921 922 922 923 // Read the bios mode set control … … 1036 1037 // Set the BIOS mem 1037 1038 write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MODE,mode); 1038 write_word(BIOSMEM_SEG,BIOSMEM_NB_COLS, twidth);1039 write_word(BIOSMEM_SEG,BIOSMEM_NB_COLS,video_param_table[vpti].twidth); 1039 1040 write_word(BIOSMEM_SEG,BIOSMEM_PAGE_SIZE,video_param_table[vpti].slength); 1040 1041 write_word(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS,crtc_addr); 1041 write_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS, theightm1);1042 write_word(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT, cheight);1042 write_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS,video_param_table[vpti].theightm1); 1043 write_word(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT,video_param_table[vpti].cheight); 1043 1044 write_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL,(0x60|noclearmem)); 1044 1045 write_byte(BIOSMEM_SEG,BIOSMEM_SWITCHES,0xF9); … … 1078 1079 set_int_vector(0x1f, vgafont8+128*8); 1079 1080 1080 switch( cheight)1081 switch(video_param_table[vpti].cheight) 1081 1082 {case 8: 1082 1083 set_int_vector(0x43, vgafont8); … … 1394 1395 mask=0x80>>j; 1395 1396 outw(VGAREG_GRDC_ADDRESS, (mask << 8) | 0x08); 1396 xread_byte(0xa000,dest);1397 readx_byte(0xa000,dest); 1397 1398 if(fdata[src+i]&mask) 1398 1399 { … … 1641 1642 outw(VGAREG_GRDC_ADDRESS, (mask << 8) | 0x08); 1642 1643 outw(VGAREG_GRDC_ADDRESS, 0x0205); 1643 data = xread_byte(0xa000,addr);1644 data = readx_byte(0xa000,addr); 1644 1645 if (AL & 0x80) 1645 1646 { … … 2332 2333 * may be corrupted. 2333 2334 */ 2334 uint8_t xread_byte(uint16_t seg, uint16_t offset)2335 uint8_t readx_byte(uint16_t seg, uint16_t offset) 2335 2336 { 2336 2337 return( *(seg:>(uint8_t *)offset) ); … … 2548 2549 if (GET_AL() < 2) { 2549 2550 write_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL, 2550 ( xread_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & ~1) | GET_AL());2551 (read_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL) & ~1) | GET_AL()); 2551 2552 SET_AL(0x12); 2552 2553 } -
trunk/src/VBox/Devices/Graphics/BIOS/vgarom.asm
r69294 r83002 87 87 push ds 88 88 DO_pusha 89 mov bx, 0C000h 90 mov ds, bx 89 push cs 90 pop ds 91 cld 91 92 call _int10_debugmsg 92 93 DO_popa … … 197 198 198 199 ;; We have to set ds to access the right data segment 199 mov bx, 0C000h 200 mov ds, bx 200 push cs 201 pop ds 202 cld 201 203 call _int10_func 202 204
Note:
See TracChangeset
for help on using the changeset viewer.