vbox的更動 3290 路徑 trunk/src/VBox/Devices/Graphics
- 時間撮記:
- 2007-6-26 下午02:04:50 (17 年 以前)
- 位置:
- trunk/src/VBox/Devices/Graphics/BIOS
- 檔案:
-
- 修改 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/Graphics/BIOS/vbe.c
r2980 r3290 1427 1427 * Input: 1428 1428 * AX = 4F09h 1429 * (16-bit) BL = 00h Set palette data 1430 * = 01h Get palette data 1431 * = 02h Set secondary palette data 1432 * = 03h Get secondary palette data 1433 * = 80h Set palette data during VRetrace 1434 * CX = Number of entries to update (<= 256) 1435 * DX = First entry to update 1436 * ES:DI = Table of palette values 1429 1437 * Output: 1430 1438 * AX = VBE Return Status 1431 1439 * 1432 * FIXME: incomplete API description, Input & Output 1440 * Notes: 1441 * Secondary palette support is a "future extension". 1442 * Attempts to set/get it should return status 02h. 1443 * 1444 * In VBE 3.0, reading palette data is optional and 1445 * subfunctions 01h and 03h may return failure. 1446 * 1447 * The format of palette entries is as follows: 1448 * 1449 * PaletteEntry struc 1450 * Blue db ? ; Blue channel value (6 or 8 bits) 1451 * Green db ? ; Green channel value (6 or 8 bits) 1452 * Red db ? ; Red channel value (6 or 8 bits) 1453 * Padding db ? ; DWORD alignment byte (unused) 1454 * PaletteEntry ends 1455 * 1456 * Most applications use VGA DAC registers directly to 1457 * set/get palette in VBE modes. However, subfn 4F09h is 1458 * required for NonVGA controllers (eg. XGA). 1433 1459 */ 1434 void vbe_biosfn_set_get_palette_data(AX) 1435 { 1436 } 1460 ASM_START 1461 vbe_biosfn_set_get_palette_data: 1462 test bl, bl 1463 jz set_palette_data 1464 cmp bl, #0x01 1465 je get_palette_data 1466 cmp bl, #0x03 1467 jbe vbe_09_nohw 1468 cmp bl, #0x80 1469 jne vbe_09_unsupported 1470 #if 0 1471 /* this is where we could wait for vertical retrace */ 1472 #endif 1473 set_palette_data: 1474 pushad 1475 push ds 1476 push es 1477 pop ds 1478 mov al, dl 1479 mov dx, # VGAREG_DAC_WRITE_ADDRESS 1480 out dx, al 1481 inc dx 1482 mov si, di 1483 set_pal_loop: 1484 lodsd 1485 ror eax, #16 1486 out dx, al 1487 rol eax, #8 1488 out dx, al 1489 rol eax, #8 1490 out dx, al 1491 loop set_pal_loop 1492 pop ds 1493 popad 1494 vbe_09_ok: 1495 mov ax, #0x004f 1496 ret 1497 1498 get_palette_data: 1499 pushad 1500 mov al, dl 1501 mov dx, # VGAREG_DAC_READ_ADDRESS 1502 out dx, al 1503 add dl, #2 1504 get_pal_loop: 1505 xor eax, eax 1506 in al, dx 1507 shl eax, #8 1508 in al, dx 1509 shl eax, #8 1510 in al, dx 1511 stosd 1512 loop get_pal_loop 1513 popad 1514 jmp vbe_09_ok 1515 1516 vbe_09_unsupported: 1517 mov ax, #0x014f 1518 ret 1519 vbe_09_nohw: 1520 mov ax, #0x024f 1521 ret 1522 ASM_END 1437 1523 1438 1524 /** Function 0Ah - Return VBE Protected Mode Interface -
trunk/src/VBox/Devices/Graphics/BIOS/vbe.h
r1 r3290 16 16 void vbe_biosfn_set_mode(AX, BX, ES, DI); 17 17 void vbe_biosfn_save_restore_state(AX, DL, CX, ES, BX); 18 void vbe_biosfn_set_get_palette_data(AX);19 18 void vbe_biosfn_return_protected_mode_interface(AX); 20 19 -
trunk/src/VBox/Devices/Graphics/BIOS/vgabios.c
r3082 r3290 367 367 int10_test_vbe_08: 368 368 cmp al, #0x08 369 jne int10_test_vbe_09 370 call vbe_biosfn_set_get_dac_palette_format 371 jmp int10_end 372 int10_test_vbe_09: 373 cmp al, #0x09 369 374 jne int10_normal 370 call vbe_biosfn_set_get_ dac_palette_format375 call vbe_biosfn_set_get_palette_data 371 376 jmp int10_end 372 377 #endif
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器