Documentation ¶
Index ¶
- Constants
- func CalcDataChecksum(data []byte) uint16
- func FBBasicBinToString(reader io.Reader) (string, error)
- func FBBasicStringToBin(s string, writer io.Writer) error
- func FBByteToString(c byte) string
- func FBStringToBytes(s string) ([]byte, error)
- type FBFile
- type FBFileInfo
- type FBFileType
- type FBNameTable
- type RawBlockType
- type TapeEncodingInfo
- type TapeReader
- func (reader *TapeReader) GetPosition() int64
- func (reader *TapeReader) NextBit() (byte, error)
- func (reader *TapeReader) NextByte() (byte, error)
- func (reader *TapeReader) NextBytes(len int) ([]byte, error)
- func (reader *TapeReader) NextBytesWithChecksum(len int) ([]byte, uint16, error)
- func (reader *TapeReader) NextFile() (*FBFile, error)
- func (reader *TapeReader) RewindBit(bit byte)
- func (reader *TapeReader) SetPosition(pos int64)
- func (reader *TapeReader) SyncToBlock() (RawBlockType, error)
- func (reader *TapeReader) VerifyBit(bit byte) error
- type TapeWriter
- func (writer *TapeWriter) Close() error
- func (writer *TapeWriter) WriteBit(bit byte) error
- func (writer *TapeWriter) WriteByte(v byte) error
- func (writer *TapeWriter) WriteBytes(buf []byte) error
- func (writer *TapeWriter) WriteBytesWithChecksum(buf []byte) error
- func (writer *TapeWriter) WriteFile(file FBFile) error
- func (writer *TapeWriter) WritePulse(length int) error
- func (writer *TapeWriter) WriteSilence(length float64) error
Constants ¶
View Source
const ( RawBlockUnknown RawBlockType = iota RawBlockInfo RawBlockData FileTypeBasic FBFileType = 2 FileTypeBgGraphics FBFileType = 3 )
View Source
const ( FBNameTableOffsetX = 2 FBNameTableOffsetY = 3 FBNameTableWidth = 28 FBNameTableHeight = 21 )
View Source
const (
FAMICOM_FREQUENCY = 1789773
)
Variables ¶
This section is empty.
Functions ¶
func CalcDataChecksum ¶
func FBByteToString ¶
func FBStringToBytes ¶
Types ¶
type FBFile ¶
type FBFile struct { Info FBFileInfo Data []byte }
type FBFileInfo ¶
type FBFileInfo struct { Type FBFileType Name [16]byte Reserved1 byte Length uint16 LoadAddress uint16 ExecutionAddress uint16 Pad [104]byte }
func (FBFileInfo) MarshalBinary ¶
func (i FBFileInfo) MarshalBinary() ([]byte, error)
func (FBFileInfo) NameStr ¶
func (i FBFileInfo) NameStr() string
func (*FBFileInfo) SetName ¶
func (i *FBFileInfo) SetName(s string)
func (*FBFileInfo) UnmarshalBinary ¶
func (i *FBFileInfo) UnmarshalBinary(buf []byte) error
type FBFileType ¶
type FBFileType uint8
func (FBFileType) String ¶
func (tp FBFileType) String() string
type FBNameTable ¶
func NewFBNameTable ¶
func NewFBNameTable() FBNameTable
func (*FBNameTable) GetString ¶
func (f *FBNameTable) GetString(x, y int) string
func (*FBNameTable) PutString ¶
func (f *FBNameTable) PutString(x, y int, tileString string)
type RawBlockType ¶
type RawBlockType uint8
type TapeEncodingInfo ¶
type TapeEncodingInfo struct { CyclesPerByte int ShortPulseWidth int LongPulseWidth int SyncMinPulseCount int PulseTolerance float32 }
func NewTapeEncodingInfo ¶
func NewTapeEncodingInfo() TapeEncodingInfo
func (*TapeEncodingInfo) TapeFrequency ¶
func (info *TapeEncodingInfo) TapeFrequency() float64
type TapeReader ¶
type TapeReader struct {
// contains filtered or unexported fields
}
func NewTapeReader ¶
func NewTapeReader(reader io.ReadSeeker, encInfo TapeEncodingInfo) (*TapeReader, error)
func (*TapeReader) GetPosition ¶
func (reader *TapeReader) GetPosition() int64
func (*TapeReader) NextBit ¶
func (reader *TapeReader) NextBit() (byte, error)
func (*TapeReader) NextByte ¶
func (reader *TapeReader) NextByte() (byte, error)
func (*TapeReader) NextBytesWithChecksum ¶
func (reader *TapeReader) NextBytesWithChecksum(len int) ([]byte, uint16, error)
func (*TapeReader) NextFile ¶
func (reader *TapeReader) NextFile() (*FBFile, error)
func (*TapeReader) RewindBit ¶
func (reader *TapeReader) RewindBit(bit byte)
func (*TapeReader) SetPosition ¶
func (reader *TapeReader) SetPosition(pos int64)
func (*TapeReader) SyncToBlock ¶
func (reader *TapeReader) SyncToBlock() (RawBlockType, error)
func (*TapeReader) VerifyBit ¶
func (reader *TapeReader) VerifyBit(bit byte) error
type TapeWriter ¶
type TapeWriter struct {
// contains filtered or unexported fields
}
func NewTapeWriter ¶
func NewTapeWriter(writer io.WriteSeeker, encInfo TapeEncodingInfo, frequency int) (*TapeWriter, error)
func (*TapeWriter) Close ¶
func (writer *TapeWriter) Close() error
func (*TapeWriter) WriteBit ¶
func (writer *TapeWriter) WriteBit(bit byte) error
func (*TapeWriter) WriteByte ¶
func (writer *TapeWriter) WriteByte(v byte) error
func (*TapeWriter) WriteBytes ¶
func (writer *TapeWriter) WriteBytes(buf []byte) error
func (*TapeWriter) WriteBytesWithChecksum ¶
func (writer *TapeWriter) WriteBytesWithChecksum(buf []byte) error
func (*TapeWriter) WriteFile ¶
func (writer *TapeWriter) WriteFile(file FBFile) error
func (*TapeWriter) WritePulse ¶
func (writer *TapeWriter) WritePulse(length int) error
func (*TapeWriter) WriteSilence ¶
func (writer *TapeWriter) WriteSilence(length float64) error
Click to show internal directories.
Click to hide internal directories.