This repository is a development kit for the computer from The Quest for Tetris (QFT), a programmable computer that works on Conway's Game of Life.
QFT_hashedrom_v11.mc
:- A modified version of
Tetris8.mc
from the original QFT repo where the ROM and RAM demultiplexers are extended to 12 bits and 10 bits, respectively (the original pattern has a 9-bit ROM and 7-bit RAM architecture). Both the ROM and RAM slots are left blank so that new programs can be written in to the pattern.
- A modified version of
QFT_prep_rom_ram_hashedrom.py
:- A script to write a QFTASM program and prepare a RAM module with a specified size in
QFT_hashedrom_v11.mc
.
- A script to write a QFTASM program and prepare a RAM module with a specified size in
QFT_ram_reader_writer.py
:- A tool to monitor values of registers and stdio, and also to write values to stdin.
QFT_ram_reader_writer_metafied.py
:- A tool to write and read values to and from the RAM directly into the metafied version of
QFT_hashedrom_v11.mc
.
- A tool to write and read values to and from the RAM directly into the metafied version of
MetafierV3.py
:- A modified version of
MetafierV2.py
from the original QFT repo, made to be capable of handling very large patterns that contain thousands of ROM and RAM slots. MetafierV3.py
assumes that the width of the pattern is less than or equal to 2048, made to fitQFT_15bit_rom_14bit_ram_blank.mc
. The size limit can be modified by hand if desired.
- A modified version of
requirements.txt
:- A list of Python package requirements for this repository.
Varlife.rule
:- Copied from the original QFT repo. Required to run Varlife patterns on Golly. Varlife is a cellular automaton rule made for designing the computer; please see the Stack Exchange post for QFT.
metatemplate11.mc
:- Copied from the original QFT repo. Required for running
MetafierV3.py
.
- Copied from the original QFT repo. Required for running
This devkit requires the pyparsing package (pyparsing>=2.3.1
), used by QFT_ram_reader_writer.py
.
In a Linux or Mac environment, add Varlife.rule
to ~/.golly/Rules
.
-
Prepare a QFTASM program.
-
Open
QFT_15bit_rom_14bit_ram_blank.mc
in Golly. -
Copy the QFTASM program to your clipboard. On Golly, change the file view to this directory, and click on
QFT_prep_rom_ram.py
to execute it. A dialog prompting for the RAM size will appear, so enter the maximum RAM address used in the code (i.e. the number 1 less than the RAM size). This script will tile the ROM patterns and the RAM module to create a usable computer. -
On Golly, use
QFT_ram_reader_writer.py
to write the standard input to the RAM. Specify the offsets for stdin and stdout by manually editing the script. A dialog prompting for the stdin string value will appear. The resulting pattern will be runnable on the Varlife rule.QFT_ram_reader_writer.py
can be used to monitor the RAM values of a running pattern. -
To convert the Varlife pattern to a Conway's Game of Life pattern, first press Ctrl + A (or Command + A on a Mac) in the editing screen on Golly to select the entire Varlife pattern, and execute
MetafierV3.py
. This will generate a file namedOutput.mc
in this directory (or the same directory asMetafierV3.py
, if the file is moved somewhere else) containing the output pattern.
The lisp-in-life project is an example of the QFT Devkit in use.
- The original QFT repository: https://github.com/QuestForTetris/QFT
- Stack Exchange post for QFT: https://codegolf.stackexchange.com/questions/11880/build-a-working-game-of-tetris-in-conways-game-of-life