v0.0.0-...-ad720f0 Latest Latest

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

Go to latest
Published: Mar 24, 2024 License: GPL-3.0 Imports: 8 Imported by: 0




View Source
const (
	// ProDosBlockSize is the size of the blocks on the ProDOS devices
	ProDosBlockSize = uint32(512)


This section is empty.


func IsDiskette

func IsDiskette(data []byte) bool

IsDiskette returns true if the files looks like a 5 1/4 diskette


type BlockDisk

type BlockDisk struct {
	// contains filtered or unexported fields

BlockDisk is any block device with 512 bytes blocks

func OpenBlockDisk

func OpenBlockDisk(filename string) (*BlockDisk, error)

OpenBlockDisk creates a new block device links to a file

func (*BlockDisk) GetSizeInBlocks

func (bd *BlockDisk) GetSizeInBlocks() uint32

GetSizeInBlocks returns the number of blocks of the device

func (*BlockDisk) IsReadOnly

func (bd *BlockDisk) IsReadOnly() bool

IsReadOnly returns true if the device is read only

func (*BlockDisk) Read

func (bd *BlockDisk) Read(block uint32) ([]uint8, error)

func (*BlockDisk) Write

func (bd *BlockDisk) Write(block uint32, data []uint8) error

type Diskette

type Diskette interface {
	PowerOn(cycle uint64)
	PowerOff(cycle uint64)
	Read(quarterTrack int, cycle uint64) uint8
	Write(quarterTrack int, value uint8, cycle uint64)

Diskette represents a diskette and it's RW mechanism

func MakeDiskette

func MakeDiskette(data []byte, filename string, writeable bool) (Diskette, error)

MakeDiskette returns a Diskette by detecting the format

type FileWoz

type FileWoz struct {
	Info woz2Info
	// contains filtered or unexported fields

func NewFileWoz

func NewFileWoz(data []uint8) (*FileWoz, error)

func (*FileWoz) DumpTrackAsNib

func (f *FileWoz) DumpTrackAsNib(quarterTrack int) []uint8

func (*FileWoz) DumpTrackAsWoz

func (f *FileWoz) DumpTrackAsWoz(quarterTrack int) []uint8

func (*FileWoz) GetNextBitAndPosition

func (f *FileWoz) GetNextBitAndPosition(position uint32, positionMax uint32, quarterTrack int) (bool, uint32, uint32)

func (*FileWoz) SetBit

func (f *FileWoz) SetBit(value bool, position uint32, positionMax uint32, quarterTrack int)

Jump to

Keyboard shortcuts

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