ReactOS  0.4.14-dev-583-g2a1ba2c
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 22 of file archmach.c.

23 {
24  ULONG PciId;
25 
26  memset(&MachVtbl, 0, sizeof(MACHVTBL));
27 
28  /* Check for Xbox by identifying device at PCI 0:0:0, if it's
29  * 0x10de/0x02a5 then we're running on an Xbox */
30  WRITE_PORT_ULONG((ULONG*)0xcf8, CONFIG_CMD(0, 0, 0));
31  PciId = READ_PORT_ULONG((ULONG*)0xcfc);
32  if (PciId == 0x02a510de)
33  {
35  }
36  else
37  {
39  }
40 
42 }
VOID HalpCalibrateStallExecution(VOID)
Definition: hardware.c:100
ULONG NTAPI READ_PORT_ULONG(IN PULONG Port)
Definition: portio.c:70
VOID NTAPI WRITE_PORT_ULONG(IN PULONG Port, IN ULONG Value)
Definition: portio.c:123
CHAR CmdLine[MAX_PATH]
Definition: mach.c:34
VOID XboxMachInit(const char *CmdLine)
Definition: machxbox.c:256
VOID PcMachInit(const char *CmdLine)
Definition: machpc.c:1407
MACHVTBL MachVtbl
Definition: arcemul.c:21
#define CONFIG_CMD(bus, dev_fn, where)
Definition: hardware.h:23
unsigned int ULONG
Definition: retypes.h:1
#define memset(x, y, z)
Definition: compat.h:39

Variable Documentation

◆ MachVtbl