woodrush / QFT-devkit

Development kit for the Quest For Tetris computer, which works on Conway's Game of Life

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QFT Devlopment Kit

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.

Contents

  • 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.
  • 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.
  • 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.
  • 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 fit QFT_15bit_rom_14bit_ram_blank.mc. The size limit can be modified by hand if desired.
  • requirements.txt:
    • A list of Python package requirements for this repository.
  • Varlife.rule:
  • metatemplate11.mc:

Preparation

Install Python Requirements

This devkit requires the pyparsing package (pyparsing>=2.3.1), used by QFT_ram_reader_writer.py.

Install the Varlife Rule to Golly

In a Linux or Mac environment, add Varlife.rule to ~/.golly/Rules.

Usage

  1. Prepare a QFTASM program.

  2. Open QFT_15bit_rom_14bit_ram_blank.mc in Golly.

  3. 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.

  4. 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.

  5. 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 named Output.mc in this directory (or the same directory as MetafierV3.py, if the file is moved somewhere else) containing the output pattern.

Examples

The lisp-in-life project is an example of the QFT Devkit in use.

References

About

Development kit for the Quest For Tetris computer, which works on Conway's Game of Life

License:Other


Languages

Language:Python 100.0%