Documentation ¶
Overview ¶
Package z80 emulates Zilog's Z80 CPU.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBreakPoint = errors.New("break point reached")
ErrBreakPoint shows PC is reached to one of break points.
Functions ¶
This section is empty.
Types ¶
type CPU ¶
type CPU struct { States Memory Memory IO IO INT INT NMI NMI IMon InterruptMonitor Debug bool BreakPoints map[uint16]struct{} }
CPU is Z80 emulator.
type DumbMemory ¶
type DumbMemory []uint8
DumbMemory provides Memory interface as wrapper of []uint8
func (DumbMemory) Get ¶
func (dm DumbMemory) Get(addr uint16) uint8
Get gets a byte at addr of memory.
func (DumbMemory) Put ¶
func (dm DumbMemory) Put(addr uint16, data ...uint8) DumbMemory
Put puts "data" block from addr.
func (DumbMemory) Set ¶
func (dm DumbMemory) Set(addr uint16, value uint8)
Set sets a byte at addr of memory.
type INT ¶
type INT interface { // CheckINT should return valid interruption data if maskable interruption // made. The data is used for interruption codes or as a vector depending // on interruption mode. CheckINT() []uint8 // ReturnINT is called when "RETI" op is executed. ReturnINT() }
INT is interface for maskable interrupt.
type InterruptMonitor ¶
InterruptMonitor monitors interruptions.
type MapMemory ¶
MapMemory implements Memory interface with a map.
type NMI ¶
type NMI interface { // CheckNMI should return true if non-maskable interruption made. CheckNMI() bool }
NMI is interruption for non-maskable interrupt.
type Option ¶ added in v0.9.1
type Option interface {
// contains filtered or unexported methods
}
Option is an optional element for Build.
func WithInterruptMonitor ¶ added in v0.9.1
func WithInterruptMonitor(v InterruptMonitor) Option
WithInterruptMonitor is an option to setup with InterruptMonitor.
func WithMemory ¶ added in v0.9.1
WithMemory is an option to setup with Memory.
type Register ¶
Register is 16 bits register.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
internal
|
|
tinycpm
Package tinycpm provides minimal CP/M compatible BIOS to run Z80 Exerciser tests.
|
Package tinycpm provides minimal CP/M compatible BIOS to run Z80 Exerciser tests. |
zex
Package zex provides test cases of Z80 Exerciser.
|
Package zex provides test cases of Z80 Exerciser. |
Click to show internal directories.
Click to hide internal directories.