monitor

package
v0.0.0-...-d185933 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUState

type CPUState struct {
	A  uint8
	X  uint8
	Y  uint8
	PC uint16
	SP uint8
	P  uint8
}

CPUState holds a snapshot of CPU state

type Monitor

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

Monitor represents the UI state

func NewMonitor

func NewMonitor(stepper Stepper, cpu *cpu.CPU, mem cpu.MemoryBus) *Monitor

Initialize the monitor

func (Monitor) Init

func (m Monitor) Init() tea.Cmd

Implementation of tea.Model interface

func (Monitor) Update

func (m Monitor) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Handle keyboard input

func (Monitor) View

func (m Monitor) View() string

type Stepper

type Stepper interface {
	Step() uint8
}

Jump to

Keyboard shortcuts

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