From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 65928203 for ; Sat, 7 Dec 2019 01:23:31 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id B1F079BDDC; Sat, 7 Dec 2019 11:23:30 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 4C6669BC4E; Sat, 7 Dec 2019 11:23:03 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Fma0CbeT"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 2FBAE94BF4; Sat, 7 Dec 2019 11:23:01 +1000 (AEST) Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by minnie.tuhs.org (Postfix) with ESMTPS id 9AE9393D35 for ; Sat, 7 Dec 2019 11:23:00 +1000 (AEST) Received: by mail-ot1-f46.google.com with SMTP id 77so7461967oty.6 for ; Fri, 06 Dec 2019 17:23:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Si/hPi+XjgmKTNsrhrXbmqQ2GG7O3/93Z4riC7k/ENE=; b=Fma0CbeT5z0TUPYhiyUEEbMJ7OGt2fjG+iv3JhuY8buFkhAQKiZTy+ncCe886OZHQj ncIaBKK/lgI4c58PYCyPlatYVjLs4ZOpVTsJ4+j994NHPeT6jQseodNpngheFH0Ke36l f9STOEivy8PURauio0apeYrRDq+wRZ+WdG5o2qTjOBnkp7SmIm2DVMzp9LzE9+c1spQ/ i7SnuKJopVss5IKf8llgulnEd+00OJ2a0Ch+Oa0sKlCZ10l2yxBkXHGZn0ajwvm/bLvq uyO2nFkJZ+2NDZP5JhK+sAQ5bDD0ZgHt4AsK7bYfToABknWX3jzTAdczMJdv/uOymw/5 rCDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Si/hPi+XjgmKTNsrhrXbmqQ2GG7O3/93Z4riC7k/ENE=; b=kML2kwj6TSoYteMgvrdIY+wTCmRDp5fXKnOcs6lYYRjALZ4UQEtb5+f7eU3ZRR9ipd jmMSGgDg+vm8lqqEXZa8nBcdERQ0cTg1mX/5pdHlI4tnNL5HGB5g4qXV4GsZESl8BO5g dhueM619tO9h0ReD0DHm0WyXQVOWTq5AtZ3SvgXNrPcNwhoNL34CyE9H3lMB0RC15FVB E9dkeo4Xpr+JzEhKKkQFaO8ZtnRPrAVLKjN1OUtIBjW2yPsEeqfvswD+13LxQD4TzYSM VCpB7mN77jM8EYImmnDHYtM2CKJwdNbIJRBpDkNwo7BEzb2XzQWZsPsfif1p4v8B+6sn egHA== X-Gm-Message-State: APjAAAV73H/lVgMAgpg/T94J/gEWXXOAqj/Et/2/SG25NQ6NEUShw3Ob wp+4vMXvPuCdjeEdRRp5scZ8JpcHLSn7EE3LzeU= X-Google-Smtp-Source: APXvYqwrshu0o6Xpux3fhW9pkKH8sZ7Dwp3wrC5Ft/dN285YbHqAoRbqlIpL+9clk0bj+QMpuz6KUooRSdydfhbyL1k= X-Received: by 2002:a05:6830:1c8a:: with SMTP id v10mr12850287otf.115.1575681779655; Fri, 06 Dec 2019 17:22:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Adam Thornton Date: Fri, 6 Dec 2019 18:22:47 -0700 Message-ID: To: Gabriel Diaz , The Eunuchs Hysterical Society Content-Type: multipart/alternative; boundary="000000000000c168e105991300bc" Subject: Re: [TUHS] Gaming on early Unix X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000c168e105991300bc Content-Type: text/plain; charset="UTF-8" There was not a Z-Machine interpreter for Unix machines, as far as I know, until the release of the ITF interpreter in the early 90s. However.... Zork was developed under ITS (when it was "mainframe Zork" and an MIT student project), and the later Infocom games were developed under TOPS-20. As it happens, I've fairly recently ported the "Frotz" Z-Machine interpreter to TOPS-20. https://github.com/athornton/tops20-frotz and https://github.com/athornton/gnusto-frotz-tops20 This was not all _that_ hard. KCC on TOPS-20 is an ANSI C compiler, so there were basically two classes of problems to solve. The first one is that the linker requires all symbols that are linked between modules to be six characters or shorter (and case is folded), so I wrote a transmogrifier (gnusto-frotz) to extract those symbols and create a mapping for them so that the object code would link. The second problem was that the Frotz source assumes 8-bit bytes and that your word length is a multiple of 8 bits. Since the Z-machine is a 16-bit virtual machine, that meant there was a whole lot of bit masking necessary in the opcodes and memory references in order to represent the Z-machine memory correctly within the TOPS-20 address space. That's done with stuff like: https://github.com/athornton/tops20-frotz/blob/0130a67fc44e0c7de1faa8f882cbc28faee76756/frotz.h#L488 So the idea is, gnusto-frotz-tops20 is semantically equivalent to regular Frotz, but with macros changed so if you build it with -DWEIRD_WORDSIZE it would build on a 36-bit system. Then once you've modified the source, you run it through the transmogrifier (which really just generates a sed script) to get something that will _link_ on a 36-bit system. I have vague plans to port Frotz to ITS but the problem there is that the C compiler is pre-K&R rather than ANSI, so there's a lot of deprotoization work to be done, and _then_ I need to fix the things like += being =+ and so forth, and I think I have to chop another character off the symbols, which may mean I need smarter collision detection. So it's nontrivial. Maybe a good first step would be unprotoizing Frotz and getting it to build on v7 or so... Adam On Fri, Dec 6, 2019 at 3:52 AM Gabriel Diaz wrote: > Hello, > > > Source code has been published of some early games. > > Were those games playable on Unix machines at the time? What was your > favourite game? > > > > https://kryptonradio.com/2019/04/18/zork-source-code-presumed-lost-forever-has-been-uploaded-to-github/ > > > Gabi > > > > > --000000000000c168e105991300bc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
There was not a Z-Machine interpreter for Unix machin= es, as far as I know, until the release of the ITF interpreter in the early= 90s.

