[CMAKE]
[reactos.git] / boot / freeldr / freeldr / arch / i386 / machpc.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 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 EnableA20();
26
27 /* Setup vtbl */
28 MachVtbl.ConsPutChar = PcConsPutChar;
29 MachVtbl.ConsKbHit = PcConsKbHit;
30 MachVtbl.ConsGetCh = PcConsGetCh;
31 MachVtbl.VideoClearScreen = PcVideoClearScreen;
32 MachVtbl.VideoSetDisplayMode = PcVideoSetDisplayMode;
33 MachVtbl.VideoGetDisplaySize = PcVideoGetDisplaySize;
34 MachVtbl.VideoGetBufferSize = PcVideoGetBufferSize;
35 MachVtbl.VideoSetTextCursorPosition = PcVideoSetTextCursorPosition;
36 MachVtbl.VideoHideShowTextCursor = PcVideoHideShowTextCursor;
37 MachVtbl.VideoPutChar = PcVideoPutChar;
38 MachVtbl.VideoCopyOffScreenBufferToVRAM = PcVideoCopyOffScreenBufferToVRAM;
39 MachVtbl.VideoIsPaletteFixed = PcVideoIsPaletteFixed;
40 MachVtbl.VideoSetPaletteColor = PcVideoSetPaletteColor;
41 MachVtbl.VideoGetPaletteColor = PcVideoGetPaletteColor;
42 MachVtbl.VideoSync = PcVideoSync;
43 MachVtbl.Beep = PcBeep;
44 MachVtbl.PrepareForReactOS = PcPrepareForReactOS;
45 MachVtbl.GetMemoryMap = PcMemGetMemoryMap;
46 MachVtbl.DiskGetBootPath = PcDiskGetBootPath;
47 MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
48 MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry;
49 MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount;
50 MachVtbl.GetTime = PcGetTime;
51 MachVtbl.HwDetect = PcHwDetect;
52 }
53
54 VOID
55 PcPrepareForReactOS(IN BOOLEAN Setup)
56 {
57 //
58 // On PC, prepare video and turn off the floppy motor
59 //
60 PcVideoPrepareForReactOS(Setup);
61 DiskStopFloppyMotor();
62 }
63 /* EOF */