Release Nethack

Discussion in 'Software Releases' started by Once, May 15, 2011.

  1. Once

    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Ă  :) [​IMG]





    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 !
     
    Tags:
  2. Tam Toucan

    Tam Toucan Still Fresh

    Joined:
    Feb 4, 2011
    Messages:
    96
    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!)
     
  3. Nintendo

    Nintendo Nintendo Switch

    Joined:
    Oct 8, 2005
    Messages:
    12,515
    Location:
    Melbourne, VICTORIA - AUSTRALIA
    Interesting. Thanks Once. :)
     
  4. Asiyura

    Asiyura Well-Known Member

    Joined:
    Oct 28, 2009
    Messages:
    1,496
    Location:
    Belgium
    Last edited by a moderator: May 16, 2011
  5. Once

    Once Still Fresh

    Joined:
    Oct 1, 2008
    Messages:
    11
    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.
     
  6. double7

    double7 It's Evil Dragons magic

    Joined:
    Nov 28, 2005
    Messages:
    345
    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.
     
  7. Once

    Once Still Fresh

    Joined:
    Oct 1, 2008
    Messages:
    11
    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.
     
  8. AapoRantalainen

    AapoRantalainen Still Fresh

    Joined:
    Aug 30, 2010
    Messages:
    13
    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
     
  9. Letalis Sonus

    Letalis Sonus Advanced Member

    Joined:
    Mar 5, 2009
    Messages:
    1,036
    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.
     
  10. Once

    Once Still Fresh

    Joined:
    Oct 1, 2008
    Messages:
    11
    The gp2x version works fine with Ginge.
     
  11. Nintendo

    Nintendo Nintendo Switch

    Joined:
    Oct 8, 2005
    Messages:
    12,515
    Location:
    Melbourne, VICTORIA - AUSTRALIA
    ^ Thanks, I didn't know that. I'll give it a try then. :)
     

Share This Page

Loading...