Stubbed emulator

This commit is contained in:
Daniele Verducci 2025-01-28 08:59:53 +01:00
parent 1e62fbc306
commit e136bfef33
5 changed files with 45 additions and 0 deletions

2
pat80-emulator/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
build

View File

@ -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)

View File

@ -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"
}
}
]
}

15
pat80-emulator/README.md Normal file
View File

@ -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

5
pat80-emulator/main.c Normal file
View File

@ -0,0 +1,5 @@
#include <stdio.h>
int main(int, char**){
printf("Hello, from pat80-emulator!\n");
}