quick question on VBE mode on real hardware, the following code works for me under all the emulators (Vesa 2.x) but on all my real machines (Vesa 3.x) it goes completely haywire..
I first determine if VBE is present and if so it's version:
Code: Select all
mov ax,4f00h
int 10h
; fill VBEInfo table and get version...
Code: Select all
mov ax,4f01h
mov cx,115h ; the mode im using 800x600xtrue colour
int 10h
; this fills the modeinfo structure
BytesPerScanLine
and BitsPerPixel
as some cards will use true-colour mode in 24bit while others will use 32bits..
These factors are accounted for in the drawing code..
Then I set the mode as follows:
Code: Select all
mov ax,4f02h
mov bx,115h
or bh,01000000b ; set bit 14 for LFB
push ds
pop es
mov di,offset crtinfo
int 10h
All this works sofar in both emulator and real h/w... the problem comes once I start drawing:
I use the PhysBaseAddr field from the mode info block and then treat the vid-mem as normal using the pitch and if it's 3 bytes or 4 bytes per pixel as either R,G,B or R,G,B,A...
The output on real h/w looks totally whacked.. like its banked or planar or something.. not too sure.. Anyone have any ideas?
John