tinyemu/README.md

41 lines
1.4 KiB
Markdown
Raw Normal View History

2025-07-22 04:36:47 +10:00
# TinyEMU System Emulator
2025-07-23 20:41:37 +10:00
**This repo is a fork** of [Fabrice Bellard's TinyEMU project\[v2019-12-21\]](https://bellard.org/tinyemu),
2025-07-22 04:34:31 +10:00
a lightweight RISC-V and x86 emulator. Specifically migrating the project to
2025-07-22 04:36:47 +10:00
the latest stable release of `enscriptem`. I provide a `flake.nix` dev shell too *(cause I'm super nice)*.
2025-07-22 04:34:31 +10:00
2025-07-22 04:45:51 +10:00
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.
2025-07-23 20:41:37 +10:00
> For WAYYYY more information I've provided Bellard's original [tinyemu/readme.txt](README.tinyemu.md) & [jslinux/readme.txt](README.jslinux.md) files
2025-07-22 04:45:51 +10:00
2025-07-22 04:36:47 +10:00
## Compiling
2025-07-22 04:45:51 +10:00
2025-07-22 04:36:47 +10:00
### Nix
2025-07-22 04:34:31 +10:00
```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
2025-07-22 04:45:51 +10:00
### Other Unix Systems
2025-07-22 04:34:31 +10:00
```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`/`SDL-devel`)
> 4. `curl` \[v8.14.1] (aka `libcurl-devel`)
> 5. `openssl` \[v3.4.1] (aka `openssl-devel`)
2025-07-22 04:34:31 +10:00
## Todo
1. Expose the CONFIG_FS_NET + CONFIG_SDL Makefile variables