psx

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package psx implements access to PSX-EXE object files.

Index

Constants

This section is empty.

Variables

View Source
var (
	ExecutableSignature = [8]byte{'P', 'S', '-', 'X', ' ', 'E', 'X', 'E'}
)

Functions

func AlignTextData

func AlignTextData(exe *File, size int64)

func Print

func Print(f *File) error

Types

type File

type File struct {
	FileHeader
	Sections []*Section
}

func Open

func Open(name string) (*File, error)

func ParseFile

func ParseFile(r io.Reader) (*File, error)

func (*File) Bytes

func (f *File) Bytes() []byte

func (*File) Section

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

func (*File) SetMarker

func (f *File) SetMarker(s string) int

func (*File) Size

func (f *File) Size() int64

func (*File) String

func (f *File) String() string

func (*File) WriteFile

func (f *File) WriteFile(path string) error

type FileHeader

type FileHeader struct {
	Magic     [8]byte
	Text      uint32
	Data      uint32
	PC0       uint32
	GP0       uint32
	TextAddr  uint32
	TextSize  uint32
	DataAddr  uint32
	DataSize  uint32
	BSSAddr   uint32
	BSSSize   uint32
	StackAddr uint32
	StackSize uint32

	Reserved [20]byte

	ASCIIMarker [1972]byte
}

type Section

type Section struct {
	Name string
	Addr uint32
	Data []byte
}

func (*Section) String

func (s *Section) String() string

Jump to

Keyboard shortcuts

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