anago script file reference - common
Anago uses Squirrel 2.1.2 as its script engine, which highly resembles C style. (Please note that the current version of Squirrel will output 'unknown error' whenever resuming a thread. Squirrel 2.1.x does not have this problem. If you have a solution to this bug, please let me know.)
special variables and constants
First argument is assigned 'd' in many functions. 'd' is userpointer, which is needed for executing internal control commands. 'd' is used to give argument to functions.
This defines parameters for the target cartridge. Members of the board will depend on the script mode.
It is assigned 0x20000 as a constant. This is useful for defining members of the board.
function cpu_write(d, address, data)
This is used to write control registers on the cartridge. Writing data length is 1 byte.