Game Of Life, John H. Conway

Liam Proven lproven at gmail.com
Thu Apr 30 18:02:32 CDT 2020


On Thu, 30 Apr 2020 at 23:05, Kyle Owen via cctalk
<cctalk at classiccmp.org> wrote:

>
> I also wrote a version for the PDP-8; I was sure someone else had beat me
> to it (an assembly version, that is), but I didn't find any versions online
> other than for BASIC and FOCAL—neither of which supported very many cells
> nor ran very quickly.

Not sure it's vintage _enough_ for ClassicCmp, but I wrote several for
the ZX Spectrum.

First the dumb algorithm, in vanilla interpreted ZX BASIC. Then the
QuickLife algorithm. Then an integer-only version compiled with HiSoft
BASIC.

It still wasn't quick. So one long drunken evening with my mate Dion,
who was doing a CompSci degree, we did QuickLife in Z80 assembly for
the Spectrum. I wrote the editor in BASIC and explained the algorithm
to him, he implemented the hard part in assembler, and between us, in
a sdingle 8- or 9-hour session we got it working.

It was very fast on character cells. The Spectrum wasn't really quick
enough to do it on pixel scale. So I came up with a compromise: the
Spectrum ROM contains block character graphics with 1, 2, & 3 quarter
character squares. With a bit of extra logic, this means you can turn
on quarter-squares individually by picking the right character for the
2x2 grid you need. A simple lookup table.

So on the 32*22 character Spectrum screen, we had a 64*44 Life
implementation that could do a generation in under a second, so you
could see the patterns move and develop in real time. It was a thing
of beauty, and I dearly hope I still can read the ZX Microdrive
cartridge and retrieve it.


-- 
Liam Proven – Profile: https://about.me/liamproven
Email: lproven at cix.co.uk – gMail/gTalk/gHangouts: lproven at gmail.com
Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven
UK: +44 7939-087884 – ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053


More information about the cctech mailing list