Hack

 

Hack is the precursor to NetHack, and the follower of rogue. It’s a fun game, however I thought it would be a great addition to my 4.2 BSD project stuff. Thanks to the awesome site NetHackWiki I was able to quickly find Hack 1.0.3, download it, convert it into a tape for SIMH, and get it compiled. In it’s present state it does core dump when exiting, I’m not all that sure as to why, and to be honest I’m not all that good with adb. Perhaps a project for another time.

At any rate, the game is somewhat playable.

GCC is required to compile the source, pcc chokes when trying to build. I have made minor modifications to the source with regards to some variables, and renaming variables called ‘inline’..

If the COMPAT_42 is built with any later BSD it should run the binary otherwise producing your own ought to be trivial.

The binary is located here.

The modified source is here.

I’m sure there are all kinds of mods like PC hack to run it under DOSBOX or some kind of Windows thing, but it’s more fun running it under a VAX 11/780 emulator…

7 thoughts on “Hack

  1. I played hack quite a bit back in the day (in the early 80’s – logged into the vaxen at the university over a 1200 baud acoustic coupler with an actual VT100)
    —Thor

  2. Very strange, I just changed laptops, and used the sourceforge stuff to just transfer all my work on this stuff… I'll delete the source package & re-create it….

    Or maybe it was too 'new' in the sourceforge system? Try and download the gdb/ircii-4.4 stuff as they are 'fresh'..

  3. Ok, the source should be in place now.. how very strange.

    Anyways I’ve also kind of figured a formula to get a more stable Hack…

    Compile with regular pcc (cc), by running make and it will fail on hack.c line 799 (missing stuff). Use gcc to compile this one file,

    gcc -c -g hack.c

    Then resume the make, I don’t trust that weird ld syntax thing, so I run:

    cc -g -o hack *.o -ltermcap -lcurses

    to finalize the exe. I can verify you can die properly now… 😉

  4. I've been building this under 4.2, 4.3 Wisconson & 4.3 RENO.. And there is a version of gcc that will run on 4.2 BSD..

    gcc 1.27

    it's not that intuitive to setup, as there is no configure, you have to link some files yourself.. trial and error however got me a "working" version of it.

    Anyways I just did the prior make I did above on 4.3 wisconson, and it works, now, as you can die correctly!

    I'll have to update the binary package for 4.2 BSD.

Leave a Reply