Versions in this module Expand all Collapse all v0 v0.0.3 Jul 25, 2024 Changes in this version type MDPalette + func (palette *MDPalette) Size() int v0.0.2 Jul 25, 2024 v0.0.1 Jul 25, 2024 Changes in this version + func DecodeSJIS(sjis []byte) string + func EncodeSJIS(s string) []byte + type MDColor struct + A uint8 + B uint8 + G uint8 + R uint8 + func NewMDColor() *MDColor + func (mdcolor *MDColor) FromValue(v uint16) + func (mdcolor *MDColor) ToRGBA() color.RGBA + func (mdcolor *MDColor) ToValue() uint16 + type MDCompressor interface + Marshal func() []byte + Unmarshal func() []byte + func NewMDCompressor(algorithm string, rom generic.ROM) MDCompressor + type MDCompressor_SEGARD struct + ROM generic.ROM + func (segard *MDCompressor_SEGARD) Marshal() []byte + func (segard *MDCompressor_SEGARD) Unmarshal() []byte + type MDHeader struct + Checksum uint16 + Copyright string + Devices string + DomesticTitle string + InternationalTitle string + Modem string + RAMEndAddress uint32 + RAMStartAddress uint32 + ROMEndAddress uint32 + ROMStartAddress uint32 + Region string + Reserved1 [40]byte + Reserved2 [13]byte + SRAMEndAddress uint32 + SRAMStartAddress uint32 + SRAMType [4]byte + SerialNumber string + Type string + func (header *MDHeader) Marshal() []byte + func (header *MDHeader) Unmarshal(data []byte) + type MDPCM struct + Channels int + SampleRate int + func (pcm *MDPCM) FromWAV(data []byte) ([]byte, error) + func (pcm *MDPCM) ToWAV(data []byte) ([]byte, error) + type MDPalette struct + Colors []MDColor + func NewMDPalette(data []byte) (palette *MDPalette) + type MDROM struct + Header MDHeader + func NewMDROM(filename string) (mdrom *MDROM, err error) + func (rom *MDROM) Init() + func (rom *MDROM) UpdateChecksum() + func (rom *MDROM) UpdateHeader() + type MDRawHeader struct + Checksum [2]byte + Copyright [16]byte + Devices [16]byte + DomesticTitle [48]byte + InternationalTitle [48]byte + Modem [12]byte + RAMEndAddress [4]byte + RAMStartAddress [4]byte + ROMEndAddress [4]byte + ROMStartAddress [4]byte + Region [3]byte + Reserved1 [40]byte + Reserved2 [13]byte + SRAMEndAddress [4]byte + SRAMStartAddress [4]byte + SRAMType [4]byte + SerialNumber [14]byte + Type [16]byte + type MDTiles struct + Bpp int + Height int + Raw []byte + Width int + func NewMDTiles(data []byte, width int, bpp int) *MDTiles + func (tiles *MDTiles) FromData(data []byte) + func (tiles *MDTiles) ReadPixel(x, y int) (value byte) + func (tiles *MDTiles) ToPNG(mdpalette MDPalette) (img *image.RGBA)