public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: "Edenyard" <mail@edenyard.co.uk>
To: linux-msdos@vger.kernel.org
Subject: Re: DOSemu serial port problem
Date: Mon, 03 Nov 2003 11:37:43	[thread overview]
Message-ID: <200311031144.AMH80464@msgdirector1.onetel.net.uk> (raw)

On Sun, 2 Nov 2003 10:54:32 -0800 (PST), Robert Komar wrote:

>
> The fuser command might help you find out if another process
> is using /dev/ttyS0.
>

   I tried fuser and it reported that the only PID using /dev/ttyS0 was
the one that was shown by ps as running dosemu.bin.

   I have written a very simple piece of Turbo Basic code running in
DOS under DOSemu that I've put together to drive 'COM1'. I've made
an interesting discovery:

   1.  I can write a 1 or a 0 to bit 1 of the UART's MCR register to
       control the RTS line and the actual hardware output line (as
       measured on the D-type connector with an oscilloscope) faithfully
       follows whatever I write to the MCR bit.

   2.  Having set the RTS bit in the MCR to 1 or 0, I can read the
       contents of the MCR back and check that the bit that I've just
       written is correct.

   So far, so good. But....

   3.  Having set the RTS bit in the MCR to 1, subsequently writing a
       character to the TX register results in the actual hardware RTS
       line from the UART being reset as the character comes out of
       the hardware TX line.

   4.  Now if I read back the value from the MCR register, it STILL
       indicates that RTS is set, although the actual hardware has
       reset it.

   Assuming that COM1 as seen by DOS programmes running under DOSemu
(with the settings as I have them in  /etc/dosemu/dosemu.conf) is an
emulated UART, it seems that DOSemu is actually NOT emulating the
operation of the UART correctly, but is corrupting the content of the
hardware UART's MCR register (and therefore the RTS output) somehow as
it transmits.

   The same piece of code run under native DOS on a DOS box works
exactly as expected, with the RTS line staying as set whilst characters
are transmitted.

   Now I'm stuck!! Please could someone look into this UART emulation
part of DOSemu and confirm what my experiments indicate? Best of all,
please, PLEASE could it be fixed?

   Any help will be very gratefully accepted, as I'm getting desperate
to get this DOS thing running under Linux!

   Cheers,

      Gerald.


             reply	other threads:[~2003-11-03 11:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-03 11:37 Edenyard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-06-28 10:03 Dosemu serial port problem Horváth András
2008-06-28 14:18 ` James Courtier-Dutton
2003-10-31 16:22 DOSemu " Edenyard
2003-11-02 13:30 ` Dr. Claudia Neumann
2003-11-02 16:39   ` Ged Haywood
2003-11-02 18:54     ` Robert Komar
2003-11-02 19:07     ` Stas Sergeev
2003-10-31  9:36 Edenyard
2003-10-31 12:09 ` Dr. Claudia Neumann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200311031144.AMH80464@msgdirector1.onetel.net.uk \
    --to=mail@edenyard.co.uk \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox