        "How I Did It" by Baron Frankenstein
        ====================================
        
Diary of a port of NetHack  3.3.1 to RISC OS 4.02, from the original sources.
Note that the file names under RISC OS have . as the directory seperator, so 
. and / are transposed in file names.

Tue 03rd October 2000
---------------------

Soundtrack: Up The Downstair

Unpacked files to a F+ format disc.

Copied sys.unix to sys.ros.  I plan to use UnixLib for the initial port, so
starting from the Unix version seems sensible.

Removed the /shr files.  File typed what was left to text.

Generate setup from setup/sh.

Edit Makefile/top.  

Edit Makefile/dat.

Soundtrack: Sushi

Edit Makefile/utl.

Edit Makefile/src.

Skip Makefile/doc for the moment.

Run setup.

Create rosconf/h, edit config/h.

Try "make" in the util directory.  Failed on makedefs/c.  Tried to compile it
manually, but gcc expects to find thing.c in c.thing.  Try reversing some of
the edits in Makefile/utl.

New version of Makefile/utl is the same as the unix version with the CFLAGS, LFLAGS and LIBS changed.

Soundtrack: marillion.com

Need to move all the include files to include.h

Restore Makefile/src as above.

Edited system.h line 516 to have defined(RISCOS)

Make doesn't seem to be able to run gcc!  Not in compile mode anyway.. Try 
larger wimpslot (10M) still fails.

*make -n { > comp }
*SetType comp Obey
*comp
cmd.c:1256: `dosh' undeclared here (not in a function)
cmd.c:1256: initializer element is not constant
cmd.c:1256: (near initialization for `cmdlist[76].f_funct')

Removed #define SHELL from rosconf.h but forgot to save it!

files.c:69: `FILENAME' undeclared here (not in a function)
files.c:69: conflicting types for `SAVEF'
../include/decl.h:22: previous declaration of `SAVEF'
files.c: In function `fopen_config_file':
files.c:1128: `envp' undeclared (first use in this function)
files.c:1128: (Each undeclared identifier is reported only once
files.c:1128: for each function it appears in.)
files.c:1130: `tmp_config' undeclared (first use in this function)
files.c:1135: `errno' undeclared (first use in this function)
files.c:1135: `ENOENT' undeclared (first use in this function)

put #define FILENAME 255 in rosconf.h
need a clause for RISCOS in fopen_config_file

Soundtrack: Obscured by Clouds

Get to linking and:
gcc: installation problem, cannot exec `gccpkg:bin/arm-riscos/2_95_2/ld': Argument list too long

Put everything but rosmain.o and rosros.o into a library.

Linked!  Put executable into !NetHack as !RunImage.  It ran, but failed to ID
the TERM.

set TERM acorn12
Didn't like that either! Unknown terminal type.

OK, get the data compiled.

Copy it to !NetHack.nethackdir

Look at win/tty.  Need to tell UnixLib where to find /etc

Almost working!  Draws everything, but: 
  Need return after keypress
  Says "Cannot open level 0"
  Quits, claiming a trickery

Need to put getlock() back into rosros.c and call it from rosmain.c 

Still needs return after keypress.  #define tgetch ros_getkey
(which uses osbyte)

Nearly working:
  Screen gumf
  Doesn't update record (logfile ok!)
  
Save did appear to work!!!

Wed 04th October 2000
---------------------

Soundtrack: Tales from the Big Bus

Turn off escape handling in main(), change ros_setkey.

Screen problems are probably due to the termcap entry, try editing.

Entries are appearing in record now (maybe it didn't record scores of 0?)

Mode 12 termcap entry is OK, must have screwed the Mode 28 version.
Line 10 is drawn in the wrong place.
Looks like a bug in UnixLib's termcap code.  Is there a later version?

It's always so OBVIOUS!  tgoto generates VDU 31, 11, 9, 8 BUT this goes
through the terminal driver which expands the 9 (tab) into the requisite
number of spaces!  Need to tell the terminal driver not to do that, or 
bypass it.  Should have paid attention to those complaints about settty.

Soundtrack: Troubadour

tcgetattr/tcsetattr are failing.

Soundtrack: Is There Anybody Out There?

Create new windowing system: vdu

Sat 02nd December 2000
----------------------

Soundtrack: The Best of Black Sabbath

After many weeks ignoring the problem, I'm back on it.  I'm going to try 
ioctl(, TIOCGETAm &tios) instead of tcgetattr.

SUCCESS!!!!

