bus

package
v0.0.0-...-4dc9614 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RAMsize = 64 * 1024

RAMsize is the size of the bus RAM space.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

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

Bus represents the bus used by the CPU to communicate with other components. It can be read from and written to.

func NewBus

func NewBus(ram RAM) *Bus

NewBus constructs and returns a Bus instance.

func (*Bus) Read

func (b *Bus) Read(address uint16) uint8

Read reads a byte at a given address on the Bus.

func (*Bus) ReadByteOnly

func (b *Bus) ReadByteOnly(address uint16) uint8

ReadByteOnly will be used by diassaembler to read address with mutating state. currently unused.

func (*Bus) Write

func (b *Bus) Write(address uint16, data uint8)

Write writes a byte of data to an address on the Bus.

type RAM

type RAM [RAMsize]uint8

RAM represents the addressable RAM space on the Bus.

Jump to

Keyboard shortcuts

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