[FREELDR]
[reactos.git] / reactos / boot / freeldr / freeldr / arch / i386 / machpc.c
1 /* $Id: machpc.c 56270 2012-03-29 08:25:20Z tkreuzer $
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 along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #include <freeldr.h>
21
22 VOID
23 PcMachInit(const char *CmdLine)
24 {
25 /* Setup vtbl */
26 MachVtbl.ConsPutChar = PcConsPutChar;
27 MachVtbl.ConsKbHit = PcConsKbHit;
28 MachVtbl.ConsGetCh = PcConsGetCh;
29 MachVtbl.VideoClearScreen = PcVideoClearScreen;
30 MachVtbl.VideoSetDisplayMode = PcVideoSetDisplayMode;
31 MachVtbl.VideoGetDisplaySize = PcVideoGetDisplaySize;
32 MachVtbl.VideoGetBufferSize = PcVideoGetBufferSize;
33 MachVtbl.VideoSetTextCursorPosition = PcVideoSetTextCursorPosition;
34 MachVtbl.VideoHideShowTextCursor = PcVideoHideShowTextCursor;
35 MachVtbl.VideoPutChar = PcVideoPutChar;
36 MachVtbl.VideoCopyOffScreenBufferToVRAM = PcVideoCopyOffScreenBufferToVRAM;
37 MachVtbl.VideoIsPaletteFixed = PcVideoIsPaletteFixed;
38 MachVtbl.VideoSetPaletteColor = PcVideoSetPaletteColor;
39 MachVtbl.VideoGetPaletteColor = PcVideoGetPaletteColor;
40 MachVtbl.VideoSync = PcVideoSync;
41 MachVtbl.Beep = PcBeep;
42 MachVtbl.PrepareForReactOS = PcPrepareForReactOS;
43 MachVtbl.GetMemoryMap = PcMemGetMemoryMap;
44 MachVtbl.DiskGetBootPath = PcDiskGetBootPath;
45 MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
46 MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry;
47 MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount;
48 MachVtbl.GetTime = PcGetTime;
49 MachVtbl.HwDetect = PcHwDetect;
50 MachVtbl.HwIdle = PcHwIdle;
51 }
52
53 VOID
54 PcPrepareForReactOS(IN BOOLEAN Setup)
55 {
56 //
57 // On PC, prepare video and turn off the floppy motor
58 //
59 PcVideoPrepareForReactOS(Setup);
60 DiskStopFloppyMotor();
61 }
62 /* EOF */