However....

Zork wa= s developed under ITS (when it was "mainframe Zork" and an MIT st= udent project), and the later Infocom games were developed under TOPS-20.

As it happens, I've fairly recently ported the = "Frotz" Z-Machine interpreter to TOPS-20.=C2=A0 https://github.com/athornton/tops20-fr= otz and ht= tps://github.com/athornton/gnusto-frotz-tops20

This was not all _that_ hard.=C2=A0 KCC on TOPS-20 is an ANSI C compiler, = so there were basically two classes of problems to solve.

The first one is that the linker requires all symbols that are link= ed between modules to be six characters or shorter (and case is folded), so= I wrote a transmogrifier (gnusto-frotz) to extract those symbols and creat= e a mapping for them so that the object code would link.

The second problem was that the Frotz source assumes 8-bit bytes and= that your word length is a multiple of 8 bits.=C2=A0 Since the Z-machine i= s a 16-bit virtual machine, that meant there was a whole lot of bit masking= necessary in the opcodes and memory references in order to represent the Z= -machine memory correctly within the TOPS-20 address space.=C2=A0 That'= s done with stuff like:


So the i= dea is, gnusto-frotz-tops20 is semantically equivalent to regular Frotz, bu= t with macros changed so if you build it with -DWEIRD_WORDSIZE it would bui= ld on a 36-bit system.=C2=A0 Then once you've modified the source, you = run it through the transmogrifier (which really just generates a sed script= ) to get something that will _link_ on a 36-bit system.

I have vague plans to port Frotz to ITS but the problem there is that= the C compiler is pre-K&R rather than ANSI, so there's a lot of de= protoization work to be done, and _then_ I need to fix the things like +=3D= being =3D+ and so forth, and I think I have to chop another character off = the symbols, which may mean I need smarter collision detection.=C2=A0 So it= 's nontrivial.

Maybe a good first step would b= e unprotoizing Frotz and getting it to build on v7 or so...
<= br>
Adam

On Fri, Dec 6, 2019 at 3:52 AM Gabriel Diaz &= lt;gdiaz@qswarm.com> wrote:
<= /div>
Hello,


Source code has been published of some early games.
<= br>
Were those games playable on Unix machines at the time? What was y= our favourite game?


https://kryptonradio.com/2019/04/18/zork-s= ource-code-presumed-lost-forever-has-been-uploaded-to-github/

<= /div>

Gabi



=

--000000000000c168e105991300bc--