Skip to content
0:00 / 0:00

#infinifactory#tis-100#cpudesign

TIS-100 in Infinifactory

gtw123

826 subscribers • 1 video on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • May be out of date. Uploaded 9 years ago, in an area where tools change fast.

Advanced. Deep dive for people who know the field.

48K views9 years ago1 recommendation

Systems programmingGame developmentCPUs and computer architectureGame programming

A demonstration of a custom asynchronous CPU architecture implementing TIS-100 instructions inside the game Infinifactory.

After finishing SHENZHEN I/O, I thought I would go back and play some TIS-100... in Infinifactory! This is the Sequence Counter level. The goal here is to read zero-terminated sequences from IN, then write the sum to OUT.S and the length to OUT.L. (Sorry for the low framerate and lack of audio. This level runs at 1-2 fps so I had speed up the video a lot to make it even watchable!) Technical details: * Each node has its own "CPU" which runs asynchronously from each of the others. Due to performance limitations there are only 4 nodes rather than 12. * For ease of display, numbers are encoded using Binary Coded Decimal (BCD) using 9 bits: 2 decimal digits plus a sign bit. This could be expanded to 3 digits (13 bits) but would require more work. * All TIS-100 instructions are implemented except for JRO/ANY/LAST. Stack memory nodes and the visualization module are also not implemented! * Each CPU node is built using standard Infinifactory blocks, while the "screens" use some of the extra blocks from the level editor for aesthetic purposes (e.g. invisible blocks and invisible conveyors). * I used CyberShadow's mod to replicate some of the components, but it's not required to actually run the factory: reddit.com/r/infinifactory/comments/4qmten/i_made_a_mod/ * In this factory it takes about 1 real second to process each Infinifactory cycle, and 10-40 Infinifactory cycles for each TIS-100 cycle. The program in this video took 40 minutes to run! This is probably not the most efficient way to play TIS-100. If you'd like to take a look at the level yourself in Infinifactory, here's a cut-down one-screen version: pastebin.com/m2LgBUJQ

Why it's here

1 person recommends this

What people say. Highlighted as an impressive feat of building a functioning CPU and assembly interpreter inside Infinifactory.

u/leo3065in r/programming • Recommends

On “Game in which you develop your own CPU”

Because of pipelines? Gonna make those parallel processing working. But yeah many games by Zach is like processors with strange architecture and some gimmick thrown in. Like, TIS-100, Shenzhen I/O and Exapunks are straight up programming, and someone made a 4-bit version of brainfuck interpreter in SpaceChem (link to this video), who also made similar thing in Opus Magnum (link to this video). Hell, someone even built TIS-100 in Infinifactory, which are both games by Zachtronics.