bundle

package
v0.0.0-prerelease Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Magic = "BUND"

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Raw    asn1.RawContent
	Name   asn1.RawValue
	Type   int
	Offset int
	Size   int
}

func (Asset) String

func (h Asset) String() string

type Bundle

type Bundle struct {
	Header
	TypeHeader any
	Config     Config
	Files      []File
	// contains filtered or unexported fields
}

func Open

func Open(filename string) (*Bundle, error)

func Parse

func Parse(r io.ReadSeeker) (*Bundle, error)

func (*Bundle) Close

func (b *Bundle) Close() error

func (*Bundle) DumpFiles

func (b *Bundle) DumpFiles(output string) error

func (*Bundle) ParseFiles

func (b *Bundle) ParseFiles() error

func (Bundle) String

func (b Bundle) String() string

type Compartment

type Compartment struct {
	Raw      asn1.RawContent
	AppUID   int
	Metadata []metadata
}

type Config

type Config struct {
	Unk1         int
	Unk2         int
	Assets       []Asset
	TOC          []TocEntry
	Compartments []Compartment
}

type Endpoint

type Endpoint struct {
	Type int
	Unk1 asn1.RawValue
	Unk2 asn1.RawValue
	Name asn1.RawValue
}

func (Endpoint) String

func (e Endpoint) String() string

type File

type File struct {
	Name      string
	Type      string
	Segments  []Segment
	Sections  []Section
	Endpoints []Endpoint
	Extra     map[string]any
}

func (File) Segment

func (f File) Segment(name string) *Segment

func (File) String

func (f File) String() string
type Header struct {
	Unknown1 uint16 // 0x0200
	Unknown2 uint16 // 0x1400

	Magic [4]byte // "BUND"

	Type uint16 // 3 (AOP/DCP), 4 (ExclaveCore)
	// contains filtered or unexported fields
}

type Section

type Section struct {
	Name   string
	Offset uint64
	Size   uint64
}

type Segment

type Segment struct {
	Name   string
	Offset uint64
	Size   uint64
}

type TocEntry

type TocEntry struct {
	Index int
	Entry asn1.RawValue `asn1:"optional"`
}

func (TocEntry) GetEntry

func (t TocEntry) GetEntry() *TocEntryType

func (TocEntry) String

func (t TocEntry) String() string

type TocEntryType

type TocEntryType struct {
	Name asn1.RawValue
	Type int
}

type Type3

type Type3 struct {
	UUID types.UUID

	SubType uint64

	FileSz uint64

	EndOff  uint64
	DataOff uint64 // roottask __DATA offset

	KernelDataOffset uint64 // 2D0C000h

	TextOff      uint64 // roottask __TEXT offset
	UnkSz        uint64
	TextOffAgain uint64 // ???
	TextSz       uint64 // is x14000 again
	UnkSzMaybe   uint64 // 2CF8000h

	UnkOffMaybe   uint64 // 5FC000h
	UnkNumOfImgs  uint64 // C0000000h ? maybe just 0xC == 11 ?
	What          uint64 // C0035404h
	UnkSz2        uint64 // 5FC000h
	Something     uint64 // 26FC000h
	KernelDataOff uint64 // 2D0C000h
	SomeSize2     uint64 // 334000h

	AnotherSz uint64 // 30000h ?

	YouAgain    uint64 // 30000h ?
	UnkSize4    uint64 // 74000h ?
	UnkSize5    uint64 // 40000h ?
	HelpMe      uint64 // C05FC000h ?
	UnkSize6    uint64 // 264000h ?
	Nooooooo    uint64 // 14000h ???
	SweetBaaaby uint64 // C0670000h ??
	ImDead      uint64 // 70000h ??

	Aaaagain      uint64 // 70000h ??
	UnkOffset6    uint64 // 2BC000h ???
	UnkOffset7    uint64 // 2D0C000h ???
	UnkOffset8    uint64 // 334000h ???
	Aaaaaaaaaagin uint64 // 70000h ???

	Aaaaaaaaaagin2 uint64 // 70000h ???
	UnkOffset9     uint64 // 2BC000h ???
	UnkOffset10    uint64 // 32C000h ???
	FooterOffset   uint64
	FooterSz       uint64
	// contains filtered or unexported fields
}

type Type4

type Type4 struct {
	Unk0 uint32 // 1
	Unk1 uint32 // 0xc == 11

	Unk2 uint64 // F000h

	Unk3 uint64 // C000h

	Unk4 uint64 // 3 ?

	Unk5 uint64 // 16000h ?

	NumRanges uint64     // 0xD == 12 ?
	UUID      types.UUID // 636B62C3-4647-34F7-9089-A58256078A27

	Unk7      uint64 // 14000h ?
	Unk7again uint64 // 14000h ?
	Unk8      uint64 // 8000000h ?
	Unk9      uint64 // 1 ?

	Unk10      uint64 // C000h ?
	Unk10again uint64 // C000h ?
	Unk11      uint64 // 8014000h ?
	Unk12      uint64 // 4 ?

	Unk13 uint64 // 8020000h ?
	Unk14 uint64 // 6 ?
	Unk15 uint64 // 8003E80h ?

	Unk17 uint64 // 0xa == 10 ?

	Unk18 uint64 // 16000h ?
	Unk19 uint64 // 1582Ch ?

	Unk20 uint64 // 0xa == 10 ?

	Unk21  uint64         // F000h ?
	Ranges [0xD]typ4Range // FIXME: this should be read AFTER the Type4 header is read
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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