z80

package
v0.0.0-...-33ef502 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus interface {
	SetAddr(uint16)
	GetAddr() uint16

	SetData(byte)
	GetData() byte

	Release()

	ReadMemory()
	WriteMemory()

	RegisterPort(mask cpu.PortMask, manager cpu.PortManager)
	ReadPort()
	WritePort()

	// debuger
	GetBlock(addr uint16, l uint16) []byte
}

func NewBus

func NewBus(mem Memory) Bus

type CPUTrap

type CPUTrap func()

type Memory

type Memory interface {
	GetByte(pos uint16) byte
	PutByte(pos uint16, b byte)
}

type Z80

type Z80 interface {
	cpu.CPU
	Registers() *Z80Registers
	RegisterTrap(pc uint16, trap CPUTrap)
}

func NewZ80

func NewZ80(bus Bus) Z80

type Z80Registers

type Z80Registers struct {
	PC uint16
	M1 bool

	A byte
	F *flags

	B  byte
	C  byte
	BC *cpuUtils.RegPair

	D  byte
	E  byte
	DE *cpuUtils.RegPair

	H  byte
	L  byte
	HL *cpuUtils.RegPair

	S  byte
	P  byte
	SP *cpuUtils.RegPair

	I  byte
	R  byte
	R7 byte

	IFF1 bool
	IFF2 bool

	IXH byte
	IXL byte
	IX  *cpuUtils.RegPair

	IYH byte
	IYL byte
	IY  *cpuUtils.RegPair

	Aalt byte
	Falt *flags
	Balt byte
	Calt byte
	Dalt byte
	Ealt byte
	Halt byte
	Lalt byte

	InterruptsMode byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL