bus

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 7 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 struct {
	CPUVRAM [0x800]byte `msgpack:"alias:CpuVram"`

	OpenBus byte
	// contains filtered or unexported fields
}

func New

func New(conf *config.Config, mapper cartridge.Mapper, ppu *ppu.PPU, apu *apu.APU) *Bus

func (*Bus) ReadMem

func (b *Bus) ReadMem(addr uint16) byte

ReadMem reads a byte from memory.

func (*Bus) ReadMem16

func (b *Bus) ReadMem16(addr uint16) uint16

ReadMem16 reads two bytes from memory.

func (*Bus) ReadMemSafe

func (b *Bus) ReadMemSafe(addr uint16) byte

ReadMemSafe reads a byte from memory, but immediately returns 0xFF for any reads with side effects.

func (*Bus) SetMapper

func (b *Bus) SetMapper(m cartridge.Mapper)

func (*Bus) UpdateInput

func (b *Bus) UpdateInput()

func (*Bus) WriteMem

func (b *Bus) WriteMem(addr uint16, data byte)

WriteMem writes a byte to memory.

func (*Bus) WriteMem16

func (b *Bus) WriteMem16(addr uint16, data uint16)

WriteMem16 writes two bytes to memory.

Jump to

Keyboard shortcuts

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