ReactOS 0.4.15-dev-7931-gfd331f1
machine.h File Reference
#include "disk.h"
#include "mm.h"
#include "fs.h"
Include dependency graph for machine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagMACHVTBL
 

Macros

#define MachConsPutChar(Ch)    MachVtbl.ConsPutChar(Ch)
 
#define MachConsKbHit()    MachVtbl.ConsKbHit()
 
#define MachConsGetCh()    MachVtbl.ConsGetCh()
 
#define MachVideoClearScreen(Attr)    MachVtbl.VideoClearScreen(Attr)
 
#define MachVideoSetDisplayMode(Mode, Init)    MachVtbl.VideoSetDisplayMode((Mode), (Init))
 
#define MachVideoGetDisplaySize(W, H, D)    MachVtbl.VideoGetDisplaySize((W), (H), (D))
 
#define MachVideoGetBufferSize()    MachVtbl.VideoGetBufferSize()
 
#define MachVideoGetFontsFromFirmware(RomFontPointers)    MachVtbl.VideoGetFontsFromFirmware((RomFontPointers))
 
#define MachVideoSetTextCursorPosition(X, Y)    MachVtbl.VideoSetTextCursorPosition((X), (Y))
 
#define MachVideoHideShowTextCursor(Show)    MachVtbl.VideoHideShowTextCursor(Show)
 
#define MachVideoPutChar(Ch, Attr, X, Y)    MachVtbl.VideoPutChar((Ch), (Attr), (X), (Y))
 
#define MachVideoCopyOffScreenBufferToVRAM(Buf)    MachVtbl.VideoCopyOffScreenBufferToVRAM(Buf)
 
#define MachVideoIsPaletteFixed()    MachVtbl.VideoIsPaletteFixed()
 
#define MachVideoSetPaletteColor(Col, R, G, B)    MachVtbl.VideoSetPaletteColor((Col), (R), (G), (B))
 
#define MachVideoGetPaletteColor(Col, R, G, B)    MachVtbl.VideoGetPaletteColor((Col), (R), (G), (B))
 
#define MachVideoSync()    MachVtbl.VideoSync()
 
#define MachBeep()    MachVtbl.Beep()
 
#define MachPrepareForReactOS()    MachVtbl.PrepareForReactOS()
 
#define MachGetExtendedBIOSData(ExtendedBIOSDataArea, ExtendedBIOSDataSize)    MachVtbl.GetExtendedBIOSData((ExtendedBIOSDataArea), (ExtendedBIOSDataSize))
 
#define MachGetFloppyCount()    MachVtbl.GetFloppyCount()
 
#define MachDiskReadLogicalSectors(Drive, Start, Count, Buf)    MachVtbl.DiskReadLogicalSectors((Drive), (Start), (Count), (Buf))
 
#define MachDiskGetDriveGeometry(Drive, Geom)    MachVtbl.DiskGetDriveGeometry((Drive), (Geom))
 
#define MachDiskGetCacheableBlockCount(Drive)    MachVtbl.DiskGetCacheableBlockCount(Drive)
 
#define MachInitializeBootDevices()    MachVtbl.InitializeBootDevices()
 
#define MachHwDetect(Options)    MachVtbl.HwDetect(Options)
 
#define MachHwIdle()    MachVtbl.HwIdle()
 

Typedefs

typedef enum tagVIDEODISPLAYMODE VIDEODISPLAYMODE
 
typedef enum tagVIDEODISPLAYMODEPVIDEODISPLAYMODE
 
typedef struct tagMACHVTBL MACHVTBL
 
typedef struct tagMACHVTBLPMACHVTBL
 

Enumerations

enum  tagVIDEODISPLAYMODE { VideoTextMode , VideoGraphicsMode }
 

Functions

VOID MachInit (const char *CmdLine)
 
TIMEINFOArcGetTime (VOID)
 
ULONG ArcGetRelativeTime (VOID)
 

Variables

MACHVTBL MachVtbl
 

Macro Definition Documentation

◆ MachBeep

#define MachBeep ( )     MachVtbl.Beep()

Definition at line 118 of file machine.h.

◆ MachConsGetCh

