ReactOS  0.4.14-dev-1233-gf5658fd
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()   MachVtbl.HwDetect()
 
#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 ( )    MachVtbl.HwDetect()

Definition at line 136 of file machine.h.

◆ MachHwIdle

#define MachHwIdle ( )    MachVtbl.HwIdle()

Definition at line 137 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 {
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 }
USHORT Second
Definition: fw.h:16
USHORT Minute
Definition: fw.h:15
Definition: fw.h:9
TIMEINFO * ArcGetTime(VOID)
Definition: arcemul.c:27
int ret
USHORT Hour
Definition: fw.h:14
unsigned int ULONG
Definition: retypes.h:1

◆ ArcGetTime()

TIMEINFO* ArcGetTime ( VOID  )

Definition at line 27 of file arcemul.c.

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

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

◆ MachInit()

VOID MachInit ( const char CmdLine)

Definition at line 1452 of file machpc.c.

1453 {
1454  memset(&MachVtbl, 0, sizeof(MACHVTBL));
1455 
1456  /* Setup vtbl */
1473  MachVtbl.Beep = PcBeep;
1485 
1487 }
PFREELDR_MEMORY_DESCRIPTOR(* GetMemoryMap)(PULONG MaxMemoryMapSize)
Definition: machine.h:63
VOID PcVideoGetFontsFromFirmware(PULONG RomFontPointers)
Definition: pcvideo.c:974
VOID PcVideoSync(VOID)
Definition: pcvideo.c:1136
VOID(* GetExtendedBIOSData)(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
Definition: machine.h:64
VOID(* VideoClearScreen)(UCHAR Attr)
Definition: machine.h:45
PCONFIGURATION_COMPONENT_DATA(* HwDetect)(VOID)
Definition: machine.h:77
VOID(* VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth)
Definition: machine.h:47
BOOLEAN(* VideoIsPaletteFixed)(VOID)
Definition: machine.h:54
UCHAR(* GetFloppyCount)(VOID)
Definition: machine.h:66
ULONG PcDiskGetCacheableBlockCount(UCHAR DriveNumber)
Definition: pcdisk.c:827
BOOLEAN PcInitializeBootDevices(VOID)
Definition: hwdisk.c:470
VOID PcVideoHideShowTextCursor(BOOLEAN Show)
Definition: pcvideo.c:1033
VOID PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
Definition: pcvideo.c:1008
VOID PcGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize)
Definition: machpc.c:80
VOID(* VideoGetFontsFromFirmware)(PULONG RomFontPointers)
Definition: machine.h:49
VOID PcVideoClearScreen(UCHAR Attr)
Definition: pcvideo.c:1087
BOOLEAN PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry)
Definition: pcdisk.c:798
BOOLEAN(* DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry)
Definition: machine.h:68
VOID(* VideoSetTextCursorPosition)(UCHAR X, UCHAR Y)
Definition: machine.h:50
PFREELDR_MEMORY_DESCRIPTOR PcMemGetMemoryMap(ULONG *MemoryMapSize)
Definition: pcmem.c:599
TIMEINFO *(* GetTime)(VOID)
Definition: machine.h:72
BOOLEAN(* InitializeBootDevices)(VOID)
Definition: machine.h:76
BOOLEAN PcDiskReadLogicalSectors(IN UCHAR DriveNumber, IN ULONGLONG SectorNumber, IN ULONG SectorCount, OUT PVOID Buffer)
Definition: pcdisk.c:758
VOID(* VideoGetPaletteColor)(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
Definition: machine.h:56
VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init)
Definition: pcvideo.c:886
BOOLEAN PcConsKbHit(VOID)
Definition: pccons.c:69
BOOLEAN PcVideoIsPaletteFixed(VOID)
Definition: pcvideo.c:1112
VOID PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
Definition: pcvideo.c:1118
PCONFIGURATION_COMPONENT_DATA PcHwDetect(VOID)
Definition: machpc.c:1367
BOOLEAN(* DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
Definition: machine.h:67
BOOLEAN(* ConsKbHit)(VOID)
Definition: machine.h:42
VOID(* VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: machine.h:52
VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: pcvideo.c:1103
VOID(* VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
Definition: machine.h:55
VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
Definition: pcvideo.c:944
VOID(* PrepareForReactOS)(VOID)
Definition: machine.h:59
ULONG(* VideoGetBufferSize)(VOID)
Definition: machine.h:48
int(* ConsGetCh)(VOID)
Definition: machine.h:43
ULONG(* DiskGetCacheableBlockCount)(UCHAR DriveNumber)
Definition: machine.h:69
VOID(* ConsPutChar)(int Ch)
Definition: machine.h:41
MACHVTBL MachVtbl
Definition: arcemul.c:21
VOID PcBeep(VOID)
Definition: pcbeep.c:34
VOID(* HwIdle)(VOID)
Definition: machine.h:78
VOID HalpCalibrateStallExecution(VOID)
Definition: pchw.c:105
VOID PcHwIdle(VOID)
Definition: machpc.c:1397
static UCHAR PcGetFloppyCount(VOID)
Definition: machpc.c:1355
VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
Definition: pcvideo.c:1046
VOID(* VideoSync)(VOID)
Definition: machine.h:57
VOID PcVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
Definition: pcvideo.c:1127
VOID(* VideoCopyOffScreenBufferToVRAM)(PVOID Buffer)
Definition: machine.h:53
VIDEODISPLAYMODE(* VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init)
Definition: machine.h:46
TIMEINFO * PcGetTime(VOID)
Definition: pcrtc.c:24
VOID(* Beep)(VOID)
Definition: machine.h:58
#define memset(x, y, z)
Definition: compat.h:39
ULONG PcVideoGetBufferSize(VOID)
Definition: pcvideo.c:968
int PcConsGetCh(void)
Definition: pccons.c:90
VOID PcPrepareForReactOS(VOID)
Definition: machpc.c:1490
VOID PcConsPutChar(int Ch)
Definition: pccons.c:28
VOID(* VideoHideShowTextCursor)(BOOLEAN Show)
Definition: machine.h:51

Variable Documentation

◆ MachVtbl

MACHVTBL MachVtbl