VirtualBox

Changeset 2980 in vbox for trunk/src/VBox/Devices/Graphics


Ignore:
Timestamp:
Jun 1, 2007 3:56:12 PM (18 years ago)
Author:
vboxsync
Message:

InnoTek -> innotek: actual code changes (headers follow).

Location:
trunk/src/VBox/Devices/Graphics/BIOS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/BIOS/vbe.c

    r1397 r2980  
    7272
    7373_vbebios_vendor_name:
    74 .ascii       "InnoTek Systemberatung GmbH"
     74.ascii       "innotek GmbH"
    7575.byte        0x00
    7676
     
    8080
    8181_vbebios_product_revision:
    82 .ascii       "InnoTek VirtualBox Version "
     82.ascii       "innotek VirtualBox Version "
    8383.ascii       VBOX_VERSION_STRING
    8484.byte        0x00
     
    8686_vbebios_info_string:
    8787//.ascii      "Bochs VBE Display Adapter enabled"
    88 .ascii       "InnoTek VirtualBox VBE Display Adapter enabled"
     88.ascii       "innotek VirtualBox VBE Display Adapter enabled"
    8989.byte   0x0a,0x0d
    9090.byte   0x0a,0x0d
     
    9898
    9999msg_vbe_init:
    100 .ascii       "InnoTek VirtualBox Version "
     100.ascii       "innotek VirtualBox Version "
    101101.ascii       VBOX_VERSION_STRING
    102102.ascii       " VBE Display Adapter"
  • trunk/src/VBox/Devices/Graphics/BIOS/vgabios.c

    r1397 r2980  
    44 */
    55// ============================================================================================
    6 // 
     6//
    77//  Copyright (C) 2001,2002 the LGPL VGABios developers Team
    88//
     
    2020//  License along with this library; if not, write to the Free Software
    2121//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    22 // 
     22//
    2323// ============================================================================================
    24 // 
    25 //  This VGA Bios is specific to the plex86/bochs Emulated VGA card. 
    26 //  You can NOT drive any physical vga card with it. 
    27 //     
     24//
     25//  This VGA Bios is specific to the plex86/bochs Emulated VGA card.
     26//  You can NOT drive any physical vga card with it.
     27//
    2828// ============================================================================================
    29 // 
     29//
    3030//  This file contains code ripped from :
    31 //   - rombios.c of plex86 
     31//   - rombios.c of plex86
    3232//
    3333//  This VGA Bios contains fonts from :
    3434//   - fntcol16.zip (c) by Joseph Gil avalable at :
    3535//      ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip
    36 //     These fonts are public domain 
     36//     These fonts are public domain
    3737//
    3838//  This VGA Bios is based on information taken from :
     
    143143
    144144vgabios_entry_point:
    145            
     145
    146146  jmp vgabios_init_func
    147147
     
    201201.byte   0x00
    202202#endif
    203  
     203
    204204
    205205;; ============================================================================================
     
    216216  call init_bios_area
    217217
    218 #ifdef VBE 
     218#ifdef VBE
    219219;; init vbe functions
    220   call vbe_init 
     220  call vbe_init
    221221#endif
    222222
     
    241241  call _display_info
    242242
    243 #ifdef VBE 
     243#ifdef VBE
    244244;; show vbe info
    245   call vbe_display_info 
     245  call vbe_display_info
    246246#endif
    247247
     
    257257  mov ax,#0x0003
    258258  int #0x10
    259 #endif 
     259#endif
    260260#endif /* VBOX */
    261261
     
    394394
    395395/*
    396  * Boot time harware inits 
     396 * Boot time harware inits
    397397 */
    398398ASM_START
     
    419419
    420420msg_vga_init:
    421 .ascii "InnoTek VirtualBox Version "
     421.ascii "innotek VirtualBox Version "
    422422.ascii VBOX_VERSION_STRING
    423423.ascii " VGA BIOS"
     
    427427// --------------------------------------------------------------------------------------------
    428428/*
    429  *  Boot time bios area inits 
     429 *  Boot time bios area inits
    430430 */
    431431ASM_START
     
    450450  mov   [bx], al
    451451
    452 ;; Clear the screen 
     452;; Clear the screen
    453453  mov   bx, # BIOSMEM_VIDEO_CTL
    454454  mov   al, #0x60
     
    498498 mov si,#vgabios_version
    499499 call _display_string
    500  
     500
    501501 ;;mov si,#vgabios_copyright
    502502 ;;call _display_string
     
    523523 xor al,al
    524524 cld
    525  repne 
     525 repne
    526526  scasb
    527527 not cx
     
    532532 mov bx,#0x0000
    533533 int #0x10
    534  
     534
    535535 pop cx
    536536 mov ax,#0x1301
     
    566566     biosfn_set_video_mode(GET_AL());
    567567     switch(GET_AL()&0x7F)
    568       {case 6: 
     568      {case 6:
    569569        SET_AL(0x3F);
    570570        break;
     
    676676#endif
    677677      }
    678      
     678
    679679     break;
    680680   case 0x12:
     
    725725     break;
    726726
    727 #ifdef VBE 
     727#ifdef VBE
    728728   case 0x4f:
    729729     if (vbe_has_vbe_display()) {
     
    766766#ifdef DEBUG
    767767          unknown();
    768 #endif                   
     768#endif
    769769          // function failed
    770770          AX=0x100;
     
    786786
    787787// ============================================================================================
    788 // 
     788//
    789789// BIOS functions
    790 // 
     790//
    791791// ============================================================================================
    792792
    793 static void biosfn_set_video_mode(mode) Bit8u mode; 
     793static void biosfn_set_video_mode(mode) Bit8u mode;
    794794{// mode: Bit 7 is 1 if no clear screen
    795795
     
    800800 Bit8u modeset_ctl,video_ctl,vga_switches;
    801801 Bit16u crtc_addr;
    802  
     802
    803803#ifdef VBE
    804  if (vbe_has_vbe_display()) { 
     804 if (vbe_has_vbe_display()) {
    805805   dispi_set_enable(VBE_DISPI_DISABLED);
    806806  }
    807807#endif // def VBE
    808  
     808
    809809 // The real mode
    810810 mode=mode&0x7f;
     
    823823 theight=vga_modes[line].theight;
    824824 cheight=vga_modes[line].cheight;
    825  
     825
    826826 // Read the bios vga control
    827827 video_ctl=read_byte(BIOSMEM_SEG,BIOSMEM_VIDEO_CTL);
     
    899899  }
    900900
    901  // Set CRTC address VGA or MDA 
     901 // Set CRTC address VGA or MDA
    902902 crtc_addr=vga_modes[line].memmodel==MTEXT?VGAREG_MDA_CRTC_ADDRESS:VGAREG_VGA_CRTC_ADDRESS;
    903903
     
    959959 write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_MSR,0x00); // Unavailable on vanilla vga, but...
    960960 write_byte(BIOSMEM_SEG,BIOSMEM_CURRENT_PAL,0x00); // Unavailable on vanilla vga, but...
    961  
     961
    962962 // Set cursor shape
    963963 if(vga_modes[line].class==TEXT)
     
    975975 // Write the fonts in memory
    976976 if(vga_modes[line].class==TEXT)
    977   { 
     977  {
    978978ASM_START
    979979  ;; copy and activate 8x16 font
     
    10121012
    10131013// --------------------------------------------------------------------------------------------
    1014 static void biosfn_set_cursor_shape (CH,CL) 
    1015 Bit8u CH;Bit8u CL; 
     1014static void biosfn_set_cursor_shape (CH,CL)
     1015Bit8u CH;Bit8u CL;
    10161016{Bit16u cheight,curs,crtc_addr;
    10171017 Bit8u modeset_ctl;
     
    10471047
    10481048// --------------------------------------------------------------------------------------------
    1049 static void biosfn_set_cursor_pos (page, cursor) 
     1049static void biosfn_set_cursor_pos (page, cursor)
    10501050Bit8u page;Bit16u cursor;
    10511051{
     
    10681068
    10691069   xcurs=cursor&0x00ff;ycurs=(cursor&0xff00)>>8;
    1070  
     1070
    10711071   // Calculate the address knowing nbcols nbrows and page num
    10721072   address=SCREEN_IO_START(nbcols,nbrows,page)+xcurs+ycurs*nbcols;
    1073    
     1073
    10741074   // CRTC regs 0x0e and 0x0f
    10751075   crtc_addr=read_word(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS);
     
    10821082
    10831083// --------------------------------------------------------------------------------------------
    1084 static void biosfn_get_cursor_pos (page,shape, pos) 
     1084static void biosfn_get_cursor_pos (page,shape, pos)
    10851085Bit8u page;Bit16u *shape;Bit16u *pos;
    10861086{
     
    10981098
    10991099// --------------------------------------------------------------------------------------------
    1100 static void biosfn_set_active_page (page) 
     1100static void biosfn_set_active_page (page)
    11011101Bit8u page;
    11021102{
     
    11121112 if(line==0xFF)return;
    11131113
    1114  // Get pos curs pos for the right page 
     1114 // Get pos curs pos for the right page
    11151115 biosfn_get_cursor_pos(page,&dummy,&cursor);
    11161116
     
    11201120   nbcols=read_word(BIOSMEM_SEG,BIOSMEM_NB_COLS);
    11211121   nbrows=read_byte(BIOSMEM_SEG,BIOSMEM_NB_ROWS)+1;
    1122  
     1122
    11231123   // Calculate the address knowing nbcols nbrows and page num
    11241124   address=SCREEN_MEM_START(nbcols,nbrows,page);
     
    13651365
    13661366// --------------------------------------------------------------------------------------------
    1367 static void biosfn_read_char_attr (page,car) 
     1367static void biosfn_read_char_attr (page,car)
    13681368Bit8u page;Bit16u *car;
    13691369{Bit16u ss=get_SS();
     
    15661566
    15671567// --------------------------------------------------------------------------------------------
    1568 static void biosfn_write_char_attr (car,page,attr,count) 
     1568static void biosfn_write_char_attr (car,page,attr,count)
    15691569Bit8u car;Bit8u page;Bit8u attr;Bit16u count;
    15701570{
     
    18971897
    18981898// --------------------------------------------------------------------------------------------
    1899 static void biosfn_write_teletype (car, page, attr, flag) 
     1899static void biosfn_write_teletype (car, page, attr, flag)
    19001900Bit8u car;Bit8u page;Bit8u attr;Bit8u flag;
    19011901{// flag = WITH_ATTR / NO_ATTR
     
    19531953    if(vga_modes[line].class==TEXT)
    19541954     {
    1955       // Compute the address 
     1955      // Compute the address
    19561956      address=SCREEN_MEM_START(nbcols,nbrows,page)+(xcurs+ycurs*nbcols)*2;
    19571957
    1958       // Write the char 
     1958      // Write the char
    19591959      write_byte(vga_modes[line].sstart,address,car);
    19601960
     
    20072007   ycurs-=1;
    20082008  }
    2009  
     2009
    20102010 // Set the cursor for the page
    20112011 cursor=ycurs; cursor<<=8; cursor+=xcurs;
     
    25092509
    25102510// --------------------------------------------------------------------------------------------
    2511 static void biosfn_perform_gray_scale_summing (start,count) 
     2511static void biosfn_perform_gray_scale_summing (start,count)
    25122512Bit16u start;Bit16u count;
    25132513{Bit8u r,g,b;
     
    25182518 outb(VGAREG_ACTL_ADDRESS,0x00);
    25192519
    2520  for( index = 0; index < count; index++ ) 
     2520 for( index = 0; index < count; index++ )
    25212521  {
    25222522   // set read address and switch to read mode
     
    25312531
    25322532   if(i>0x3f)i=0x3f;
    2533  
     2533
    25342534   // set write address and switch to write mode
    25352535   outb(VGAREG_DAC_WRITE_ADDRESS,start);
     
    25392539   outb( VGAREG_DAC_DATA, i&0xff );
    25402540   start++;
    2541   } 
     2541  }
    25422542 inb(VGAREG_ACTL_RESET);
    25432543 outb(VGAREG_ACTL_ADDRESS,0x20);
     
    27542754}
    27552755// --------------------------------------------------------------------------------------------
    2756 static void biosfn_get_font_info (BH,ES,BP,CX,DX) 
     2756static void biosfn_get_font_info (BH,ES,BP,CX,DX)
    27572757Bit8u BH;Bit16u *ES;Bit16u *BP;Bit16u *CX;Bit16u *DX;
    27582758{Bit16u ss=get_SS();
    2759  
     2759
    27602760 switch(BH)
    27612761  {case 0x00:
     
    30113011
    30123012// --------------------------------------------------------------------------------------------
    3013 static void biosfn_write_string (flag,page,attr,count,row,col,seg,offset) 
     3013static void biosfn_write_string (flag,page,attr,count,row,col,seg,offset)
    30143014Bit8u flag;Bit8u page;Bit8u attr;Bit16u count;Bit8u row;Bit8u col;Bit16u seg;Bit16u offset;
    30153015{
     
    30283028 newcurs=row; newcurs<<=8; newcurs+=col;
    30293029 biosfn_set_cursor_pos(page,newcurs);
    3030  
     3030
    30313031 while(count--!=0)
    30323032  {
     
    30373037   biosfn_write_teletype(car,page,attr,WITH_ATTR);
    30383038  }
    3039  
    3040  // Set back curs pos 
     3039
     3040 // Set back curs pos
    30413041 if((flag&0x01)==0)
    30423042  biosfn_set_cursor_pos(page,oldcurs);
     
    30993099
    31003100// --------------------------------------------------------------------------------------------
    3101 static void biosfn_read_state_info (BX,ES,DI) 
     3101static void biosfn_read_state_info (BX,ES,DI)
    31023102Bit16u BX;Bit16u ES;Bit16u DI;
    31033103{
     
    31093109 memcpyb(ES,DI+0x04,BIOSMEM_SEG,0x49,30);
    31103110 memcpyb(ES,DI+0x22,BIOSMEM_SEG,0x84,3);
    3111  
     3111
    31123112 write_byte(ES,DI+0x25,read_byte(BIOSMEM_SEG,BIOSMEM_DCC_INDEX));
    31133113 write_byte(ES,DI+0x26,0);
     
    31203120 write_byte(ES,DI+0x31,3);
    31213121 write_byte(ES,DI+0x32,0);
    3122  
     3122
    31233123 memsetb(ES,DI+0x33,0,13);
    31243124}
     
    31493149//
    31503150// ============================================================================================
    3151  
    3152 // --------------------------------------------------------------------------------------------
    3153 static Bit8u find_vga_entry(mode) 
     3151
     3152// --------------------------------------------------------------------------------------------
     3153static Bit8u find_vga_entry(mode)
    31543154Bit8u mode;
    31553155{
     
    36063606// --------------------------------------------------------------------------------------------
    36073607
    3608 ASM_START 
     3608ASM_START
    36093609;; DATA_SEG_DEFS_HERE
    36103610ASM_END
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette