Documentation ¶
Overview ¶
Package disassembly facilitates the disassembly of any coprocessor program in compatible ROM.
Should not be confused with the disassembly package in the project root, which handles disassembly of the 6507 program. Also not to be confused with the SourceDisasm type in the coprocessor.developer package.
Index ¶
- type Cartridge
- type DisasmEntries
- type Disassembly
- func (dsm *Disassembly) AttachCartridge(cart Cartridge)
- func (dsm *Disassembly) BorrowDisassembly(f func(*DisasmEntries))
- func (dsm *Disassembly) Enable(enable bool)
- func (dsm *Disassembly) End(summary coprocessor.CartCoProcDisasmSummary)
- func (dsm *Disassembly) Inhibit(inhibit bool)
- func (dsm *Disassembly) IsEnabled() bool
- func (dsm *Disassembly) Start()
- func (dsm *Disassembly) Step(entry coprocessor.CartCoProcDisasmEntry)
- type TV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cartridge ¶ added in v0.25.0
type Cartridge interface {
GetCoProcBus() coprocessor.CartCoProcBus
}
Cartridge defines the interface to the cartridge required by the coprocessor disassembly pacakge
type DisasmEntries ¶
type DisasmEntries struct { Enabled bool Entries map[string]coprocessor.CartCoProcDisasmEntry Keys []string // sorted keys into the disasm map LastExecution []coprocessor.CartCoProcDisasmEntry LastExecutionSummary coprocessor.CartCoProcDisasmSummary LastStart coords.TelevisionCoords }
DisasmEntries contains all the current information about the coprocessor disassembly, including whether disassembly is currently enabled.
type Disassembly ¶
type Disassembly struct {
// contains filtered or unexported fields
}
Disassembly is used to handle the disassembly of instructions from an attached cartridge that contains a coprocessor.
func NewDisassembly ¶
func NewDisassembly(tv TV) Disassembly
NewDisassembly returns a new Coprocessor instance if cartridge implements the coprocessor bus.
func (*Disassembly) AttachCartridge ¶ added in v0.20.0
func (dsm *Disassembly) AttachCartridge(cart Cartridge)
func (*Disassembly) BorrowDisassembly ¶
func (dsm *Disassembly) BorrowDisassembly(f func(*DisasmEntries))
BorrowDisasm will lock the DisasmEntries structure for the durction of the supplied function, which will be executed with the disasm structure as an argument.
Should not be called from the emulation goroutine.
func (*Disassembly) Enable ¶
func (dsm *Disassembly) Enable(enable bool)
Enable or disable coprocessor disassembly. We retain the disassembly (including last execution) already gathered but the LastExecution field is cleared on disable. The general disassembly is maintained.
func (*Disassembly) End ¶
func (dsm *Disassembly) End(summary coprocessor.CartCoProcDisasmSummary)
End implements the CartCoProcDisassembler interface.
func (*Disassembly) Inhibit ¶ added in v0.19.3
func (dsm *Disassembly) Inhibit(inhibit bool)
Inhibit should be used to temporarily disable disassembly functionality. IsEnabled() will still return true as appropriate regardless of inhibit state.
func (*Disassembly) IsEnabled ¶
func (dsm *Disassembly) IsEnabled() bool
IsEnabled returns true if coprocessor disassembly is currently active.
func (*Disassembly) Start ¶
func (dsm *Disassembly) Start()
Start implements the CartCoProcDisassembler interface.
func (*Disassembly) Step ¶
func (dsm *Disassembly) Step(entry coprocessor.CartCoProcDisasmEntry)
Step implements the CartCoProcDisassembler interface.
type TV ¶
type TV interface {
AdjCoords(adj television.Adj, amount int) coords.TelevisionCoords
}
TV defines the interface to the TV required by the coprocessor disassembly package