Documentation
¶
Index ¶
- Constants
- func FindFirmwareEntryTable(firmware []byte) (uint32, error)
- func FindFirmwareEntryTableByScan(firmware []byte) (uint32, error)
- func GetAddressFromTable(romType RomType, table *FirmwareEntryTable) (uint32, error)
- func GetFlashMapping(firmwareBytes []byte, fet *FirmwareEntryTable) (uint32, error)
- type Directory
- type DirectoryEntry
- type DirectoryHeader
- type Entry
- type EntryHeader
- type FirmwareEntryTable
- type Image
- type Rom
- func ParseBHDRom(firmwareBytes []byte, table *FirmwareEntryTable, flashMapping uint32) (*Rom, error)
- func ParseNewBHDRom(firmwareBytes []byte, table *FirmwareEntryTable, flashMapping uint32) (*Rom, error)
- func ParseNewPSPRom(firmwareBytes []byte, table *FirmwareEntryTable, flashMapping uint32) (*Rom, error)
- func ParsePSPRom(firmwareBytes []byte, table *FirmwareEntryTable, flashMapping uint32) (*Rom, error)
- func ParseRoms(firmwareBytes []byte, table *FirmwareEntryTable, flashMapping uint32) ([]*Rom, []error)
- type RomType
- type TypeInfo
Constants ¶
View Source
const BHDCOOCKIE = "$BHD"
View Source
const DUALPSPCOOCKIE = "2PSP"
View Source
const DefaultFlashMapping = uint32(0xFF000000)
View Source
const FETDefaultOffset = uint32(0x20000)
View Source
const FETSignature = uint32(0x55AA55AA)
View Source
const PSPCOOCKIE = "$PSP"
View Source
const SECONDBHDCOOCKIE = "$BL2"
View Source
const SECONDPSPCOOCKIE = "$PL2"
Variables ¶
This section is empty.
Functions ¶
func FindFirmwareEntryTable ¶
Looks for the FET Signature at the often used offsets.
func FindFirmwareEntryTableByScan ¶
Looks for the FET Signature everywhere (slow)
func GetAddressFromTable ¶
func GetAddressFromTable(romType RomType, table *FirmwareEntryTable) (uint32, error)
func GetFlashMapping ¶
func GetFlashMapping(firmwareBytes []byte, fet *FirmwareEntryTable) (uint32, error)
Types ¶
type Directory ¶
type Directory struct {
Header DirectoryHeader
Entries []Entry
Location uint32
}
func ParseDirectory ¶
func (*Directory) ValidateChecksum ¶
Validates the Directory Checksum and return the actual value
type DirectoryEntry ¶
type DirectoryHeader ¶
type Entry ¶
type Entry struct {
DirectoryEntry DirectoryEntry
Header *EntryHeader
Raw []byte
Signature []byte
Comment []string
TypeInfo *TypeInfo
Version string
}
func ParseEntry ¶
func ParseEntry(firmwareBytes []byte, directoryEntry DirectoryEntry, flashMapping uint32) (*Entry, error)
type EntryHeader ¶
type EntryHeader struct {
Unknown00 [0x10]byte // 0x00
ID uint32 // 0x10
SizeSigned uint32 // 0x14
IsEncrypted uint32 // 0x18
Unknown1C uint32 // 0x1C
EncFingerprint [0x10]byte // 0x20
IsSigned uint32 // 0x30
Unknown34 uint32 // 0x34
SigFingerprint [0x10]byte // 0x38
IsCompressed uint32 // 0x48
Unknown4C uint32 // 0x4C
FullSize uint32 // 0x50
Unknown54 uint32 // 0x54
Unknown58 [0x08]byte // 0x58
Version [0x04]byte // 0x60
Unknown64 uint32 // 0x64
Unknown68 uint32 // 0x68
SizePacked uint32 // 0x6C
Unknown70 [0x10]byte // 0x70
Unknown80 [0x10]byte // 0x80
Unknown90 uint32 // 0x90
Unknown94 uint32 // 0x94
Unknown98 uint32 // 0x98
Unknown9C uint32 // 0x9C
UnknownA0 uint32 // 0xA0
UnknownA4 uint32 // 0xA4
UnknownA8 uint32 // 0xA8
UnknownAC uint32 // 0xAC
UnknownB0 [0x50]byte // 0xB0
}
type FirmwareEntryTable ¶
type FirmwareEntryTable struct {
Location uint32
Signature uint32
ImcRomBase *uint32
GecRomBase *uint32
XHCRomBase *uint32
PSPDirBase *uint32
NewPSPDirBase *uint32
BHDDirBase *uint32
NewBHDDirBase *uint32
}
func ParseFirmwareEntryTable ¶
func ParseFirmwareEntryTable(firmware []byte, address uint32) (*FirmwareEntryTable, error)
Parses the FET at the given Address Default address is 0x20000 but some PSP versions appear to be able to search on different offsets
type Image ¶
type Image struct {
FET *FirmwareEntryTable
FlashMapping *uint32
Roms []*Rom
}
func ParseImage ¶
type Rom ¶
func ParseBHDRom ¶
func ParseBHDRom(firmwareBytes []byte, table *FirmwareEntryTable, flashMapping uint32) (*Rom, error)
func ParseNewBHDRom ¶
func ParseNewBHDRom(firmwareBytes []byte, table *FirmwareEntryTable, flashMapping uint32) (*Rom, error)
func ParseNewPSPRom ¶
func ParseNewPSPRom(firmwareBytes []byte, table *FirmwareEntryTable, flashMapping uint32) (*Rom, error)
func ParsePSPRom ¶
func ParsePSPRom(firmwareBytes []byte, table *FirmwareEntryTable, flashMapping uint32) (*Rom, error)
Click to show internal directories.
Click to hide internal directories.