disk

package
v0.0.0-...-9933e25 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: GPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SectorSize       = 2048
	SectorMultiplier = uint32(29) // Oberon sector number is multiplied by 29

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

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

func Open

func Open(imagePath string) (*Disk, error)

func (*Disk) Close

func (d *Disk) Close() error

func (*Disk) GetSector

func (d *Disk) GetSector(src uint32) (Sector, error)

GetSector reads a 2048-byte Oberon sector. Sector addresses are 1-based! src is sector number (in "encoded" Oberon sectors, i.e. multiple of 29) dest is the buffer to read into.

func (*Disk) MustGetSector

func (d *Disk) MustGetSector(src uint32) Sector

func (*Disk) MustPutSector

func (d *Disk) MustPutSector(src uint32, sec Sector)

func (*Disk) PutSector

func (d *Disk) PutSector(src uint32, sec Sector) error

PutSector Writes a 2048-byte Oberon sector. Sector addresses are 1-based! "src" is the sector number (in "encoded" Oberon sectors, i.e. multiple of 29) "sec" is the sector data to write.

func (*Disk) Size

func (d *Disk) Size() uint32

Size returns the size of the disk in "encoded" Oberon sectors.

type Sector

type Sector [SectorSize]byte

Jump to

Keyboard shortcuts

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