4: 2007-11-26 (月) 10:30:25 |
5: 2007-11-27 (火) 13:01:27 |
| --0x02 : VESAは存在するっぽいんだけど、BIOS設定等でカットされてて使えない? | | --0x02 : VESAは存在するっぽいんだけど、BIOS設定等でカットされてて使えない? |
| --0x03 : VESAは存在するっぽいんだけど、なんらかの理由でまともには使えない? | | --0x03 : VESAは存在するっぽいんだけど、なんらかの理由でまともには使えない? |
| + | -結果、 |
| + | CMP AX,0x004f |
| + | JNE scrn320 |
| + | 等とすることでVESAを使うかVGAの元来の機能で我慢するかを分岐できる |
| + | |
| + | |
| + | |
| + | |
| | | |
| さらに、例のES:DIアドレスに以下の情報が書き込まれる | | さらに、例のES:DIアドレスに以下の情報が書き込まれる |
| 0xc0078番地から文字が。終端は0で終わる文字列だった。 | | 0xc0078番地から文字が。終端は0で終わる文字列だった。 |
| ''Bochs VBE v2.0''という名前だった。 | | ''Bochs VBE v2.0''という名前だった。 |
| + | |
| + | |
| + | |
| + | *0x4f01 [#o45e3a87] |
| + | 上記、0x4f00ファンクションの後に行うらしい。VESAの有無を確認したら、望みのビデオモードが動くかどうかを確認するものらしい。 |
| + | |
| + | |
| + | MOV AX,0x4f01 ;AXにファンクション番号である0x4f01を |
| + | MOV CX,0x101 ;使いたいモード番号を代入 |
| + | MOV AX,0x9000 ;ここはようするに、ES:DIに0x9000:0を |
| + | MOV ES,AX ;書き込みたいだけ。ESは直接代入できない |
| + | MOV DI,0 ;のでこうしているだけ |
| + | |
| + | INT 0x10 ;BIOSコール! |
| + | |
| + | このコールの結果、各レジスタやES:DIで指定したアドレスに情報が帰ってくる |
| + | -AL : 0x4Fが帰ってきたら成功。(とりあえずVESA BIOSは存在する?) |
| + | -AH : 各種詳細情報 |
| + | --0x00 : 成功。問題なし |
| + | --0x01 : 明確に「ダメ」。(VESAはない?あっても使えない?) |
| + | -結果、 |
| + | CMP AX,0x004f |
| + | JNE scrn320 |
| + | 等とすることでVESAを使うかVGAの元来の機能で我慢するかを分岐できる |
| + | |
| + | |
| + | さらに、例のES:DIアドレスに以下の情報が書き込まれる |
| + | |
| + | |
| + | -0x90000 |
| + | --2バイト:各種モードのフラグ。 |
| + | ---bit 0: mode supported if set |
| + | ---1: optional information available if set |
| + | ---2: BIOS output supported if set |
| + | ---3: set if color, clear if monochrome |
| + | ---4: set if graphics mode, clear if text mode |
| + | ---5: (VBE2) non-VGA mode |
| + | ---6: (VBE2) No bank swiotching supported |
| + | ---7: (VBE2) Linear framebuffer mode supported |
| + | |
| + | |
| + | 02h BYTE window A attributes |
| + | bit 0: exists if set |
| + | 1: readable if set |
| + | 2: writable if set |
| + | bits 3-7 reserved |
| + | |0x90003|1バイト|window B attributes (as for window A) ???| |
| + | 04h WORD window granularity in K |
| + | 06h WORD window size in K |
| + | 08h WORD start segment of window A |
| + | 0Ah WORD start segment of window B |
| + | 0Ch DWORD -> FAR window positioning function (equivalent to AX=4F05h) |
| + | 10h WORD bytes per scan line |
| + | ---remainder is optional for VESA modes, needed for OEM modes--- |
| + | 12h WORD width in pixels |
| + | 14h WORD height in pixels |
| + | 16h BYTE width of character cell in pixels |
| + | 17h BYTE height of character cell in pixels |
| + | 18h BYTE number of memory planes |
| + | |0x90019|1バイト|画面の1ピクセルが何ビットで構成されているか?| |
| + | 1Ah BYTE number of banks |
| + | |
| + | -0x9001B |
| + | --1バイト:メモリーモデルタイプ? |
| + | ---0 Text |
| + | ---1 CGA graphics |
| + | ---2 Hercules Graphics |
| + | ---3 EGA 16 color |
| + | ---4 Packed pixels |
| + | ---5 Non chain 4 256 color modes |
| + | ---6 Direct 15/16/24 bit |
| + | ---7 YUV (luminance-chrominance, alos called YIQ) |
| + | ---8-0Fh Reserved for VESA |
| + | ---10h-0FFh Reserved for OEM |
| + | |
| + | 1Ch BYTE size of bank in K~1Dh BYTE number of image pages |
| + | 1Eh BYTE reserved(1) |
| + | ------VBE v1.2+ -------------------------- |
| + | 1Fh BYTE Red mask size |
| + | 20h BYTE Red mask position |
| + | 21h BYTE Green mask size |
| + | 22h BYTE Green mask position |
| + | 23h BYTE Blue mask size |
| + | 24h BYTE Blue mask position |
| + | 25h BYTE Reserved mask size |
| + | 26h BYTE Reserved mask position |
| + | 27h BYTE Direct Screen mode info |
| + | Bit 0 If set the color ramp is programmable, if clear fixed |
| + | 1 If set the reserved field (as defined by Bytes 25-26h) |
| + | can be used by the application, if clear the field is |
| + | truly reserved. |
| + | --- VBE v2.0 --- |
| + | 28h DWORD Physical address of linear video buffer |
| + | 2Ch DWORD Pointer to start of offscreen memory |
| + | 30h WORD Offscreen memory in Kbytes |
| + | The buffer is defined as 256bytes |