#define MachConsGetCh ( )     MachVtbl.ConsGetCh()

Definition at line 90 of file machine.h.

◆ MachConsKbHit

#define MachConsKbHit ( )     MachVtbl.ConsKbHit()

Definition at line 88 of file machine.h.

◆ MachConsPutChar

#define MachConsPutChar (   Ch)     MachVtbl.ConsPutChar(Ch)

Definition at line 86 of file machine.h.

◆ MachDiskGetCacheableBlockCount

#define MachDiskGetCacheableBlockCount (   Drive)     MachVtbl.DiskGetCacheableBlockCount(Drive)

Definition at line 130 of file machine.h.

◆ MachDiskGetDriveGeometry

#define MachDiskGetDriveGeometry (   Drive,
  Geom 
)     MachVtbl.DiskGetDriveGeometry((Drive), (Geom))

Definition at line 128 of file machine.h.

◆ MachDiskReadLogicalSectors

#define MachDiskReadLogicalSectors (   Drive,
  Start,
  Count,
  Buf 
)     MachVtbl.DiskReadLogicalSectors((Drive), (Start), (Count), (Buf))

Definition at line 126 of file machine.h.

◆ MachGetExtendedBIOSData

#define MachGetExtendedBIOSData (   ExtendedBIOSDataArea,
  ExtendedBIOSDataSize 
)     MachVtbl.GetExtendedBIOSData((ExtendedBIOSDataArea), (ExtendedBIOSDataSize))

Definition at line 122 of file machine.h.

◆ MachGetFloppyCount

#define MachGetFloppyCount ( )     MachVtbl.GetFloppyCount()

Definition at line 124 of file machine.h.

◆ MachHwDetect

#define MachHwDetect (   Options)     MachVtbl.HwDetect(Options)

Definition at line 136 of file machine.h.

◆ MachHwIdle

#define MachHwIdle ( )     MachVtbl.HwIdle()

Definition at line 139 of file machine.h.

◆ MachInitializeBootDevices

#define MachInitializeBootDevices ( )     MachVtbl.InitializeBootDevices()

Definition at line 133 of file machine.h.

◆ MachPrepareForReactOS

#define MachPrepareForReactOS ( )     MachVtbl.PrepareForReactOS()

Definition at line 120 of file machine.h.

◆ MachVideoClearScreen

#define MachVideoClearScreen (   Attr)     MachVtbl.VideoClearScreen(Attr)

Definition at line 92 of file machine.h.

◆ MachVideoCopyOffScreenBufferToVRAM

#define MachVideoCopyOffScreenBufferToVRAM (   Buf)     MachVtbl.VideoCopyOffScreenBufferToVRAM(Buf)

Definition at line 108 of file machine.h.

◆ MachVideoGetBufferSize

#define MachVideoGetBufferSize ( )     MachVtbl.VideoGetBufferSize()

Definition at line 98 of file machine.h.

◆ MachVideoGetDisplaySize

#define MachVideoGetDisplaySize (   W,
  H,
  D 
)     MachVtbl.VideoGetDisplaySize((W), (H), (D))

Definition at line 96 of file machine.h.

◆ MachVideoGetFontsFromFirmware

#define MachVideoGetFontsFromFirmware (   RomFontPointers)     MachVtbl.VideoGetFontsFromFirmware((RomFontPointers))

Definition at line 100 of file machine.h.

◆ MachVideoGetPaletteColor

#define MachVideoGetPaletteColor (   Col,
  R,
  G,
  B 
)     MachVtbl.VideoGetPaletteColor((Col), (R), (G), (B))

Definition at line 114 of file machine.h.

◆ MachVideoHideShowTextCursor

#define MachVideoHideShowTextCursor (   Show)     MachVtbl.VideoHideShowTextCursor(Show)

Definition at line 104 of file machine.h.

◆ MachVideoIsPaletteFixed

#define MachVideoIsPaletteFixed ( )     MachVtbl.VideoIsPaletteFixed()

Definition at line 110 of file machine.h.

◆ MachVideoPutChar

#define MachVideoPutChar (   Ch,
  Attr,
  X,
  Y 
)     MachVtbl.VideoPutChar((Ch), (Attr), (X), (Y))

