Open darkstar opened 9 years ago
I did see that there is a 1984 release that is "easier to compile".
It introduced changes/new source code, but we're still missing wander.c
Perhaps this was you that asked, but someone did ask about this:
It looks to me as your ZIP file is missing the main wander.c file, there’s only two already compiled object files (Fwander.o and NFwander.o) which are slightly difficult to reverse-engineer/decompile since PDP-11 assembly is not the main strength of contemporary disassembler tools…
Please share the main .c file so that the rest of us can try to get it to run on our PDP-11s :)
And the response is:
The binary-hybrid compiler is all we’ve got of 1980, sorry. It’s the only one that has all the worlds, though.
If more gets unearthed, we’ll let you know. In the meantime you can compile with the 1984 version.
yeah, that was me asking. Funny how he said that he was able to compile the 1980 source "after a little tweaking" when the missing source code clearly shows that this cannot possibly be true...
But maybe he meant the 1984 version right from the beginning (although at first he didn't mention 2 copies existed) which should work (wanderer.c doesn't exist either but wand1.c
and wand2.c
together apparently have all required functions)
I'm setting up a V6 UNIX environment to compile & test the 1980 release, we'll see how that goes...
Do you think I should have left out the 1984 release from the master branch and put it in its own?
Hm, no, I think it is okay as it is. This way we at least have a diff between the old and new .h file and story files.
I couldn'T get it to compile under V6 unix (the compiler would only spit out a meaningless 1: Control syntax
error (which would be the #include
line), and since the only V6 tape I found has no man(1), more(1) or even tar(1) I think I will try V7 tomorrow and see how that works out
Yeah v6 is too early, C changed rapidly. In v6 you have to have '#' as the first char in the file, else the preprocessor is not called. And it used something like "portable io lib" -- it was before standard io library.
I think that was also back when operator-equals was in reverse order from now (=+ =/ =& etc).
Other things too.
Edit: man(1) did exist, long before v6, even. It goes back to first edition, I think.
More(1) hadn't been invented yet.
I think tar(1) was introduced with v7, but I also think it changed format in its first decade so that it probably isn't compatible with modern tar, not that you'd need that when booting v7.
Yeah, but the first character of the .c file is actually a hash character, and the compiler definitely works as I tried it on some other files before, but I am too tired to figure it out now without any decent editor, shell and userspace :) especially since I think V7 will probably work just fine. We'll see ...
Just to let you know that Peter Langston has sent me a third version of what's being referred to as the "1984" release of Wander. I've linked to it in "UPDATE 1" on my original blogpost: https://ahopeful.wordpress.com/2015/04/22/wander-1974-a-lost-mainframe-game-is-found/#update1
@ahope1 Much thanks. I've now committed that version, too: https://github.com/shmup/wander/commit/981ce4106c36c1b2b35ff657ed3fb355a666f63d
Peter Langston sent me a second version of “Wander.tgz”, which I had linked to here, but Peter has asked me to replace that second version with this third version “with save/restore actually working and with three more of the 1980 Wander worlds.” This third version still compiles on Mac OS X 10.6.8.]
(Btw, I notice your commit comment has "Peter" saying that the third version compiles on OS X 10.6.8, but actually I'm the one making that claim!)
@ahope1 hah that's true, I did jump the gun a bit on that. :P
Builds now on OS X 10.10.2 thanks to a typo being addressed in this merge: https://github.com/shmup/wander/commit/886b43c571517c9a203ee4b9a4a441982ac227b1
Okay, the original 1980 release doesn't compile with stock V7 UNIX either. It seems there's no seek(), ttyn() and end() in V7 (also no libS, which the readme suggests).
# cc -n NFwander.o wandglb.o -lS
ld:/usr/lib/libS.a: cannot open
# cc -n NFwander.o wandglb.o
Undefined:
_seek
_ttyn
_end
# grep ttyn /usr/lib/*
#
I'm not really sure which OS this was originally compiled on, but there's not much left from that timeframe, now that V6 and V7 are out. I will try V7m next, that one is supposed to have more C libraries and headers which might do the trick...
That is a bit odd. Those missing symbols are all version 6 Unix and went away with version 7.
Seek(2) accepted only a 16 bit int parameter, and so was replaced with "long seek", lseek(2) which accepted a long, in v7.
ttyn(3) told you what /dev/ttyn, if any, corresponded to standard input. Not sure why it went away.
"end" I believe was the address of the end of the process when it began execution, roughly where brk(2)/sbrk(2) began allocating memory for malloc(3).
So that appears to be v6 code, but that's surprising in a 1980 release.
Oh wait, Langston somewhere said some of this happened on version 5 Unix, maybe that is why there's a problem? There were definitely differences in C between that and v6, like the introduction of typedef -- so maybe the #include syntax was a bit different, like the "" versus <> thing or something.
Which file was getting the error message on v6? I have insufficient information to help debug this.
Since I'm using the original 1980 source code, there's only one C file that has to be compiled, the rest is in the .o files, so I'd say you have basically all information there is :-)
For the record: I'm trying to compile cc -c wandglb.c
which spits out the error 1: Control syntax
, with no other information. I have tried -v
but apparently there's no "verbose" mode here, and since my copy of v6 doesn't include man(1) with info on the compiler, I'm pretty stuck.
I didn't get the chance to try V7m yet, but I might get there next week
I looked at Fwander.o, which appears to use the v6 seek(2), which was renamed to lseek(2) in v7, as I mentioned before -- so it definitely is not a v7 file.
But Fwander.o also uses fseek(3), which definitely was not in v6, but did appear in v7.
That contradiction seems to indicate that Fwander.o came from a system in between v6 and v7. I looked at one of the PWB (Programmer's Work Bench) distributions, but that particular one lacked fseek(2) according to its man pages.
v7m seems unlikely to work, since it seems to be just v7 with extra device support, according to http://minnie.tuhs.org/PUPS/archive_details.html -- but maybe you're right, maybe it has the missing libS.a, I don't know.
It might be expeditious to just add wrappers to implement unresolved symbols. Maybe.
It looks like you're missing the main source code file, wander.c
Fwander.o and NFwander.o are PDP-11 object files and cannot be used on any other architecture