cpu

package
v0.0.0-...-cc98a46 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cpu

type Cpu struct {
	IME bool

	Cycle int64 // 8 or 4
	// contains filtered or unexported fields
}

func New

func New(m Memory, halt, stop func(), tick func(int64)) *Cpu

func (*Cpu) Interrupt

func (c *Cpu) Interrupt(id int)

func (*Cpu) Reset

func (c *Cpu) Reset(hasBIOS bool)

func (*Cpu) Step

func (c *Cpu) Step()

type Memory

type Memory interface {
	Read(addr uint16) uint8
	Write(addr uint16, val uint8)
}

type Registers

type Registers struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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