Definition at line 106 of file machine.h.

◆ MachVideoSetDisplayMode

#define MachVideoSetDisplayMode (   Mode,
  Init 
)     MachVtbl.VideoSetDisplayMode((Mode), (Init))

Definition at line 94 of file machine.h.

◆ MachVideoSetPaletteColor

#define MachVideoSetPaletteColor (   Col,
  R,
  G,
  B 
)     MachVtbl.VideoSetPaletteColor((Col), (R), (G), (B))

Definition at line 112 of file machine.h.

◆ MachVideoSetTextCursorPosition

#define MachVideoSetTextCursorPosition (   X,
  Y 
)     MachVtbl.VideoSetTextCursorPosition((X), (Y))

Definition at line 102 of file machine.h.

◆ MachVideoSync

#define MachVideoSync ( )     MachVtbl.VideoSync()

Definition at line 116 of file machine.h.

Typedef Documentation

◆ MACHVTBL

◆ PMACHVTBL

◆ PVIDEODISPLAYMODE

◆ VIDEODISPLAYMODE

Enumeration Type Documentation

◆ tagVIDEODISPLAYMODE

Enumerator
VideoTextMode 
VideoGraphicsMode 

Definition at line 33 of file machine.h.

34{
@ VideoTextMode
Definition: machine.h:35
@ VideoGraphicsMode
Definition: machine.h:36
enum tagVIDEODISPLAYMODE * PVIDEODISPLAYMODE
enum tagVIDEODISPLAYMODE VIDEODISPLAYMODE

Function Documentation

◆ ArcGetRelativeTime()

ULONG ArcGetRelativeTime ( VOID  )

Definition at line 33 of file arcemul.c.

34{
35 TIMEINFO* TimeInfo;
36 ULONG ret;
37
38 TimeInfo = ArcGetTime();
39 ret = ((TimeInfo->Hour * 24) + TimeInfo->Minute) * 60 + TimeInfo->Second;
40 return ret;
41}
TIMEINFO * ArcGetTime(VOID)
Definition: arcemul.c:27
Definition: fw.h:10
USHORT Minute
Definition: fw.h:15
USHORT Hour
Definition: fw.h:14
USHORT Second
Definition: fw.h:16
uint32_t ULONG
Definition: typedefs.h:59
int ret

Referenced by PeLdrInitSecurityCookie().

◆ ArcGetTime()

TIMEINFO * ArcGetTime ( VOID  )

Definition at line 27 of file arcemul.c.

28{
29 return MachVtbl.GetTime();
30}
MACHVTBL MachVtbl
Definition: arcemul.c:21
TIMEINFO *(* GetTime)(VOID)
Definition: machine.h:72

Referenced by ArcGetRelativeTime(), EditCustomBootReactOS(), InitOperatingSystemList(), TuiDisplayMenu(), and TuiUpdateDateTime().

◆ MachInit()

VOID MachInit ( const char CmdLine)

Definition at line 1777 of file machpc.c.

1778{
1779 /* Setup vtbl */
1780 RtlZeroMemory(&MachVtbl, sizeof(MachVtbl));
1809
1811}
BOOLEAN PcInitializeBootDevices(VOID)
Definition: hwdisk.c:473
VOID PcGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
Definition: machpc.c:96
static UCHAR PcGetFloppyCount(VOID)
Definition: machpc.c:1680
PCONFIGURATION_COMPONENT_DATA PcHwDetect(_In_opt_ PCSTR Options)
Definition: machpc.c:1692
VOID PcHwIdle(VOID)
Definition: machpc.c:1722
VOID PcPrepareForReactOS(VOID)
Definition: machpc.c:1814
VOID PcBeep(VOID)
Definition: pcbeep.c:34
VOID PcConsPutChar(int Ch)
Definition: pccons.c:28
BOOLEAN PcConsKbHit(VOID)
Definition: pccons.c:69
int PcConsGetCh(void)
Definition: pccons.c:90
BOOLEAN PcDiskReadLogicalSectors(IN UCHAR DriveNumber, IN ULONGLONG SectorNumber, IN ULONG SectorCount, OUT PVOID Buffer)
Definition: pcdisk.c:758
ULONG PcDiskGetCacheableBlockCount(UCHAR DriveNumber)
Definition: pcdisk.c:827
BOOLEAN PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry)
Definition: pcdisk.c:798
VOID HalpCalibrateStallExecution(VOID)
Definition: pchw.c:105
PFREELDR_MEMORY_DESCRIPTOR PcMemGetMemoryMap(ULONG *MemoryMapSize)
Definition: pcmem.c:599
TIMEINFO * PcGetTime(VOID)
Definition: pcrtc.c:24
VOID PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
Definition: pcvideo.c:1010
BOOLEAN PcVideoIsPaletteFixed(VOID)
Definition: pcvideo.c:1114
VOID PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
Definition: pcvideo.c:1120
VOID PcVideoSync(VOID)
Definition: pcvideo.c:1138
VOID PcVideoGetFontsFromFirmware(PULONG RomFontPointers)
Definition: pcvideo.c:976
VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
Definition: pcvideo.c:946
VOID PcVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
Definition: pcvideo.c:1129
VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init)
Definition: pcvideo.c:888
ULONG PcVideoGetBufferSize(VOID)
Definition: pcvideo.c:970
VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: pcvideo.c:1105
VOID PcVideoClearScreen(UCHAR Attr)
Definition: pcvideo.c:1089
VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
Definition: pcvideo.c:1048
VOID PcVideoHideShowTextCursor(BOOLEAN Show)
Definition: pcvideo.c:1035
VOID(* VideoGetPaletteColor)(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
Definition: machine.h:56
VOID(* GetExtendedBIOSData)(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
Definition: machine.h:64
int(* ConsGetCh)(VOID)
Definition: machine.h:43
VOID(* PrepareForReactOS)(VOID)
Definition: machine.h:59
VOID(* VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
Definition: machine.h:55
BOOLEAN(* InitializeBootDevices)(VOID)
Definition: machine.h:76
VOID(* VideoCopyOffScreenBufferToVRAM)(PVOID Buffer)
Definition: machine.h:53
BOOLEAN(* ConsKbHit)(VOID)
Definition: machine.h:42
VOID(* VideoHideShowTextCursor)(BOOLEAN Show)
Definition: machine.h:51
UCHAR(* GetFloppyCount)(VOID)
Definition: machine.h:66
BOOLEAN(* DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry)
Definition: machine.h:68
BOOLEAN(* DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
Definition: machine.h:67
PFREELDR_MEMORY_DESCRIPTOR(* GetMemoryMap)(PULONG MaxMemoryMapSize)
Definition: machine.h:63
VOID(* VideoGetFontsFromFirmware)(PULONG RomFontPointers)
Definition: machine.h:49
VOID(* Beep)(VOID)
Definition: machine.h:58
VOID(* VideoSetTextCursorPosition)(UCHAR X, UCHAR Y)
Definition: machine.h:50
ULONG(* VideoGetBufferSize)(VOID)
Definition: machine.h:48
VOID(* VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: machine.h:52
ULONG(* DiskGetCacheableBlockCount)(UCHAR DriveNumber)
Definition: machine.h:69
VOID(* VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth)
Definition: machine.h:47
VOID(* VideoClearScreen)(UCHAR Attr)
Definition: machine.h:45
VOID(* HwIdle)(VOID)
Definition: machine.h:78
VOID(* VideoSync)(VOID)
Definition: machine.h:57
VIDEODISPLAYMODE(* VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init)
Definition: machine.h:46
BOOLEAN(* VideoIsPaletteFixed)(VOID)
Definition: machine.h:54
PCONFIGURATION_COMPONENT_DATA(* HwDetect)(_In_opt_ PCSTR Options)
Definition: machine.h:77
VOID(* ConsPutChar)(int Ch)
Definition: machine.h:41
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Variable Documentation

◆ MachVtbl

MACHVTBL MachVtbl
extern

Definition at line 21 of file arcemul.c.

Referenced by ArcGetTime(), MachInit(), and MmInitializeMemoryManager().