delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/29/20:04:44

From: "John M. Aldrich" <fighteerNO AT SPAMcs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Newbie problem
Date: Sun, 27 Apr 1997 09:50:42 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 80
Message-ID: <33632172.4D15@SPAMcs.com>
References: <Pine DOT SUN DOT 3 DOT 90 DOT 970117164632 DOT 2182A-100000 AT dds DOT dds DOT nl>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp102.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Harald Oostveen wrote:
> 
> I want to make a DOS version out of a C program (MERC, a game, that's
> making MUDs, I want to play it on my own computer.)

What version of Merc are you trying to build?  Various versions of that
engine have been theoretically ported to DOS, but the quality of the
ports vary highly.  I have had a great deal of success with the ROM 2.3
variant of Merc, but your version may not be so portable.

The first thing you need to do is look in the documentation.  If there
are specific instructions for building Merc in DOS, or there is a
specific mention that it has been ported to DOS, then you need to
carefully follow those instructions.  However, I came across one version
of the Merc code whose instructions were woefully out of date.  If you
have any doubts, please email me the file that contains the instructions
and I'll look at it.

Here are the most common porting problems for a Unix-based MUD server:

 - The server uses socket calls and expects to have a full Unixy socket
environment.  There's no simple solution for this unless someone has
taken the time to port the code.
 - The server uses a different set of defined constants for certain
internal variables, such as errno.  Fixing this is as simple as
identifying the constants and finding substitutes.  For example, DJGPP
uses 'EAGAIN' instead of 'EWOULDBLOCK'.
 - The file and directory definitions in the header files may need to be
changed to work with the DOS distribution.  Any that depend on long
filenames will not work.
 - Multiplayer play is not possible on a DOS platform, so the descriptor
handling code will need to be modified.
 - Similarly, if the server depends on asynchronous operations (fork()
and the like), this part of the code must be rewritten.  Fortunately,
Merc is synchronous.
 - The makefile and startup scripts depend on having a Unixy environment
to work with.  You'll have to verify that the makefile is DOS-safe, and
write an entirely new startup script.

As I've said, most of these headaches should already be taken care of
for you.  If not, you'll probably want to find a different version of
the server code, unless you are a real C guru.  ;)

> Unfortunately I'm a newbie (I just know my way into DOS/Windows, but
> that's it.
> Can you please tell me, which DJGPP-files I need to use and how. Theinfo
> say I need to use DJGPP (-O -Wall -c *.c    etc...)

Get this file: 
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/readme.1st.  It tells
you exactly what you need to download and how to install it.  To build
ROM 2.3, these are the packages I needed:

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/djdev201.zip
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/faq210b.zip
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bnu27b.zip
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/fil313b.zip
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/gcc2721b.zip
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/mak375b.zip
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/txi390b.zip
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2misc/csdpmi3b.zip

If you find that your connection to SimTel is slow (you are in a foreign
country, so this is likely to be the case), you'll want to find a closer
mirror.  The DJGPP FAQ (v2/faq210b.zip mentioned above) has a complete
list of SimTel mirrors in chapter 3.1.  You can read this chapter online
at http://www.delorie.com/djgpp/v2faq/faq014.html#Where to find.

Does the "nl" suffix in your email address denote the Netherlands?  If
so, any German mirror should be fairly fast; try this one: 
ftp://ftp.rz.ruhr-uni-bochum.de/pub/simtelnet/gnu/djgpp/

Good luck!  If you need any more advice, please email me privately!

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |     mailto:fighteer AT cs DOT com     |
| Plan:  To find ANYONE willing to |   http://www.cs.com/fighteer   |
| play Descent 2 on DWANGO!        | Tagline: <this space for rent> |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019