psx

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

README

GitHub release Build Status Coverage Status Go Report Card GoDoc Go version Go version Go version

psx

A collection of libraries and utilities for dealing with Sony PlayStation 1 file formats.

Full installation:

go get github.com/bodgit/psx/...

Or grab a pre-built binary from the releases page.

psx

The psx utility currently allows you to split generic memory cards (such as those created by the 8BitMods MemCard PRO) into per-game memory cards for use with a supported ODE.

A quick demo:

Documentation

Index

Constants

View Source
const (
	// BlockFirstLink signifies the first block in either a single or multi-block save
	BlockFirstLink = iota + 0x51
	// BlockMiddleLink signifies any block that is neither the first nor last block in a multi-block save
	BlockMiddleLink
	// BlockLastLink signifies the last block in a multi-block save
	BlockLastLink
	// BlockAvailable is used for any free blocks on the memory card
	BlockAvailable = 0xa0
	// BlockUnavailable is used for any block that cannot be used
	BlockUnavailable = 0xff
)
View Source
const (
	// LastLink marks the last (or only) block in a save
	LastLink = 0xffff
	// NumBlocks represents the total number of usable blocks on a PlayStation 1 memory card
	NumBlocks = 15
)

Variables

This section is empty.

Functions

func XOR

func XOR() hash.Hash

XOR returns a hash.Hash implementation that computes a single byte checksum by XOR'ing every byte written to it

Types

type MemoryCard

type MemoryCard struct {
	HeaderBlock headerBlock
	DataBlock   [NumBlocks]dataBlock
}

MemoryCard represents a PlayStation 1 memory card

func NewMemoryCard

func NewMemoryCard() (*MemoryCard, error)

NewMemoryCard returns a correctly initialized blank memory card

func (*MemoryCard) MarshalBinary

func (m *MemoryCard) MarshalBinary() ([]byte, error)

MarshalBinary encodes the memory card into binary form and returns the result

func (*MemoryCard) UnmarshalBinary

func (m *MemoryCard) UnmarshalBinary(b []byte) error

UnmarshalBinary decodes the memory card from binary form

Directories

Path Synopsis
cmd
psx command

Jump to

Keyboard shortcuts

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