TinyEMU is a system emulator for the RISC-V and x86 architectures. Its purpose is to be small and simple while being complete.
Find a file
2025-07-22 08:04:24 +10:00
js Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
slirp Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
.gitignore GCC artifacts now isolated to build/ & bin/ 2025-07-22 07:03:54 +10:00
aes.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
aes.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
block_net.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
build_filelist.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
Changelog Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
cutils.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
cutils.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
fbuf.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
flake.lock Added (90%)template flake based nix development shell 2025-07-22 02:59:46 +10:00
flake.nix Move flake.nix issues/139943 Ref 2025-07-22 04:50:53 +10:00
fs.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
fs.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
fs_disk.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
fs_net.c Typecast unused returns as (void) 2025-07-22 05:51:36 +10:00
fs_utils.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
fs_utils.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
fs_wget.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
fs_wget.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
ide.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
ide.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
iomem.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
iomem.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
jsemu.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
json.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
json.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
list.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
machine.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
machine.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
Makefile Makefile now supports src/ path 2025-07-22 08:04:24 +10:00
Makefile.js Removed emscriptem opt "-s BINARYEN_TRAP_MODE=clamp" (default for WASM compile target) 2025-07-22 03:24:52 +10:00
MIT-LICENSE.txt Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
netinit.sh Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
pci.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
pci.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
pckbd.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
ps2.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
ps2.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
README.md README.md emphasis on allergy with <br/> 2025-07-22 04:49:02 +10:00
readme.txt Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
riscv_cpu.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
riscv_cpu.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
riscv_cpu_fp_template.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
riscv_cpu_priv.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
riscv_cpu_template.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
riscv_machine.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
sdl.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
sha256.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
sha256.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
simplefb.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
softfp.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
softfp.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
softfp_template.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
softfp_template_icvt.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
splitimg.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
temu.c Typecast unused returns as (void) 2025-07-22 05:51:36 +10:00
VERSION Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
vga.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
virtio.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
virtio.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
vmmouse.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
x86_cpu.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
x86_cpu.h Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
x86_machine.c Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00

TinyEMU System Emulator

This repo is a fork of Fabrice Bellard's TinyEMU project, a lightweight RISC-V and x86 emulator. Specifically migrating the project to the latest stable release of enscriptem. I provide a flake.nix dev shell too (cause I'm super nice).

This repo will mostly be a guide for embedding TinyEMU into your website (cause that's what I'm doing).
PS: there is no guide for Windows because I'm allergic and it scares me.

For WAYYYY more information read Bellard's original readme.txt

Compiling

Nix

nix develop
makejs # alias for `make -f Makefile.js`
make

Note

emscripten expects an FHS so I've instead implemented a shell hook to steal copy ${pkgs.emscripten}/share/emscripten/cache prior to makejs. Refer to https://github.com/NixOS/nixpkgs/issues/139943

Other Unix Systems

make -f Makefile.js
make

Tip

The following dependencies are required for compilation, the version numbers are what I compiled against but are not strict.

  1. make [v4.4.1] (aka gnumake)
  2. emscripten [v4.0.8]
  3. SDL [v1.2.68] (aka libsdl)
  4. curl [v8.14.1]
  5. openssl [v3.4.1]