Scripts allow performing scheduled operations.

I mainly use scripts, more than 400, to validate emulator behaviour (Read disks, write disks, read tape, execute demos...).


Script example to press and release SHIFT + 'Q' key:
KeyDown=21
KeyDown=67
Wait=100
KeyUp=all

All actions are performed at once until an action is expecting some time (e.g. Wait).

Label are defined using ':' before label title in a single line.
Comment can be added using ';' to start comment until end of line.



Available instructions:
=============

- Press a key:
Command: keydown=XX
with XX the key code

- Release a key:
Command: keyup=XX
with XX the key code or "all" for all keys 

- Wait a while:
Command: wait=XX
with XX duration in ms

- Write a byte in RAM:
Command: poke=XXXX,YY
with XXXX the address in decimal (use & for hexa).
with YY the value in decimal (use & for hexa).

- Test byte in RAM and branch to label if different:
- Test byte in RAM and branch to label if equal:
Command: diff=XXXX,YY,ZZ:label
Command: equal=XXXX,YY,ZZ:label
with XXXX the address in decimal (use & for hexa).
with YY the value in decimal (use & for hexa).
with ZZ the mask in decimal (use & for hexa).

- Pause emulator:
Command: pause
Script is paused while emulator is paused.

- Terminate script:
Command: end

- Swap drives A and B:
Command: swapdrives

- Flip sides of drive A:
Command: flipsides

- Load disk into drive A:
- Load disk into drive B:
Command: drivea=filename
Command: driveb=filename
Disk image should be located into default disk folder.

- Eject Drive A
Command: ejecta

- Eject Drive B
Command: ejectb

- Load tape
Command: tape=filename
Tape image should be located into default tape folder.

- Play Tape
Command: tapeplay

- Stop Tape
Command: tapestop

- Reset Emulator
Command: reset

- Exit Emulator
Command: exit=XX
with XX the return code

- Press Multiface 2 STOP button
Command: mf2stop

- Press Multiface 2 RESET button
Command: mf2reset

- Copy file from A to B
Command: copyfile=filename
