SCUS 942.21 Routines
SCUS_942.21 RAM
000000a0 - 000000ac: Jump to 0x5c4
00006ba0 - 00008b80:
00008e90 - 00010b3c:
00012518 - 0001255c: Cursor Sound Effects?
00013b20 - 00013f70: Cursor Sound Effects?
00017e7c - 00017eb4: Get Sound Effect Data For ability effects?
0001bec8 - 0001d64c: Initialize some screen data
0001bfb4 - 0001bfb8: Clear r2 <-- best routine on the Iso
0001c04c - 0001c050: r2 = 0xff
0001d09c - 0001d0d4: Store Rotation matrix elements to GTE
0001d0d8 - 0001d104: Store Light Source Matrix Elements to GTE
0001d108 - 0001d134: Store Light Color matrix source RGB's to GTE
0001d138 - 0001d154: Store Translation Vectors to GTE
0001d158 - 0001d160: Get Projection Plane distance from GTE
0001d164 - 0001d184: Store Background RGB to GTE
0001d188 - 0001d1a4: Store far color RGB to GTE
0001d1a8 - 0001d1bc: Store Screen offsets to GTE
0001d1c0 - 0001d1d0: Store Projection plane distance in GTE
0001d1d4 - 0001d1fc: Multiply vector and store results
0001d200 - 0001d224: Depth Cue Color Light
0001d228 - 0001d260: Depth Cue Triple
0001d264 - 0001d284: interpolate
0001d288 - 0001d2ac: square vector
0001d2b0 - 0001d2d4: square matrix/vector (duplicate routine?
0001d2d8 - 0001d2f4: Find Average of 3 Z values
0001d2f8 - 0001d318: Find Average of 4 Z values
0001d31c - 0001d370: calculate outer product of 2 vectors
0001d374 - 0001d3c8: calculate outer product of 2 vectors 2
0001d3cc - 0001d3e0: Get leading 0 or 1 count
0001ef54 - 0001ef74: Load file into RAM 1 Calls 20650 routine, where the magic happens
00020650 - 0002074c: Load file into RAM
00020840 - 00020a5c: Call load file into RAM routine
0002230c - 00022314: Random Number Generator
00040934 - start of meaningful code
00028acc - 00040970:
00042a10 - 00042aac: Starting Inventory
00043ff8 - 00044014: Play Sound Effect? (value in r4 decides sound effect)
00045938 - end of meaningful code
000454cc - 0004571c:
0004593c - 00059abc:
00059854 - 00059abc: Initialize Status Check Data
00059ac8 - 00059aec: Initialize Party ID to FF
00059af0 - 00059b14: Get Party Data Pointer
00059b18 - 00059bac: Unit Initialization
00059bb0 - 00059d58: Add Unit to Party/Store Unit's Party Data
00059d5c - 00059e14: Find Free Party Slot
00059e18 - 00059ed0: Create Monster Egg
00059ed4 - 00059f90: Find Empty Party Slot and Generate Unit
00059f94 - 00059fdc: Find Unit's Party Data Location
00059fe0 - 00059ff8: Remove Unit from Party
00059ffc - 0005a3dc: Out of Battle Unit Generation
0005a3e0 - 0005a3fc: Generate Unit's Base Raw Stats Prep
0005a400 - 0005a444: Prep for Generating Base Raw Stats
0005a448 - 0005a51c: Generate Unit's Base Raw Stats
0005a520 - 0005a564: Transfer Job's Growths/Mults to Unit
0005a568 - 0005a634: Load Ability From Skillset
0005a638 - 0005a728: Store Skillset's Abilities
0005a72c - 0005a880: Calculate Ability Pointers and Type
0005a884 - 0005a8a0: Get Item Data Pointer
0005a8a4 - 0005a8d0: Get Job Data Pointer
0005a8d4 - 0005a9b0: Initialize Unit's Job Data
0005a9b4 - 0005aafc: Unit Battle Initialization
0005ab00 - 0005ab44: Equipment/Move/Jump +X/Name Storing/Generation
0005ab48 - 0005ac18: Store Ramza's Name/Birthday/Zodiac
0005ac1c - 0005b034: ENTD Data Calculation
0005b038 - 0005b0cc: Prep for Initializing Unit's Job Data
0005b0d0 - 0005b2b0: Initialize Unit's Battle Data
0005b2b4 - 0005b4fc: Calculate ENTD Unit Jobs
0005b500 - 0005b5d8: Sprite Set and Random Secondary Job Calculation
0005b5dc - 0005b79c: Transfer Job's Data to Unit's Data
0005b7a0 - 0005b828: Enable Unit's R/S/M Flags
0005b82c - 0005b87c: R/S/M Flag Setting
0005b880 - 0005ba6c: Calculate Actual Stats (Used for Stat Capping as well)
0005ba70 - 0005bdac: Calculate Unit's Abilities
0005bdb0 - 0005bdec: Monster Equipment Storing
0005bdf0 - 0005c278: Calculate/Store ENTD Unit Equipment
0005c27c - 0005c394: Equippable Item Setting (Support/Female-only)
0005c398 - 0005c5c4: Equipment Stat Setting
0005c5c8 - 0005c8e8: Equipment Attribute Setting
0005c8ec - 0005c980: Move/Jump +X Calculation (can be used to load data at start of battle)
0005c984 - 0005cbcc: Store/Generate Character Names
0005cbd0 - 0005cc60: Calculate Highest Party Level
0005cc64 - 0005cc94: Store X into Y (r4 = Loading Pointer, r5 = Storing Pointer)
0005cc98 - 0005ce70: Calculate Random Equipment
0005ce74 - 0005d0b8: Calculate Learned Abilities
0005d0bc - 0005d3c0: Calculate Unit's R/S/M
0005d3c4 - 0005d410: Find Skillset's Job ID (Not used?)
0005d414 - 0005d46c: Status Initialization
0005d470 - 0005d4cc: Nullify CT/Initialize Death Counter
0005d4d0 - 0005d5b8: Float/Current Statuses/Status Immunities/Status CT
0005d5bc - 0005d5dc: Status Setting/Checking + Equip/R/S/M Stats Prep
0005d5e0 - 0005d600: Status Setting/Checking + Equip/R/S/M Stats Prep 2 (Level Up)
0005d604 - 0005d624: Status Setting/Checking + Equip/R/S/M Stats Prep 3
0005d628 - 0005d87c: Status Setting/Checking + Equip/R/S/M Stats
0005d880 - 0005d8f8: Check if Unit Leveled UP
0005d8fc - 0005da0c: Level Unit to Specific Level
0005da10 - 0005db6c: Level Up Section
0005db70 - 0005dc10: Status CT Setting
0005dc14 - 0005dd44: Calculate Unlocked Jobs
0005dd48 - 0005ded4: Proposition JP Gain
0005ded8 - 0005def0: Store 3-Byte Data
0005def4 - 0005df34: Calculate Job Level
0005df38 - 0005dfa8: Initialize Unit's Job Levels
0005dfac - 0005dfd0: Initialize Some Unit Data
0005dfd4 - 0005e014: Minimum SP Capping/War Trophy Nulling/Status Initialization
0005e018 - 0005e04c: Get Ability's Range
0005e050 - 0005e084: Get Ability's AoE
0005e088 - 0005e0c8: Calculate Unit's Palette/Portrait (return Portrait)
0005e0cc - 0005e11c: Check if Random is greater/equal to Chance
0005e120 - 0005e1ac: Get Unit's Portrait/Palette
0005e1b0 - 0005e1fc: Status Checks (r5 = set to check)
0005e200 - 0005e228: Get Known Abilities
0005e22c - 0005e250: Transfer Target ID? Through Mount Data
0005e254 - 0005e284: Store X Byte into Y
0005e288 - 0005e474: Get Total Equipment Quantity (Equip Change/Formation Screen?)
0005e478 - 0005e4e4: Initialize Unit's X/Y+Facing/Battle Rewards
0005e4e8 - 0005e5d4: Get Lowest Order Status' 0x08 Check Data? (Status Checks 2)
0005e5d8 - 0005e640: Calculate Zodiac Symbol
0005e644 - 0005e66c: Data Nullifying (requires r5 = Limit, and r4 = Starting location)
0005e670 - 0005e6c8: Increase Casualties/Injured Counters
0005e6cc - 0005e740: Inflicted Status Changes
0005e744 - 0005e774: Store Current Statuses
0005e778 - 0005e7a4: Transfer Last Ability Used CT
0005e7a8 - 0005e8e4: Enable/disable acting statuses
0005e8e8 - 0005e908: ? removed code?
END
Other SCUS_942.21 Notes:
- 0x4F1D0: 64 bytes
- "Elemental" skillset lookup table: determines which abilities are enabled by which terrain type.
- 0x4F210: 64 bytes
- Terrain status inflict: determines which terrains cause Poison ("80" instead of "00")
- 0x4F250: 64 bytes
- Default movement table: determines the movement cost for crossing various terrain.
- 0x4F290: 320 bytes
- Ability movement tables: like the above, but enabled by Fly/Teleport, Float, Walk on Water/Move in Water, Move Undrwater, Move on Lava, respectivelyENDENDENDENDENDEND