View on GitHub

ASM defines and macros

Sprite insertion tool for SMW ROM image.

Defines

Name Description
GIEPY_VER Version of GIEPY.
sa1 Whether it’s SA-1 ROM or not.
SA1 Alias for sa1.
PIXI_COMPATIBLE Whether PIXI compatible mode is enabled or not.
EXTRA_BYTES_EXT Whether Extra bytes feature is enabled or not.
g_extra_bytes_len Length of Extra bytes.
g_sprite_group Group number of sprite currently being processed.
g_sprite_number Insertion number of sprite currently being processed.
g_sprite_type Type of sprite currently being processed.
g_sprite_subtype Sub-type of sprite currently being processed.

GIEPY_VER

Version of GIEPY.

The format : (major * 10000) + (minor * 100) + (bugfix * 1)

e.g. v1.01 becomes 010001

sa1

Whether it’s SA-1 ROM or not.

It becomes not 0 when SA-1 ROM, otherwise it becomes 0.

PIXI_COMPATIBLE

Whether PIXI compatible mode is enabled or not.

It becomes not 0 when PIXI compatible mode is enabled, otherwise it becomes 0.

EXTRA_BYTES_EXT

Whether Extra bytes feature is enabled or not.

It becomes not 0 when Extra bytes feature is enabled, otherwise it becomes 0.

g_extra_bytes_len

Length of Extra bytes.

It becomes 0 when Extra bytes feature is disabled.

g_sprite_group

Group number of sprite currently being processed.

g_sprite_number

Insertion number of sprite currently being processed.

g_sprite_type

Type of sprite currently being processed.

Number Type
01 Sprite
02 Extended sprite
03 Cluster sprite

g_sprite_subtype

Sub-type of sprite currently being processed.


Macros

These macros are available in ASAR only.

Name Description
putdebug Print debug message when [!DEBUG != 0]
GiepyOnly Generate an error when PIXI compatible mode is enabled.
PixiSprite Generate an error when PIXI compatible mode is disabled.
BranchWithinAbsoluteValue  

putdebug

%putdebug(msg)

Argument Description
msg A message for print.

This macro prints debug message when DEBUG define is enabled.

e.g.

%putdebug("Hello") will be expanded to [Debug] $XXXXXX ... Hello

GiepyOnly

%GiepyOnly()

Generate an error when PIXI compatible mode is enabled.

PixiSprite

%PixiSprite()

Generate an error when PIXI compatible mode is disabled.

BranchWithinAbsoluteValue

%BranchWithinAbsoluteValue(threshold, label)

Argument Description
threshold Threshold(unsigned value)
label Branch address when A register value is within threshold

Branch to label if A register value is within threshold.