ReactOS  0.4.15-dev-499-g1f31905
machxbox.h
Go to the documentation of this file.
1 /*
2  * FreeLoader
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #pragma once
20 
21 #ifndef __MEMORY_H
22 #include "mm.h"
23 #endif
24 
25 #define MAX_XBOX_COM_PORTS 2
26 
27 #define LPC_IO_BASE 0x2E
28 #define LPC_ENTER_CONFIG_KEY 0x55
29 #define LPC_EXIT_CONFIG_KEY 0xAA
30 
31 #define LPC_DEVICE_SERIAL_PORT_1 0x4
32 #define LPC_DEVICE_SERIAL_PORT_2 0x5
33 
34 #define LPC_CONFIG_DEVICE_NUMBER 0x07
35 #define LPC_CONFIG_DEVICE_ACTIVATE 0x30
36 #define LPC_CONFIG_DEVICE_BASE_ADDRESS_HIGH 0x60
37 #define LPC_CONFIG_DEVICE_BASE_ADDRESS_LOW 0x61
38 #define LPC_CONFIG_DEVICE_INTERRUPT 0x70
39 
40 #define NV2A_CONTROL_OFFSET 0xFD000000
41 #define NV2A_FB_OFFSET (0x100000 + NV2A_CONTROL_OFFSET)
42 #define NV2A_FB_CFG0 (0x200 + NV2A_FB_OFFSET)
43 #define NV2A_CRTC_OFFSET (0x600000 + NV2A_CONTROL_OFFSET)
44 #define NV2A_CRTC_FRAMEBUFFER_START (0x800 + NV2A_CRTC_OFFSET)
45 #define NV2A_CRTC_REGISTER_INDEX (0x13D4 + NV2A_CRTC_OFFSET)
46 #define NV2A_CRTC_REGISTER_VALUE (0x13D5 + NV2A_CRTC_OFFSET)
47 #define NV2A_RAMDAC_OFFSET (0x680000 + NV2A_CONTROL_OFFSET)
48 #define NV2A_RAMDAC_FP_HVALID_END (0x838 + NV2A_RAMDAC_OFFSET)
49 #define NV2A_RAMDAC_FP_VVALID_END (0x818 + NV2A_RAMDAC_OFFSET)
50 
51 extern UCHAR BitmapFont8x16[256 * 16];
52 
55 int XboxConsGetCh(VOID);
56 
65 VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y);
74 
77 
80 BOOLEAN XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
82 
84 
87 
88 VOID XboxSetLED(PCSTR Pattern);
89 
90 /* EOF */
UCHAR BitmapFont8x16[256 *16]
Definition: vgafont.c:12
Definition: bl.h:202
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:814
VOID XboxVideoHideShowTextCursor(BOOLEAN Show)
Definition: xboxvideo.c:266
ULONG XboxDiskGetCacheableBlockCount(UCHAR DriveNumber)
Definition: xboxdisk.c:122
#define Y(I)
BOOLEAN XboxVideoIsPaletteFixed(VOID)
Definition: xboxvideo.c:288
Definition: bl.h:199
#define Ch(x, y, z)
Definition: sha2.c:141
VOID XboxVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
Definition: xboxvideo.c:300
VOID XboxVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
Definition: xboxvideo.c:260
TIMEINFO * XboxGetTime(VOID)
Definition: xboxrtc.c:40
Definition: fw.h:9
unsigned char BOOLEAN
VOID XboxPrepareForReactOS(VOID)
Definition: machxbox.c:375
Definition: bufpool.h:45
VOID XboxVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
Definition: xboxvideo.c:294
VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: xboxvideo.c:133
uint64_t ULONGLONG
Definition: typedefs.h:66
BOOLEAN XboxConsKbHit(VOID)
Definition: xboxcons.c:69
VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
Definition: xboxvideo.c:240
VOID XboxVideoClearScreen(UCHAR Attr)
Definition: xboxvideo.c:123
PFREELDR_MEMORY_DESCRIPTOR XboxMemGetMemoryMap(ULONG *MemoryMapSize)
Definition: xboxmem.c:157
Definition: bl.h:200
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID XboxHwIdle(VOID)
Definition: machxbox.c:301
VOID XboxVideoInit(VOID)
Definition: xboxvideo.c:193
VOID XboxConsPutChar(int Ch)
Definition: xboxcons.c:26
enum tagVIDEODISPLAYMODE VIDEODISPLAYMODE
VOID XboxVideoPrepareForReactOS(VOID)
Definition: xboxvideo.c:312
VOID XboxVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
Definition: xboxvideo.c:272
ULONG SectorCount
Definition: part_xbox.c:31
PCONFIGURATION_COMPONENT_DATA XboxHwDetect(VOID)
Definition: machxbox.c:279
VIDEODISPLAYMODE XboxVideoSetDisplayMode(char *DisplayModem, BOOLEAN Init)
Definition: xboxvideo.c:233
VOID XboxDiskInit(BOOLEAN Init)
Definition: xboxdisk.c:26
VOID XboxSetLED(PCSTR Pattern)
Definition: xboxi2c.c:198
VOID XboxVideoScrollUp(VOID)
Definition: xboxvideo.c:105
#define RomFontPointers
Definition: winldr.c:422
VOID XboxVideoSync(VOID)
Definition: xboxvideo.c:306
Definition: disk.h:24
unsigned int * PULONG
Definition: retypes.h:1
BOOLEAN XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry)
Definition: xboxdisk.c:103
unsigned int ULONG
Definition: retypes.h:1
VOID XboxVideoGetFontsFromFirmware(PULONG RomFontPointers)
Definition: xboxvideo.c:254
ULONG XboxVideoGetBufferSize(VOID)
Definition: xboxvideo.c:248
const char * PCSTR
Definition: typedefs.h:52
int XboxConsGetCh(VOID)
Definition: xboxcons.c:76
VOID XboxMemInit(VOID)
Definition: xboxmem.c:57
BOOLEAN XboxDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)