[rec.games.hack] Nethack under Minix

david@doe.utoronto.ca (David Megginson) (06/22/91)

I have finally managed to compile the most recent version of Nethack
on a 4 meg ST running Minix, using gcc in 32-bit mode (it didn't work
in 16-bit mode). Sometimes I lose information saving, but I'll work
on that later. Right now, whenever anything is thrown, I end up with
'5's all over the place, and have to hit ^R. I don't know the NH source
well enough to even start looking for the cause. Perhaps it is a bug
in the Minix 1.5.10 termcap library, or the curses library that I use.
Has anyone ever seen this with any other Nethack implementation? Can
anyone guess the problem? Thanks,


David

-- 
////////////////////////////////////////////////////////////////////////
/  David Megginson                      david@doe.utoronto.ca          /
/  Centre for Medieval Studies          meggin@vm.epas.utoronto.ca     /
////////////////////////////////////////////////////////////////////////

mat@cdbhp1.UUCP (W Mat Waites) (06/24/91)

In article <1991Jun22.125642.8424@doe.utoronto.ca> david@doe.utoronto.ca (David Megginson) writes:
>
>I have finally managed to compile the most recent version of Nethack
>on a 4 meg ST running Minix, using gcc in 32-bit mode (it didn't work
>in 16-bit mode). Sometimes I lose information saving, but I'll work
>on that later. Right now, whenever anything is thrown, I end up with
>'5's all over the place, and have to hit ^R. I don't know the NH source
>well enough to even start looking for the cause. Perhaps it is a bug
>in the Minix 1.5.10 termcap library, or the curses library that I use.
>David

Sounds like it could be a termcap entry that is trying to throw nulls
for cursor positioning delay. The version of the termcap routines is
ignorant of the "delay" notation in the termcap file and instead of throwing
5 nulls, throws the "5" itself.

Just a Guess.....

Mat

Quote for the day:
Watch yourselves. It can happen to anyone. - Len Rose


-- 
W Mat Waites   mat@cdbhp1.UUCP |  Unlike most of you, I am not a nut.
{gatech,emory}!cdbhp1!mat      |             -H. Simpson

kevin@cfctech.cfc.com (Kevin Darcy) (06/27/91)

In article <208@cdbhp1.UUCP> mat@cdbhp1.UUCP (W Mat Waites) writes:
>In article <1991Jun22.125642.8424@doe.utoronto.ca> david@doe.utoronto.ca (David Megginson) writes:
>>
>>I have finally managed to compile the most recent version of Nethack
>>on a 4 meg ST running Minix, using gcc in 32-bit mode (it didn't work
>>in 16-bit mode). Sometimes I lose information saving, but I'll work
>>on that later. Right now, whenever anything is thrown, I end up with
>>'5's all over the place, and have to hit ^R. I don't know the NH source
>>well enough to even start looking for the cause. Perhaps it is a bug
>>in the Minix 1.5.10 termcap library, or the curses library that I use.
>>David
>
>Sounds like it could be a termcap entry that is trying to throw nulls
>for cursor positioning delay. The version of the termcap routines is
>ignorant of the "delay" notation in the termcap file and instead of throwing
>5 nulls, throws the "5" itself.
>
>Just a Guess.....
>
>Mat

Yes, that's pretty much it. The "tputs()" routine (usually found in 
curses(3X)) is both a terminfo-primitive, and a termcap-emulation. If you 
compile with the wrong library, you'll end up passing an initial $<50> to
a termcap routine which doesn't understand the terminfo notation for "delay
50 milliseconds". It will then spit it out literally, and you get "crap" on 
your screen.

I wish I could tell you exactly how to fix this, but implementations differ
greatly - some systems have 3 separate libraries for curses, termcap & 
terminfo; others have one library ln'ed as another; yet others have 
"overlapping" libraries, which need to be specified in a particular ORDER to
get the desired results.

All I can say is: fiddle with your "term[cap|info|lib]" and/or "curses" 
libraries on the "ld" line in the Makefile. Also, check out the notes in 
Install.unix (I think) which sheds more light on the issue. As a last resort,
experiment with the settings of TERMINFO and TERMLIB in the various NetHack 
header files. (It's been a long time since I've had to fight this problem, so 
I apologize for not being more authoritative).

If you get this up and running 100%, perhaps you should drop a line to
nethack-bugs@linc.cis.upen.edu, and let them know how you did it. Then maybe
your wisdom could become part of the official package, and future MINIX users
can just compile-and-run.

>-- 
>W Mat Waites   mat@cdbhp1.UUCP |  Unlike most of you, I am not a nut.
>{gatech,emory}!cdbhp1!mat      |             -H. Simpson


------------------------------------------------------------------------------
kevin@cfctech.cfc.com 		  | Kevin Darcy, Unix Systems Administrator
...sharkey!cfctech!kevin 	  | Technical Services (CFC)
Voice: (313) 759-7140 		  | Chrysler Corporation
Fax:   (313) 758-8173 		  | 25999 Lawrence Ave, Center Line, MI 48015
------------------------------------------------------------------------------

david@doe.utoronto.ca (David Megginson) (06/28/91)

I mentioned in an earlier posting (I think) that Nethack already has
an obscure option, "nonull", to get rid of the null padding bug under
systems like Minix. I also had to change some files for Minix,
particularly those involving ioctl() calls. Doe estdio under PC Minix
provide a more useful ioctl() function than the standard Minix
distribution? I am using ST Minix, which does not have estdio.

David


-- 
////////////////////////////////////////////////////////////////////////
/  David Megginson                      david@doe.utoronto.ca          /
/  Centre for Medieval Studies          meggin@vm.epas.utoronto.ca     /
////////////////////////////////////////////////////////////////////////