diff --git a/pat80-emulator/.gitignore b/pat80-emulator/.gitignore new file mode 100644 index 0000000..9ef9604 --- /dev/null +++ b/pat80-emulator/.gitignore @@ -0,0 +1,2 @@ +build + diff --git a/pat80-emulator/CMakeLists.txt b/pat80-emulator/CMakeLists.txt new file mode 100644 index 0000000..f3f7177 --- /dev/null +++ b/pat80-emulator/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.5.0) +project(pat80-emulator VERSION 0.1.0 LANGUAGES C) + +find_package(Z80 REQUIRED Shared) +add_executable(pat80-emulator main.c) + diff --git a/pat80-emulator/CMakePresets.json b/pat80-emulator/CMakePresets.json new file mode 100644 index 0000000..83112b6 --- /dev/null +++ b/pat80-emulator/CMakePresets.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "configurePresets": [ + { + "name": "gcc", + "displayName": "GCC 14.2.1 x86_64-pc-linux-gnu", + "description": "Using compilers: C = /usr/bin/gcc, CXX = /usr/bin/g++", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}", + "CMAKE_C_COMPILER": "/usr/bin/gcc", + "CMAKE_CXX_COMPILER": "/usr/bin/g++", + "CMAKE_BUILD_TYPE": "Debug" + } + } + ] +} \ No newline at end of file diff --git a/pat80-emulator/README.md b/pat80-emulator/README.md new file mode 100644 index 0000000..bf7e0e2 --- /dev/null +++ b/pat80-emulator/README.md @@ -0,0 +1,15 @@ +# Pat80 emulator + +## Setup + +Install the required Z80 emulator by redcode following the instructions for your Linux distribution at https://github.com/redcode/Z80 +Make sure to install not only the `libz80` package, but also `libz80-dev`. + +Create the build directory: `mkdir build` +Create the makefile with cmake: `cd build && cmake ..` + +## Build + +Enter the `build` directory and run `make` + +## Usage diff --git a/pat80-emulator/main.c b/pat80-emulator/main.c new file mode 100644 index 0000000..f80fadb --- /dev/null +++ b/pat80-emulator/main.c @@ -0,0 +1,5 @@ +#include + +int main(int, char**){ + printf("Hello, from pat80-emulator!\n"); +}