format

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TapeFileProgram        = 0
	TapeFileNumberArray    = 1
	TapeFileCharacterArray = 2
	TapeFileCode           = 3
)

Tape file types

Variables

This section is empty.

Functions

func NewTap

func NewTap() tape.Tape

NewTap creates a new tape

func NewTzx

func NewTzx() tape.Tape

NewTzx creates a new tape

Types

type Snapshot

type Snapshot struct {
	z80.State                 // Z80 state
	Tstates   int             // CPU tstates
	Border    byte            // ULA current border
	Memory    [48 * 1024]byte // Spectrum memory (48k)
}

Snapshot ZX Spectrum 16k / 48k snap

func LoadSNA

func LoadSNA(data []byte) *Snapshot

LoadSNA loads snap from SNA data format

func LoadZ80

func LoadZ80(data []byte) *Snapshot

LoadZ80 loads snap from Z80 data format

func NewSnapshot

func NewSnapshot() *Snapshot

NewSnapshot returns a new ZX Spectrum snap

func (*Snapshot) SaveSNA

func (snap *Snapshot) SaveSNA() []byte

SaveSNA saves snap to SNA data format

type Tap

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

Tap implements the a tape format .TAP

func (*Tap) Blocks

func (tap *Tap) Blocks() []tape.Block

Blocks gets the tape blocks

func (*Tap) Info

func (tap *Tap) Info() *tape.Info

Info gets tape information

func (*Tap) Load

func (tap *Tap) Load(data []byte) bool

Load loads the tape file data

func (*Tap) Play

func (tap *Tap) Play(control *tape.Control)

Play tap

type TapBlock

type TapBlock struct {
	tape.BlockInfo
	// contains filtered or unexported fields
}

TapBlock is a tape block

func (*TapBlock) Data

func (block *TapBlock) Data() []byte

Data gets block data bytes

func (*TapBlock) Info

func (block *TapBlock) Info() *tape.BlockInfo

Info gets block information

type TapBlockHeader

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

TapBlockHeader information

type Tzx

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

Tzx implements the a tape format .TZX

func (*Tzx) Blocks

func (tzx *Tzx) Blocks() []tape.Block

Blocks gets the tape blocks

func (*Tzx) Info

func (tzx *Tzx) Info() *tape.Info

Info gets tape information

func (*Tzx) Load

func (tzx *Tzx) Load(data []byte) bool

Load loads the tape file data

func (*Tzx) Play

func (tzx *Tzx) Play(control *tape.Control)

Play TZX tape

type TzxBlock

type TzxBlock struct {
	tape.BlockInfo
	// contains filtered or unexported fields
}

TzxBlock is a tape block

func (*TzxBlock) Data

func (block *TzxBlock) Data() []byte

Data gets block data bytes

func (*TzxBlock) Info

func (block *TzxBlock) Info() *tape.BlockInfo

Info gets block information

Jump to

Keyboard shortcuts

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