mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[KDCOM][NTOS:INBV][FREELDR] Decrease default baud rate for PC-98 target (#2601)
According to PC-9801 Bible p. 50, divisor for PIT will become unsupported in some cases after having removed the fractional part. Replace 19200 value with 9600 which is supported by both 10 MHz and 8 MHz machines.
This commit is contained in:
parent
181ed94e22
commit
4501bbac8f
8 changed files with 53 additions and 21 deletions
|
@ -39,7 +39,7 @@ Options=/MININT
|
||||||
[LiveCD_Debug]
|
[LiveCD_Debug]
|
||||||
BootType=Windows2003
|
BootType=Windows2003
|
||||||
SystemPath=multi(0)disk(0)cdrom(0)\reactos
|
SystemPath=multi(0)disk(0)cdrom(0)\reactos
|
||||||
Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /MININT
|
Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=9600 /SOS /MININT
|
||||||
|
|
||||||
[LiveCD_Screen]
|
[LiveCD_Screen]
|
||||||
BootType=Windows2003
|
BootType=Windows2003
|
||||||
|
|
|
@ -30,7 +30,11 @@
|
||||||
|
|
||||||
/* STATIC VARIABLES ***********************************************************/
|
/* STATIC VARIABLES ***********************************************************/
|
||||||
|
|
||||||
|
#if defined(SARCH_PC98)
|
||||||
|
#define DEFAULT_BAUD_RATE 9600
|
||||||
|
#else
|
||||||
#define DEFAULT_BAUD_RATE 19200
|
#define DEFAULT_BAUD_RATE 19200
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_M_IX86) || defined(_M_AMD64)
|
#if defined(_M_IX86) || defined(_M_AMD64)
|
||||||
#if defined(SARCH_PC98)
|
#if defined(SARCH_PC98)
|
||||||
|
|
|
@ -43,8 +43,13 @@ static UCHAR DbgChannels[DBG_CHANNELS_COUNT];
|
||||||
ULONG DebugPort = RS232;
|
ULONG DebugPort = RS232;
|
||||||
|
|
||||||
/* Serial debug connection */
|
/* Serial debug connection */
|
||||||
ULONG ComPort = 0; // The COM port initializer chooses the first available port starting from COM4 down to COM1.
|
#if defined(SARCH_PC98)
|
||||||
|
ULONG BaudRate = 9600;
|
||||||
|
#else
|
||||||
ULONG BaudRate = 115200;
|
ULONG BaudRate = 115200;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ULONG ComPort = 0; // The COM port initializer chooses the first available port starting from COM4 down to COM1.
|
||||||
ULONG PortIrq = 0; // Not used at the moment.
|
ULONG PortIrq = 0; // Not used at the moment.
|
||||||
|
|
||||||
BOOLEAN DebugStartOfLine = TRUE;
|
BOOLEAN DebugStartOfLine = TRUE;
|
||||||
|
|
|
@ -67,10 +67,10 @@ WinLdrPortInitialize(IN ULONG BaudRate,
|
||||||
IN BOOLEAN TerminalConnected,
|
IN BOOLEAN TerminalConnected,
|
||||||
OUT PULONG PortId)
|
OUT PULONG PortId)
|
||||||
{
|
{
|
||||||
/* Set default baud rate */
|
|
||||||
if (BaudRate == 0) BaudRate = 19200;
|
|
||||||
|
|
||||||
#if defined(SARCH_PC98)
|
#if defined(SARCH_PC98)
|
||||||
|
/* Set default baud rate */
|
||||||
|
if (BaudRate == 0) BaudRate = 9600;
|
||||||
|
|
||||||
/* Check if port or address given */
|
/* Check if port or address given */
|
||||||
if (PortNumber)
|
if (PortNumber)
|
||||||
{
|
{
|
||||||
|
@ -106,6 +106,9 @@ WinLdrPortInitialize(IN ULONG BaudRate,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
/* Set default baud rate */
|
||||||
|
if (BaudRate == 0) BaudRate = 19200;
|
||||||
|
|
||||||
/* Check if port or address given */
|
/* Check if port or address given */
|
||||||
if (PortNumber)
|
if (PortNumber)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,12 +15,19 @@
|
||||||
#include <ndk/halfuncs.h>
|
#include <ndk/halfuncs.h>
|
||||||
|
|
||||||
/* Serial debug connection */
|
/* Serial debug connection */
|
||||||
|
#if defined(SARCH_PC98)
|
||||||
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
||||||
#define DEFAULT_DEBUG_COM1_IRQ 4 /* COM1 IRQ */
|
#define DEFAULT_DEBUG_COM1_IRQ 4
|
||||||
#define DEFAULT_DEBUG_COM2_IRQ 3 /* COM2 IRQ */
|
#define DEFAULT_DEBUG_COM2_IRQ 5
|
||||||
#define DEFAULT_DEBUG_BAUD_RATE 115200 /* 115200 Baud */
|
#define DEFAULT_DEBUG_BAUD_RATE 9600
|
||||||
|
#define DEFAULT_BAUD_RATE 9600
|
||||||
#define DEFAULT_BAUD_RATE 19200
|
#else
|
||||||
|
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
||||||
|
#define DEFAULT_DEBUG_COM1_IRQ 4
|
||||||
|
#define DEFAULT_DEBUG_COM2_IRQ 3
|
||||||
|
#define DEFAULT_DEBUG_BAUD_RATE 115200
|
||||||
|
#define DEFAULT_BAUD_RATE 19200
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_M_IX86) || defined(_M_AMD64)
|
#if defined(_M_IX86) || defined(_M_AMD64)
|
||||||
#if defined(SARCH_PC98)
|
#if defined(SARCH_PC98)
|
||||||
|
|
|
@ -13,12 +13,19 @@
|
||||||
#include <ndk/halfuncs.h>
|
#include <ndk/halfuncs.h>
|
||||||
|
|
||||||
/* Serial debug connection */
|
/* Serial debug connection */
|
||||||
|
#if defined(SARCH_PC98)
|
||||||
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
||||||
#define DEFAULT_DEBUG_COM1_IRQ 4 /* COM1 IRQ */
|
#define DEFAULT_DEBUG_COM1_IRQ 4
|
||||||
#define DEFAULT_DEBUG_COM2_IRQ 3 /* COM2 IRQ */
|
#define DEFAULT_DEBUG_COM2_IRQ 5
|
||||||
#define DEFAULT_DEBUG_BAUD_RATE 115200 /* 115200 Baud */
|
#define DEFAULT_DEBUG_BAUD_RATE 9600
|
||||||
|
#define DEFAULT_BAUD_RATE 9600
|
||||||
#define DEFAULT_BAUD_RATE 19200
|
#else
|
||||||
|
#define DEFAULT_DEBUG_PORT 2 /* COM2 */
|
||||||
|
#define DEFAULT_DEBUG_COM1_IRQ 4
|
||||||
|
#define DEFAULT_DEBUG_COM2_IRQ 3
|
||||||
|
#define DEFAULT_DEBUG_BAUD_RATE 115200
|
||||||
|
#define DEFAULT_BAUD_RATE 19200
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_M_IX86) || defined(_M_AMD64)
|
#if defined(_M_IX86) || defined(_M_AMD64)
|
||||||
#if defined(SARCH_PC98)
|
#if defined(SARCH_PC98)
|
||||||
|
@ -299,12 +306,12 @@ NTAPI
|
||||||
KdpReceiveByte(_Out_ PUCHAR OutByte)
|
KdpReceiveByte(_Out_ PUCHAR OutByte)
|
||||||
{
|
{
|
||||||
USHORT CpStatus;
|
USHORT CpStatus;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
CpStatus = CpGetByte(&KdComPort, OutByte, TRUE, FALSE);
|
CpStatus = CpGetByte(&KdComPort, OutByte, TRUE, FALSE);
|
||||||
} while (CpStatus == CP_GET_NODATA);
|
} while (CpStatus == CP_GET_NODATA);
|
||||||
|
|
||||||
/* Get the byte */
|
/* Get the byte */
|
||||||
if (CpStatus == CP_GET_SUCCESS)
|
if (CpStatus == CP_GET_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,10 +79,10 @@ InbvPortInitialize(IN ULONG BaudRate,
|
||||||
/* Not yet supported */
|
/* Not yet supported */
|
||||||
ASSERT(IsMMIODevice == FALSE);
|
ASSERT(IsMMIODevice == FALSE);
|
||||||
|
|
||||||
/* Set default baud rate */
|
|
||||||
if (BaudRate == 0) BaudRate = 19200;
|
|
||||||
|
|
||||||
#if defined(SARCH_PC98)
|
#if defined(SARCH_PC98)
|
||||||
|
/* Set default baud rate */
|
||||||
|
if (BaudRate == 0) BaudRate = 9600;
|
||||||
|
|
||||||
/* Check if port or address given */
|
/* Check if port or address given */
|
||||||
if (PortNumber)
|
if (PortNumber)
|
||||||
{
|
{
|
||||||
|
@ -118,6 +118,9 @@ InbvPortInitialize(IN ULONG BaudRate,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
/* Set default baud rate */
|
||||||
|
if (BaudRate == 0) BaudRate = 19200;
|
||||||
|
|
||||||
/* Check if port or address given */
|
/* Check if port or address given */
|
||||||
if (PortNumber)
|
if (PortNumber)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,8 +13,11 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#if defined(SARCH_PC98)
|
||||||
|
#define DEFAULT_BAUD_RATE 9600
|
||||||
|
#else
|
||||||
#define DEFAULT_BAUD_RATE 19200
|
#define DEFAULT_BAUD_RATE 19200
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_M_IX86) || defined(_M_AMD64)
|
#if defined(_M_IX86) || defined(_M_AMD64)
|
||||||
#if defined(SARCH_PC98)
|
#if defined(SARCH_PC98)
|
||||||
|
|
Loading…
Reference in a new issue