ReactOS 0.4.16-dev-319-g6cf4263
machpc98.h
Go to the documentation of this file.
1/*
2 * PROJECT: FreeLoader
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Header file for NEC PC-98 series
5 * COPYRIGHT: Copyright 2020 Dmitry Borisov (di.sean@protonmail.com)
6 */
7
8#pragma once
9
10#ifndef __MEMORY_H
11#include "mm.h"
12#endif
13
14/*
15 * BIOS work area memory
16 */
17
18/* Extended RAM between 0x100000 and 0xFFFFFF in 128 kB */
19#define MEM_EXPMMSZ 0x401
20
21#define MEM_BIOS_FLAG5 0x458
22 #define NESA_BUS_FLAG 0x80
23
24#define MEM_SCSI_TABLE 0x460
25
26/* Bit 3 and bit 6 - keyboard type */
27#define MEM_KEYB_TYPE 0x481
28
29/* Status about connected SCSI hard drives */
30#define MEM_DISK_EQUIPS 0x482
31
32/* Status about RAM drives */
33#define MEM_RDISK_EQUIP 0x488
34
35#define MEM_BIOS_FLAG1 0x501
36 #define CONVENTIONAL_MEMORY_SIZE 0x07 /* In 128 kB */
37 #define HIGH_RESOLUTION_FLAG 0x08
38 #define SYSTEM_CLOCK_8MHZ_FLAG 0x80 /* 0 = PIT runs at 2.4576 MHz, 1 = at 1.9968 MHz */
39
40/* Status about connected floppies */
41#define MEM_DISK_EQUIP 0x55C
42
43/* Device Address/Unit Address (DA/UA) */
44#define MEM_DISK_BOOT 0x584
45
46/* Extended RAM after 0x1000000, low part, in 1 MB */
47#define MEM_EXPMMSZ16M_LOW 0x594
48
49/* Extended RAM after 0x1000000, high part, in 1 MB */
50#define MEM_EXPMMSZ16M_HIGH 0x595
51
52/* Status about connected 1.44 MB floppies */
53#define MEM_F144_SUPPORT 0x5AE
54
55#define MEM_EXTENDED_NORMAL 0xF8E80
56#define MEM_EXTENDED_HIGH_RESO 0xFFE80
57
59
63
72VOID Pc98VideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y);
79
83
87
89
90/* pcmem.c */
93
95
96/* hwpci.c */
98
99/*
100 * Disk Variables and Functions
101 */
102
103typedef struct _PC98_DISK_DRIVE
104{
105 /* Disk geometry */
107
108 /* BIOS drive number */
110
111 /* IDE driver drive number */
113
114 /* Drive type flags */
116#define DRIVE_SASI 0x00
117#define DRIVE_IDE 0x01
118#define DRIVE_SCSI 0x02
119#define DRIVE_CDROM 0x04
120#define DRIVE_FDD 0x08
121#define DRIVE_MO 0x10
122#define DRIVE_RAM 0x20
123
124 /* TRUE when LBA access are supported */
126
127 /*
128 * 'IsRemovable' flag: TRUE when the drive is removable (e.g. floppy, CD-ROM...).
129 * In that case some of the cached information might need to be refreshed regularly.
130 */
132
133 /*
134 * 'Initialized' flag: if TRUE then the drive has been initialized;
135 * if FALSE then the disk isn't detected by BIOS/FreeLoader.
136 */
139
140/* Platform-specific boot drive and partition numbers */
141extern UCHAR FrldrBootDrive;
143
144LONG DiskReportError(BOOLEAN bShowError);
146
148BOOLEAN Pc98DiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
152
155
156/* hwdisk.c */
unsigned char BOOLEAN
#define RomFontPointers
Definition: winldr.c:348
@ Green
Definition: bl.h:199
@ Red
Definition: bl.h:201
@ Blue
Definition: bl.h:198
enum tagVIDEODISPLAYMODE VIDEODISPLAYMODE
Definition: bufpool.h:45
#define Y(I)
ULONG Pc98DiskGetCacheableBlockCount(UCHAR DriveNumber)
Definition: pc98disk.c:887
VOID Pc98VideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
Definition: pc98video.c:195
BOOLEAN Pc98ConsKbHit(VOID)
Definition: pc98cons.c:64
BOOLEAN Pc98DiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry)
Definition: pc98disk.c:871
BIOS_MEMORY_MAP PcBiosMemoryMap[]
Definition: pcmem.c:37
VOID Pc98HwIdle(VOID)
Definition: machpc98.c:29
BOOLEAN Pc98VideoIsPaletteFixed(VOID)
Definition: pc98video.c:399
VOID Pc98VideoClearScreen(UCHAR Attr)
Definition: pc98video.c:167
ULONG Pc98VideoGetBufferSize(VOID)
Definition: pc98video.c:203
PPC98_DISK_DRIVE Pc98DiskDriveNumberToDrive(IN UCHAR DriveNumber)
Definition: pc98disk.c:141
struct _PC98_DISK_DRIVE * PPC98_DISK_DRIVE
VOID Pc98VideoInit(VOID)
Definition: pc98video.c:69
PCONFIGURATION_COMPONENT_DATA Pc98HwDetect(_In_opt_ PCSTR Options)
Definition: pc98hw.c:1183
BOOLEAN DiskResetController(IN PPC98_DISK_DRIVE DiskDrive)
Definition: pc98disk.c:91
VOID Pc98VideoGetFontsFromFirmware(PULONG RomFontPointers)
Definition: pc98video.c:209
PFREELDR_MEMORY_DESCRIPTOR Pc98MemGetMemoryMap(ULONG *MemoryMapSize)
Definition: pc98mem.c:48
VOID Pc98VideoSetTextCursorPosition(UCHAR X, UCHAR Y)
Definition: pc98video.c:215
ULONG PcBiosMapCount
Definition: pcmem.c:38
LONG DiskReportError(BOOLEAN bShowError)
Definition: pcdisk.c:120
VOID Pc98Beep(VOID)
Definition: pc98beep.c:10
VOID Pc98DiskPrepareForReactOS(VOID)
Definition: pc98disk.c:135
BOOLEAN Pc98InitializeBootDevices(VOID)
Definition: pc98disk.c:721
BOOLEAN PcInitializeBootDevices(VOID)
Definition: hwdisk.c:473
VIDEODISPLAYMODE Pc98VideoSetDisplayMode(char *DisplayMode, BOOLEAN Init)
Definition: pc98video.c:188
VOID Pc98VideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: pc98video.c:316
BOOLEAN PcFindPciBios(PPCI_REGISTRY_INFO BusData)
Definition: hwpci.c:80
VOID Pc98VideoHideShowTextCursor(BOOLEAN Show)
Definition: pc98video.c:228
VOID Pc98ConsPutChar(int Ch)
Definition: pc98cons.c:25
VOID Pc98VideoPrepareForReactOS(VOID)
Definition: pc98video.c:445
VOID Pc98VideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
Definition: pc98video.c:417
UCHAR Pc98GetFloppyCount(VOID)
Definition: pc98hw.c:1214
BOOLEAN Pc98DiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
int Pc98ConsGetCh(VOID)
Definition: pc98cons.c:85
ULONG Pc98GetBootSectorLoadAddress(IN UCHAR DriveNumber)
Definition: machpc98.c:44
VOID Pc98VideoSync(VOID)
Definition: pc98video.c:435
struct _PC98_DISK_DRIVE PC98_DISK_DRIVE
UCHAR FrldrBootDrive
Definition: uefidisk.c:47
TIMEINFO * Pc98GetTime(VOID)
Definition: pc98rtc.c:13
VOID Pc98VideoCopyOffScreenBufferToVRAM(PVOID Buffer)
Definition: pc98video.c:383
VOID Pc98VideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
Definition: pc98video.c:405
ULONG FrldrBootPartition
Definition: uefidisk.c:48
VOID Pc98PrepareForReactOS(VOID)
Definition: machpc98.c:35
#define _In_opt_
Definition: no_sal2.h:212
ULONG SectorCount
Definition: part_xbox.c:31
static VIDEODISPLAYMODE DisplayMode
Definition: pcvideo.c:117
long LONG
Definition: pedump.c:60
#define Ch(x, y, z)
Definition: sha2.c:141
Definition: disk.h:26
BOOLEAN LBASupported
Definition: machpc98.h:125
GEOMETRY Geometry
Definition: machpc98.h:106
BOOLEAN IsRemovable
Definition: machpc98.h:131
BOOLEAN Initialized
Definition: machpc98.h:137
UCHAR IdeUnitNumber
Definition: machpc98.h:112
Definition: fw.h:10
uint32_t * PULONG
Definition: typedefs.h:59
const char * PCSTR
Definition: typedefs.h:52
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3534
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:819
unsigned char UCHAR
Definition: xmlstorage.h:181