Main features ============= - Monotasking - ROM based kernel - Disk based userland programs - POSIX support(partial) - Custom filesystem (see `doc/filesystem.md`) - File descriptor support Status ====== The kernel is currently under development. Most of the features are working as intended, but there are still some bugs and missing features. Latest stable version: v0.3.0 History ======= I started this project back in April 9th, 2025 after I figured out how to upload code as payload to a Z80 machine(http://searle.x10host.com/z80/SimpleZ80.html) that runs BASIC. That's why you see basicloader.c in older versions, fun fact or not. Initially I released the repository as private, but I made a public repository on May 1st, marking the "first" release. After that, I continued development, and kept a small break(less than a year), and now I'm back working on it again. System calls ============ Programs can communicate with the kernel using system calls. The kernel preserves all general purpose registers, so the programmer shouldn't have to worry about them. Syscall calling convention - HL - Syscall argument 1 - DE - Syscall argument 2 - BC - Syscall argument 3 - A - Syscall number - HL - Return value if any See `doc/syscalls.md` for more information POSIX support ============= Manux can run very simple POSIX programs. However, it's not fully POSIX-compliant, some programs might break or not work at all. Stdio works now: printf/scanf are tested. File operations aren't tested/implemented yet. Note that stdio add greatly to the code size, around 2-6KB depending on functions used. The current implementation relies on z88dk's newlib(also mixed with classic lib, little bit messy), so full custom target is needed. I haven't implemented the full target yet, but I've ported CRT0 and unistd/other POSIX-like functions. See `include/sys/` folder for currently supported functions. Minimum system requirements =========================== Manux supports bemu80(https://github.com/HelleBenjamin/bemu80) as the offical target machine. Manux is going to be ported to other machines in the future when the kernel becomes stable. - A Z80 CPU - 56K RAM - 8K ROM - a serial interface - floppy disk or other disk interface These requirements may change in the future. Lower ram requirement is planned. To do ==== - [] Add more drivers - [] Rework memory management - [] More POSIX features - [] More documentation - [x] A filesystem - [] Use only SDCC compiler, not the whole z88dk toolchain - [] Port Manux to other machines - [] Better configuration - [] Clean legacy code Programs ======== Manux can run POSIX-like with limited functionality. Some programs may not work as intended. Currently stdio is not supported, so use read/write from unistd instead. Userland programs are located in `userland/` directory. See its README for more information. The OS comes with a few programs included in the `userland/` directory. There are `ecalc`(a simple calculator) and `asmz80`(a simple assembler, WIP). Pre-requisites ============== - z88dk 2.4 - make - kconfig-frontends-nox(for configuration) - linux or other unix-like platform - git Building ======== Configure Manux using `kconfig-mconf Kconfig`. There's a preconfigured `.config` file included. To build Manux, run `make`. The kernel is build with z88dk. You need to have z88dk installed to build the kernel. Here's the steps to build Manux: 1. `git clone https://github.com/HelleBenjamin/Manux.git` 2. `cd Manux` 3. `kconfig-mconf Kconfig` (optional) 4. `make`, builds the kernel, userland, disk image, and bemu80 Here's some other make targets: - `make kernel` builds only the kernel - `make userland` builds the userland programs and the disk image - `make bemu80` builds bemu80 - `make emulate` runs the OS in bemu80 `make testprogram` adds file `test.asm`, useful for testing the assembler Note that compilation can take a while due to SDCC's optimizer. Especially with larger files, such as mfs.c and asmz80.c. Reduce...Read more »
Benjamin H.
ziggurat29
wilco2009
agp.cooper