2 * ReactOS Boot video driver
4 * Copyright (C) 2005 Filip Navara
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 /* INCLUDES ******************************************************************/
27 /* GLOBALS *******************************************************************/
29 static PVID_FUNCTION_TABLE VidTable
;
30 extern VID_FUNCTION_TABLE VidVgaTable
;
31 extern VID_FUNCTION_TABLE VidVgaTextTable
;
32 extern VID_FUNCTION_TABLE VidXboxTable
;
34 /* FUNCTIONS *****************************************************************/
43 * Check for Xbox by identifying device at PCI 0:0:0, if it's
44 * 0x10de/0x02a5 then we're running on an Xbox.
47 WRITE_PORT_ULONG((PULONG
)0xcf8, 0x80000000);
48 PciId
= READ_PORT_ULONG((PULONG
)0xcfc);
49 if (0x02a510de == PciId
)
50 VidTable
= &VidXboxTable
;
52 VidTable
= &VidVgaTable
;
54 VidTable
= &VidVgaTextTable
;
55 return VidTable
->Initialize(SetMode
);
61 VidTable
->ResetDisplay();
79 VidTable
->BufferToScreenBlt(Buffer
, Left
, Top
, Width
, Height
, Delta
);
91 VidTable
->ScreenToBufferBlt(Buffer
, Left
, Top
, Width
, Height
, Delta
);
100 VidTable
->BitBlt(Buffer
, Left
, Top
);
111 VidTable
->SolidColorFill(Left
, Top
, Right
, Bottom
, Color
);
118 VidTable
->DisplayString(String
);