Menu

#8 RS232 serial port emulator

closed
Qbix
None
5
2014-08-14
2003-01-12
Dean Beeler
No

I'm sure you guys are beginning to hate me. Don't
worry! Classes are starting to pick up and I'll get a life
again. Anyway, on with info about this patch. This
patch provides the following thing (and only the following
thing... not other spurious changes are included in the
patch file): A RS232 serial port emulator. Specifically, it
emulates a 16550A UART and redirects the input/output
to a internet address and port of your choosing. Sorry, I
have not implemented any serial port passthrough
capability since I don't have a real modem to test it on.
The modem works like any other real modem, except
that atdt only works with one number... 555-1212, and
the Inet address it is connected to is hardwired to the
code. To really connect to ports then, I implemented
a "ATDI" command, which, when followed by an internet
address will proceed connect to the address's telnet
port. I.E. ATDI127.0.0.1 will connect you to your telnetd
running on your computer. This function will also
accept host name addresses as well, though I will warn
that I haven't programmed asynchronous DNS lookup
routines, so the call will block DosBox if your address is
malformed or takes a while to resolve! As for that
hardcoded 555-1212 number, I plan to work that into
some sort of system where one can call other emulated
modems in DosBox. From there, one could play old
DOS modem games over the internet. (Linewars
particularlly comes to mind). Finally, I've tested this
patch for both Windows XP (using WinSock2) and for
Linux 2.4, using System V sockets. I hope someone
finds this as much fun as I do. So far, I've tested it with
Procomm Plus, Qmodem and Ripterm, though Ripterm
requires all of DosBox's memory to be set to 0xFF to
run.

Discussion

  • Dean Beeler

    Dean Beeler - 2003-01-12

    Patch for rs232 inetmodem

     
  • Qbix

    Qbix - 2003-01-13

    Logged In: YES
    user_id=535630

    We working of this idea a long long time actually but we
    never came to it to play it.
    We had the idea to
    atdtIPNUMMER
    and then be able to dail another pc running dosbox.

    I'm looking forward to the complete workout
    and hope that many people will apply the patch en send it
    comments.

     
  • Dean Beeler

    Dean Beeler - 2003-01-14

    Source file to overwrite after applying modem.patch

     
  • Dean Beeler

    Dean Beeler - 2003-01-14

    Logged In: YES
    user_id=433573

    Ok.. I've posted the completed modem. This modem can
    now connect between other DosBox modems. By default
    (and hardcoded for now), it simply opens up port 23 (telnet)
    and listens for an incoming socket. Using the "ATDI" prefix,
    one can dial into another DosBox session. It works great
    and I've already tried it out with Linewars (though the EGA
    version needs a BIOS signature fix to run) and Populous.
    Moreover, I've fixed several IRQ bugs, added ring tones and
    dial tones and for WIN32 added asynchronous DNS lookup.
    Unfortunately, the asychronous lookup required modifying the
    sdlmain.cpp file and adding several headers so that I could
    get the system specific messages back from the WinSock
    routine that does the asychronous lookup. Because of this,
    I've turned it off for the version I'm posting here. All other
    changes have only been made to the modem.cpp file, so that
    is all I am posting. To use this then, straight from version
    0.57, apply the patch to add modem.cpp to the makefile, and
    then copy over the new modem.cpp file. Have fun!

     
  • Dean Beeler

    Dean Beeler - 2003-01-14

    Logged In: YES
    user_id=433573

    Sorry... that modem.cpp has a tiny bug... You will need to
    change line 142, which reads "Bit16u ringcounter" to "Bit32u
    ringcounter". If you don't, once the ringing starts, it never
    stops until you connect. Sorry.

     
  • Stiletto

    Stiletto - 2003-01-14

    Logged In: YES
    user_id=149805

    For the love of God, Peter, add Canadacow's patches to
    CVS if they're not there already. Pretty please? :-)

     
  • Dean Beeler

    Dean Beeler - 2003-01-14

    Logged In: YES
    user_id=433573

    Ok..... now the latest copy of modem.cpp is the one you
    want. This one fixes some more bugs that I've found as I
    continue to try more modem games and software on it. This
    version should be much faster too for playing games over the
    the internet via two DosBox sessions. (Sorry for the
    confusion, but Source

     
  • Dean Beeler

    Dean Beeler - 2003-01-14

    "Now this is the cup of the carpenter"

     
  • Qbix

    Qbix - 2003-01-15

    Logged In: YES
    user_id=535630

    Stilleto,

    the patches are so other people like you can use that code.

    If it was only for getting it in the codebase it could be
    handled with private communication as well.

    The idea is that everybody who wants to include this
    feature (which isn't in the code base yet) can do so.

    Wether to include or not to include the patch is a process
    that takes time (and testing) (as you see this patch has
    been changed a few times even) So when the patch is
    mature and stable. I will consider the fact of commiting it.

     
  • Max Horn

    Max Horn - 2003-03-22

    Logged In: YES
    user_id=12935

    So, when exactly will it be considered stable? :-)

     
  • Dean Beeler

    Dean Beeler - 2003-03-23

    Logged In: YES
    user_id=433573

    As for me, with school back in session, I'm more or less
    done with the serial port emulator. I no longer have any time
    to mess with it.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.