Subframe FILT Computer

  • 64_Tesseract
    9th Jul 2021 Member 2 Permalink

    The purpose of this thread is to over-explain my latest save "Subframe FILT Computer" [2738030].


    The Basics
    While it incorporates some aspects from both of my previous computers, this one is much more organized and efficient.
    As with the Poorly Organized FILT Computer, there are registers the computer can quickly access (16, rather than 2), and a multitude of bit operations it can perform (just 1 instruction per operation, rather than having to call `bopmode` & `bopwrite`, plus reading the values).
    I took inspiration from my Quad Instruction FILT Computer with regards to the overall shape (storage on the right, CPU on the left), and the high-level language containing the mode and 2 addresses in a single FILT, rather than the lower-level step-by-step code of the poFILTc (actually, the 16 instructions themselves represent simple command combinations and sequences, so it's like compiling a high-level language to a lower-level one).

    The instruction format, in hex, is as follows:
    0x2MBBBAAA
    AAA and BBB each represent 12 bits of an address to a RAM or ROM position, depending on the instruction. They range from 0x0 to 0x3ff (1024 positions) - a leap down from the qiFILTc's 8192, as I realized nobody would make programs that big anyway.
    The M represents a 4-bit instruction, 0x0 to 0xf. I won't go into detail about the instructions themselves, as there is documentation in the compiler itself.
    The 0x20000000 is the always-on bit all data has, because BRAY cannot work with a ctype of 0. It is ignored in calculations.
    I find the Subframe Chipmaker Mod very helpful in manually coding instructions, as it lets you easily read and write FILT ctypes in hex.


    How It Works
    TL;DR (Too Long; Don't Read)
    The computer reads from ROM with PSTNs, checks which instruction is sent in the CPU, and sends firmware code to an interpreter which BRAYs certain hardware, and repeats.

    NL;DR (No Life; Do Read)
    Code is stored in the top right FILT block labelled "ROM", read from bottom left upwards, then moving onto the next column when it reaches the top. When the "Go!" sign is pressed, the PSTN sets the position of a FILT pixel, which is then read into the CPU.
    The CPU separates the A, B, and mode bits, placing them into separate busses. The mode determines what row of firmware FILTs is DRAYed into the white buffer block. Every 12-or-so frames, this buffer block pushes the pixels left and reads the first firmware commands in the row, determining what actions the computer takes.
    The firmware instructions are lower-level command sequences represented by one of the 16 commands. Their values are bitmasked along the left data bus to send a BRAY to specific components, such as the RAM module or a bit operator, in different positions to perform different functions. And, due to almost every component in the computer incorporating subframe technology, every function takes only 12 frames or less to complete, hence the clock's DLAY being set to 12C and the computer's fast speed.
    With some exceptions, the last FILT of a firmware instruction will have the computer add 1 to the index of the program line it's at and read it, repeating the process. The exceptions are the `goifneg` and `goif0` instructions which route a BRAY through negative-check or zero-check hardware first, `goto` which bypasses the index adder entirely, and `input` and `add` which, due to possibly not returning a value within the 12-frame clock cycle, manually resume the computer's operations when they are finished.


    LUA Compiler
    My previous 2 computers shared 95% of code in their compilers, as they were very similar. I could've adapted it again for this computer, but I decided it would be easier to write another specifically for this one, because it has more than 1 FILT block it needs to write to and the instructions are higher-level. Uniquely, it has a fancy GUI file browser and a one-click compilation, removing the need to paste or type in filenames or even having to align an outline of the computer with the FILT blocks. I think it's much better than my previous scripts, but it may still be buggy, so make sure you read the comments and see what you can and can't write!

    Anyway, here's the link to it: https://pastebin.com/fS4Q7cYd

    Edited 2 times by 64_Tesseract. Last: 9th Jul 2021
  • creator_EXECUTE
    9th Jul 2021 Member 0 Permalink

    What are the possible uses for such a device?

  • Pexy
    9th Jul 2021 Member 0 Permalink

    i have no idea what i just read but thats awesome

  • 64_Tesseract
    10th Jul 2021 Member 0 Permalink

    @slayerthevooperian (View Post)

    The same as with any other computer; it can calculate numbers, control another save like a nuclear reactor, or even manage a different computer via the IO ports on each of them... but really it's just a proof-of-concept I made for fun