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 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)
Ah!! To have been around then! What fun!
I’m trying to grab the source but it’s no-go?
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'..
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… 😉
Are you building this under BSD 4.2? I didn’t know GCC was available then!!
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..
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.