- Sync with trunk r58248 to bring the latest changes from Amine (headers) and others...
[reactos.git] / boot / freeldr / freeldr / arch / i386 / machxbox.c
1 /*
2 * FreeLoader
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #include <freeldr.h>
20
21 VOID
22 XboxMachInit(const char *CmdLine)
23 {
24 /* Set LEDs to red before anything is initialized */
25 XboxSetLED("rrrr");
26
27 /* Initialize our stuff */
28 XboxMemInit();
29 XboxVideoInit();
30
31 /* Setup vtbl */
32 MachVtbl.ConsPutChar = XboxConsPutChar;
33 MachVtbl.ConsKbHit = XboxConsKbHit;
34 MachVtbl.ConsGetCh = XboxConsGetCh;
35 MachVtbl.VideoClearScreen = XboxVideoClearScreen;
36 MachVtbl.VideoSetDisplayMode = XboxVideoSetDisplayMode;
37 MachVtbl.VideoGetDisplaySize = XboxVideoGetDisplaySize;
38 MachVtbl.VideoGetBufferSize = XboxVideoGetBufferSize;
39 MachVtbl.VideoHideShowTextCursor = XboxVideoHideShowTextCursor;
40 MachVtbl.VideoPutChar = XboxVideoPutChar;
41 MachVtbl.VideoCopyOffScreenBufferToVRAM = XboxVideoCopyOffScreenBufferToVRAM;
42 MachVtbl.VideoIsPaletteFixed = XboxVideoIsPaletteFixed;
43 MachVtbl.VideoSetPaletteColor = XboxVideoSetPaletteColor;
44 MachVtbl.VideoGetPaletteColor = XboxVideoGetPaletteColor;
45 MachVtbl.VideoSync = XboxVideoSync;
46 MachVtbl.Beep = PcBeep;
47 MachVtbl.PrepareForReactOS = XboxPrepareForReactOS;
48 MachVtbl.GetMemoryMap = XboxMemGetMemoryMap;
49 MachVtbl.DiskGetBootPath = DiskGetBootPath;
50 MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors;
51 MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry;
52 MachVtbl.DiskGetCacheableBlockCount = XboxDiskGetCacheableBlockCount;
53 MachVtbl.GetTime = XboxGetTime;
54 MachVtbl.HwDetect = XboxHwDetect;
55 MachVtbl.HwIdle = XboxHwIdle;
56
57 /* Set LEDs to orange after init */
58 XboxSetLED("oooo");
59 }
60
61 VOID
62 XboxPrepareForReactOS(IN BOOLEAN Setup)
63 {
64 //
65 // On XBOX, prepare video and turn off the floppy motor
66 //
67 XboxVideoPrepareForReactOS(Setup);
68 DiskStopFloppyMotor();
69 }