setup

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Overview

Package setup is used to preset the emulation depending on the attached cartridge. It is currently quite limited but is useful none-the-less. Currently support entry types:

Toggling of panel switches
Apply patches to cartridge
Television specification

Menu driven selection of patches would be a nice feature to have in the future. But at the moment, the package doesn't even facilitate editing of entries. Adding new entries to the setup database therefore requires editing the DB file by hand. For reference the following describes the format of each entry type:

Panel Toggles

<DB Key>, panel, <SHA-1 Hash>, <player 0 (bool)>, .<player 1 (bool)>, <color (bool)>, <notes>

When editing the DB file, make sure the DB Key is unique

Patch Cartridge

<DB Key>, patch, <SHA-1 Hash>, <patch file>, <notes>

Patch files are located in the patches sub-directory of the resources path.

Television

<DB Key>, television, <SHA-1 Hash>, <tv spec>, notes

TV spec should be one of PAL or NTSC (or AUTO).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachCartridge

func AttachCartridge(vcs *hardware.VCS, cartload cartridgeloader.Loader, resetVCS bool) error

AttachCartridge to the VCS and apply setup information from the setupDB. This function should be preferred to the hardware.VCS.AttachCartridge() function in almost all cases.

Types

type PanelSetup

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

PanelSetup is used to adjust the VCS's front panel.

func (PanelSetup) CleanUp

func (set PanelSetup) CleanUp() error

CleanUp implements the database.Entry interface.

func (PanelSetup) EntryType added in v0.21.0

func (set PanelSetup) EntryType() string

EntryType implements the database.Entry interface.

func (*PanelSetup) Serialise

func (set *PanelSetup) Serialise() (database.SerialisedEntry, error)

Serialise implements the database.Entry interface.

type Patch

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

Patch is used to patch cartridge memory after cartridge has been attached/loaded.

func (Patch) CleanUp

func (set Patch) CleanUp() error

CleanUp implements the database.Entry interface.

func (Patch) EntryType added in v0.21.0

func (set Patch) EntryType() string

EntryType implements the database.Entry interface.

func (*Patch) Serialise

func (set *Patch) Serialise() (database.SerialisedEntry, error)

Serialise implements the database.Entry interface.

Jump to

Keyboard shortcuts

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