On 11/30/07, Timothy Normand Miller <[EMAIL PROTECTED]> wrote:
> On 11/27/07, Farhan Mohamed Ali <[EMAIL PROTECTED]> wrote:

> > > Phase 3:  BIOS ROM
> > > - Get basic BIOS code together.  This mostly involves finding out the
> > > format and putting together a skeleton.  Without HQ, we can have it do
> > > something simple like program memory and video controllers.
>
> Research.  Find web pages and books that document this and write some
> assembly code.
http://www.vesa.org/public/VBE/vbe3.pdf VESA BIOS EXTENSION
has a lot of the information that is needed.
*VBE Functions 00h-0Ah are required; all other functions are optional.
There are no absolutely required modes, or mode capabilities, since
these will vary according to the hardware and applications. AX=4F01 to
4F0A
* expected to work on all 80x86 platforms, in real and protected modes.
*Must fit without 32k C0000h to C7fffh window
   might be copied from 0xfffc0000 or from pci bar
*TTY support is recommended but not required for all extended text and
graphic modes.
              graphic modes beyond VGA.
  Cursor Size and Position,Scroll , Blank window, Write character AH=00 to 13h
* One way to create more ROM space for the VBE is to delete some of
the VGA parameter tables by deleting modes which are outdated and
little used. Many of the standard VGA modes are now almost entirely
obsolete and should probably be phased out of existence.


* If multiple controllers are present in the system, the second
controller can only be controlled via the VBE/AF Accelerator Functions
specification. AX = 4F17h

There is an optional protected mode entry point, but I don't know if
linux or windows uses it.
Optional Protected Mode Entry Point
PMInfoBlock struc
Signature db 'PMID'
EntryPoint dw
PMInitialize dw
BIOSDataSel dw 0
A0000Sel dw A000h
B0000Sel dw B000h
B8000Sel dw B800h
CodeSegSel dw C000h
InProtectMode db 0
Checksum db
PMInfoBlock ends

http://www.ctyme.com/intr/int-10.htm Ralf Brown interrupt list

http://linuxbios.org/VGA_support
The standard boot ROM sequence for an x86 machine uses the BIOS to
select an initial video card for boot display. This boot video  card
will have it's BIOS copied to C0000 in system RAM.
http://www.grafi.ii.pw.edu.pl/gbm/matrox/pciagp.html
[[The BIOS image of primary VGA (residing in ROM chip on VGA board) is
mapped somewhere in the 32-bit memory address space. At this moment
the length of the image containing initialization routines and the
BIOS services may exceed 32 KBytes  (usually it is between 32 and 64
KBytes). Then the motherboard BIOS copies the whole image from the ROM
on VGA board to the system RAM at the linear address C0000, which is
the standard location of ISA VGA BIOS. This part of RAM is not
write-protected yet.
(The above means that the BIOS of PCI/AGP VGA is never executed from
ROM = is always shadowed, regardless of the setting of "video BIOS
shadow" option in the MB's BIOS.)
Then the VGA BIOS initialization routine is invoked while the BIOS
image in RAM is still writable. The BIOS may determine and write some
data into its image. Also it may move some routines, and "cut-out"
unnecessary parts (like initialization routines), thus reducing its
size to 32 KBytes (if the image was bigger before). After the init
routine completes, the motherboard's BIOS write-protects the portion
of system RAM containing the VGA BIOS. ]]

I assume that the motherboard bios copies the rom and then far calls
to 0xc0000, this vga image then initializes the hardware and traps int
0x10 .
This interrupt handler should deal with most of ah=00h to 13h and ah=4fh .

Do most people like nasm for an assembler or do you like another better?
http://nasm.sourceforge.net/

> > > - Get started on VGA BIOS code
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to