Release Nethack


Once

Still Fresh
Joined
Oct 1, 2008
Messages
11
Hi all,


Since I received my Pandora, I always wanted to be able to play one of my favourite roguelike: Nethack. However there is no port of this game available (there was one in the apps repository but it has been removed).


I tried to cross compile it myself but could not find a way to get through all the errors...


But not all hope is lost, because Nethack runs flawlessly in Dosbox :) So here is a quick tutorial on how to play this game.


1- Install Dosbox from the apps repo:


http://apps.open-pandora.org/cgi-bin/viewapp.pl?/Emulator/Dosbox.inf


2- Run Dosbox for the first time. You will notice that the command line points to a virtual disk "Z:>". We need to change this to a folder where you will store your Dos applications


You can do this directly from the command line every time you start dosbox, but it's more convenient to make this automatic.


Go to your appdata directory (it should be on you SD card, in the main pandora folder) and edit the file "dosbox/.dosbox/dosbox-0.74.conf". Add the following lines to this file:



Code:
mount c /media/mmcblk0p1/pandora/appdata/dosbox/games

c:

Now dosbox will always start in the folder specified, under the disk letter C.



3- Download the latest DOS version of nethack (3.4.3)

http://www.nethack.org/v343/ports/download-msdos.html



4- Unzip the file and put everything into a subfolder of appdata/dosbox/games



5- Nethack will not work directly, you need to download the file CWSDPMI.EXE from this location

http://www.delorie.com/djgpp/dl/ofc/simtel/v2misc/csdpmi5b.zip/

Put the file in the same folder as your nethack executable.



6- Done ! Start Dosbox, go to your nethack folder (if you setup your Dosbox like mine, simply type "cd nh343dos"). Then run "nethack".



Et voilà :)
screenshotrou.png






Extra steps:

By default nethack assume that you are using the numpad to move your character on the screen. In order to use the vi keys, do the following:

- start nethack

- use key "O" to access options

- in the 3rd page of options, switch off the option "number_pad"



You can also edit the file "defaults.nh" in your nh43dos folder.



Code:
Change line 61 : 

OPTIONS=time,noshowexp,number_pad:2,lit_corridor

to

OPTIONS=time,noshowexp,[b]number_pad:0[/b],lit_corridor


Enjoy !
 
Thanks so much for this! I'd never have got this going. BTW, for some reason my conf is dosbox-SVN.conf (never used Dosbox before so may have screwed something up).


Do you by any chance have a keyboard layout for the Pandora? I noticed things like : don't work and quick google and read of the help talks about setting up a keyboard map (the initial window says press Ctrl-F11 to run the keyboard mapper, but that's one of the keys that don't seem to work!)
 
Yes, there was a native port but it has been removed.


As for the keyboard layout, it's true that some keys are missing, for instance ":". I think it should be possible to edit this in Dosbox, there is some information here: http://www.dosbox.com/DOSBoxManual.html#KeyboardLayout


but I must admit I did not try this yet. I'll update this post if I find more info.
 
How about using the GP2X version running with ginge?


Dzz's source code for nethack is also available for the gp2x, maybe you get rid of some of the errors by comparing?


Hm, i can't link it, enter nethack into the search function of the gp2x file archive.
 
I found that most of the special characters are accessible with specific combination of keys, for instance you can type ":" by pressing left_shoulder+Fn+<


It would be nice though to have a working kwyboard layout for the pandora in Dosbox.
 
If compiling is only issue (not making packet with correct permissions and folder structures):


Use compiled binaries from Debian-ARM.


I have once successfully made package for Freerunner with this method, see: http://wiki.openmoko.org/wiki/Nethack



Code:
wget http://ftp.de.debian.org/debian/pool/main/n/nethack/nethack-console_3.4.3-12.1_armel.deb

ar x nethack-console_3.4.3-12.1_armel.deb

tar zxvf data.tar.gz



It has:



Code:
./usr/lib/games/nethack/nethack-console: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

What you think, is this runnable on OpenPandora? Could somebody test it?


And then you also need nethack-common:


http://ftp.de.debian.org/debian/pool/main/n/nethack/nethack-common_3.4.3-12.1_armel.deb


Not sure what nethack-license says about sources (it is enough to mention where to get sources, or should they be bundled on same server or same package), but here is straight link:


http://packages.debian.org/source/sid/nethack
 
Debian armel targets ARMv4t or ARMv5t and therefore all their packages are binary compatible with the Pandora's Cortex-A8, but they are less optimised and therefore running slightly slower. You only need to take care of whether the dependencies are available, i.e. it shouldn't use stuff like OpenGL.
 
Back
Top