jmshal

package
v0.0.0-...-19051da Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorSPIViolated = errors.New("SPI interface cannot handle transaction")

Functions

This section is empty.

Types

type CPUContext

type CPUContext struct {
	DPTR uint16
	ACC  uint8
	R    [8]uint8
}

type JMSHal

type JMSHal struct {
	LogFunc func(format string, params ...any)
	// contains filtered or unexported fields
}

func New

func New(dev *scsi.SCSI, unsafe bool) (*JMSHal, error)

func (*JMSHal) CodeCall

func (d *JMSHal) CodeCall(addr uint16, ctx CPUContext) (CPUContext, error)

func (*JMSHal) CodeRead

func (d *JMSHal) CodeRead(offset uint16, buf []byte) (int, error)

func (*JMSHal) CodeWrite

func (d *JMSHal) CodeWrite(buf []byte, useVendorPath bool, useRawLoad bool) error

func (*JMSHal) DumpBootrom

func (d *JMSHal) DumpBootrom() ([]byte, error)

func (*JMSHal) FlashEraseFirmware

func (d *JMSHal) FlashEraseFirmware() error

func (*JMSHal) FlashPatchWriteAndBootFW

func (d *JMSHal) FlashPatchWriteAndBootFW(bootrom []byte, fw []byte, addHooks bool, mods []jmsmods.Mod, bootIt bool) error

This is the main function that does the whole flash procedure

func (*JMSHal) FlashReadFirmware

func (d *JMSHal) FlashReadFirmware() ([]byte, error)

func (*JMSHal) FlashWriteFirmware

func (d *JMSHal) FlashWriteFirmware(fw []byte, verify bool) error

func (*JMSHal) PatchIsCurrent

func (d *JMSHal) PatchIsCurrent() bool

func (*JMSHal) PatchVersion

func (d *JMSHal) PatchVersion() (string, string)

func (*JMSHal) RebootToPatched

func (d *JMSHal) RebootToPatched(bootrom []byte) error

func (*JMSHal) RebootToROM

func (d *JMSHal) RebootToROM() error

func (*JMSHal) ResetChip

func (d *JMSHal) ResetChip() error

func (*JMSHal) SPI

func (d *JMSHal) SPI(out []byte, in []byte) error

func (*JMSHal) SPIMaxTransactionSize

func (d *JMSHal) SPIMaxTransactionSize() int

func (*JMSHal) VersionGet

func (d *JMSHal) VersionGet() (uint32, error)

func (*JMSHal) XDATARead

func (d *JMSHal) XDATARead(offset uint16, buf []byte) (int, error)

func (*JMSHal) XDATAReadByte

func (d *JMSHal) XDATAReadByte(offset uint16) (byte, error)

func (*JMSHal) XDATAWrite

func (d *JMSHal) XDATAWrite(offset uint16, buf []byte) (int, error)

func (*JMSHal) XDATAWriteByte

func (d *JMSHal) XDATAWriteByte(offset uint16, value byte) error

Jump to

Keyboard shortcuts

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