Welcome to the home page for my port of NetHack to the Nintendo DS. The goal of this project is to create a port of NetHack for the DS utilizing the unique features of the DS to create an easy-to-use NetHacking experience. I think I’ve succeeded in that goal. I’m probably wrong.

Important note!

This page really exists for archival purposes only. A lot of the links are broken and I’m unlikely to fix them any time soon.

If you want to find the latest version, your best bet is to head over to the official Github project in the Releases area.

However, note that there’s an old, legacy project in my Github profile called “NetHackDS”, and then the more up-to-date version, which was built as a proper fork of NetHack 3.6 (which means it’s a lot easier to merge in fixes and so forth). The link, above, is to the NetHack fork and not the legacy project.


October 17, 2009

No, this isn’t a real update, in that I haven’t made any recent changes to the NetHackDS codebase. That said, I wanted to announce that I’ve moved the code to GitHub.

From there you can grab the latest version of the codebase, and any changes I do get around to making will be published there. Enjoy!

October 19, 2008

Well, long time no see! I can’t say I have an excuse for no updates, but, well… so it goes, eh? Anyway, this is an announcement for an initial, very alpha release of both a SporkHack and Slash’EM port, built using NetHackDS as the underlying base.

Now, I need to repeat, these are alpha releases. I’ve done only the most basic of playtesting on them, and haven’t even exited the main dungeon in Slash’EM. But if you’re interested in trying out some fairly preliminary code, you can download them here:

January 24, 2008

Version 1.17 Released.

  • Added support for tapping menu section titles for selecting items in that section.
  • Changed menus in keyboard mode to show item accelerator characters.
  • After insisting I’d never do it, action menus (read, zap, eat, etc, etc) now display only relevant menu items (with an option to show all).
  • Made ‘cursor’ a compound option, which can take three values: 0 (always on), 1 (disabled over hero), and 2 (always off).
  • More refinements to touchscreen handling to ensure that stylus raises are promptly registered (fixes periodic hangs).
  • Fixed directional prompting when keyboard mode is enabled.
  • Fixed detection spells (such as “detect monsters”), etc, so they properly wait for user input.
  • Fixed key bound option toggling, after I completely broke it in the last release.
  • Fixed crasher triggered by popping up a menu immediately after resuming a saved game with the ‘name’ option set (yes, someone hit this :).

January 7, 2008

No, this isn’t an update. Well, not exactly, anyway. Rather than hacking more on the game, I decided to hack up a new manual instead. It’s even a nice, fancy PDF! Oooh, ahhh! Anyway, it’s linked below.

January 4, 2008

Version 1.16 Released.

  • Allow users to bind commands to individual chordkey presses (note, you can’t bind combination presses, and commands are activated when the key is released).
  • Added support for binding run and fight movements (movements prefixed with ‘g’ and ‘F’, respectively).
  • Added the ‘cmdkey’ option, which lets the user define the key used to open the command window.
  • Added ‘keyhelp’ option which controls whether the bindings are shown on the screen (default is now off).
  • Added HELPLINE1 and HELPLINE2 directives. These take key lists, which determine which keys appear in the key help, and in what order.
  • Moved minimap colours into a palette file (minimap.pal).
  • Properly ignore all input when in sleep mode.
  • Various commands which didn’t show a prompt now do (eg, wear, take off, eat, etc).
  • Fixed a bug in the default X keymapping. ie, it actually works now (the default was mistakenly set to “o,” instead of just “o”).
  • Fixed a bug where dismissing the “Toggle Option” key binding submenu without selecting anything would cause a crash.
  • Fixed a bug where responding to the “Press A…” prompt would result in the action bound to A getting executed.
  • Fixed keyboard colours, and changed the palette to plain text.

Regarding the keymapping code, the new cmdkey option adds interesting new possibilities. For example, by switching the cmdkey to ‘start’, you can free up both shoulder buttons for chording:

OPTIONS=cmdkey:start CHORDKEYS=r,l

It’s interesting to note that the ‘lefthanded’ option is somewhat unnecessary now, as the same thing can be achieved with cmdkey and CHORDKEYS. However, I’ve left it in for backward compatibility, and it results in the L and R keys being swapped.

Note, make sure you copy over kbd.pal and minimap.pal from the distribution archive to your /NetHackDS directory (assuming you don’t just unzip straight over the old copy).

December 31, 2007

Version 1.15a Released.

Yes, already. Fixed a map rendering bug in graphics mode caused by wall tile substitution in the NetHack core (this was evident when going from the regular dungeons to Sokoban, where the wall colours are supposed to change, but didn’t).

Version 1.15 Released.

  • Added the CHORDKEYS configuration option, which allows the user to define which keys may be used in combination of others for the purpose of key binding.
  • Removed triggermode (yes, after just two versions), in lieu of CHORDKEYS.
  • Display help for key bindings if a chord key is pressed.
  • Changed extended command input to use a menu, rather than the virtual keyboard.
  • Added the ability to bind keys for toggling boolean options (eg, holdmode, hpmon, etc).
  • Added “Show Keys” command, which pops up a window listing the current key bindings.
  • Added hilite_pet support.
  • Added new option “keyrepeat”, which controls whether or not keys repeat in the game (default on). Doesn’t affect menus, command window, etc.

Now, you may ask, “why did you remove triggermode?!?”. Well the answer is simple: CHORDKEYS allows the same functionality, only moar betar! Specifically, if you set CHORDKEYS as follows:


