public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* Doom in Linux HOWTO
@ 2002-12-08  3:38 Stian Sletner
  2002-12-08  4:47 ` Bart Oldeman
       [not found] ` <20021208043551.GA23189@dirac.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Stian Sletner @ 2002-12-08  3:38 UTC (permalink / raw)
  To: linux-msdos

Hi again.

I've been working on a document to help people set up Doom in Linux via
DOSEMU.  Since DOSEMU is such an integral part of it, I'd appreciate any
feedback or criticism from you guys.  I know the subject is a bit
narrow, but hey, you have to write about what you care about, right? :)

Also, Section 4.2 is still unwritten because of my tunnelling problems,
I'm still not quite sure how to go about it.  All input appreciated. :)

Temporary URL: http://home.powertech.no/sletner/doom-in-linux.html

DocBook XML source: http://home.powertech.no/sletner/doom-in-linux.xml
(for those interested.)

-- 
Stian Sletner

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Doom in Linux HOWTO
@ 2002-12-08 14:35 Stas Sergeev
  2002-12-08 16:55 ` Stian Sletner
  2002-12-08 19:36 ` phrostie
  0 siblings, 2 replies; 10+ messages in thread
From: Stas Sergeev @ 2002-12-08 14:35 UTC (permalink / raw)
  To: linux-msdos

Hello.

Stian Sletner wrote:
> Section 4.2 is still unwritten because of my tunnelling problems,
> I'm still not quite sure how to go about it.
I really think that playing doom on the
same machine the tunnel is running, is
rather rare requirement, so you can
write that section omitting that detail.
I also still think that it is nothing
more than your bridging software limitation.
See what the main page says:
---
For those who wanna play in Windows, *with
more than 2 LANs connected*, try GIT
---
And I also think that tunelling to dsn
will work. I tried 2 dosemu sessions:
first with $_vnet=(on) and the second
with $_vnet=(off) (as acting from outside)
and the dooms see each other.

> if you want sound to work (and who wouldn't), you need to get a third-party patch
Well, I don't agree it is a third-party
patch:) Furthermore it will be a part of
dosemu eventually, so this part of the doc
is nothing more than a "temporary hack".

> Set $_cpu to whatever fits your iron. 
No, this is whatever CPU you want to be
emulated (actually just reported to the
dos prog with some other minor differences).

> Set $_xms to some value you see fitting, I use 8192. 
> Set $_ems to 0, Doom doesn't use it.
Doom might not requre neither XMS nor EMS
but still setting them to 0 is not
recommended as many other progs may start
complaining.

> $_novell_hack to on. 
Is it really necessary to do that packets
conversion? I was playing network doom
only on dsn and it works also without a
novell_hack, so I am not sure what problems
does it solve exactly. So why is this important?

> $_netdev to "eth0", if that is your LAN device. 
OK, I think you have to also describe a
$_vnet possibility. Btw, if $_vnet is enabled,
$_netdev is ignored, which must be noted.

> DOSEMU and Doom do not use very much CPU
How does this feet with your suggestion of
setting $_hogthreshold to 0? It must eat
100% of your cpu if $_hogthreshold is not
enabled.
Even with $_hogthreshold set to 1 doom eats
75% of CPU under X and 60% under console on
my Athlon700. Two instances of doom (connected
via vnet) are not playable:(
So I would say doom is extremely CPU-hungry
under dosemu, at least on my system.


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Doom in Linux HOWTO
@ 2002-12-08 20:10 Stas Sergeev
  0 siblings, 0 replies; 10+ messages in thread
From: Stas Sergeev @ 2002-12-08 20:10 UTC (permalink / raw)
  To: linux-msdos

Hello.

phrostie wrote:
> sorry i'm late getting into this but why can't you run either:
That was a generic instructions.
You change the word "Doom" there
to Duke3D, Hexen, Heretic, whatever
you want, and it is still valid.

> lxdoom-svga 1.4.4-7
OK, but when I want
"lxduke3d-svga-1.4.4-7", this
doesn't work (non-existant).


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Doom in Linux HOWTO
@ 2003-01-07 18:53 Stas Sergeev
  0 siblings, 0 replies; 10+ messages in thread
From: Stas Sergeev @ 2003-01-07 18:53 UTC (permalink / raw)
  To: linux-msdos; +Cc: Stian Sletner

[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]

Hello.

Stian Sletner wrote:
> | And I also think that tunelling to dsn will work. I tried 2 dosemu
> | sessions: first with $_vnet=(on) and the second with $_vnet=(off) (as
> | acting from outside) and the dooms see each other.
> Mm, I still have some testing to do...
OK, given that SIB doesn't support more
than 2 interfaces and that dosnet doesn't
support a kernel bridging (bridging to it
from user-space is OK however), the things
are difficult...
But I've found a solution for you:)

At first, compile and start the simple
bridge I've just made by copy/pasting some
examples supplied with TUN/TAP driver.
The code is attached.
If it printed something like:
Allocated devices: tap0 and tap1
then everything goes fine.

The second, as dosnet doesn't support the
kernel bridging, apply the TUN/TAP patch
from my page, do the necessary change in
dosemu.conf and start dosemu. It will
allocate tap2 (now as the tap0 and tap1
are busy already).

Now do this:
ifconfig tap0 up
ifconfig tap1 up
ifconfig tap2 up
brctl addbr br0
brctl addif br0 tap1
brctl addif br0 tap2
brctl addif br0 eth0
ifconfig br0 up

If there were no errors, you are doing good:)
Now configure your SIB to communicate to tap0
(note that tap0 was not added to br0 bridge as
it is intended to be used by SIB).

