LCPU - a alternative CPU addon for Garry's Mod
Go to file
Lily Tsuru e3ffcb02c2 revert loggingsystem usage until I feel safe requiring x64 gmod 2023-07-18 23:33:30 -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 revert loggingsystem usage until I feel safe requiring x64 gmod 2023-07-18 23:33:30 -04:00
.clang-format vastly improve logger 2023-07-17 16:27:27 -04:00
.editorconfig init 2023-07-16 01:58:32 -04:00
.gitignore see previous commit 2023-07-17 03:01:31 -04:00
.gitmodules RamDevice is public 2023-07-18 02:05:39 -04:00
LICENSE revert loggingsystem usage until I feel safe requiring x64 gmod 2023-07-18 23:33:30 -04:00
README.md revert loggingsystem usage until I feel safe requiring x64 gmod 2023-07-18 23:33:30 -04:00
ideas.md revert loggingsystem usage until I feel safe requiring x64 gmod 2023-07-18 23:33:30 -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, implemented in native code
    • No wiremod native code embargos here, so we get actually good performance without half our SENTs becoming lag machine fodder!
  • Interoperation with the Wiremod addon (and addons which implement Wiremod integration)

This addon (for now) works with both the non-beta branch and the x86-64 beta branches of GMod.

Installation

This repository is set up to be a Filesystem Addon; therefore, workflows which clone repositories from Git and put them in addons/ should be able to work with the LCPU addon just fine.

Preliminary installation steps:

garrysmod/addons$ git clone --recursive https://github.com/modeco80/gmod-lcpu.git lcpu
garrysmod/addons$ cd lcpu

# Build the LCPU native module. These steps build the linux64 version of the module
# on linux; you'll need to alter it if you want to build for 32-bit.
garrysmod/addons/lcpu$ cmake -Wno-dev -GNinja -S native -B build \
	-DCMAKE_BUILD_TYPE=Release
garrysmod/addons/lcpu$ ninja -C build

# Install the native module (Linux)
# For Windows you can do the same thing, just replace this
# with how you'd do it in batch (or use Explorer, I'm not your dad)
garrysmod/addons/lcpu$ [[ ! -d '../../lua/bin']] && mkdir -p ../../lua/bin && cp build/projects/lcpu/*.dll ../../lua/bin

# Tada!

Special Thanks

CNLohr - I may not like the mini-rv32ima code that much, but it did still help a lot (and my emulation core library is based off it, with tons of refactoring and a C++ rewrite to boot.)