Skip to content

BizHawk WCH Importer File Comment Format Specification

The purpose of this document is to clarify the preferred comment format for WCH files when used with the Crowd Control SDK’s WCH Import Tool.

Definitions

For this document:

When {BRACES} are used, this is meant as an insertion. For example, “Cats are {ADJECTIVE}” could be satisfied by “Cats are fluffy”.

When [BRACKETS] are used, they denote an optional component.

Format

The comment follows the following format:

=> {NAME} ; {BODY}

The expression as a whole consists of two parts, NAME and BODY separated by a semicolon.

e.g. Kill Player ; poke to 0

{NAME} => .+\s*

The name is any expression with any amount of whitespace at the end. Bear in mind that the evaluation as part of the outer expression means that semicolons cannot be used in the name.

e.g. Kill Player, Give 10 Lives

{BODY} => poke to {VALUE}

The poke body consists of a value for the address to be set to.

e.g. poke to 0xA0

{BODY} => freeze to {VALUE} [for {DURATION}]

The freeze body consists of a value for the address to be frozen to followed by an optional duration.

e.g. freeze to 0x0F for 30 seconds

{BODY} => add|increment {VALUE}

The add body consists of a value to be added to the value at the address.

e.g. add 0x03, add 7, increment 1

{BODY} => subtract|decrement {VALUE}

The add body consists of a value to be subtracted from the value at the address.

e.g. subtract 0x03, subtract 7, decrement 1

{DURATION} => {AMOUNT} {UNIT}

The duration consists of an amount followed by a unit of time.

e.g. 5 minutes, 3 seconds

{AMOUNT} => \d+

The amount of a duration is any whole number greater than or equal to 0.

e.g. 1, 5, 60

{UNIT} => seconds|minutes

The unit of a duration may be either seconds or minutes.

e.g. seconds, minutes