Merge 14551:14980 from trunk
[reactos.git] / reactos / boot / freeldr / freeldr / arch / i386 / machxbox.c
1 /* $Id$
2 *
3 * FreeLoader
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #include "freeldr.h"
21 #include "mm.h"
22 #include "machine.h"
23 #include "machxbox.h"
24 #include "i386.h"
25
26 VOID
27 XboxMachInit(char *CmdLine)
28 {
29 /* Initialize our stuff */
30 XboxMemInit();
31 XboxVideoInit();
32
33 /* Setup vtbl */
34 MachVtbl.ConsPutChar = XboxConsPutChar;
35 MachVtbl.ConsKbHit = XboxConsKbHit;
36 MachVtbl.ConsGetCh = XboxConsGetCh;
37 MachVtbl.VideoClearScreen = XboxVideoClearScreen;
38 MachVtbl.VideoSetDisplayMode = XboxVideoSetDisplayMode;
39 MachVtbl.VideoGetDisplaySize = XboxVideoGetDisplaySize;
40 MachVtbl.VideoGetBufferSize = XboxVideoGetBufferSize;
41 MachVtbl.VideoHideShowTextCursor = XboxVideoHideShowTextCursor;
42 MachVtbl.VideoPutChar = XboxVideoPutChar;
43 MachVtbl.VideoCopyOffScreenBufferToVRAM = XboxVideoCopyOffScreenBufferToVRAM;
44 MachVtbl.VideoIsPaletteFixed = XboxVideoIsPaletteFixed;
45 MachVtbl.VideoSetPaletteColor = XboxVideoSetPaletteColor;
46 MachVtbl.VideoGetPaletteColor = XboxVideoGetPaletteColor;
47 MachVtbl.VideoSync = XboxVideoSync;
48 MachVtbl.VideoPrepareForReactOS = XboxVideoPrepareForReactOS;
49 MachVtbl.GetMemoryMap = XboxMemGetMemoryMap;
50 MachVtbl.DiskGetBootVolume = i386DiskGetBootVolume;
51 MachVtbl.DiskGetSystemVolume = i386DiskGetSystemVolume;
52 MachVtbl.DiskGetBootPath = i386DiskGetBootPath;
53 MachVtbl.DiskGetBootDevice = i386DiskGetBootDevice;
54 MachVtbl.DiskBootingFromFloppy = i386DiskBootingFromFloppy;
55 MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors;
56 MachVtbl.DiskGetPartitionEntry = XboxDiskGetPartitionEntry;
57 MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry;
58 MachVtbl.DiskGetCacheableBlockCount = XboxDiskGetCacheableBlockCount;
59 MachVtbl.RTCGetCurrentDateTime = XboxRTCGetCurrentDateTime;
60 MachVtbl.HwDetect = XboxHwDetect;
61 }