hardware

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: GPL-3.0, GPL-3.0 Imports: 9 Imported by: 3

Documentation

Overview

Package hardware is the base package for the VCS emulation. It and its sub-package contain everything required for a headless emulation.

The VCS type is the root of the emulation and contains external references to all the VCS sub-systems. From here, the emulation can either be started to run continuously (with optional callback to check for continuation); or it can be stepped cycle by cycle. Both CPU and video cycle stepping are supported.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VCS

type VCS struct {
	CPU  *cpu.CPU
	Mem  *memory.VCSMemory
	TIA  *tia.TIA
	RIOT *riot.RIOT

	TV television.Television

	Panel           *input.Panel
	HandController0 *input.HandController
	HandController1 *input.HandController

	// randomise state on startup
	RandomState prefs.Bool
}

VCS struct is the main container for the emulated components of the VCS

func NewVCS

func NewVCS(tv television.Television) (*VCS, error)

NewVCS creates a new VCS and everything associated with the hardware. It is used for all aspects of emulation: debugging sessions, and regular play !!TODO: option for random state on VCS creation

func (*VCS) AttachCartridge

func (vcs *VCS) AttachCartridge(cartload cartridgeloader.Loader) error

AttachCartridge loads a cartridge (given by filename) into the emulators memory. While this function can be called directly it is advised that the setup package be used in most circumstances.

func (*VCS) Reset

func (vcs *VCS) Reset() error

Reset emulates the reset switch on the console panel

func (*VCS) Run

func (vcs *VCS) Run(continueCheck func() (bool, error)) error

Run sets the emulation running as quickly as possible. continuteCheck() should return false when an external event (eg. a GUI event) indicates that the emulation should stop.

func (*VCS) RunForFrameCount

func (vcs *VCS) RunForFrameCount(numFrames int, continueCheck func(frame int) (bool, error)) error

RunForFrameCount sets emulator running for the specified number of frames. Useful for FPS and regression tests. Not used by the debugger because traps and steptraps are more flexible.

func (*VCS) Step

func (vcs *VCS) Step(videoCycleCallback func() error) error

Step the emulator state one CPU instruction. With a bit of work the optional videoCycleCallback argument can be used for video-cycle stepping.

Directories

Path Synopsis
cpu
Package cpu emulates the 6507 microprocessor found in the Atari VCS.
Package cpu emulates the 6507 microprocessor found in the Atari VCS.
execution
Package execution tracks the result of instruction execution on the CPU.
Package execution tracks the result of instruction execution on the CPU.
instructions
Package instructions defines the table of instruction for the 6507.
Package instructions defines the table of instruction for the 6507.
registers
Package registers implements the three types of registers found in the 6507.
Package registers implements the three types of registers found in the 6507.
registers/test
Package test contains functions useful for testing CPU registers.
Package test contains functions useful for testing CPU registers.
Package memory implements the Atari VCS memory model.
Package memory implements the Atari VCS memory model.
addresses
Package addresses countains all information about VCS addresses and registers, including canonical symbols for read and write addresses and registers.
Package addresses countains all information about VCS addresses and registers, including canonical symbols for read and write addresses and registers.
bus
Package bus defines the memory bus concept.
Package bus defines the memory bus concept.
cartridge
Package cartridge fully implements loading of mapping of cartridge memory.
Package cartridge fully implements loading of mapping of cartridge memory.
memorymap
Package memorymap facilitates the translation of addresses to primary address equivalents.
Package memorymap facilitates the translation of addresses to primary address equivalents.
Package riot (RIOT) represents the active part of the PIA 6532.
Package riot (RIOT) represents the active part of the PIA 6532.
input
Package input represents the input/output part of the RIOT (the IO in RIOT).
Package input represents the input/output part of the RIOT (the IO in RIOT).
timer
Package timer represents the timer part of the RIOT (the T in RIOT).
Package timer represents the timer part of the RIOT (the T in RIOT).
tia
Package TIA implements the custom video/audio chip found in the the VCS.
Package TIA implements the custom video/audio chip found in the the VCS.
audio
Package audio implements the audio generation of the TIA.
Package audio implements the audio generation of the TIA.
future
Pacakge future conceptualises event delays inside the VCS.
Pacakge future conceptualises event delays inside the VCS.
phaseclock
Package phaseclock defines the two phase clock generator used to drive the various polynomial counters in the TIA.
Package phaseclock defines the two phase clock generator used to drive the various polynomial counters in the TIA.
polycounter
Package polycounter implements the polynomial counters found in the TIA.
Package polycounter implements the polynomial counters found in the TIA.
video
Package video implements pixel generation for the emulated TIA.
Package video implements pixel generation for the emulated TIA.

Jump to

Keyboard shortcuts

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