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 = 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 ¶
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
Click to show internal directories.
Click to hide internal directories.