Skip to content

yfdyzjt/TerrariaWiringComputer

Repository files navigation

Terraria Wiring Computer


RISC-V 32-bit computer made by wiring in vanilla Terraria
Modular Computer Systems: Simple, Flexible, Open High Performance and High Density Wirings

Introduction (中文)

Terraria Wiring Computer is a RISC-V 32-bit computer based on Terraria vanilla wiring.

  • Implements the standard rv32imc instruction set and can use the standard RISC-V toolchain;

  • Fully modular hardware, allowing free choice of suitable hardware, easy development, and flexible use;

  • Uses tmake + xmake scripts to build hardware and software, powerful and convenient;

  • Optimized for wiring area and performance, aiming to explore the limits of Terraria wiring.

Installation

Navigate to the Project Folder

cd /TerrariaWiringComputer

Replace with the actual directory

Pull the Docker Image

docker pull yfdyzjt/terraria-wiring-computer

Run the Docker Container

startup

Run startup.bat or startup.sh .

Install WireShark wiring acceleration mod (optional)

If the wiring runs slowly, you can use the WireShark wiring acceleration mod, which can preload wirings to improve the execution efficiency of some wiring codes without changing the wiring logic.

Usage

Build

Run the following command inside the Docker container to complete the hardware and software build:

xmake

The generated files will be placed in the ./system folder

Execute the following command in the project directory to copy the generated world file to the Terraria and tModLoader world save folders:

copy_world

Run copy_world.bat or copy_world.sh .

Configuration

Run the following command inside the Docker container to configure the build software:

xmake f --s=[SoftwareName]

To configure additional options, create a xmake.lua file in the root directory of the build software:

config = {
    [ConfigKey1] = [ConfigValue1],
    [ConfigKey2] = [ConfigValue2],
    [ConfigKey3] = [ConfigValue3]
}
Config Key Default Value Path Description
world terraria_computer_large hardware/world Name of the world
cpu cpu_cs100c_rv32imc hardware/wiring/cpu Name of the CPU
driver 6.96K hardware/wiring/driver Value of the drive frequency
stack 1K - Size of the data stack
printf_float false - Enable floating point output support
scanf_float false - Enable floating point input support
terminal false - Enable terminal input and output support

About

RISC-V 32-bit computer made by wiring in vanilla Terraria

Resources

License

Stars

Watchers

Forks

Releases

No releases published