For those interested I've started work on the frame buffer, the current services are set mode and get info.
Set mode takes the device ID, the bits per pixel for colors, a text or graphics mode and the resolution. The low 8 bits of the flags (ecx) set the bits per pixel and the 9th bit specifies whether it's a text or graphics mode. The top 16 bits of the data (edx) sets the X resolution and the low 16 bits set the Y resolution.
Setting a text mode:
Code:
mov eax, 0x00100000 ; Set mode
mov ebx, 0x00100000 ; First frame buffer device
mov ecx, 0x00000004 ; Text mode 4 bpp (16 colors)
mov edx, 0x00500019 ; 80 cols x 25 rows
call [serCall]
Setting a graphics mode:
Code:
mov eax, 0x00100000 ; Set mode
mov ebx, 0x00100000 ; First frame buffer device
mov ecx, 0x00000120 ; Gfx mode 32 bpp (16.7m colors)
mov edx, 0x04000300 ; 1024 x 768
call [serCall]
To get the info about the current mode:
Code:
mov eax, 0x00100001 ; Get info
mov ebx, 0x00100000 ; First frame buffer device
mov ecx, 0x00000000 ; Flags &
mev edx, 0x00000000 ; Data = 0 then get current mode
call [serCall]
This will return the flags and data in the same format as for set mode.
The get info service will be able to accept different flags to specify what kind of information about the device you are requesting. The data will point to memory allocated for a structure ready to accept the type of info block. This could be the frame buffer device details similar to the VBE information block or it could be the detailed info about a mode similar to the VBE mode info block.