Compare commits

...

2 Commits

Author SHA1 Message Date
e136bfef33 Stubbed emulator 2025-01-28 08:59:53 +01:00
1e62fbc306 Removed python z80 emulator submodule 2025-01-28 08:29:20 +01:00
6 changed files with 42 additions and 5 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"
}
}
]
}

View File

@ -1,7 +1,15 @@
# PAT80 Emulator
This folder contains a submodule (you should fetch it if you need to run the os in an emulator).
# Pat80 emulator
Uses cburbridge's Z80 emulator written in python. It opens some windows showing the emulated computer's memory map, the cpu registers state and parallel terminal to interact with the os.
## 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
To run the os in the emulator, head to `pat80-computer/software/z80-assembly/os/Makefile` and run `make run` to build the rom from assembly and start the emulator.

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");
}

@ -1 +0,0 @@
Subproject commit 46d5391d5c890b2608389db5f2e8e470ef99f254