anago script file reference - common

Syntax

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

d

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.

board

This defines parameters for the target cartridge. Members of the board will depend on the script mode.

mega

It is assigned 0x20000 as a constant. This is useful for defining members of the board.

functions

cpu_write()

function cpu_write(d, address, data)

Arguments

  • d: userpointer
  • address: target address. Available address range are 0x4200 to 0xffff.
  • data: writing data

Returns

nothing

Description

This is used to write control registers on the cartridge. Writing data length is 1 byte.