That should do it. If I haven't forgot something,
now you have 3 dosemu sessions working together:
on the other end of SIB; on tap2 on the same
machine; somewhere on the net to which the eth0
is connected.

Well, this may be too complicated at a first
glance (3 different bridging software working
between different virtual interfaces etc), but
that would definitely be a lot of fun for you
to play with:)

[-- Attachment #2: sbr.c --]
[-- Type: text/plain, Size: 1771 bytes --]

#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/types.h>

#include <netinet/if_ether.h>
#include <linux/if.h>
#include <linux/if_tun.h>

#define max(a,b) ((a)>(b) ? (a):(b))

int tun_alloc(char *dev)
{
      struct ifreq ifr;
      int fd, err;

      if( (fd = open("/dev/net/tun", O_RDWR)) < 0 )
         return -1;

      memset(&ifr, 0, sizeof(ifr));

      /* Flags: IFF_TUN   - TUN device (no Ethernet headers)
       *        IFF_TAP   - TAP device
       *
       *        IFF_NO_PI - Do not provide packet information
       */
      ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
      if( *dev )
         strncpy(ifr.ifr_name, dev, IFNAMSIZ);

      if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){
         close(fd);
         return err;
      }
      strcpy(dev, ifr.ifr_name);

      return fd;
}

int main(int argc, char *argv[])
{
   char dev1[7], dev2[7], buf[1600];
   int f1,f2,l,fm;
   fd_set fds;
 
   strcpy(dev1,"tap%d");
   strcpy(dev2,"tap%d");
   if (((f1 = tun_alloc(dev1)) < 0) || ((f2 = tun_alloc(dev2)) < 0)) {
     printf("Cannot allocate TAP device\n");
     exit(1);
   }
   printf("Allocated devices: %s and %s\n", dev1, dev2);

   fm = max(f1, f2) + 1;
/*
   ioctl(f1, TUNSETNOCSUM, 1); 
   ioctl(f2, TUNSETNOCSUM, 1); 
*/
   while(1){
	FD_ZERO(&fds);
        FD_SET(f1, &fds);
        FD_SET(f2, &fds);

	select(fm, &fds, NULL, NULL, NULL);

	if( FD_ISSET(f1, &fds) ) {
	   l = read(f1,buf,sizeof(buf));
	   printf("Got %i bytes from %s\n", l, dev1);
           write(f2,buf,l);
	}
	if( FD_ISSET(f2, &fds) ) {
	   l = read(f2,buf,sizeof(buf));
	   printf("Got %i bytes from %s\n", l, dev2);
           write(f1,buf,l);
	}
   }
}

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-01-07 18:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-08  3:38 Doom in Linux HOWTO Stian Sletner
2002-12-08  4:47 ` Bart Oldeman
2002-12-08  4:58   ` Stian Sletner
     [not found] ` <20021208043551.GA23189@dirac.org>
     [not found]   ` <20021208045400.GD15769@sletner.com>
     [not found]     ` <20021208061926.GA26833@dirac.org>
     [not found]       ` <20021208063342.GF15769@sletner.com>
     [not found]         ` <20021208064541.GA27112@dirac.org>
     [not found]           ` <20021208065503.GA25194@sletner.com>
2002-12-08 19:19             ` Peter Jay Salzman
  -- strict thread matches above, loose matches on Subject: below --
2002-12-08 14:35 Stas Sergeev
2002-12-08 16:55 ` Stian Sletner
2002-12-08 19:36 ` phrostie
2002-12-08 18:12   ` Peter Jay Salzman
2002-12-08 20:10 Stas Sergeev
2003-01-07 18:53 Stas Sergeev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox