[FREELDR] Fix typos and PC-98 boot (#2564)

- INT 18h, AH=A0h doesn't exist, it was meant to be AH=0Ah. Thanks to SimK (@simk98l) on twitter for bug reporting and fix.
- Adress -> Address.
This commit is contained in:
Dmitry Borisov 2020-04-18 00:27:20 +06:00 committed by GitHub
parent 2ac13afefc
commit 61d966bf1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -117,7 +117,7 @@ Pc98VideoInit(VOID)
for (i = 0; i < RTL_NUMBER_OF(CgaPalette); i++)
Pc98VideoSetPaletteColor(i, CgaPalette[i].Red, CgaPalette[i].Green, CgaPalette[i].Blue);
/* Int 18h AH=A0h
/* Int 18h AH=0Ah
* CRT BIOS - Set text screen mode
*
* AL0 - text rows
@ -137,7 +137,7 @@ Pc98VideoInit(VOID)
* High-resolution machine:
* AL4 - text rows, AL3 - KCG access mode
*/
Regs.b.ah = 0xA0;
Regs.b.ah = 0x0A;
Regs.b.al = HiResoMachine ? 0x10 : 0x00;
Int386(0x18, &Regs, &Regs); /* 80x25(31) */
@ -208,7 +208,7 @@ Pc98VideoSetTextCursorPosition(UCHAR X, UCHAR Y)
CSRWPARAM CursorParameters;
RtlZeroMemory(&CursorParameters, sizeof(CSRWPARAM));
CursorParameters.CursorAdress = X + Y * TextCols;
CursorParameters.CursorAddress = X + Y * TextCols;
CursorParameters.DotAddress = 0;
WRITE_PORT_UCHAR((PUCHAR)GDC1_IO_o_COMMAND, GDC_COMMAND_CSRW);

View file

@ -89,7 +89,7 @@ WRITE_GDC_CSRFORM(PUCHAR Port, PCSRFORMPARAM CursorParameters)
#define GDC_COMMAND_CSRW 0x49
typedef struct _CSRWPARAM
{
ULONG CursorAdress;
ULONG CursorAddress;
UCHAR DotAddress;
} CSRWPARAM, *PCSRWPARAM;
@ -97,13 +97,13 @@ FORCEINLINE
VOID
WRITE_GDC_CSRW(PUCHAR Port, PCSRWPARAM CursorParameters)
{
ASSERT(CursorParameters->CursorAdress < 0xF00000);
ASSERT(CursorParameters->CursorAddress < 0xF00000);
ASSERT(CursorParameters->DotAddress < 0x10);
WRITE_PORT_UCHAR(Port, CursorParameters->CursorAdress & 0xFF);
WRITE_PORT_UCHAR(Port, (CursorParameters->CursorAdress >> 8) & 0xFF);
WRITE_PORT_UCHAR(Port, CursorParameters->CursorAddress & 0xFF);
WRITE_PORT_UCHAR(Port, (CursorParameters->CursorAddress >> 8) & 0xFF);
WRITE_PORT_UCHAR(Port, (CursorParameters->DotAddress << 4) |
((CursorParameters->CursorAdress >> 16) & 0x03));
((CursorParameters->CursorAddress >> 16) & 0x03));
}
#define GDC_COMMAND_PRAM 0x70