Skip to content
/ z80 Public

A Z80 Processor Emulator In Go. It covers all instructions including undocument, and accurately emulates unused bits in the flag register

License

Notifications You must be signed in to change notification settings

codesqueak/z80

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Z80 Processor in Go / Golang

build CodeQL License: 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! Thanks 👍

How to use

Get the library

Add this:

go get  github.com/codesqueak/z80@v1.2.0 

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.

About

A Z80 Processor Emulator In Go. It covers all instructions including undocument, and accurately emulates unused bits in the flag register

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages