Crates.io | i8080emulator |
lib.rs | i8080emulator |
version | 0.1.0 |
source | src |
created_at | 2023-07-25 09:45:57.946814 |
updated_at | 2023-07-25 09:45:57.946814 |
description | An Intel 8080 CPU full emulation library for 3rd party platform use |
homepage | https://github.com/k0Iry/8080-Emulator-in-Rust |
repository | https://github.com/k0Iry/8080-Emulator-in-Rust |
max_upload_size | |
id | 925357 |
size | 69,366 |
Using Rust to implement a full Intel 8080 CPU emulator.
To verify if the emulator works well, run cpudiag program under path diagnosis_program/. I also modified the assembly to avoid the need of writing to ROM.
This library is intended to be reused on different platforms: macOS, iOS, Android and (if possible) Web.
The FFI design is meant to be easy to understand and use.
The most important part of this library is to give you an instance of the CPU representative, within which all the functions(CPU, RAM, IO) are provided.
If we take a look at the interfaces in emulator.h header file, we can see:
Cpu8080
opaque struct, we obtain a pointer to it on app platforms and pass it back to this lib for interpretation. e.g. see run
methodIoCallbacks
struct, as the name implies, this is for IO interaction, e.g. we need to read from/write to peripheral devices, every time an IO request made from CPU, we need a way to get back to our devices.To use this library for app development, just build and copy the static library libemulator.a and include the emulator.h header file in your project.