LCPU - a alternative CPU addon for Garry's Mod
Go to file
Lily Tsuru 25aa8bd7da uh i guess try this 2023-07-17 02:09:59 -04:00
data begin actually setting up the repository as a GMod addon.. 2023-07-16 06:05:19 -04:00
lua/autorun add scripts for building llvm (for inclusion in addon root) 2023-07-16 21:10:59 -04:00
native begin actually setting up the repository as a GMod addon.. 2023-07-16 06:05:19 -04:00
scripts uh i guess try this 2023-07-17 02:09:59 -04:00
.clang-format move all native projects to native/projects 2023-07-16 05:46:49 -04:00
.editorconfig init 2023-07-16 01:58:32 -04:00
.gitignore add scripts for building llvm (for inclusion in addon root) 2023-07-16 21:10:59 -04:00
Containerfile.llvm tell build script about llvm version 2023-07-17 00:21:20 -04:00
README.md uh i guess try this 2023-07-17 02:09:59 -04:00
ideas.md uh i guess try this 2023-07-17 02:09:59 -04:00

README.md

LCPU

LCPU is an alternative CPU core addon for GMod/Wiremod.

It provides:

  • A standard RISC-V architechure (rv32ima) CPU core
  • Extensive interoperation with the Wiremod addon
  • A text editor and assembler suite based on LLVM (for writing bare-metal LCPU programs in assembly)

Building Native Module

TODO: Steps to build the LCPU native module on Windows and Linux

LLVM is built using a podman container (see Containerfile). The steps for building follow (this should only need to be done once):

mkdir llvm_build
podman build -t llvm-build -f Containerfile.llvm
podman run --rm --mount type=bind,source=$PWD/llvm_build,destination=/build/llvm-build localhost/llvm-build
cp -rv llvm_build/install lua/bin/llvm

Installation

This repository is set up in the exact directory structure to be a Legacy Addon; therefore once you have built the native module (TODO), adding it to a server should work fine.