Unofficial Nethack real mode binaries for DOS

I recently acquired a Toshiba T1200 laptop computer made in the late '80s. When looking for games to run on it, Nethack seemed like a good candidate - interesting and complex gameplay combined with light weight. However, the only version for which I could easily find real-mode DOS binaries was 3.3.1, which is unplayably slow on an actual 8086 system. To remedy the situation I decided to roll my own.

Some of the binaries require some setting up to run, mostly related to ANSI terminal driver and setting the terminal type correctly. Unless otherwise noted, all game-related options are enabled. All binaries tested on a real 80C86 with MS-DOS 5.0.

I also tried running them in VirtualBox with FreeDOS 1.2. Nethack 3.1.3 works fine, but the ANSI-requiring versions show corrupted display output. This is not a bug in Nethack, but either in NANSI.SYS as supplied by FreeDOS, FreeDOS itself or possibly VirtualBox console routines. I have no interest in investigating this matter further.


Requires a terminal driver to run. NANSI.SYS from the source distribution is included in the zip package. Thanks to my inability in configuring stuff, you also need to create a directory C:\ETC and put the TERMCAP file there. If I recompile this with the option to use TERMCAP from current directory, I will update the package.

Before running the game, set TERM=ibmpc or ibmpc-mono to choose between colors and no colors.

Built with Microsoft C 4.0 and NDMAKE45.


ANSI driver required as well, ditto for setting TERM.

Built with Microsoft C 6.0a and NDMAKE45.

3.1.3 -- bugfix. crashed on a 8086 but worked on a 386, this one should work on both. nope, does not work on the Toshiba. crashes when changing levels. works on all emulators I could try it on, though.

Uses direct BIOS calls for display drawing, so no ANSI driver required. MUSE option left out for now because the compiler used had problems with it. If I get around to porting the code, I'll update the package.

Built with Microsoft C 6.0a and NDMAKE45. I tried MS C 7.0 too, but the resulting binary ran much slower than this one. The reason for this is the overlay manager used. Performance-wise, the one included in the Nethack source seems way superior to Microsoft's offering. Because of lack of documentation I don't know whether the MS-supplied overlay system can use expanded memory, but the Nethack one can. With the Toshiba's 384 kilobytes of expanded memory, this makes all the difference as basically the whole game fits in memory simultaneously.

It does not work!

It should. However, if you have any TSRs loaded that use the expanded memory, this will cause problems. Try booting the system without them and see if that helps.

Wait a moment, I can do this better!

I don't doubt that for a moment. Here are a couple of links to help you on your quest.

Erno Palonheimo,