vcs

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: GPL-3.0, GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package vcs represents the areas of memory that are internal to the VCS hardware. Compare with the cartridge package which represents memory (ROM and sometimes RAM) periperhal to the VCS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChipMemory

type ChipMemory struct {
	bus.DebugBus
	bus.ChipBus
	bus.CPUBus
	bus.InputDeviceBus
	// contains filtered or unexported fields
}

ChipMemory defines the information for and operations allowed for those memory areas accessed by the VCS chips as well as the CPU

func NewRIOT

func NewRIOT() *ChipMemory

NewRIOT is the preferred method of initialisation for the RIOT memory area

func NewTIA

func NewTIA() *ChipMemory

NewTIA is the preferred method of initialisation for the TIA memory area

func (*ChipMemory) ChipRead

func (area *ChipMemory) ChipRead() (bool, bus.ChipData)

ChipRead is an implementation of memory.ChipBus

func (*ChipMemory) ChipWrite

func (area *ChipMemory) ChipWrite(reg addresses.ChipRegister, data uint8)

ChipWrite is an implementation of memory.ChipBus

func (*ChipMemory) InputDeviceWrite

func (area *ChipMemory) InputDeviceWrite(reg addresses.ChipRegister, data uint8, preserveBits uint8)

InputDeviceWrite implements memory.InputDeviceBus

func (*ChipMemory) LastReadRegister

func (area *ChipMemory) LastReadRegister() string

LastReadRegister is an implementation of memory.ChipBus

func (ChipMemory) Peek

func (area ChipMemory) Peek(address uint16) (uint8, error)

Peek is an implementation of memory.DebugBus. Address must be normalised.

func (ChipMemory) Poke

func (area ChipMemory) Poke(address uint16, value uint8) error

Poke is an implementation of memory.DebugBus. Address must be normalised.

func (*ChipMemory) Read

func (area *ChipMemory) Read(address uint16) (uint8, error)

Read is an implementation of memory.CPUBus. Address must be normalised.

func (*ChipMemory) Write

func (area *ChipMemory) Write(address uint16, data uint8) error

Write is an implementation of memory.CPUBus. Address must be normalised.

type RAM

type RAM struct {
	bus.DebugBus
	bus.CPUBus
	RAM []uint8
}

RAM represents the 128bytes of RAM in the PIA 6532 chip, found in the Atari VCS.

func NewRAM

func NewRAM() *RAM

NewRAM is the preferred method of initialisation for the RAM memory area

func (RAM) Peek

func (ram RAM) Peek(address uint16) (uint8, error)

Peek is the implementation of memory.DebugBus. Address must be normalised.

func (RAM) Poke

func (ram RAM) Poke(address uint16, value uint8) error

Poke is the implementation of memory.DebugBus. Address must be normalised.

func (RAM) Read

func (ram RAM) Read(address uint16) (uint8, error)

Read is an implementatio of memory.ChipBus. Address must be normalised.

func (RAM) String

func (ram RAM) String() string

func (*RAM) Write

func (ram *RAM) Write(address uint16, data uint8) error

Write is an implementatio of memory.ChipBus. Address must be normalised.

Jump to

Keyboard shortcuts

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