Slashdot Mirror


DOS Emulation Under Linux - a Simple Guide

David Precious writes "With just a little work, it's possible to get your Linux system to run DOS applications with very little trouble. Whether you need to run some legacy corporate application, or just want to play some of those old classic DOS games, it's easy to get going. To make it easy, I've produced a simple guide to explain it. Hopefully it'll be of use to some people."

37 of 299 comments (clear)

  1. Duke Nukem 3D by DigiShaman · · Score: 5, Funny

    Will it play Duke Nukem 3D....forever?

    --
    Life is not for the lazy.
    1. Re:Duke Nukem 3D by n3k5 · · Score: 5, Interesting
      *i* couldn't get dn3d to run on dosemu+freedos, but it may be possible, particularly if you use, say, MSDOS 6.2 instead of freedos.
      DOSBox claims to run Duke Nukem 3D.

      By the way, does anyone know if there is a free program like DOSEMU/DOSBox for MacOS?
      --
      but what do i know, i'm just a model.
    2. Re:Duke Nukem 3D by Anonymous Coward · · Score: 4, Interesting

      Check out bochs.

    3. Re:Duke Nukem 3D by slux · · Score: 5, Informative
      I suggest you try Icculus' Duke Nukem 3D GNU/Linux port if you want to play it rather than fiddling with dosemu or dosbox (which will surely be too slow as it emulates the entire cpu).

      The same goes for all the games mentioned in the guide - Quake, Wolf3D, Doom all have versions that can be run natively on GNU/Linux and some are also greatly enhanced. Schorched Earth's original version isn't but several remakes are. The Linux Game Tome is a good starting place if you wish to obtain these.

      It's interesting how it might be easier to run legacy Dos apps in GNU/Linux than in Windows (XP) these days. My friend's been dreaming of running a certain old dos game on his WinXP system, but all he has is Dosbox which doesn't run it and even if it did, it would be unplayably slow.

    4. Re:Duke Nukem 3D by Joseph+Lam · · Score: 5, Funny

      Ok,
      It doesn't run Duke Nukem 3D Forever.
      It does run Duke Nukem 3D however.
      It can run Duke Nukem 3D forever.
      It won't run Duke Nukem 3D smooth or fast or whatever

  2. And if DOSemu doesn't work for some reason . . . by Selanit · · Score: 5, Informative

    . . . you can also try DOSbox, which is a virtual DOS machine.

  3. Keen!! by Cyclopedian · · Score: 4, Interesting

    Bah, if I'm going to emulate DOS on linux, I'd rather play Commander Keen. =P

    -Cyc

    1. Re:Keen!! by croddy · · Score: 4, Informative

      runs surprisingly well, as does duke nukem 2 :-)

  4. Quake?? Doom?? by j-pimp · · Score: 3, Informative

    Perhaps he's not aware of the many open source ports of these two for linux with improved EVERYTHING. I reccomend the freedoom wad replacement and legacydoom.

    --
    --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
  5. Oh no by Anonymous Coward · · Score: 5, Funny

    I see a new era of DOS-resident viruses comming up.

  6. Now if only Windows could do the same thing, right by aardwolf204 · · Score: 4, Funny

    Now if only we could get Windows to emulate DOS correctly, maybe then we could Play Duke3d in XP.

    --
    Im dreaming ofa big bndwdth, That can resist the /.crowd.May ur days b merry & bright & may al
  7. Industrial Programs? by Linus+Sixpack · · Score: 5, Insightful

    Has anyone made emulation work with Parallel port Dongles and Hasps? It seems that most of the emulators target dos games -- will they translate com and printer port calls ?

    Some programs that "just work" are really a pain to change. I support a few of these that run on dos and I don't think there is a will to port them or replace them.

    At this point Linux is much better maintained than dos and it would be a better fit if the programs ran perfectly? I know I'd like to dump dos.

    LS

    1. Re:Industrial Programs? by krymsin01 · · Score: 3, Informative

      Dosemu does do com and lpt interfacing, and as for the dongles, I'd assume that that would be handled by your software.

      Then again, I could be wrong... I need sleep.

      --
      stuff
    2. Re:Industrial Programs? by Krunch · · Score: 3, Informative

      Something like User Mode Linux ?

      --
      No GNU has been Hurd during the making of this comment.
  8. Or do it the easy way. by Anonymous Coward · · Score: 5, Informative

    In real Linux distributions, click K (or G) > Configuration > Packaging > Install software

    Enter root password
    search for dos.
    Tick the dosbox box. Click install.

    All the depencancies are automagically resolved and your done in 10 seconds.

    Then click
    K > Applications > Emulators > Dosbox

    Then volia, the c prompt is here haunt you.

    Silly geeks, why do you make your life so hard when it can be so easy now days.

    1. Re:Or do it the easy way. by sholden · · Score: 4, Informative

      Or even just:

      # apt-get install dosemu

    2. Re:Or do it the easy way. by upside · · Score: 5, Informative

      Because we geeks know the commandline is quicker. In Mandrake:

      urpmi dosbox

      --
      I'm sorry if I haven't offended anyone
    3. Re:Or do it the easy way. by Bios_Hakr · · Score: 3, Funny

      Real men prefer:

      tar -zxvf dosbox.tar.gz
      cd dosbox ./configure
      Spend 30 minutes to resolve dependencies.
      make
      sudo make install
      Spend 30 more minutes resolving a segfault.
      Rebuild glibc with debugging support.
      Rebuild dosbox.
      This time it works with no segfault, but 50 other apps just broke because you rebuilt glibc.

      You know, real men suck. Maybe it's time I try out one of these new-fangaled distribution thingies...

      --
      I'd rather you do it wrong, than for me to have to do it at all.
  9. what's the big deal? by ultrapenguin · · Score: 5, Insightful

    Am I the only one who finds the articly higly lacking any useful info?

    Sure, I haven't touched DOSEMU since about 1998 but back then I remember all sorts of problems.

    Even now, the article mentions nothing about setting up sound, midi playback, etc, is this all handled automatically by dosemu installer (doubt it).

    This guide seems to be written by someone who just found DOSEMU yesterday and didn't know anyone used it for years before.

    I mean there's even DOSEMU-HOWTO written which is the official linux dosemu howto, what's wrong with that one? It seems to be even kept up-to-date (as popular dos is these days, anyhow).

    And most of the games he mentions on the site have way better native linux ports...

  10. Re:WP 5.1!!! by krymsin01 · · Score: 3, Funny

    edlin owns them all.

    --
    stuff
  11. DOSemu by DarkHelmet · · Score: 4, Funny

    Thinking about DOSemu and DOSbox remind me of an old article in Wired about the Turbo Switch on computers.

    "Having a turbo switch on your computer is kind of like saying 'I have this really cool ferrari that when I press a button it turns into a pinto'".

    I downloaded Dosbox and played some of the old classics at a sluggish pace... They say that an XP 1800 with DosBox is the equivalent of a 386SX-25.

    "Look ma! I have this cool little program that makes my Athlon 64 3200 into a 386SX-40! Isn't that swell?"

    The sad thing is... I don't think I've ever been so happy about finding a program online.

    I suck.

    --
    /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
  12. Best option... by Markos · · Score: 4, Insightful

    The best option is to really just put together an old gaming box. Old hardware that will run dos like a dream is avaiable everywhere. Seems to be the best option instead of messing around with various emulators trying to get them to work with game xy and z.

  13. Re:Now if only Windows could do the same thing, ri by Phexro · · Score: 4, Funny

    Or you could just wait. See, the delay with Duke Nukem Forever is that they've hidden the entire series of old Duke games in it as an easter egg, and they want them to work just right in Windows 95^H8^UMe^U2k^UXP.

  14. Re:And if DOSemu doesn't work for some reason . . by Anonymous Coward · · Score: 5, Informative

    DOSBox will also run on non-x86 machines. Got MacOSX or LinuxPPC? Works.

  15. Why this news? by po8 · · Score: 5, Insightful

    OK, I'm not getting why this article made the front page. The "tutorial" seems to consist of saying "download the software and install it", which shouldn't be too hard to figure out on one's own. The bulk of the tutorial content is pointers to four standard DOS games.

    BTW, on Debian, the installation is "apt-get install dosemu-freedos". I was about to gloat about how easy that is, but it looks pretty darn easy under Slackware also. :-)

  16. Re:Isn't this just ... by ottawanker · · Score: 5, Funny

    You only waited 3 hours? You got it lucky, I've been waiting 10 years for a guide on how to use DOSEMU.

  17. DOSEMU / FreeDOS useful for embedded support by barries · · Score: 5, Informative

    There's still a dusty corner of systems design and programming that takes place on DOS: some embedded programming tools (compilers, flash burners, in circuit emulator debuggers) for some chips still work "best" on DOS.

    Only now, we can use DOSEMU to run them under Linux and get the benefit of real development environment when supporting legacy apps. We can open a bash shell and use Perl, gnu make, emacs/vim, etc to drive development, then have a DOSemu / FreeDOS window to drive download and debug.

    It can be quite difficult automating the Windows versions of these tools to that same level. Most of our projects use Windowes tool (running in VMware on Linux), but we did one two years ago hosted on DOSEMU and using Bytecraft's (now) excellent compiler for the PIC chips.

    Best of both worlds, and many, many thanks to all the hackers that made it work so well.

    - Barrie

  18. It's a bit ironic... by DarkDust · · Score: 3, Informative

    I'm still playing DOS games from time to time, like Dune 2. Now the ironic part is that I can't get the sound to work in DOS directly (laptop with an SiS chip, no DOS usable driver avaible) neither does the sound work under Windows ME... but it works without problems in Linux using DOSEmu since it emulates an SoundBlaster 16 and a General MIDI card :-)

  19. Re:PCEmu by kasperd · · Score: 5, Interesting

    I'm curious to know what are those 16 bytes in the ROM...must have been highly optimized :)

    The trick is, that when writing an emulator, you don't need to write a BIOS in 16 bit code. Instead a BIOS implementation is written in 32 bit code, that can execute outside the precious low end address space. Then I just need enough entry points from 16 bit code to 32 bit code. An entry points requires an instruction that will trap from virtual 86 mode to 32 bit user mode. I decided to use the HLT instruction which is only one byte. Because of the segment:offset addressing there are 4096 different ways to address this single byte, that means I have 4096 entry points which is a lot more than I need. The entry point for reboot is sometimes accessed through at least two different addressings, so I avoided to place my HLT instruction there and instead placed the conventional five bytes long far jump instruction there, which jumps to one of my entry points. After this five bytes instruction are eight bytes reserved for the BIOS date written as month / date / year. The last three bytes are three single byte instructions HLT IRET RETF. The HLT and IRET are actually used, the RETF I just placed there because it might come in handy. Because of the DOS memory management and the reboot entry point, there is no way to make the ROM smaller than 16 bytes.

    To actually protect the ROM against writing I mark the entire page read only, though it is only the last 16 bytes I really need to protect. This means any write to the first 4050 bytes of this page will trap, those are the traps that I needed to fix in the kernel because they would Oops if triggered by a stack access by an instruction emulated in the kernel. All those traps of course slows down execution, so I might want to sacrifice the last 4050 bytes for a bit of performance. I'm still looking for an efficient way to access the last bytes. If I could put an upper limit to the address accessed by virtual 86 mode, I could switch between a limit just below the ROM and a write protected page, which I belive would speed up execution. Together with my emulator I have put a GPL'ed UMM driver that works with my emulator, quite conveniently this driver does not support the last 4050 bytes of UMB that have been causing problems anyway. EMM386 doesn't work with my emulator, and never will because of braindead Intel design.

    --

    Do you care about the security of your wireless mouse?
  20. DOSBox and Mac OS X. by Xenex · · Score: 4, Informative

    "By the way, does anyone know if there is a free program like DOSEMU/DOSBox for MacOS?"

    There is a DOSBox package in Fink.

  21. Re:Isn't this just ... by InternationalCow · · Score: 3, Funny

    I agree - but perhaps it is a good sign that there are now Linux users who need this kind of hand holding :) I remember that, in the old days (eg, a year ago or so) one was supposed to RTFM and figure it out. Not any more?

    --
    ----- One learns to itch where one can scratch.
  22. Re:It's a bit ironic... - Try VDMsound by Artega+VH · · Score: 5, Informative

    May I suggest vdmsound Allowed me to play Dune 2 no problems under windows 2k. Bonus points for it being open source and gpl'ed eh?

    --
    groklaw, wired and slashdot. The holy trinity of work based time wasting.
  23. Re:Abandomware by TwistedSquare · · Score: 5, Informative

    IIRC, Apogee sell all their old games online on their website www.3drealms.com -quick check- Yep, if you go here: http://store.yahoo.com/3drealms/dowit.html you can find classics such as Duke Nukem (1&2), Commander Keen (various episodes), and lesser known games such as the "cute" Cosmo, Crystal Caves, etc. Those were the days!

  24. Gentoo users: by Trejkaz · · Score: 4, Informative

    Who needs a tutorial? Just type emerge dosemu.

    --
    Karma: It's all a bunch of tree-huggin' hippy crap!
  25. From one WP-5.1 user to another by Anna+Merikin · · Score: 3, Informative

    Wp5.1 for DOS was, like all other WP DOS versions, was written in assembly language for "fast keyboard response" according to WP Corp. way back when.

    I still use it on DOSemu (easy, start it with -c -k and all the function keys work as expected.)

  26. I am greatly saddened... by tiger99 · · Score: 3, Insightful
    Why? Because I gave away lots of my old but good DOS programs, complete with licence of course, years ago. It would be nice to run almost bug-free, stable things like Word Perfect 5.2 again. (I did find one bug in that actually, but it was not too serious and did not cause data loss). Then there was a magazine cover disk with 50 free utilities, about 20 of which were actually useful and worked, and got used every day, and all the old C programs I wrote, which would compile and run on both DOS and Unix, but not for some reason, Windoze, even in a command window.

    It would be nice to run non-bloated code again. I used to be amazed at the speed of spell-checking in WP 5.2 on a 286, it would most probably still beat Word 2000 on my Athlon 2.6GHz. Life was much less troublesome then, before truly abominable software, designed by idiots, for idiots, became dominant.

    Now, if DOS could be combined with Unix version 7, that would be almost perfection.

  27. Re:WP 5.1!!! by iantri · · Score: 4, Informative
    You might find it interesting that WP 5.1 WAS ported to UNIX.. unfortunately, it is not available anymore and would probably require a fair bit of modification to get running on anything modern (back to the source code issue).

    There were several versions of the graphical WordPerfect available for Linux.. google and you will find a guide to getting them running on a modern distro.

    Unfortunately, only the very crippled personal version is available for free, and since Corel killed all their Linux stuff, you can't get it anymore.