https://github.com/redcode/z80-lkm
Zilog Z80 CPU emulator - Linux kernel module
https://github.com/redcode/z80-lkm
cpu cpu-emulator emulator kernel-module linux linux-kernel linux-kernel-module lkm z80 z80-emulator zilog
Last synced: 2 months ago
JSON representation
Zilog Z80 CPU emulator - Linux kernel module
- Host: GitHub
- URL: https://github.com/redcode/z80-lkm
- Owner: redcode
- Created: 2022-12-04T21:35:36.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T12:18:17.000Z (almost 3 years ago)
- Last Synced: 2025-04-07T13:37:14.336Z (6 months ago)
- Topics: cpu, cpu-emulator, emulator, kernel-module, linux, linux-kernel, linux-kernel-module, lkm, z80, z80-emulator, zilog
- Language: CMake
- Homepage:
- Size: 14.6 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- Support: support/Kbuild.in
Awesome Lists containing this project
README
Z80-LKM
This tiny project allows you to build the [Z80 library](https://github.com/redcode/Z80) as a Linux kernel module.
## Build
### Prerequisites
* CMake v3.14 or later.
* Linux kernel headers.### Configuration options
The CMake script supports the following options:
* **`-DLINUX_KERNEL_HEADERS_DIR=`**
Specify the directory of the Linux kernel headers.
If this option is not defined, the directory will be autodetected.
Not defined by default.* **`-DZ80_LKM_STABLE=(YES|NO)`**
Download the source code packages of the stable versions of Z80 and Zeta instead of cloning the `master` branch from their respective Git repositories.
The default is `NO`.### Build
Type the following:
```shell
git clone https://github.com/redcode/Z80-LKM.git
mkdir Z80-LKM/build
cd Z80-LKM/build
cmake .. [options]
make
```This will generate the `z80.ko` module, which then you can load and unload:
```shell
insmod z80.ko # Load the module
dmesg | tail -n 1 # Will print "Zilog Z80 CPU emulator v0.2"
rmmod z80 # Unload the module
```## License
Copyright © 2022 Manuel Sainz de Baranda y Goñi.
This program is [free software](https://www.gnu.org/philosophy/free-sw.html): you can redistribute it and/or modify it under the terms of the **[GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html)** as published by the [Free Software Foundation](https://www.fsf.org), either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but **WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE**. See the GNU General Public License for more details.
You should have received a [copy](COPYING) of the GNU General Public License along with this program. If not, see .