public interface CPU extends Plugin
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CPU.CPUListener
The listener interface for receiving CPU events.
|
static class |
CPU.RunState
The run state of the CPU.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCPUListener(CPU.CPUListener listener)
Adds the specified CPU listener to receive CPU events from this CPU.
|
void |
execute()
Runs CPU emulation.
|
Disassembler |
getDisassembler()
Get disassembler object.
|
int |
getInstructionPosition()
Get actual instruction position (before its execution).
|
JPanel |
getStatusPanel()
Get CPU status panel.
|
boolean |
isBreakpointSet(int memLocation)
Determine if a breakpoint is set at a memory location.
|
boolean |
isBreakpointSupported()
Determine whether breakpoints are supported by CPU.
|
void |
pause()
Pauses the CPU emulation.
|
boolean |
removeCPUListener(CPU.CPUListener listener)
Removes the specified CPU listener so that it no longer receives CPU
events from this CPU.
|
void |
reset(int startAddress)
Perform reset of the CPU with specific starting address.
|
void |
setBreakpoint(int memLocation)
Set a breakpoint at a memory location.
|
boolean |
setInstructionPosition(int pos)
Set new actual instruction position (that will be executed as next).
|
void |
step()
Perform one step of CPU emulation.
|
void |
stop()
Stops the CPU emulation.
|
void |
unsetBreakpoint(int memLocation)
Unset a breakpoint at a memory location.
|
destroy, getTitle, getVersion, initialize, isShowSettingsSupported, reset, showSettingsboolean addCPUListener(CPU.CPUListener listener)
null, no exception is thrown and no action is
performed.listener - the CPU listenerboolean removeCPUListener(CPU.CPUListener listener)
null, no exception is
thrown and no action is performed.listener - the CPU listener to be removedvoid step()
void execute()
step().
A good CPU should performs right timing for instructions here.
Debug window should not be updated after each instruction execution,
in order to the execution loop would be faster.void pause()
void stop()
step(), pause(),
execute() until user resets the CPU. Debug window in main
module should be updated with saved CPU state.JPanel getStatusPanel()
boolean isBreakpointSupported()
void setBreakpoint(int memLocation)
memLocation - memory location where the breakpoint will be setisBreakpointSupported()void unsetBreakpoint(int memLocation)
memLocation - memory location from where the breakpoint will be unsetisBreakpointSupported()boolean isBreakpointSet(int memLocation)
memLocation - memory location, from where the breakpoint will be determinedisBreakpointSupported()void reset(int startAddress)
Plugin.reset() methodstartAddress - Starting address/memory position of the program counterint getInstructionPosition()
boolean setInstructionPosition(int pos)
pos - new address of actual instructionDisassembler getDisassembler()
Copyright © 2017. All rights reserved.