Skip to contentSkip to conversation

serial performance

DISCUSSION Trifle Menot 2 participants 4 messages Mar 12, 2010 – Mar 13, 2010

lore
Share & tools
lore
#0 lore raw

If I start dosemu -s with this:

Quoted 2 lines

$_ports = "fast range 0x3F8,0x3FF"
$_irqpassing = "4"

A speed of 57600 looks fast, like it should be. But if I omit the direct hardware access, and try this:

Quoted 1 line

$_com1 = "/dev/ttyS0 irq 4"

57600 still works, but looks much slower on the remote side of a null modem cable. Seems like I read where the code traps serial port writes and buffers data to /dev/ttyS0. Is the trapping causing the slowdown? Is there a cure?

I don't want to use direct hardware access. I tested it that way, only to see how things work.

I'm using the latest dosemu svn code. I first tried a 2.6.32 kernel on arch linux, but got a kernel panic, then tried a suse 2.6.11 kernel, and got these results. Both were i386 only, never x86_64.

Signature · 2 lines
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php
#1 lore raw
Quoted 8 lines · Trifle Menot

If I start dosemu -s with this:

Quoted 2 lines

$_ports = "fast range 0x3F8,0x3FF"
$_irqpassing = "4"

A speed of 57600 looks fast, like it should be. But if I omit the direct hardware access, and try this:

Quoted 6 lines
Quoted 1 line

$_com1 = "/dev/ttyS0 irq 4"

57600 still works, but looks much slower on the remote side of a null modem cable. Seems like I read where the code traps serial port writes and buffers data to /dev/ttyS0. Is the trapping causing the slowdown? Is there a cure?

Digging deeper, I noticed that my PCBoard BBS recognized a 16550 when using direct hardware access, but only a 16450 with /dev/ttyS0.

I looked at the dosemu source to try and understand why. Being new to the code, I'm not 100% sure of what I'm saying here, but it looks like FIFO mode is turned on according to whatever bits are poked into the virtual UART. So then I looked closer my PCBoard configuration, and I noticed a setting to "Force 16550A usage" and I turned it on.

With that setting, PCBoard now sees a 16550 when using /dev/ttyS0, and my remote output looks fast, like 57600 should. So poking the necessary bits into the dosemu virtual UART fixed things up.

Signature · 2 lines
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php
#2 lore raw
Quoted 3 lines · Trifle Menot

With that setting, PCBoard now sees a 16550 when using /dev/ttyS0, and my remote output looks fast, like 57600 should. So poking the necessary bits into the dosemu virtual UART fixed things up.

Can you elaborate on which bits you poked to achieve this?

We have also had some performance issues with the virtual UART and anything that makes it more like real-time would be appreciated.

Regards,
Paul

Signature · 7 lines
 Dr. Paul S. Crawford
 c/o Satellite Station
 University of Dundee
 Small's Wynd, Dundee, DD1 4HN
 Email: [email protected]
 Tel: +44 (0)1382 38 4687
 The University of Dundee is a Scottish Registered Charity, No. SC015096
#3 lore raw
Quoted 9 lines · Paul Crawford
Quoted 3 lines · Trifle Menot

With that setting, PCBoard now sees a 16550 when using /dev/ttyS0, and my remote output looks fast, like 57600 should. So poking the necessary bits into the dosemu virtual UART fixed things up.

Can you elaborate on which bits you poked to achieve this?

We have also had some performance issues with the virtual UART and anything that makes it more like real-time would be appreciated.

I'm not sure, but probably UART FCR0=1. I got the idea from reading PCBoard's help text for the "Force 16550A Usage" setting:

Quoted 7 lines

Some multi-tasking environments, such as OS/2 or Windows, use device drivers to virtualize the comm port. In the process of doing so, they may hide the 16550A UART, making it appear to be a 16450 UART when accessed by a DOS application.

Setting the answer to 'Y' tells PCBoard to operate AS IF it had detected a 16550A chip.

From a quick read of the dosemu source, it seems that the virutal UART defaults to 16450 mode, until you put it into 16550 mode, presumably by poking FCR0=1 into the (virtual) UART.

If the app cannot do that on its own, maybe a small C program that does it, prior to launching the app, would achieve the same result.

Signature · 2 lines
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php