2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
5 * PURPOSE: VDM BIOS (header file)
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
12 /* INCLUDES *******************************************************************/
16 /* DEFINES ********************************************************************/
18 #define CONSOLE_VIDEO_MEM_END 0xBFFFF
19 #define ROM_AREA_START 0xC0000
20 #define ROM_AREA_END 0xFFFFF
21 #define BDA_SEGMENT 0x40
22 #define BIOS_PIC_MASTER_INT 0x08
23 #define BIOS_PIC_SLAVE_INT 0x70
24 #define BIOS_SEGMENT 0xF000
25 #define BIOS_VIDEO_INTERRUPT 0x10
26 #define BIOS_EQUIPMENT_INTERRUPT 0x11
27 #define BIOS_KBD_INTERRUPT 0x16
28 #define BIOS_TIME_INTERRUPT 0x1A
29 #define BIOS_SYS_TIMER_INTERRUPT 0x1C
30 #define CONSOLE_FONT_HEIGHT 8
31 #define BIOS_KBD_BUFFER_SIZE 16
32 #define BIOS_EQUIPMENT_LIST 0x2C // HACK: Disable FPU for now
33 #define BIOS_DEFAULT_VIDEO_MODE 0x03
34 #define BIOS_MAX_PAGES 8
35 #define BIOS_MAX_VIDEO_MODE 0x13
53 WORD ParallelPorts
[3];
63 WORD KeybdBuffer
[BIOS_KBD_BUFFER_SIZE
];
64 BYTE DriveRecalibrate
;
65 BYTE DriveMotorStatus
;
66 BYTE MotorShutdownCounter
;
67 BYTE LastDisketteOperation
;
73 WORD CursorPosition
[BIOS_MAX_PAGES
];
79 BYTE CrtColorPaletteMask
;
86 BYTE LastDiskOperation
;
88 BYTE DriveControlByte
;
92 WORD KeybdBufferStart
;
94 } BIOS_DATA_AREA
, *PBIOS_DATA_AREA
;
98 /* FUNCTIONS ******************************************************************/
100 BOOLEAN
BiosInitialize();
102 VOID
BiosUpdateConsole(ULONG StartAddress
, ULONG EndAddress
);
103 VOID
BiosUpdateVideoMemory(ULONG StartAddress
, ULONG EndAddress
);
104 inline DWORD
BiosGetVideoMemoryStart();
105 inline VOID
BiosVerticalRefresh();
106 WORD
BiosPeekCharacter();
107 WORD
BiosGetCharacter();
108 VOID
BiosVideoService();
109 VOID
BiosEquipmentService();
110 VOID
BiosKeyboardService();
111 VOID
BiosTimeService();
112 VOID
BiosHandleIrq(BYTE IrqNumber
);
113 VOID
BiosSystemTimerInterrupt();