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 09:18:16 +10:00
cfg Added sample TinyEMU .cfg files 2025-07-22 09:17:45 +10:00
js Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
src Moved all *.c|*.h files to src/ 2025-07-22 08:05:36 +10:00
web Added template website 2025-07-22 09:18:16 +10:00
.gitignore GCC artifacts now isolated to build/ & bin/ 2025-07-22 07:03:54 +10:00
CHANGELOG Standard names README/CHANGELOG/LICENSE 2025-07-22 08:15:47 +10:00
flake.lock Added (90%)template flake based nix development shell 2025-07-22 02:59:46 +10:00
flake.nix Expose makejs from flake::mkShell 2025-07-22 08:17:08 +10:00
LICENSE Standard names README/CHANGELOG/LICENSE 2025-07-22 08:15:47 +10:00
Makefile Added "bridging" Makefile 2025-07-22 09:16:35 +10:00
Makefile.c Added "bridging" Makefile 2025-07-22 09:16:35 +10:00
Makefile.js Compile JS+WASM to build/js 2025-07-22 08:47:51 +10:00
netinit.sh Fork http://bellard.org/tinyemu 2025-07-22 02:42:34 +10:00
README Renamed README files (add jslinux README) 2025-07-22 08:56:38 +10:00
README.jslinux Renamed README files (add jslinux README) 2025-07-22 08:56:38 +10:00
README.tinyemu Renamed README files (add jslinux README) 2025-07-22 08:56:38 +10:00
VERSION Modified version number 2025-07-22 08:04:59 +10:00

# TinyEMU System Emulator
**This repo is a fork** of [Fabrice Bellard's TinyEMU project\[v2019-12-21]](https://bellard.org/tinyemu),
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).
<br/><u><b>PS:</b></u> there is no guide for Windows because I'm allergic and it scares me.
> For WAYYYY more information read Bellard's original [readme.txt](readme.txt)


## Compiling

### Nix
```bash
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
```bash
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]