RV32IMA Emulator (with Linux kernel) by Minki the Avali
A full RiscV 32-bit IMA instruction set emulator with memory peripherals such as UART and timers. Supports up to 128 MB of RAM. Capable of booting Linux and running bare-metal binaries compiled for rv32ima from C or Rust.
This emulator is based on the work from https://github.com/cnlohr/mini-rv32ima/blob/master/mini-rv32ima/mini-rv32ima.h
All credit for the base of the emulator goes to the original author!
This version can run on any Lua interpreter that has the bit32 extension, the ComputerCraft version however is optimized to run in the game.
Important note: if you are using a slow computer, pass a higher -t value (clock divider) since Linux does not like too slow clock speeds and will fail booting due to "abnormal clock jumps". Default is 32 which worked on my machine (Ryzen 5 5600G).
Demo: https://youtu.be/UkTQjgLKQzw
Usage:
- Drag the rvemu-cc.lua, minirv32ima.lua and split-file-manager.lua onto your in-game computer.
- connect at least 34 floppy drives to the computer and populate them with disks.
- run split-file-manager -u kernel, then drag the linux.bin onto your game window.
- run rvemu-cc -f split:kernel to launch the emulator
- wait ~7-10 minutes for the system to boot, then log in as user root
- enjoy your linux computer!
