17.5.2. Modifier Plugins

With modifiers you modify the outputted bytes from a section of the code. E.g the following will send the memory block starting at $8080 the the modifier called 'MyModifier' and the returned bytes will be used instead:

.modify MyModifier(27) {
    inc $d020
    jmp main

You implement a modifier by implementing the following interface. The 'name' in the definition is the modifier name ('MyModifier' in the above example.):

public interface IModifier extends IPlugin {
   ModifierDefinition getDefinition();
   byte[] execute(List<IMemoryBlock> memoryBlocks, IValue[] parameters, IEngine engine);

public class ModifierDefinition {
   private String name;

   // Getters and setters

Also see the chapter on modifiers.