https://github.com/codesqueak/z80
A Z80 Processor Emulator In Go. It covers all instructions including undocument, and accurately emulates unused bits in the flag register
https://github.com/codesqueak/z80
emaulator go golang processor z80 zilog
Last synced: 6 months ago
JSON representation
A Z80 Processor Emulator In Go. It covers all instructions including undocument, and accurately emulates unused bits in the flag register
- Host: GitHub
- URL: https://github.com/codesqueak/z80
- Owner: codesqueak
- License: mit
- Created: 2022-03-01T21:51:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T20:19:42.000Z (over 1 year ago)
- Last Synced: 2024-06-21T10:00:21.289Z (12 months ago)
- Topics: emaulator, go, golang, processor, z80, zilog
- Language: Go
- Homepage:
- Size: 98.6 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Z80 Processor in Go / Golang
[](https://github.com/codesqueak/z80/actions/workflows/build.yml)
[](https://github.com/codesqueak/z80/actions/workflows/codeql-analysis.yml)
[](https://opensource.org/licenses/MIT)This is an implementation of the Mostek / Zilog Z80 processor NMOS version in Go
If you find this project useful, you may want to [__Buy me a
Coffee!__ :coffee:](https://www.buymeacoffee.com/codesqueak) Thanks :thumbsup:## How to use
### Get the library
Add this:
```
go get github.com/codesqueak/[email protected]
```### In project code
Add this (depending on what bits you need)
```
import (
"github.com/codesqueak/z80/processor/pkg"
"github.com/codesqueak/z80/processor/pkg/hw"
)
```**_github.com/codesqueak/z80/processor/pkg_** - contains processor methods
**_github.com/codesqueak/z80/processor/pkg/hw_** - contains interface definitions for Memory and I/O
## Undocumented instruction
The code attempts to faithfully reproduce the numerous undocumented instructions in the Z80. I have tested against a
real device but if you find any issues, let me know.## How to make a machine
To make a machine you need three components, the CPU, Memory and I/O. To see a simple example, look at the test in
`core_instructions_test.go`.