You can then bind Up+B to Up, Up+Right+B to Up-Right, Right+B to Right, and so on. And this happens to be identical to triggermode. BUT, it also allows one to bind Up+X, Up+Y, and so forth, which is basically triggermode on steriods (and allows one to duplicate other key arrangements, such as that found in DSCrawl).

But note! If you change CHORDKEYS, your keybindings are reset! This is necessary, as there’s no clean way to migrate an old keyset forward if the CHORDKEYS setting changes.

And yes, this modification is backward compatible with the old keybinding file, so your settings won’t be lost (again, unless you change CHORDKEYS).

Lastly, in CHORDKEYS, the free shoulder button is always “r”, whether or not lefthanded mode is enabled. Call me lazy.


  • Support for 16- and 256-colour BMP tilesets, including non-rectangular tiles (tiles must have dimensions which are a multiple of 8, e.g. 8x8, 8x16, etc).
  • Support for text mode, with optional full colour and IBM graphics.
  • Support for multiple font sizes for menus, status, and message displays.
  • Popup command window for easy access to the full command set.
  • On-screen keyboard for text input.
  • Flexible key bindings, supports binding keys to both regular and extended commands, and toggleable options.
  • Support for both left- and right-handed modes.
  • Save and restore.
  • Sleep mode.
  • Optional walk mode, inspired by iRogue.
  • Incorporates the following patches to vanilla NetHack:



To build, you’ll need:

Of course, the last two are only used when debugging remotely via GDB, but they’re necessary for the build to complete (yeah, I know, I need to make them optional depending on the build type… some day).

And please… don’t look too closely at the source. It’s… really really ugly. :)

Installation Instructions

Simply extract the NetHackDS archive into the root of your flash card. Feel free to move the .nds file if you like, but the NetHack directory must be in the root of the flash card. You may also have to apply the appropriate DLDI patch to the NetHackDS.nds file, if your card doesn’t support auto-patching.


See the NetHackDS Manual.pdf


NetHackDS comes with the stock 16x16 NetHack tileset. However, there are, of course, alternate sets available, which can be used with NetHackDS.

To install these tiles, copy them to the NetHack folder on your flash cart, then edit /NetHack/defaults.nh, and change the first OPTIONS line to contain the name of the tileset, and the correct width and height for those tiles.

  • Geoduck 8x16 - This is the Geoduck tileset, shrunk down from 10x20 to 8x16.
  • Lagged 8x16 - This is lagged’s tileset, scaled down from 12x20 to 8x16. Yeah, this messes up the aspect ratio a bit, but it still looks alright.

Additionally, NetHackDS is known to work with rltiles.

If you want to create a new tileset, NetHackDS requires a 16- or 256-colour indexed, non-RLE-encoded BMP file, and the tile dimensions must be a multiple of 8.


The default NetHackDS font is a 5x10 font called ProFont. However, NetHackDS will happily work with other fonts, and so I’ve provided a couple others snagged from X11.

And, of course, you can always use the included 8x16 map font.

Text Mode

Of course, there are purists out there (and, let’s face it, I count myself among them), who would say NetHack ain’t NetHack if you’re playing it with tiles. Luckily, NetHackDS also supports text mode. The default font is from Stumpy’s collection, and is fully ANSI compatible, meaning ibmgraphics mode works perfectly. Meanwhile, the palette was swiped from gnome-terminal’s idea of the default xterm colour palette.

To enable text mode, simply remove any tile configuration from /NetHack/defaults.nh, as it falls back to text mode in the absence of a tile specification.

Of course, you should be able to use any fixed-width, BDF-2 compatible font as a replacement, though understand that the characters will be padded out to multiples of 8 (ie, a 7x10 font will become an 8x16 font with extra space around each character). Of course, Stumpy’s font is already 8x16, which is rather convenient. You can also replace the palette, which is stored as a plain text set of 16 RGB hex values. The default set should match the xterm palette.

The data files are located in the /NetHack directory, and are called map.bdf and map.pal, respectively.

Planned Features

  • Add support for bonesfile sharing via the Hearse server.
  • Online leaderboard.
  • Automatic diagonal movement if there are no other options.
  • “Diagonal lock” key which, if held while the direction keys are pressed, will only allow diagonal movements.
  • Customizable button bar for triggering actions.
  • Rendering cleanups (fades between layers, maybe?).
  • A statuscolors clone.
  • Look at compiling in autopickup exceptions (though it’ll need additional hackery to create an option to disable autopickup in shops).


Of course, this port wasn’t written in a vacuum, and builds on the efforts of a number of individuals:

  • This code has it’s roots in the first NetHackDS port, created by Stuart Pernsteiner. While the actual implementation is essentially a rewrite, I borrowed much (such as the keyboard handling code), and benefitted greatly from his initial porting effort.
  • Of course, there’s the Nethack DevTeam, without which this port wouldn’t exist (and I would’ve spent many hours doing far more productive things with my time).
  • The Devkitpro folks, and all those who’ve contributed to the project. In particular, libnds has been unsurprisingly invaluable.
  • Chism for his work on libfat.
  • Masscat for his GDB stub. I probably would’ve given up without it.
  • The dswifi developers, without whom Masscat’s stub would’ve been useless.
  • Oddly, the Foobillard developers. I snagged their BDF font rendering and PPM handling code. :)
  • Stumpy, for his superb ANSI fontsets, from which I scavenged.
  • Tobias Jung, for making ProFont available.
  • The authors of the surprisingly portable PCRE, without which menucolors support would’ve been a non-starter.
  • Many users for providing valuable feedback and feature suggestions.