Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ $$($(1)_DIR)/%.o: %.s

$$($(1)_DIR)/%.o: %.c
@mkdir -p $$(dir $$@)
$$(CPP) -E -lang-c -nostdinc -Iinclude $$< -o $$($(1)_DIR)/$$(*F).i && \
$$(CPP) -E -lang-c -nostdinc -Iinclude $$(if $$(wildcard include/effect/params/$(1)),-Iinclude/effect/params/$(1)) $$< -o $$($(1)_DIR)/$$(*F).i && \
$$(if $$(filter $$<,$$(PSYQ43_SRCS)), \
$$(PSYQ43_CC1) -quiet $$(CC_FLAGS) $$($(1)_DIR)/$$(*F).i -o $$($(1)_DIR)/$$(*F).s && \
cat $$($(1)_DIR)/$$(*F).s | $$(MASPSX) $$(PSYQ43_MASPSXFLAGS) $$(call expand_div,$(1),$$<) --run-assembler $$(ASFLAGS) -o $$@, \
Expand Down
62 changes: 57 additions & 5 deletions config/ff8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -676,13 +676,22 @@ binaries:
options:
target_path: original/effect/effect_001.bin
src_path: src/effect
section_order: [.text, .rodata, .data, .bss]
segments:
- name: effect_001
type: code
start: 0x0
vram: 0x801A0000
subsegments:
- [0x0, c, effect_001]
- [0x0, c, effect_001_entry]
- [0x1F0, c, lib/common]
- [0x960, c, lib/aim]
- [0xAD8, c, lib/entity]
- [0x1648, c, lib/sprite]
- [0x16E4, c, lib/step]
- [0x172C, c, effect_001_anim]
- [0x181C, c, lib/render]
- [0x2E48, c, effect_001]
- [0x4614, .rodata, effect_001]
# The overlay's data, cut at every address the code names. The TIM parses
# to exactly 0x2532C, where the five prim source tables begin.
Expand Down Expand Up @@ -1039,14 +1048,33 @@ binaries:
options:
target_path: original/effect/effect_025.bin
src_path: src/effect
section_order: [.text, .rodata, .data, .bss]
segments:
- name: effect_025
type: code
start: 0x0
vram: 0x801A0000
subsegments:
- [0x0, c, effect_025]
- [0x8304, .rodata, effect_025]
- [0x0, c, effect_025_entry]
- [0x14C, c, lib/common]
- [0x8BC, c, lib/aim]
- [0xA34, c, lib/heading]
- [0xA64, c, lib/scatter]
- [0xB6C, c, lib/render]
- [0x2198, c, lib/entity]
- [0x2D08, c, lib/emit_mode]
- [0x4BFC, c, effect_025_scroll]
- [0x4F44, c, lib/sprite]
- [0x4FE0, c, effect_025_anim]
- [0x5204, c, lib/step]
- [0x524C, c, effect_025_motes]
- [0x5CEC, c, lib/fill]
- [0x5D10, c, lib/rot]
- [0x5F14, c, lib/pose]
- [0x6910, c, lib/interpolate]
- [0x6A00, c, effect_025]
- [0x8304, .rodata, effect_025_motes]
- [0x8344, .rodata, effect_025]
- [0x83D0, bin, effect_025]
- [0x33EA4]
- name: effect_026
Expand Down Expand Up @@ -1084,14 +1112,38 @@ binaries:
options:
target_path: original/effect/effect_028.bin
src_path: src/effect
section_order: [.text, .rodata, .data, .bss]
segments:
- name: effect_028
type: code
start: 0x0
vram: 0x801A0000
subsegments:
- [0x0, c, effect_028]
- [0x9EFC, .rodata, effect_028]
- [0x0, c, effect_028_entry]
- [0x208, c, lib/common]
- [0x978, c, lib/rotz]
- [0xB04, c, lib/heading]
- [0xB34, c, lib/entity]
- [0x16A4, c, lib/tint]
- [0x1980, c, lib/vector]
- [0x20EC, c, lib/emit]
- [0x3F20, c, lib/packet]
- [0x4128, c, lib/particlestep]
- [0x541C, c, lib/particlealloc]
- [0x5538, c, lib/draw]
- [0x6194, c, lib/emitteralloc]
- [0x62B4, c, lib/spawn]
- [0x8068, c, lib/list]
- [0x8684, c, lib/trail]
- [0x87F8, c, lib/strands]
- [0x8CE4, c, lib/tables]
- [0x8FF8, c, lib/bankclear]
- [0x9050, c, lib/drawscript]
- [0x94B4, c, effect_028]
- [0x9EFC, .rodata, lib/particlestep]
- [0x9F10, pad]
- [0x9F14, .rodata, lib/list]
- [0x9F40, .rodata, effect_028]
- [0x9FA0, bin, effect_028]
- [0x3CCB0]
- name: effect_029
Expand Down
49 changes: 49 additions & 0 deletions config/symbols.effect_001.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
effectTextInit = 0x801A01F0; // type:func
effectTextHex = 0x801A0340; // type:func
effectTextNewline = 0x801A03EC; // type:func
effectNop = 0x801A040C; // type:func
effectDrawQuad128 = 0x801A0414; // type:func
effectDrawQuad256 = 0x801A0510; // type:func
effectMatrixIdentity = 0x801A060C; // type:func
effectMatrixRotX = 0x801A0644; // type:func
effectMatrixRotY = 0x801A07D4; // type:func
effectMatrixAim = 0x801A0960; // type:func
effectMatrixLookAt = 0x801A0A6C; // type:func
effectReleaseWait = 0x801A0AD8; // type:func
effectSpawnTask = 0x801A0B00; // type:func
effectCacheSlotAnchors = 0x801A0C8C; // type:func
effectSlotAnchor0 = 0x801A0DC0; // type:func
effectSlotAnchor1 = 0x801A0DF0; // type:func
effectSlotAnchorMid = 0x801A0E20; // type:func
effectCacheAnimSlotAnchors = 0x801A0E50; // type:func
effectAnimSlotAnchor0 = 0x801A0F8C; // type:func
effectAnimSlotAnchor1 = 0x801A0FBC; // type:func
effectAnimSlotAnchorMid = 0x801A0FEC; // type:func
effectUpdateModelBounds = 0x801A101C; // type:func
effectGetModelBounds = 0x801A1268; // type:func
effectModelRadius = 0x801A12B8; // type:func
effectModelHalfHeight = 0x801A135C; // type:func
effectModelHalfWidth = 0x801A138C; // type:func
effectModelHeight = 0x801A13E4; // type:func
effectModelTop = 0x801A1408; // type:func
effectModelBottom = 0x801A1450; // type:func
effectModelRandomY = 0x801A1498; // type:func
effectModelCentreY = 0x801A1550; // type:func
effectModelCentre = 0x801A15A4; // type:func
effectZeroWords = 0x801A1610; // type:func
effectDrawSprite = 0x801A1648; // type:func
effectStepCounter = 0x801A16E4; // type:func
effectRenderSetPose = 0x801A181C; // type:func
effectRenderPoseJoints = 0x801A1960; // type:func
effectRebasePointers = 0x801A1A0C; // type:func
effectRenderFaceCamera = 0x801A1A4C; // type:func
effectRenderReset = 0x801A1D38; // type:func
effectRenderSetTexture = 0x801A1DF4; // type:func
effectRenderMesh = 0x801A1EBC; // type:func
effectRenderModel = 0x801A2D0C; // type:func
g_effectPrimCursor = 0x801C58F4;
g_effectHexGlyphs = 0x801D5D00;
g_effectTextX = 0x801D5D14;
g_effectTextY = 0x801D5D18;
g_effectTextColour = 0x801D5D1C;
g_effectJointOffsets = 0x801D5D20;
72 changes: 72 additions & 0 deletions config/symbols.effect_025.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
effectTextInit = 0x801A014C; // type:func
effectTextHex = 0x801A029C; // type:func
effectTextNewline = 0x801A0348; // type:func
effectNop = 0x801A0368; // type:func
effectDrawQuad128 = 0x801A0370; // type:func
effectDrawQuad256 = 0x801A046C; // type:func
effectMatrixIdentity = 0x801A0568; // type:func
effectMatrixRotX = 0x801A05A0; // type:func
effectMatrixRotY = 0x801A0730; // type:func
effectMatrixAim = 0x801A08BC; // type:func
effectMatrixLookAt = 0x801A09C8; // type:func
effectMatrixHeading = 0x801A0A34; // type:func
effectScatter = 0x801A0A64; // type:func
effectRenderSetPose = 0x801A0B6C; // type:func
effectRenderPoseJoints = 0x801A0CB0; // type:func
effectRebasePointers = 0x801A0D5C; // type:func
effectRenderFaceCamera = 0x801A0D9C; // type:func
effectRenderReset = 0x801A1088; // type:func
effectRenderSetTexture = 0x801A1144; // type:func
effectRenderMesh = 0x801A120C; // type:func
effectRenderModel = 0x801A205C; // type:func
effectReleaseWait = 0x801A2198; // type:func
effectSpawnTask = 0x801A21C0; // type:func
effectCacheSlotAnchors = 0x801A234C; // type:func
effectSlotAnchor0 = 0x801A2480; // type:func
effectSlotAnchor1 = 0x801A24B0; // type:func
effectSlotAnchorMid = 0x801A24E0; // type:func
effectCacheAnimSlotAnchors = 0x801A2510; // type:func
effectAnimSlotAnchor0 = 0x801A264C; // type:func
effectAnimSlotAnchor1 = 0x801A267C; // type:func
effectAnimSlotAnchorMid = 0x801A26AC; // type:func
effectUpdateModelBounds = 0x801A26DC; // type:func
effectGetModelBounds = 0x801A2928; // type:func
effectModelRadius = 0x801A2978; // type:func
effectModelHalfHeight = 0x801A2A1C; // type:func
effectModelHalfWidth = 0x801A2A4C; // type:func
effectModelHeight = 0x801A2AA4; // type:func
effectModelTop = 0x801A2AC8; // type:func
effectModelBottom = 0x801A2B10; // type:func
effectModelRandomY = 0x801A2B58; // type:func
effectModelCentreY = 0x801A2C10; // type:func
effectModelCentre = 0x801A2C64; // type:func
effectZeroWords = 0x801A2CD0; // type:func
effectEmitTris = 0x801A2D08; // type:func
effectEmitQuads = 0x801A2FE8; // type:func
effectEmitTexTris = 0x801A3320; // type:func
effectEmitTexQuads = 0x801A36B4; // type:func
effectEmitGouraudTris = 0x801A3AAC; // type:func
effectEmitGouraudQuads = 0x801A3DD4; // type:func
effectEmitGouraudTexTris = 0x801A4174; // type:func
effectEmitGouraudTexQuads = 0x801A4548; // type:func
effectEmitMesh = 0x801A49A8; // type:func
effectDrawSprite = 0x801A4F44; // type:func
effectStepCounter = 0x801A5204; // type:func
effectFillWords = 0x801A5CEC; // type:func
effectMatrixSetRotX = 0x801A5D10; // type:func
effectMatrixSetRotY = 0x801A5D8C; // type:func
effectMatrixSetRotZ = 0x801A5E08; // type:func
effectMatrixSetRotZXY = 0x801A5E84; // type:func
effectPoseInit = 0x801A5F14; // type:func
effectPoseFindShorts = 0x801A6094; // type:func
effectPoseFindWords = 0x801A60FC; // type:func
effectPoseStepChannel = 0x801A6164; // type:func
effectPoseWalk = 0x801A6354; // type:func
effectInterpolateFrames = 0x801A6910; // type:func
g_effectPrimCursor = 0x801D3EB8;
g_effectHexGlyphs = 0x801ED404;
g_effectTextX = 0x801ED418;
g_effectTextY = 0x801ED41C;
g_effectTextColour = 0x801ED420;
g_effectJointOffsets = 0x801ED424;
g_effectDrawMode = 0x801EEA0C;
113 changes: 113 additions & 0 deletions config/symbols.effect_028.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
effectTextInit = 0x801A0208; // type:func
effectTextHex = 0x801A0358; // type:func
effectTextNewline = 0x801A0404; // type:func
effectNop = 0x801A0424; // type:func
effectDrawQuad128 = 0x801A042C; // type:func
effectDrawQuad256 = 0x801A0528; // type:func
effectMatrixIdentity = 0x801A0624; // type:func
effectMatrixRotX = 0x801A065C; // type:func
effectMatrixRotY = 0x801A07EC; // type:func
effectMatrixRotZ = 0x801A0978; // type:func
effectMatrixHeading = 0x801A0B04; // type:func
effectReleaseWait = 0x801A0B34; // type:func
effectSpawnTask = 0x801A0B5C; // type:func
effectCacheSlotAnchors = 0x801A0CE8; // type:func
effectSlotAnchor0 = 0x801A0E1C; // type:func
effectSlotAnchor1 = 0x801A0E4C; // type:func
effectSlotAnchorMid = 0x801A0E7C; // type:func
effectCacheAnimSlotAnchors = 0x801A0EAC; // type:func
effectAnimSlotAnchor0 = 0x801A0FE8; // type:func
effectAnimSlotAnchor1 = 0x801A1018; // type:func
effectAnimSlotAnchorMid = 0x801A1048; // type:func
effectUpdateModelBounds = 0x801A1078; // type:func
effectGetModelBounds = 0x801A12C4; // type:func
effectModelRadius = 0x801A1314; // type:func
effectModelHalfHeight = 0x801A13B8; // type:func
effectModelHalfWidth = 0x801A13E8; // type:func
effectModelHeight = 0x801A1440; // type:func
effectModelTop = 0x801A1464; // type:func
effectModelBottom = 0x801A14AC; // type:func
effectModelRandomY = 0x801A14F4; // type:func
effectModelCentreY = 0x801A15AC; // type:func
effectModelCentre = 0x801A1600; // type:func
effectZeroWords = 0x801A166C; // type:func
effectTintPlay = 0x801A16A4; // type:func
effectRandBetween = 0x801A1980; // type:func
effectRandProduct = 0x801A1A04; // type:func
effectRandVector = 0x801A1AA8; // type:func
effectMatrixFromAngles = 0x801A1B20; // type:func
effectJitterAngle = 0x801A1BEC; // type:func
effectJitterVector = 0x801A1C80; // type:func
effectJitterAngleS = 0x801A1CF8; // type:func
effectJitterSVector = 0x801A1D88; // type:func
effectCopyVector = 0x801A1E00; // type:func
effectFadeValue = 0x801A1E30; // type:func
effectFadeVector = 0x801A1E8C; // type:func
effectBlendPointSets = 0x801A1F58; // type:func
effectEmitTris = 0x801A20EC; // type:func
effectEmitQuads = 0x801A23B8; // type:func
effectEmitTexTris = 0x801A26DC; // type:func
effectEmitTexQuads = 0x801A2A64; // type:func
effectEmitGouraudTris = 0x801A2E48; // type:func
effectEmitGouraudQuads = 0x801A3150; // type:func
effectEmitGouraudTexTris = 0x801A34D8; // type:func
effectEmitGouraudTexQuads = 0x801A3894; // type:func
effectEmitStream = 0x801A3CDC; // type:func
effectBuildMeshPacket = 0x801A3F20; // type:func
effectParticleLateStep = 0x801A4128; // type:func
effectParticleAdvance = 0x801A41E0; // type:func
effectParticleAgeHold = 0x801A49E8; // type:func
effectParticlePose = 0x801A4ADC; // type:func
effectParticleAlloc = 0x801A541C; // type:func
effectStepRunKind = 0x801A5538; // type:func
effectStepFire = 0x801A5570; // type:func
effectParticleStep = 0x801A561C; // type:func
effectEmitterCountStep = 0x801A5708; // type:func
effectSpriteEmit = 0x801A5720; // type:func
effectSpritePacket = 0x801A5D4C; // type:func
effectParticleDrawPacket = 0x801A5FB4; // type:func
effectDrawParticles = 0x801A6074; // type:func
effectEmitterAlloc = 0x801A6194; // type:func
effectEmitterAge = 0x801A62B4; // type:func
effectEmitterSpawn = 0x801A631C; // type:func
effectEmitterSpawnShare = 0x801A6DB8; // type:func
effectEmitterStep = 0x801A6EB8; // type:func
effectEmitterOnStrand = 0x801A6F58; // type:func
effectEmitterOnTrail = 0x801A71E0; // type:func
effectEmitterOnOwner = 0x801A73E8; // type:func
effectEmitterSlide = 0x801A75F8; // type:func
effectListAppend = 0x801A8068; // type:func
effectListRemove = 0x801A80A4; // type:func
effectListClear = 0x801A80E4; // type:func
effectListRun = 0x801A80FC; // type:func
effectEmitterSetup = 0x801A8184; // type:func
effectStepFireSlots = 0x801A83B8; // type:func
effectEmittersOnCue = 0x801A846C; // type:func
effectTrailPush = 0x801A85A8; // type:func
effectTrailAim = 0x801A8684; // type:func
effectStrandsSeed = 0x801A87F8; // type:func
effectStrandsPush = 0x801A8904; // type:func
effectStrandsAim = 0x801A8A1C; // type:func
effectPoseTablesRelocate = 0x801A8CE4; // type:func
effectStartChildScript = 0x801A8F88; // type:func
effectBanksClear = 0x801A8FF8; // type:func
effectDrawScriptStart = 0x801A9050; // type:func
effectDrawScriptRun = 0x801A92F8; // type:func
effectDrawListSpan = 0x801A9420; // type:func
g_effectStackBase = 0x801D3CD4;
g_effectStackTop = 0x801D3CD8;
g_effectEmitterBank = 0x801D3F7C;
g_effectParticleBank = 0x801D3F80;
g_effectDrawList = 0x801D3F84;
g_effectEmitterCursor = 0x801D3F88;
g_effectParticleCursor = 0x801D3F8A;
g_effectParticleTotal = 0x801D3F8C;
g_effectLiveTotal = 0x801D3F8E;
g_effectBankUnk90 = 0x801D3F90;
g_effectBankUnk92 = 0x801D3F92;
g_effectChildPool = 0x801D478C;
g_effectPrimCursor = 0x801D479C;
g_effectHexGlyphs = 0x801D4ADC;
g_effectTextX = 0x801D4AF0;
g_effectTextY = 0x801D4AF4;
g_effectTextColour = 0x801D4AF8;
26 changes: 3 additions & 23 deletions include/effect/effect_001.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@

#include "effect.h"

/**
* @brief Entry point of the effect_001 overlay.
*
* battle.bin calls this at the overlay's load address once the image is in
* place; it builds the effect's root entity and its task pools.
*
* @param animSet Animation table the effect draws its models from.
* @return The task pool the effect's scripts run out of.
*/
void *func_801A0000(EffectAnimSet *animSet);

/**
* @name Overlay data
*
Expand Down Expand Up @@ -83,7 +72,6 @@ extern MATRIX *D_801C58EC;
extern u8 *D_801C58F0;

/** @brief Cursors this frame's prims and frames are written through. */
extern void *D_801C58F4;
extern void *D_801C58F8;

/** @brief The two bank pairs, one per parity of the frame counter. */
Expand Down Expand Up @@ -114,17 +102,9 @@ extern EffectRender D_801D3800;
extern s32 D_801D3900;
extern s32 D_801D5CF0;

/** @brief The sixteen hex digit glyphs, cached from the main string table. */
extern u8 D_801D5D00[];

/** @brief Debug text cursor: X, Y, and the colour the glyphs are drawn in. */
extern s32 D_801D5D14;
extern s32 D_801D5D18;
extern s32 D_801D5D1C;

/** @brief Per-joint world matrices, one per joint of the posed skeleton. */
extern MATRIX D_801D5D20[];

/** @} */

/** @brief Advance one effect script by a single frame. */
s32 func_801A4434(EffectEntity *entity);

#endif /* EFFECT_EFFECT_001_H */
Loading
Loading