mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +00:00
Merge branch 'master' into doc_pause_menu
This commit is contained in:
commit
929724c37c
357 changed files with 2965 additions and 1900 deletions
|
@ -1,149 +1,166 @@
|
|||
<Root>
|
||||
<File Name="object_tr" Segment="6">
|
||||
<Animation Name="object_tr_Anim_000BFC" Offset="0xBFC"/> <!-- Turn to look over left (?) shoulder -->
|
||||
<Animation Name="object_tr_Anim_0013CC" Offset="0x13CC"/> <!-- Looking over right shoulder -->
|
||||
<Animation Name="object_tr_Anim_001CDC" Offset="0x1CDC"/> <!-- Standing, broom in left hand -->
|
||||
<Animation Name="object_tr_Anim_002BC4" Offset="0x2BC4"/> <!-- Turn to look over right (?) shoulder -->
|
||||
<Animation Name="object_tr_Anim_0035CC" Offset="0x35CC"/> <!-- Looking over left shoulder -->
|
||||
<Animation Name="object_tr_Anim_003FC8" Offset="0x3FC8"/> <!-- Standing, broom over right shoulder -->
|
||||
<Animation Name="object_tr_Anim_0049C8" Offset="0x49C8"/> <!-- Floating on broom -->
|
||||
<Animation Name="object_tr_Anim_005308" Offset="0x5308"/>
|
||||
<Animation Name="gKotakeKoumeLookOverRightShoulderAnim" Offset="0xBFC"/>
|
||||
<Animation Name="gKotakeKoumeLookingOverRightShoulderAnim" Offset="0x13CC"/>
|
||||
<Animation Name="gKotakeKoumeStandingBroomOverLeftShoulderAnim" Offset="0x1CDC"/>
|
||||
<Animation Name="gKotakeKoumeLookOverLeftShoulderAnim" Offset="0x2BC4"/>
|
||||
<Animation Name="gKotakeKoumeLookingOverLeftShoulderAnim" Offset="0x35CC"/>
|
||||
<Animation Name="gKotakeKoumeStandingBroomOverRightShoulderAnim" Offset="0x3FC8"/>
|
||||
<Animation Name="gKotakeKoumeFlyAnim" Offset="0x49C8"/>
|
||||
<Animation Name="gKotakeKoumeStandingBroomOverRightShoulderUnusedAnim" Offset="0x5308"/> <!-- Very similar to gKotakeKoumeStandingBroomOverRightShoulderAnim but not quite a duplicate -->
|
||||
|
||||
<Blob Name="object_tr_Blob_0062E0" Size="0x60" Offset="0x62E0"/>
|
||||
<DList Name="object_tr_DL_006520" Offset="0x6520"/>
|
||||
<DList Name="object_tr_DL_0066A0" Offset="0x66A0"/>
|
||||
<DList Name="object_tr_DL_006800" Offset="0x6800"/>
|
||||
<DList Name="object_tr_DL_006940" Offset="0x6940"/>
|
||||
<DList Name="object_tr_DL_006A50" Offset="0x6A50"/>
|
||||
<DList Name="object_tr_DL_006B48" Offset="0x6B48"/>
|
||||
<DList Name="object_tr_DL_006C58" Offset="0x6C58"/>
|
||||
<DList Name="object_tr_DL_006D50" Offset="0x6D50"/>
|
||||
<DList Name="object_tr_DL_006E70" Offset="0x6E70"/>
|
||||
<DList Name="object_tr_DL_006FF0" Offset="0x6FF0"/>
|
||||
<DList Name="object_tr_DL_007118" Offset="0x7118"/>
|
||||
<DList Name="object_tr_DL_007238" Offset="0x7238"/>
|
||||
<DList Name="object_tr_DL_007358" Offset="0x7358"/>
|
||||
<DList Name="object_tr_DL_0074D8" Offset="0x74D8"/>
|
||||
<DList Name="object_tr_DL_007600" Offset="0x7600"/>
|
||||
<DList Name="object_tr_DL_007720" Offset="0x7720"/>
|
||||
<DList Name="object_tr_DL_007728" Offset="0x7728"/>
|
||||
<Texture Name="object_tr_TLUT_007730" OutName="tlut_00007730" Format="rgba16" Width="53" Height="4" Offset="0x7730"/>
|
||||
<Texture Name="object_tr_Tex_0078D8" OutName="tex_000078D8" Format="rgba16" Width="32" Height="32" Offset="0x78D8"/>
|
||||
<Texture Name="object_tr_Tex_0080D8" OutName="tex_000080D8" Format="rgba16" Width="16" Height="16" Offset="0x80D8"/>
|
||||
<Texture Name="object_tr_Tex_0082D8" OutName="tex_000082D8" Format="rgba16" Width="16" Height="16" Offset="0x82D8"/>
|
||||
<Texture Name="object_tr_Tex_0084D8" OutName="tex_000084D8" Format="rgba16" Width="16" Height="16" Offset="0x84D8"/>
|
||||
<Texture Name="object_tr_Tex_0086D8" OutName="tex_000086D8" Format="ci8" Width="32" Height="32" Offset="0x86D8" TlutOffset="0x7730"/> <!-- eye open -->
|
||||
<Texture Name="object_tr_Tex_008AD8" OutName="tex_00008AD8" Format="ci8" Width="16" Height="8" Offset="0x8AD8" TlutOffset="0x7730"/>
|
||||
<Texture Name="object_tr_Tex_008B58" OutName="tex_00008B58" Format="ci8" Width="8" Height="8" Offset="0x8B58" TlutOffset="0x7730"/>
|
||||
<Texture Name="object_tr_Tex_008B98" OutName="tex_00008B98" Format="rgba16" Width="8" Height="32" Offset="0x8B98"/>
|
||||
<Texture Name="object_tr_Tex_008D98" OutName="tex_00008D98" Format="ci8" Width="8" Height="8" Offset="0x8D98" TlutOffset="0x7730"/>
|
||||
<Texture Name="object_tr_Tex_008DD8" OutName="tex_00008DD8" Format="ci8" Width="8" Height="16" Offset="0x8DD8" TlutOffset="0x7730"/>
|
||||
<Texture Name="object_tr_Tex_008E58" OutName="tex_00008E58" Format="rgba16" Width="8" Height="8" Offset="0x8E58"/>
|
||||
<Texture Name="object_tr_Tex_008ED8" OutName="tex_00008ED8" Format="rgba16" Width="16" Height="32" Offset="0x8ED8"/>
|
||||
<Texture Name="object_tr_Tex_0092D8" OutName="tex_000092D8" Format="rgba16" Width="16" Height="8" Offset="0x92D8"/>
|
||||
<Texture Name="object_tr_Tex_0093D8" OutName="tex_000093D8" Format="rgba16" Width="8" Height="8" Offset="0x93D8"/>
|
||||
<Texture Name="object_tr_Tex_009458" OutName="tex_00009458" Format="ci8" Width="8" Height="8" Offset="0x9458" TlutOffset="0x7730"/>
|
||||
<Texture Name="object_tr_Tex_009498" OutName="tex_00009498" Format="ci8" Width="8" Height="8" Offset="0x9498" TlutOffset="0x7730"/>
|
||||
<Texture Name="object_tr_Tex_0094D8" OutName="tex_000094D8" Format="ci8" Width="32" Height="32" Offset="0x94D8" TlutOffset="0x7730"/> <!-- eye half -->
|
||||
<Texture Name="object_tr_Tex_0098D8" OutName="tex_000098D8" Format="ci8" Width="32" Height="32" Offset="0x98D8" TlutOffset="0x7730"/> <!-- eye closed -->
|
||||
<DList Name="object_tr_DL_00AF38" Offset="0xAF38"/>
|
||||
<DList Name="object_tr_DL_00B568" Offset="0xB568"/>
|
||||
<DList Name="object_tr_DL_00B5C8" Offset="0xB5C8"/>
|
||||
<DList Name="object_tr_DL_00B678" Offset="0xB678"/>
|
||||
<DList Name="object_tr_DL_00B728" Offset="0xB728"/>
|
||||
<DList Name="object_tr_DL_00B8D0" Offset="0xB8D0"/>
|
||||
<DList Name="object_tr_DL_00B968" Offset="0xB968"/>
|
||||
<DList Name="object_tr_DL_00BA00" Offset="0xBA00"/>
|
||||
<DList Name="object_tr_DL_00BB68" Offset="0xBB68"/>
|
||||
<Texture Name="object_tr_Tex_00BCD0" OutName="tex_0000BCD0" Format="rgba16" Width="8" Height="8" Offset="0xBCD0"/>
|
||||
|
||||
<DList Name="gKotakePelvisDL" Offset="0x6520"/>
|
||||
<DList Name="gKotakeTorsoDL" Offset="0x66A0"/>
|
||||
<DList Name="gKotakeNeckDL" Offset="0x6800"/>
|
||||
<DList Name="gKotakeLeftBraidStartDL" Offset="0x6940"/>
|
||||
<DList Name="gKotakeLeftBraidEndDL" Offset="0x6A50"/>
|
||||
<DList Name="gKotakeRightBraidStartDL" Offset="0x6B48"/>
|
||||
<DList Name="gKotakeRightBraidEndDL" Offset="0x6C58"/>
|
||||
<DList Name="gKotakeRightSleeveStartDL" Offset="0x6D50"/>
|
||||
<DList Name="gKotakeRightSleeveFrontDL" Offset="0x6E70"/>
|
||||
<DList Name="gKotakeRightSleeveMidDL" Offset="0x6FF0"/>
|
||||
<DList Name="gKotakeRightSleeveEndDL" Offset="0x7118"/>
|
||||
<DList Name="gKotakeLeftSleeveStartDL" Offset="0x7238"/>
|
||||
<DList Name="gKotakeLeftSleeveFrontDL" Offset="0x7358"/>
|
||||
<DList Name="gKotakeLeftSleeveMidDL" Offset="0x74D8"/>
|
||||
<DList Name="gKotakeLeftSleeveEndDL" Offset="0x7600"/>
|
||||
<DList Name="gKotakeRightThighDL" Offset="0x7720"/> <!-- Renders a single triangle instead of a normal-looking limb -->
|
||||
<DList Name="gKotakeLeftThighDL" Offset="0x7728"/> <!-- Renders a single triangle instead of a normal-looking limb -->
|
||||
|
||||
<Texture Name="gKotakeKoumeTLUT" OutName="kotake_koume_tlut" Format="rgba16" Width="53" Height="4" Offset="0x7730"/>
|
||||
<Texture Name="gKotakeGerudoFabricTex" OutName="kotake_gerudo_fabric" Format="rgba16" Width="32" Height="32" Offset="0x78D8"/>
|
||||
<Texture Name="gKotakeRobeTex" OutName="kotake_robe" Format="rgba16" Width="16" Height="16" Offset="0x80D8"/>
|
||||
<Texture Name="gKotakeKoumeRobePatternTex" OutName="kotake_koume_robe_pattern" Format="rgba16" Width="16" Height="16" Offset="0x82D8"/>
|
||||
<Texture Name="gKotakeKoumeRobeTrimTex" OutName="kotake_koume_robe_trim" Format="rgba16" Width="16" Height="16" Offset="0x84D8"/>
|
||||
<Texture Name="gKotakeKoumeEyeOpenTex" OutName="kotake_koume_eye_open" Format="ci8" Width="32" Height="32" Offset="0x86D8" TlutOffset="0x7730"/>
|
||||
<Texture Name="gKotakeKoumeSkinTex" OutName="kotake_koume_skin" Format="ci8" Width="16" Height="8" Offset="0x8AD8" TlutOffset="0x7730"/>
|
||||
<Texture Name="gKotakeKoumeMouthTex" OutName="kotake_koume_mouth" Format="ci8" Width="8" Height="8" Offset="0x8B58" TlutOffset="0x7730"/>
|
||||
<Texture Name="gKotakeKoumeHairTex" OutName="kotake_koume_hair" Format="rgba16" Width="8" Height="32" Offset="0x8B98"/>
|
||||
<Texture Name="gKotakeKoumeEarTex" OutName="kotake_koume_ear" Format="ci8" Width="8" Height="8" Offset="0x8D98" TlutOffset="0x7730"/>
|
||||
<Texture Name="gKotakeKoumeFingerTex" OutName="kotake_koume_finger" Format="ci8" Width="8" Height="16" Offset="0x8DD8" TlutOffset="0x7730"/>
|
||||
<Texture Name="gKotakeKoumeBroomHandleTex" OutName="kotake_koume_broom_handle" Format="rgba16" Width="8" Height="8" Offset="0x8E58"/>
|
||||
<Texture Name="gKotakeKoumeBroomHeadTex" OutName="kotake_koume_broom_head" Format="rgba16" Width="16" Height="32" Offset="0x8ED8"/>
|
||||
<Texture Name="gKotakeKoumeJewelHolderTex" OutName="kotake_koume_jewel_holder" Format="rgba16" Width="16" Height="8" Offset="0x92D8"/>
|
||||
<Texture Name="gKotakeJewelTex" OutName="kotake_jewel" Format="rgba16" Width="8" Height="8" Offset="0x93D8"/>
|
||||
<Texture Name="gKotakeKoumeNeckTex" OutName="kotake_koume_neck" Format="ci8" Width="8" Height="8" Offset="0x9458" TlutOffset="0x7730"/>
|
||||
<Texture Name="gKotakeKoumeNostrilsTex" OutName="kotake_koume_nostrils" Format="ci8" Width="8" Height="8" Offset="0x9498" TlutOffset="0x7730"/>
|
||||
<Texture Name="gKotakeKoumeEyeHalfTex" OutName="kotake_koume_eye_half" Format="ci8" Width="32" Height="32" Offset="0x94D8" TlutOffset="0x7730"/>
|
||||
<Texture Name="gKotakeKoumeEyeClosedTex" OutName="kotake_koume_eye_closed" Format="ci8" Width="32" Height="32" Offset="0x98D8" TlutOffset="0x7730"/>
|
||||
|
||||
<DList Name="gKotakeHeadDL" Offset="0xAF38"/>
|
||||
<DList Name="gKotakeTeethDL" Offset="0xB568"/>
|
||||
<DList Name="gKotakeRightShinDL" Offset="0xB5C8"/>
|
||||
<DList Name="gKotakeLeftShinDL" Offset="0xB678"/>
|
||||
<DList Name="gKotakeBroomDL" Offset="0xB728"/>
|
||||
<DList Name="gKotakeRightFootDL" Offset="0xB8D0"/>
|
||||
<DList Name="gKotakeLeftFootDL" Offset="0xB968"/>
|
||||
<DList Name="gKotakeRightHandDL" Offset="0xBA00"/>
|
||||
<DList Name="gKotakeLeftHandDL" Offset="0xBB68"/>
|
||||
|
||||
<Texture Name="gKotakeKoumeBraidEndTex" OutName="kotake_koume_braid_end" Format="rgba16" Width="8" Height="8" Offset="0xBCD0"/>
|
||||
|
||||
<Blob Name="object_tr_Blob_00BD50" Size="0x580" Offset="0xBD50"/>
|
||||
<Texture Name="object_tr_Tex_00C2D0" OutName="tex_0000C2D0" Format="rgba16" Width="4" Height="8" Offset="0xC2D0"/>
|
||||
|
||||
<Texture Name="gKotakeCollarNeckTex" OutName="kotake_collar_neck" Format="rgba16" Width="4" Height="8" Offset="0xC2D0"/>
|
||||
|
||||
<Blob Name="object_tr_Blob_00C310" Size="0x80" Offset="0xC310"/>
|
||||
<Limb Name="object_tr_Limb_00C390" LimbType="Standard" Offset="0xC390"/>
|
||||
<Limb Name="object_tr_Limb_00C39C" LimbType="Standard" Offset="0xC39C"/>
|
||||
<Limb Name="object_tr_Limb_00C3A8" LimbType="Standard" Offset="0xC3A8"/>
|
||||
<Limb Name="object_tr_Limb_00C3B4" LimbType="Standard" Offset="0xC3B4"/>
|
||||
<Limb Name="object_tr_Limb_00C3C0" LimbType="Standard" Offset="0xC3C0"/>
|
||||
<Limb Name="object_tr_Limb_00C3CC" LimbType="Standard" Offset="0xC3CC"/>
|
||||
<Limb Name="object_tr_Limb_00C3D8" LimbType="Standard" Offset="0xC3D8"/>
|
||||
<Limb Name="object_tr_Limb_00C3E4" LimbType="Standard" Offset="0xC3E4"/>
|
||||
<Limb Name="object_tr_Limb_00C3F0" LimbType="Standard" Offset="0xC3F0"/>
|
||||
<Limb Name="object_tr_Limb_00C3FC" LimbType="Standard" Offset="0xC3FC"/>
|
||||
<Limb Name="object_tr_Limb_00C408" LimbType="Standard" Offset="0xC408"/>
|
||||
<Limb Name="object_tr_Limb_00C414" LimbType="Standard" Offset="0xC414"/>
|
||||
<Limb Name="object_tr_Limb_00C420" LimbType="Standard" Offset="0xC420"/>
|
||||
<Limb Name="object_tr_Limb_00C42C" LimbType="Standard" Offset="0xC42C"/>
|
||||
<Limb Name="object_tr_Limb_00C438" LimbType="Standard" Offset="0xC438"/>
|
||||
<Limb Name="object_tr_Limb_00C444" LimbType="Standard" Offset="0xC444"/>
|
||||
<Limb Name="object_tr_Limb_00C450" LimbType="Standard" Offset="0xC450"/>
|
||||
<Limb Name="object_tr_Limb_00C45C" LimbType="Standard" Offset="0xC45C"/>
|
||||
<Limb Name="object_tr_Limb_00C468" LimbType="Standard" Offset="0xC468"/>
|
||||
<Limb Name="object_tr_Limb_00C474" LimbType="Standard" Offset="0xC474"/>
|
||||
<Limb Name="object_tr_Limb_00C480" LimbType="Standard" Offset="0xC480"/>
|
||||
<Limb Name="object_tr_Limb_00C48C" LimbType="Standard" Offset="0xC48C"/>
|
||||
<Limb Name="object_tr_Limb_00C498" LimbType="Standard" Offset="0xC498"/>
|
||||
<Limb Name="object_tr_Limb_00C4A4" LimbType="Standard" Offset="0xC4A4"/>
|
||||
<Limb Name="object_tr_Limb_00C4B0" LimbType="Standard" Offset="0xC4B0"/>
|
||||
<Limb Name="object_tr_Limb_00C4BC" LimbType="Standard" Offset="0xC4BC"/>
|
||||
<Skeleton Name="object_tr_Skel_00C530" Type="Flex" LimbType="Standard" Offset="0xC530"/>
|
||||
<Animation Name="object_tr_Anim_00C60C" Offset="0xC60C"/>
|
||||
|
||||
<Limb Name="gKotakePelvisLimb" LimbType="Standard" Offset="0xC390"/>
|
||||
<Limb Name="gKotakeLeftThighLimb" LimbType="Standard" Offset="0xC39C"/>
|
||||
<Limb Name="gKotakeLeftShinLimb" LimbType="Standard" Offset="0xC3A8"/>
|
||||
<Limb Name="gKotakeLeftFootLimb" LimbType="Standard" Offset="0xC3B4"/>
|
||||
<Limb Name="gKotakeRightThighLimb" LimbType="Standard" Offset="0xC3C0"/>
|
||||
<Limb Name="gKotakeRightShinLimb" LimbType="Standard" Offset="0xC3CC"/>
|
||||
<Limb Name="gKotakeRightFootLimb" LimbType="Standard" Offset="0xC3D8"/>
|
||||
<Limb Name="gKotakeTorsoLimb" LimbType="Standard" Offset="0xC3E4"/>
|
||||
<Limb Name="gKotakeLeftSleeveStartLimb" LimbType="Standard" Offset="0xC3F0"/>
|
||||
<Limb Name="gKotakeLeftSleeveMidLimb" LimbType="Standard" Offset="0xC3FC"/>
|
||||
<Limb Name="gKotakeLeftSleeveEndLimb" LimbType="Standard" Offset="0xC408"/>
|
||||
<Limb Name="gKotakeLeftSleeveFrontLimb" LimbType="Standard" Offset="0xC414"/>
|
||||
<Limb Name="gKotakeLeftHandLimb" LimbType="Standard" Offset="0xC420"/>
|
||||
<Limb Name="gKotakeBroomLimb" LimbType="Standard" Offset="0xC42C"/>
|
||||
<Limb Name="gKotakeRightSleeveStartLimb" LimbType="Standard" Offset="0xC438"/>
|
||||
<Limb Name="gKotakeRightSleeveMidLimb" LimbType="Standard" Offset="0xC444"/>
|
||||
<Limb Name="gKotakeRightSleeveEndLimb" LimbType="Standard" Offset="0xC450"/>
|
||||
<Limb Name="gKotakeRightSleeveFrontLimb" LimbType="Standard" Offset="0xC45C"/>
|
||||
<Limb Name="gKotakeRightHandLimb" LimbType="Standard" Offset="0xC468"/>
|
||||
<Limb Name="gKotakeNeckLimb" LimbType="Standard" Offset="0xC474"/>
|
||||
<Limb Name="gKotakeHeadLimb" LimbType="Standard" Offset="0xC480"/>
|
||||
<Limb Name="gKotakeRightBraidStartLimb" LimbType="Standard" Offset="0xC48C"/>
|
||||
<Limb Name="gKotakeRightBraidEndLimb" LimbType="Standard" Offset="0xC498"/>
|
||||
<Limb Name="gKotakeTeethLimb" LimbType="Standard" Offset="0xC4A4"/>
|
||||
<Limb Name="gKotakeLeftBraidStartLimb" LimbType="Standard" Offset="0xC4B0"/>
|
||||
<Limb Name="gKotakeLeftBraidEndLimb" LimbType="Standard" Offset="0xC4BC"/>
|
||||
<Skeleton Name="gKotakeSkel" Type="Flex" LimbType="Standard" Offset="0xC530"/>
|
||||
|
||||
<Animation Name="gKotakeKoumeTPoseAnim" Offset="0xC60C"/>
|
||||
|
||||
<Blob Name="object_tr_Blob_00D5E0" Size="0x60" Offset="0xD5E0"/>
|
||||
<DList Name="object_tr_DL_00D820" Offset="0xD820"/>
|
||||
<DList Name="object_tr_DL_00D9A0" Offset="0xD9A0"/>
|
||||
<DList Name="object_tr_DL_00DB00" Offset="0xDB00"/>
|
||||
<DList Name="object_tr_DL_00DC40" Offset="0xDC40"/>
|
||||
<DList Name="object_tr_DL_00DD50" Offset="0xDD50"/>
|
||||
<DList Name="object_tr_DL_00DE48" Offset="0xDE48"/>
|
||||
<DList Name="object_tr_DL_00DF58" Offset="0xDF58"/>
|
||||
<DList Name="object_tr_DL_00E050" Offset="0xE050"/>
|
||||
<DList Name="object_tr_DL_00E170" Offset="0xE170"/>
|
||||
<DList Name="object_tr_DL_00E2F0" Offset="0xE2F0"/>
|
||||
<DList Name="object_tr_DL_00E418" Offset="0xE418"/>
|
||||
<DList Name="object_tr_DL_00E538" Offset="0xE538"/>
|
||||
<DList Name="object_tr_DL_00E658" Offset="0xE658"/>
|
||||
<DList Name="object_tr_DL_00E7D8" Offset="0xE7D8"/>
|
||||
<DList Name="object_tr_DL_00E900" Offset="0xE900"/>
|
||||
<DList Name="object_tr_DL_00EA20" Offset="0xEA20"/>
|
||||
<DList Name="object_tr_DL_00EA28" Offset="0xEA28"/>
|
||||
<Texture Name="object_tr_Tex_00EA30" OutName="tex_0000EA30" Format="rgba16" Width="32" Height="32" Offset="0xEA30"/>
|
||||
<Texture Name="object_tr_Tex_00F230" OutName="tex_0000F230" Format="rgba16" Width="16" Height="16" Offset="0xF230"/>
|
||||
<Texture Name="object_tr_Tex_00F430" OutName="tex_0000F430" Format="rgba16" Width="8" Height="8" Offset="0xF430"/>
|
||||
<DList Name="object_tr_DL_010710" Offset="0x10710"/>
|
||||
<DList Name="object_tr_DL_010D40" Offset="0x10D40"/>
|
||||
<DList Name="object_tr_DL_010DA0" Offset="0x10DA0"/>
|
||||
<DList Name="object_tr_DL_010E50" Offset="0x10E50"/>
|
||||
<DList Name="object_tr_DL_010F00" Offset="0x10F00"/>
|
||||
<DList Name="object_tr_DL_0110A8" Offset="0x110A8"/>
|
||||
<DList Name="object_tr_DL_011140" Offset="0x11140"/>
|
||||
<DList Name="object_tr_DL_0111D8" Offset="0x111D8"/>
|
||||
<DList Name="object_tr_DL_011340" Offset="0x11340"/>
|
||||
<Texture Name="object_tr_Tex_0114A8" OutName="tex_000114A8" Format="rgba16" Width="4" Height="8" Offset="0x114A8"/>
|
||||
<Limb Name="object_tr_Limb_0114E8" LimbType="Standard" Offset="0x114E8"/>
|
||||
<Limb Name="object_tr_Limb_0114F4" LimbType="Standard" Offset="0x114F4"/>
|
||||
<Limb Name="object_tr_Limb_011500" LimbType="Standard" Offset="0x11500"/>
|
||||
<Limb Name="object_tr_Limb_01150C" LimbType="Standard" Offset="0x1150C"/>
|
||||
<Limb Name="object_tr_Limb_011518" LimbType="Standard" Offset="0x11518"/>
|
||||
<Limb Name="object_tr_Limb_011524" LimbType="Standard" Offset="0x11524"/>
|
||||
<Limb Name="object_tr_Limb_011530" LimbType="Standard" Offset="0x11530"/>
|
||||
<Limb Name="object_tr_Limb_01153C" LimbType="Standard" Offset="0x1153C"/>
|
||||
<Limb Name="object_tr_Limb_011548" LimbType="Standard" Offset="0x11548"/>
|
||||
<Limb Name="object_tr_Limb_011554" LimbType="Standard" Offset="0x11554"/>
|
||||
<Limb Name="object_tr_Limb_011560" LimbType="Standard" Offset="0x11560"/>
|
||||
<Limb Name="object_tr_Limb_01156C" LimbType="Standard" Offset="0x1156C"/>
|
||||
<Limb Name="object_tr_Limb_011578" LimbType="Standard" Offset="0x11578"/>
|
||||
<Limb Name="object_tr_Limb_011584" LimbType="Standard" Offset="0x11584"/>
|
||||
<Limb Name="object_tr_Limb_011590" LimbType="Standard" Offset="0x11590"/>
|
||||
<Limb Name="object_tr_Limb_01159C" LimbType="Standard" Offset="0x1159C"/>
|
||||
<Limb Name="object_tr_Limb_0115A8" LimbType="Standard" Offset="0x115A8"/>
|
||||
<Limb Name="object_tr_Limb_0115B4" LimbType="Standard" Offset="0x115B4"/>
|
||||
<Limb Name="object_tr_Limb_0115C0" LimbType="Standard" Offset="0x115C0"/>
|
||||
<Limb Name="object_tr_Limb_0115CC" LimbType="Standard" Offset="0x115CC"/>
|
||||
<Limb Name="object_tr_Limb_0115D8" LimbType="Standard" Offset="0x115D8"/>
|
||||
<Limb Name="object_tr_Limb_0115E4" LimbType="Standard" Offset="0x115E4"/>
|
||||
<Limb Name="object_tr_Limb_0115F0" LimbType="Standard" Offset="0x115F0"/>
|
||||
<Limb Name="object_tr_Limb_0115FC" LimbType="Standard" Offset="0x115FC"/>
|
||||
<Limb Name="object_tr_Limb_011608" LimbType="Standard" Offset="0x11608"/>
|
||||
<Limb Name="object_tr_Limb_011614" LimbType="Standard" Offset="0x11614"/>
|
||||
<Skeleton Name="object_tr_Skel_011688" Type="Flex" LimbType="Standard" Offset="0x11688"/>
|
||||
<Animation Name="object_tr_Anim_012E1C" Offset="0x12E1C"/> <!-- Casting magic -->
|
||||
|
||||
<DList Name="gKoumePelvisDL" Offset="0xD820"/>
|
||||
<DList Name="gKoumeTorsoDL" Offset="0xD9A0"/>
|
||||
<DList Name="gKoumeNeckDL" Offset="0xDB00"/>
|
||||
<DList Name="gKoumeLeftBraidStartDL" Offset="0xDC40"/>
|
||||
<DList Name="gKoumeLeftBraidEndDL" Offset="0xDD50"/>
|
||||
<DList Name="gKoumeRightBraidStartDL" Offset="0xDE48"/>
|
||||
<DList Name="gKoumeRightBraidEndDL" Offset="0xDF58"/>
|
||||
<DList Name="gKoumeRightSleeveStartDL" Offset="0xE050"/>
|
||||
<DList Name="gKoumeRightSleeveFrontDL" Offset="0xE170"/>
|
||||
<DList Name="gKoumeRightSleeveMidDL" Offset="0xE2F0"/>
|
||||
<DList Name="gKoumeRightSleeveEndDL" Offset="0xE418"/>
|
||||
<DList Name="gKoumeLeftSleeveStartDL" Offset="0xE538"/>
|
||||
<DList Name="gKoumeLeftSleeveFrontDL" Offset="0xE658"/>
|
||||
<DList Name="gKoumeLeftSleeveMidDL" Offset="0xE7D8"/>
|
||||
<DList Name="gKoumeLeftSleeveEndDL" Offset="0xE900"/>
|
||||
<DList Name="gKoumeRightThighDL" Offset="0xEA20"/> <!-- Renders a single triangle instead of a normal-looking limb -->
|
||||
<DList Name="gKoumeLeftThighDL" Offset="0xEA28"/> <!-- Renders a single triangle instead of a normal-looking limb -->
|
||||
|
||||
<Texture Name="gKoumeGerudoFabricTex" OutName="koume_gerudo_fabric" Format="rgba16" Width="32" Height="32" Offset="0xEA30"/>
|
||||
<Texture Name="gKoumeRobeTex" OutName="koume_robe" Format="rgba16" Width="16" Height="16" Offset="0xF230"/>
|
||||
<Texture Name="gKoumeJewelTex" OutName="koume_jewel" Format="rgba16" Width="8" Height="8" Offset="0xF430"/>
|
||||
|
||||
<DList Name="gKoumeHeadDL" Offset="0x10710"/>
|
||||
<DList Name="gKoumeTeethDL" Offset="0x10D40"/>
|
||||
<DList Name="gKoumeRightShinDL" Offset="0x10DA0"/>
|
||||
<DList Name="gKoumeLeftShinDL" Offset="0x10E50"/>
|
||||
<DList Name="gKoumeBroomDL" Offset="0x10F00"/>
|
||||
<DList Name="gKoumeRightFootDL" Offset="0x110A8"/>
|
||||
<DList Name="gKoumeLeftFootDL" Offset="0x11140"/>
|
||||
<DList Name="gKoumeRightHandDL" Offset="0x111D8"/>
|
||||
<DList Name="gKoumeLeftHandDL" Offset="0x11340"/>
|
||||
|
||||
<Texture Name="gKoumeCollarNeckTex" OutName="koume_collar_neck" Format="rgba16" Width="4" Height="8" Offset="0x114A8"/>
|
||||
|
||||
<Limb Name="gKoumePelvisLimb" LimbType="Standard" Offset="0x114E8"/>
|
||||
<Limb Name="gKoumeLeftThighLimb" LimbType="Standard" Offset="0x114F4"/>
|
||||
<Limb Name="gKoumeLeftShinLimb" LimbType="Standard" Offset="0x11500"/>
|
||||
<Limb Name="gKoumeLeftFootLimb" LimbType="Standard" Offset="0x1150C"/>
|
||||
<Limb Name="gKoumeRightThighLimb" LimbType="Standard" Offset="0x11518"/>
|
||||
<Limb Name="gKoumeRightShinLimb" LimbType="Standard" Offset="0x11524"/>
|
||||
<Limb Name="gKoumeRightFootLimb" LimbType="Standard" Offset="0x11530"/>
|
||||
<Limb Name="gKoumeTorsoLimb" LimbType="Standard" Offset="0x1153C"/>
|
||||
<Limb Name="gKoumeLeftSleeveStartLimb" LimbType="Standard" Offset="0x11548"/>
|
||||
<Limb Name="gKoumeLeftSleeveMidLimb" LimbType="Standard" Offset="0x11554"/>
|
||||
<Limb Name="gKoumeLeftSleeveEndLimb" LimbType="Standard" Offset="0x11560"/>
|
||||
<Limb Name="gKoumeLeftSleeveFrontLimb" LimbType="Standard" Offset="0x1156C"/>
|
||||
<Limb Name="gKoumeLeftHandLimb" LimbType="Standard" Offset="0x11578"/>
|
||||
<Limb Name="gKoumeBroomLimb" LimbType="Standard" Offset="0x11584"/>
|
||||
<Limb Name="gKoumeRightSleeveStartLimb" LimbType="Standard" Offset="0x11590"/>
|
||||
<Limb Name="gKoumeRightSleeveMidLimb" LimbType="Standard" Offset="0x1159C"/>
|
||||
<Limb Name="gKoumeRightSleeveEndLimb" LimbType="Standard" Offset="0x115A8"/>
|
||||
<Limb Name="gKoumeRightSleeveFrontLimb" LimbType="Standard" Offset="0x115B4"/>
|
||||
<Limb Name="gKoumeRightHandLimb" LimbType="Standard" Offset="0x115C0"/>
|
||||
<Limb Name="gKoumeNeckLimb" LimbType="Standard" Offset="0x115CC"/>
|
||||
<Limb Name="gKoumeHeadLimb" LimbType="Standard" Offset="0x115D8"/>
|
||||
<Limb Name="gKoumeRightBraidStartLimb" LimbType="Standard" Offset="0x115E4"/>
|
||||
<Limb Name="gKoumeRightBraidEndLimb" LimbType="Standard" Offset="0x115F0"/>
|
||||
<Limb Name="gKoumeTeethLimb" LimbType="Standard" Offset="0x115FC"/>
|
||||
<Limb Name="gKoumeLeftBraidStartLimb" LimbType="Standard" Offset="0x11608"/>
|
||||
<Limb Name="gKoumeLeftBraidEndLimb" LimbType="Standard" Offset="0x11614"/>
|
||||
<Skeleton Name="gKoumeSkel" Type="Flex" LimbType="Standard" Offset="0x11688"/>
|
||||
|
||||
<Animation Name="gKotakeKoumeCastMagicAnim" Offset="0x12E1C"/>
|
||||
</File>
|
||||
</Root>
|
||||
|
|
|
@ -1,144 +1,156 @@
|
|||
<Root>
|
||||
<File Name="object_tw" Segment="6">
|
||||
<Animation Name="object_tw_Anim_0004A4" Offset="0x4A4"/> <!-- Original name is "btT_DEMOwait" -->
|
||||
<Animation Name="object_tw_Anim_000AAC" Offset="0xAAC"/> <!-- Original name is "btT_DEMOwait_to_fly" -->
|
||||
<Animation Name="object_tw_Anim_0012A4" Offset="0x12A4"/> <!-- Original name is "btT_EDikari" ("anger; rage; fury") -->
|
||||
<Animation Name="object_tw_Anim_0017E0" Offset="0x17E0"/> <!-- Original name is "btT_EDmiage" ("to look up at; to raise one's eyes") -->
|
||||
<Animation Name="object_tw_Anim_001D10" Offset="0x1D10"/> <!-- Original name is "btT_EDwait" -->
|
||||
<Animation Name="object_tw_Anim_00230C" Offset="0x230C"/> <!-- Original name is "btT_EDyaruki" ("drive; motivation; enthusiasm") -->
|
||||
<Animation Name="object_tw_Anim_003614" Offset="0x3614"/> <!-- Original name is "btT_atack" -->
|
||||
<Animation Name="object_tw_Anim_003E34" Offset="0x3E34"/> <!-- Original name is "btT_beeem" -->
|
||||
<Animation Name="object_tw_Anim_004548" Offset="0x4548"/> <!-- Original name is "btT_beeem_to_fly" -->
|
||||
<Animation Name="object_tw_Anim_00578C" Offset="0x578C"/> <!-- Original name is "btT_damage01" -->
|
||||
<Animation Name="object_tw_Anim_006530" Offset="0x6530"/> <!-- Original name is "btT_damage02" -->
|
||||
<Animation Name="object_tw_Anim_006F28" Offset="0x6F28"/> <!-- Original name is "btT_fly" -->
|
||||
<!-- Kotake and Koume animations -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeIdleLoopAnim" Offset="0x4A4"/> <!-- Original name is "btT_DEMOwait" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeIdleEndAnim" Offset="0xAAC"/> <!-- Original name is "btT_DEMOwait_to_fly" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeBickerAnim" Offset="0x12A4"/> <!-- Original name is "btT_EDikari" ("anger; rage; fury") -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeFloatLookUpAnim" Offset="0x17E0"/> <!-- Original name is "btT_EDmiage" ("to look up at; to raise one's eyes") -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeFloatLookForwardAnim" Offset="0x1D10"/> <!-- Original name is "btT_EDwait" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeShakeHandAnim" Offset="0x230C"/> <!-- Original name is "btT_EDyaruki" ("drive; motivation; enthusiasm") -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeAttackStartAnim" Offset="0x3614"/> <!-- Original name is "btT_atack" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeAttackLoopAnim" Offset="0x3E34"/> <!-- Original name is "btT_beeem" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeAttackEndAnim" Offset="0x4548"/> <!-- Original name is "btT_beeem_to_fly" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeDamageStartAnim" Offset="0x578C"/> <!-- Original name is "btT_damage01" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeDamageEndAnim" Offset="0x6530"/> <!-- Original name is "btT_damage02" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeFlyAnim" Offset="0x6F28"/> <!-- Original name is "btT_fly" -->
|
||||
|
||||
<Limb Name="object_tw_Limb_006F40" LimbType="Standard" Offset="0x6F40"/>
|
||||
<Limb Name="object_tw_Limb_006F4C" LimbType="Standard" Offset="0x6F4C"/>
|
||||
<Limb Name="object_tw_Limb_006F58" LimbType="Standard" Offset="0x6F58"/>
|
||||
<Limb Name="object_tw_Limb_006F64" LimbType="Standard" Offset="0x6F64"/>
|
||||
<Limb Name="object_tw_Limb_006F70" LimbType="Standard" Offset="0x6F70"/>
|
||||
<Limb Name="object_tw_Limb_006F7C" LimbType="Standard" Offset="0x6F7C"/>
|
||||
<Limb Name="object_tw_Limb_006F88" LimbType="Standard" Offset="0x6F88"/>
|
||||
<Limb Name="object_tw_Limb_006F94" LimbType="Standard" Offset="0x6F94"/>
|
||||
<Limb Name="object_tw_Limb_006FA0" LimbType="Standard" Offset="0x6FA0"/>
|
||||
<Limb Name="object_tw_Limb_006FAC" LimbType="Standard" Offset="0x6FAC"/>
|
||||
<Limb Name="object_tw_Limb_006FB8" LimbType="Standard" Offset="0x6FB8"/>
|
||||
<Limb Name="object_tw_Limb_006FC4" LimbType="Standard" Offset="0x6FC4"/>
|
||||
<Limb Name="object_tw_Limb_006FD0" LimbType="Standard" Offset="0x6FD0"/>
|
||||
<Limb Name="object_tw_Limb_006FDC" LimbType="Standard" Offset="0x6FDC"/>
|
||||
<Limb Name="object_tw_Limb_006FE8" LimbType="Standard" Offset="0x6FE8"/>
|
||||
<Limb Name="object_tw_Limb_006FF4" LimbType="Standard" Offset="0x6FF4"/>
|
||||
<Limb Name="object_tw_Limb_007000" LimbType="Standard" Offset="0x7000"/>
|
||||
<Limb Name="object_tw_Limb_00700C" LimbType="Standard" Offset="0x700C"/>
|
||||
<Limb Name="object_tw_Limb_007018" LimbType="Standard" Offset="0x7018"/>
|
||||
<Limb Name="object_tw_Limb_007024" LimbType="Standard" Offset="0x7024"/>
|
||||
<Limb Name="object_tw_Limb_007030" LimbType="Standard" Offset="0x7030"/>
|
||||
<Limb Name="object_tw_Limb_00703C" LimbType="Standard" Offset="0x703C"/>
|
||||
<Limb Name="object_tw_Limb_007048" LimbType="Standard" Offset="0x7048"/>
|
||||
<Limb Name="object_tw_Limb_007054" LimbType="Standard" Offset="0x7054"/>
|
||||
<Limb Name="object_tw_Limb_007060" LimbType="Standard" Offset="0x7060"/>
|
||||
<Limb Name="object_tw_Limb_00706C" LimbType="Standard" Offset="0x706C"/>
|
||||
<!-- Kotake skeleton -->
|
||||
<Limb Name="gTwinrovaKotakePelvisLimb" LimbType="Standard" Offset="0x6F40"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftThighLimb" LimbType="Standard" Offset="0x6F4C"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftShinLimb" LimbType="Standard" Offset="0x6F58"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftFootLimb" LimbType="Standard" Offset="0x6F64"/>
|
||||
<Limb Name="gTwinrovaKotakeRightThighLimb" LimbType="Standard" Offset="0x6F70"/>
|
||||
<Limb Name="gTwinrovaKotakeRightShinLimb" LimbType="Standard" Offset="0x6F7C"/>
|
||||
<Limb Name="gTwinrovaKotakeRightFootLimb" LimbType="Standard" Offset="0x6F88"/>
|
||||
<Limb Name="gTwinrovaKotakeTorsoLimb" LimbType="Standard" Offset="0x6F94"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftSleeveStartLimb" LimbType="Standard" Offset="0x6FA0"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftSleeveMidLimb" LimbType="Standard" Offset="0x6FAC"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftSleeveEndLimb" LimbType="Standard" Offset="0x6FB8"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftSleeveFrontLimb" LimbType="Standard" Offset="0x6FC4"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftHandLimb" LimbType="Standard" Offset="0x6FD0"/>
|
||||
<Limb Name="gTwinrovaKotakeBroomLimb" LimbType="Standard" Offset="0x6FDC"/>
|
||||
<Limb Name="gTwinrovaKotakeRightSleeveStartLimb" LimbType="Standard" Offset="0x6FE8"/>
|
||||
<Limb Name="gTwinrovaKotakeRightSleeveMidLimb" LimbType="Standard" Offset="0x6FF4"/>
|
||||
<Limb Name="gTwinrovaKotakeRightSleeveEndLimb" LimbType="Standard" Offset="0x7000"/>
|
||||
<Limb Name="gTwinrovaKotakeRightSleeveFrontLimb" LimbType="Standard" Offset="0x700C"/>
|
||||
<Limb Name="gTwinrovaKotakeRightHandLimb" LimbType="Standard" Offset="0x7018"/>
|
||||
<Limb Name="gTwinrovaKotakeNeckLimb" LimbType="Standard" Offset="0x7024"/>
|
||||
<Limb Name="gTwinrovaKotakeHeadLimb" LimbType="Standard" Offset="0x7030"/>
|
||||
<Limb Name="gTwinrovaKotakeRightBraidStartLimb" LimbType="Standard" Offset="0x703C"/>
|
||||
<Limb Name="gTwinrovaKotakeRightBraidEndLimb" LimbType="Standard" Offset="0x7048"/>
|
||||
<Limb Name="gTwinrovaKotakeTeethLimb" LimbType="Standard" Offset="0x7054"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftBraidStartLimb" LimbType="Standard" Offset="0x7060"/>
|
||||
<Limb Name="gTwinrovaKotakeLeftBraidEndLimb" LimbType="Standard" Offset="0x706C"/>
|
||||
<Skeleton Name="gTwinrovaKotakeSkel" Type="Flex" LimbType="Standard" Offset="0x70E0"/>
|
||||
|
||||
<Skeleton Name="object_tw_Skel_0070E0" Type="Flex" LimbType="Standard" Offset="0x70E0"/>
|
||||
<!-- Kotake and Koume animations -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeChargeUpAttackStartAnim" Offset="0x7688"/> <!-- Original name is "btT_fly_to_tame" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeSpinAnim" Offset="0x7CA8"/> <!-- Original name is "btT_guard" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeLaughAnim" Offset="0x88C8"/> <!-- Original name is "btT_hihihi" -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeChargeUpAttackLoopAnim" Offset="0x9398"/> <!-- Original name is "btT_tame" ("to amass; to accumulate") -->
|
||||
<Animation Name="gTwinrovaKotakeKoumeTPoseAnim" Offset="0x947C"/>
|
||||
|
||||
<Animation Name="object_tw_Anim_007688" Offset="0x7688"/> <!-- Original name is "btT_fly_to_tame" -->
|
||||
<Animation Name="object_tw_Anim_007CA8" Offset="0x7CA8"/> <!-- Original name is "btT_guard" -->
|
||||
<Animation Name="object_tw_Anim_0088C8" Offset="0x88C8"/> <!-- Original name is "btT_hihihi" -->
|
||||
<Animation Name="object_tw_Anim_009398" Offset="0x9398"/> <!-- Original name is "btT_tame" ("to amass; to accumulate") -->
|
||||
<Animation Name="object_tw_Anim_00947C" Offset="0x947C"/>
|
||||
|
||||
<Texture Name="object_tw_TLUT_009490" OutName="tlut_009490" Format="rgba16" Width="53" Height="4" Offset="0x9490"/>
|
||||
<!-- Kotake and Koume textures -->
|
||||
<Texture Name="gTwinrovaKoumeKotakeTLUT" OutName="twinrova_koume_kotake_tlut" Format="rgba16" Width="53" Height="4" Offset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeGerudoFabricTex" OutName="twinrova_kotake_gerudo_fabric" Format="rgba16" Width="32" Height="32" Offset="0x9638"/>
|
||||
<Texture Name="gTwinrovaKotakeRobeTex" OutName="twinrova_kotake_robe" Format="rgba16" Width="16" Height="16" Offset="0x9E38"/>
|
||||
<Texture Name="gTwinrovaRobePatternTex" OutName="twinrova_robe_pattern" Format="rgba16" Width="16" Height="16" Offset="0xA038"/>
|
||||
<Texture Name="gTwinrovaRobeTrimTex" OutName="twinrova_robe_trim" Format="rgba16" Width="16" Height="16" Offset="0xA238"/>
|
||||
<Texture Name="object_tw_Tex_00A438" OutName="tex_00A438" Format="ci8" Width="32" Height="32" Offset="0xA438" TlutOffset="0x9490"/>
|
||||
<Texture Name="object_tw_Tex_00A838" OutName="tex_00A838" Format="ci8" Width="16" Height="8" Offset="0xA838" TlutOffset="0x9490"/>
|
||||
<Texture Name="object_tw_Tex_00A8B8" OutName="tex_00A8B8" Format="ci8" Width="8" Height="8" Offset="0xA8B8" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeEyeOpenTex" OutName="twinrova_kotake_koume_eye_open" Format="ci8" Width="32" Height="32" Offset="0xA438" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeSkinTex" OutName="twinrova_kotake_koume_skin" Format="ci8" Width="16" Height="8" Offset="0xA838" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeMouthTex" OutName="twinrova_kotake_koume_mouth" Format="ci8" Width="8" Height="8" Offset="0xA8B8" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaHairTex" OutName="twinrova_hair" Format="rgba16" Width="8" Height="32" Offset="0xA8F8"/>
|
||||
<Texture Name="object_tw_Tex_00AAF8" OutName="tex_00AAF8" Format="ci8" Width="8" Height="8" Offset="0xAAF8" TlutOffset="0x9490"/>
|
||||
<Texture Name="object_tw_Tex_00AB38" OutName="tex_00AB38" Format="ci8" Width="8" Height="16" Offset="0xAB38" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeEarTex" OutName="twinrova_kotake_koume_ear" Format="ci8" Width="8" Height="8" Offset="0xAAF8" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeFingerTex" OutName="twinrova_kotake_koume_finger" Format="ci8" Width="8" Height="16" Offset="0xAB38" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaBroomHandleTex" OutName="twinrova_broom_handle" Format="rgba16" Width="8" Height="8" Offset="0xABB8"/>
|
||||
<Texture Name="gTwinrovaBroomHeadTex" OutName="twinrova_broom_head" Format="rgba16" Width="16" Height="32" Offset="0xAC38"/>
|
||||
<Texture Name="object_tw_Tex_00B038" OutName="tex_00B038" Format="rgba16" Width="16" Height="8" Offset="0xB038"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeJewelHolderTex" OutName="twinrova_koume_kotake_jewel_holder" Format="rgba16" Width="16" Height="8" Offset="0xB038"/>
|
||||
<Texture Name="gTwinrovaKotakeJewelTex" OutName="twinrova_kotake_jewel" Format="rgba16" Width="8" Height="8" Offset="0xB138"/>
|
||||
<Texture Name="object_tw_Tex_00B1B8" OutName="tex_00B1B8" Format="ci8" Width="8" Height="8" Offset="0xB1B8" TlutOffset="0x9490"/>
|
||||
<Texture Name="object_tw_Tex_00B1F8" OutName="tex_00B1F8" Format="ci8" Width="8" Height="8" Offset="0xB1F8" TlutOffset="0x9490"/>
|
||||
<Texture Name="object_tw_Tex_00B238" OutName="tex_00B238" Format="ci8" Width="32" Height="32" Offset="0xB238" TlutOffset="0x9490"/>
|
||||
<Texture Name="object_tw_Tex_00B638" OutName="tex_00B638" Format="ci8" Width="32" Height="32" Offset="0xB638" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeNeckTex" OutName="twinrova_koume_kotake_neck" Format="ci8" Width="8" Height="8" Offset="0xB1B8" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeNostrilsTex" OutName="twinrova_koume_kotake_nostrils" Format="ci8" Width="8" Height="8" Offset="0xB1F8" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeEyeHalfTex" OutName="twinrova_koume_kotake_eye_half" Format="ci8" Width="32" Height="32" Offset="0xB238" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaKotakeKoumeEyeClosedTex" OutName="twinrova_koume_kotake_eye_closed" Format="ci8" Width="32" Height="32" Offset="0xB638" TlutOffset="0x9490"/>
|
||||
<Texture Name="gTwinrovaEffectTex" OutName="twinrova_effect" Format="i8" Width="32" Height="32" Offset="0xBA38"/>
|
||||
<Texture Name="gTwinrovaEffectMaskTex" OutName="twinrova_effect_mask" Format="i4" Width="32" Height="64" Offset="0xBE38"/>
|
||||
<Texture Name="gTwinrovaKoumeGerudoFabricTex" OutName="twinrova_koume_gerudo_fabric" Format="rgba16" Width="32" Height="32" Offset="0xC238"/>
|
||||
<Texture Name="gTwinrovaKoumeJewelTex" OutName="twinrova_koume_jewel" Format="rgba16" Width="8" Height="8" Offset="0xCA38"/>
|
||||
<Texture Name="gTwinrovaKoumeRobeTex" OutName="twinrova_koume_robe" Format="rgba16" Width="16" Height="16" Offset="0xCAB8"/>
|
||||
|
||||
<DList Name="object_tw_DL_0110A8" Offset="0x110A8"/>
|
||||
<DList Name="object_tw_DL_0116A0" Offset="0x116A0"/>
|
||||
<DList Name="object_tw_DL_011C98" Offset="0x11C98"/>
|
||||
<DList Name="object_tw_DL_011E28" Offset="0x11E28"/>
|
||||
<DList Name="object_tw_DL_011FB8" Offset="0x11FB8"/>
|
||||
<DList Name="object_tw_DL_012018" Offset="0x12018"/>
|
||||
<DList Name="object_tw_DL_0120C8" Offset="0x120C8"/>
|
||||
<DList Name="object_tw_DL_012178" Offset="0x12178"/>
|
||||
<DList Name="object_tw_DL_012210" Offset="0x12210"/>
|
||||
<DList Name="object_tw_DL_0122A8" Offset="0x122A8"/>
|
||||
<DList Name="object_tw_DL_012410" Offset="0x12410"/>
|
||||
<DList Name="object_tw_DL_012578" Offset="0x12578"/>
|
||||
<DList Name="object_tw_DL_0126E0" Offset="0x126E0"/>
|
||||
<DList Name="object_tw_DL_012848" Offset="0x12848"/>
|
||||
<DList Name="object_tw_DL_0128E0" Offset="0x128E0"/>
|
||||
<DList Name="object_tw_DL_012978" Offset="0x12978"/>
|
||||
<DList Name="object_tw_DL_012A28" Offset="0x12A28"/>
|
||||
<DList Name="object_tw_DL_012AD8" Offset="0x12AD8"/>
|
||||
<DList Name="object_tw_DL_012B38" Offset="0x12B38"/>
|
||||
<DList Name="object_tw_DL_012CE0" Offset="0x12CE0"/>
|
||||
<DList Name="object_tw_DL_013310" Offset="0x13310"/>
|
||||
<DList Name="object_tw_DL_0134B8" Offset="0x134B8"/>
|
||||
<DList Name="object_tw_DL_013AE8" Offset="0x13AE8"/>
|
||||
<DList Name="object_tw_DL_013D68" Offset="0x13D68"/>
|
||||
<DList Name="object_tw_DL_013E98" Offset="0x13E98"/>
|
||||
<DList Name="object_tw_DL_013F98" Offset="0x13F98"/>
|
||||
<DList Name="object_tw_DL_014070" Offset="0x14070"/>
|
||||
<DList Name="object_tw_DL_014158" Offset="0x14158"/>
|
||||
<!--Blob Name="object_tw_Blob_015200" Size="0x60" Offset="0x15200" /-->
|
||||
<DList Name="object_tw_DL_015440" Offset="0x15440"/>
|
||||
<DList Name="object_tw_DL_015538" Offset="0x15538"/>
|
||||
<DList Name="object_tw_DL_015648" Offset="0x15648"/>
|
||||
<DList Name="object_tw_DL_015740" Offset="0x15740"/>
|
||||
<DList Name="object_tw_DL_015850" Offset="0x15850"/>
|
||||
<DList Name="object_tw_DL_015990" Offset="0x15990"/>
|
||||
<DList Name="object_tw_DL_015B10" Offset="0x15B10"/>
|
||||
<DList Name="object_tw_DL_015C30" Offset="0x15C30"/>
|
||||
<DList Name="object_tw_DL_015D58" Offset="0x15D58"/>
|
||||
<DList Name="object_tw_DL_015E78" Offset="0x15E78"/>
|
||||
<DList Name="object_tw_DL_015FF8" Offset="0x15FF8"/>
|
||||
<DList Name="object_tw_DL_016118" Offset="0x16118"/>
|
||||
<DList Name="object_tw_DL_016240" Offset="0x16240"/>
|
||||
<DList Name="object_tw_DL_016360" Offset="0x16360"/>
|
||||
<DList Name="object_tw_DL_0164C0" Offset="0x164C0"/>
|
||||
<DList Name="object_tw_DL_0164C8" Offset="0x164C8"/>
|
||||
<DList Name="object_tw_DL_0164D0" Offset="0x164D0"/>
|
||||
<!-- Kotake and Koume DLs -->
|
||||
<DList Name="gTwinrovaKotakeHeadInvisibleHairDL" Offset="0x110A8"/>
|
||||
<DList Name="gTwinrovaKoumeHeadInvisibleHairDL" Offset="0x116A0"/>
|
||||
<DList Name="gTwinrovaKotakeBroomInvisibleHeadDL" Offset="0x11C98"/>
|
||||
<DList Name="gTwinrovaKoumeBroomInvisibleHeadDL" Offset="0x11E28"/>
|
||||
<DList Name="gTwinrovaKotakeTeethDL" Offset="0x11FB8"/>
|
||||
<DList Name="gTwinrovaKotakeRightShinDL" Offset="0x12018"/>
|
||||
<DList Name="gTwinrovaKotakeLeftShinDL" Offset="0x120C8"/>
|
||||
<DList Name="gTwinrovaKotakeRightFootDL" Offset="0x12178"/>
|
||||
<DList Name="gTwinrovaKotakeLeftFootDL" Offset="0x12210"/>
|
||||
<DList Name="gTwinrovaKotakeRightHandDL" Offset="0x122A8"/>
|
||||
<DList Name="gTwinrovaKotakeLeftHandDL" Offset="0x12410"/>
|
||||
<DList Name="gTwinrovaKoumeRightHandDL" Offset="0x12578"/>
|
||||
<DList Name="gTwinrovaKoumeLeftHandDL" Offset="0x126E0"/>
|
||||
<DList Name="gTwinrovaKoumeLeftFootDL" Offset="0x12848"/>
|
||||
<DList Name="gTwinrovaKoumeRightFootDL" Offset="0x128E0"/>
|
||||
<DList Name="gTwinrovaKoumeLeftShinDL" Offset="0x12978"/>
|
||||
<DList Name="gTwinrovaKoumeRightShinDL" Offset="0x12A28"/>
|
||||
<DList Name="gTwinrovaKoumeTeethDL" Offset="0x12AD8"/>
|
||||
<DList Name="gTwinrovaKotakeBroomDL" Offset="0x12B38"/>
|
||||
<DList Name="gTwinrovaKotakeHeadDL" Offset="0x12CE0"/>
|
||||
<DList Name="gTwinrovaKoumeBroomDL" Offset="0x13310"/>
|
||||
<DList Name="gTwinrovaKoumeHeadDL" Offset="0x134B8"/>
|
||||
<DList Name="gTwinrovaKotakeIceHairDL" Offset="0x13AE8"/>
|
||||
<DList Name="gTwinrovaKoumeFireHairDL" Offset="0x13D68"/>
|
||||
<DList Name="gTwinrovaKotakeIceBroomHeadDL" Offset="0x13E98"/>
|
||||
<DList Name="gTwinrovaKotakeIceBroomHeadOuterDL" Offset="0x13F98"/>
|
||||
<DList Name="gTwinrovaKotakeFireBroomHeadDL" Offset="0x14070"/>
|
||||
<DList Name="gTwinrovaKotakeFireBroomHeadOuterDL" Offset="0x14158"/>
|
||||
|
||||
<Blob Name="object_tw_Blob_015200" Size="0x60" Offset="0x15200"/>
|
||||
|
||||
<!-- Kotake DLs -->
|
||||
<DList Name="gTwinrovaKotakeLeftBraidEndDL" Offset="0x15440"/>
|
||||
<DList Name="gTwinrovaKotakeLeftBraidStartDL" Offset="0x15538"/>
|
||||
<DList Name="gTwinrovaKotakeRightBraidEndDL" Offset="0x15648"/>
|
||||
<DList Name="gTwinrovaKotakeRightBraidStartDL" Offset="0x15740"/>
|
||||
<DList Name="gTwinrovaKotakeNeckDL" Offset="0x15850"/>
|
||||
<DList Name="gTwinrovaKotakeRightSleeveFrontDL" Offset="0x15990"/>
|
||||
<DList Name="gTwinrovaKotakeRightSleeveEndDL" Offset="0x15B10"/>
|
||||
<DList Name="gTwinrovaKotakeRightSleeveMidDL" Offset="0x15C30"/>
|
||||
<DList Name="gTwinrovaKotakeRightSleeveStartDL" Offset="0x15D58"/>
|
||||
<DList Name="gTwinrovaKotakeLeftSleeveFrontDL" Offset="0x15E78"/>
|
||||
<DList Name="gTwinrovaKotakeLeftSleeveEndDL" Offset="0x15FF8"/>
|
||||
<DList Name="gTwinrovaKotakeLeftSleeveMidDL" Offset="0x16118"/>
|
||||
<DList Name="gTwinrovaKotakeLeftSleeveStartDL" Offset="0x16240"/>
|
||||
<DList Name="gTwinrovaKotakeTorsoDL" Offset="0x16360"/>
|
||||
<DList Name="gTwinrovaKotakeRightThighDL" Offset="0x164C0"/>
|
||||
<DList Name="gTwinrovaKotakeLeftThighDL" Offset="0x164C8"/>
|
||||
<DList Name="gTwinrovaKotakePelvisDL" Offset="0x164D0"/>
|
||||
|
||||
<Texture Name="gTwinrovaBraidEndTex" OutName="twinrova_braid_end" Format="rgba16" Width="8" Height="8" Offset="0x16650"/>
|
||||
<Texture Name="gTwinrovaLeftFootTex" OutName="twinrova_left_foot" Format="rgba16" Width="4" Height="8" Offset="0x166D0"/>
|
||||
<!--Blob Name="object_tw_Blob_0176D0" Size="0x60" Offset="0x176D0" /-->
|
||||
<DList Name="object_tw_DL_017910" Offset="0x17910"/>
|
||||
<DList Name="object_tw_DL_017A08" Offset="0x17A08"/>
|
||||
<DList Name="object_tw_DL_017B18" Offset="0x17B18"/>
|
||||
<DList Name="object_tw_DL_017C10" Offset="0x17C10"/>
|
||||
<DList Name="object_tw_DL_017D20" Offset="0x17D20"/>
|
||||
<DList Name="object_tw_DL_017E60" Offset="0x17E60"/>
|
||||
<DList Name="object_tw_DL_017FE0" Offset="0x17FE0"/>
|
||||
<DList Name="object_tw_DL_018100" Offset="0x18100"/>
|
||||
<DList Name="object_tw_DL_018228" Offset="0x18228"/>
|
||||
<DList Name="object_tw_DL_018348" Offset="0x18348"/>
|
||||
<DList Name="object_tw_DL_0184C8" Offset="0x184C8"/>
|
||||
<DList Name="object_tw_DL_0185E8" Offset="0x185E8"/>
|
||||
<DList Name="object_tw_DL_018710" Offset="0x18710"/>
|
||||
<DList Name="object_tw_DL_018830" Offset="0x18830"/>
|
||||
<DList Name="object_tw_DL_018990" Offset="0x18990"/>
|
||||
<DList Name="object_tw_DL_018998" Offset="0x18998"/>
|
||||
<DList Name="object_tw_DL_0189A0" Offset="0x189A0"/>
|
||||
|
||||
<Blob Name="object_tw_Blob_0176D0" Size="0x60" Offset="0x176D0"/>
|
||||
|
||||
<!-- Koume DLs -->
|
||||
<DList Name="gTwinrovaKoumeLeftBraidEndDL" Offset="0x17910"/>
|
||||
<DList Name="gTwinrovaKoumeLeftBraidStartDL" Offset="0x17A08"/>
|
||||
<DList Name="gTwinrovaKoumeRightBraidEndDL" Offset="0x17B18"/>
|
||||
<DList Name="gTwinrovaKoumeRightBraidStartDL" Offset="0x17C10"/>
|
||||
<DList Name="gTwinrovaKoumeNeckDL" Offset="0x17D20"/>
|
||||
<DList Name="gTwinrovaKoumeRightSleeveFrontDL" Offset="0x17E60"/>
|
||||
<DList Name="gTwinrovaKoumeRightSleeveEndDL" Offset="0x17FE0"/>
|
||||
<DList Name="gTwinrovaKoumeRightSleeveMidDL" Offset="0x18100"/>
|
||||
<DList Name="gTwinrovaKoumeRightSleeveStartDL" Offset="0x18228"/>
|
||||
<DList Name="gTwinrovaKoumeLeftSleeveFrontDL" Offset="0x18348"/>
|
||||
<DList Name="gTwinrovaKoumeLeftSleeveEndDL" Offset="0x184C8"/>
|
||||
<DList Name="gTwinrovaKoumeLeftSleeveMidDL" Offset="0x185E8"/>
|
||||
<DList Name="gTwinrovaKoumeLeftSleeveStartDL" Offset="0x18710"/>
|
||||
<DList Name="gTwinrovaKoumeTorsoDL" Offset="0x18830"/>
|
||||
<DList Name="gTwinrovaKoumeRightThighDL" Offset="0x18990"/>
|
||||
<DList Name="gTwinrovaKoumeLeftThighDL" Offset="0x18998"/>
|
||||
<DList Name="gTwinrovaKoumePelvisDL" Offset="0x189A0"/>
|
||||
|
||||
<Texture Name="gTwinrovaRightFootTex" OutName="twinrova_right_foot" Format="rgba16" Width="4" Height="8" Offset="0x18B20"/>
|
||||
|
||||
<!-- Assets for the smoke that comes off of the big flame -->
|
||||
|
@ -229,34 +241,35 @@
|
|||
<DList Name="gTwinrovaLightCircleDL" Offset="0x1F390"/> <!-- Original name is "bt_heavensgate_modelT" -->
|
||||
<DList Name="gTwinrovaHaloDL" Offset="0x1F608"/> <!-- Original name is "bt_angelring_model" -->
|
||||
|
||||
<Limb Name="object_tw_Limb_01F6E8" LimbType="Standard" Offset="0x1F6E8"/>
|
||||
<Limb Name="object_tw_Limb_01F6F4" LimbType="Standard" Offset="0x1F6F4"/>
|
||||
<Limb Name="object_tw_Limb_01F700" LimbType="Standard" Offset="0x1F700"/>
|
||||
<Limb Name="object_tw_Limb_01F70C" LimbType="Standard" Offset="0x1F70C"/>
|
||||
<Limb Name="object_tw_Limb_01F718" LimbType="Standard" Offset="0x1F718"/>
|
||||
<Limb Name="object_tw_Limb_01F724" LimbType="Standard" Offset="0x1F724"/>
|
||||
<Limb Name="object_tw_Limb_01F730" LimbType="Standard" Offset="0x1F730"/>
|
||||
<Limb Name="object_tw_Limb_01F73C" LimbType="Standard" Offset="0x1F73C"/>
|
||||
<Limb Name="object_tw_Limb_01F748" LimbType="Standard" Offset="0x1F748"/>
|
||||
<Limb Name="object_tw_Limb_01F754" LimbType="Standard" Offset="0x1F754"/>
|
||||
<Limb Name="object_tw_Limb_01F760" LimbType="Standard" Offset="0x1F760"/>
|
||||
<Limb Name="object_tw_Limb_01F76C" LimbType="Standard" Offset="0x1F76C"/>
|
||||
<Limb Name="object_tw_Limb_01F778" LimbType="Standard" Offset="0x1F778"/>
|
||||
<Limb Name="object_tw_Limb_01F784" LimbType="Standard" Offset="0x1F784"/>
|
||||
<Limb Name="object_tw_Limb_01F790" LimbType="Standard" Offset="0x1F790"/>
|
||||
<Limb Name="object_tw_Limb_01F79C" LimbType="Standard" Offset="0x1F79C"/>
|
||||
<Limb Name="object_tw_Limb_01F7A8" LimbType="Standard" Offset="0x1F7A8"/>
|
||||
<Limb Name="object_tw_Limb_01F7B4" LimbType="Standard" Offset="0x1F7B4"/>
|
||||
<Limb Name="object_tw_Limb_01F7C0" LimbType="Standard" Offset="0x1F7C0"/>
|
||||
<Limb Name="object_tw_Limb_01F7CC" LimbType="Standard" Offset="0x1F7CC"/>
|
||||
<Limb Name="object_tw_Limb_01F7D8" LimbType="Standard" Offset="0x1F7D8"/>
|
||||
<Limb Name="object_tw_Limb_01F7E4" LimbType="Standard" Offset="0x1F7E4"/>
|
||||
<Limb Name="object_tw_Limb_01F7F0" LimbType="Standard" Offset="0x1F7F0"/>
|
||||
<Limb Name="object_tw_Limb_01F7FC" LimbType="Standard" Offset="0x1F7FC"/>
|
||||
<Limb Name="object_tw_Limb_01F808" LimbType="Standard" Offset="0x1F808"/>
|
||||
<Limb Name="object_tw_Limb_01F814" LimbType="Standard" Offset="0x1F814"/>
|
||||
|
||||
<Skeleton Name="object_tw_Skel_01F888" Type="Flex" LimbType="Standard" Offset="0x1F888"/>
|
||||
<!-- Koume skeleton -->
|
||||
<Limb Name="gTwinrovaKoumePelvisLimb" LimbType="Standard" Offset="0x1F6E8"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftThighLimb" LimbType="Standard" Offset="0x1F6F4"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftShinLimb" LimbType="Standard" Offset="0x1F700"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftFootLimb" LimbType="Standard" Offset="0x1F70C"/>
|
||||
<Limb Name="gTwinrovaKoumeRightThighLimb" LimbType="Standard" Offset="0x1F718"/>
|
||||
<Limb Name="gTwinrovaKoumeRightShinLimb" LimbType="Standard" Offset="0x1F724"/>
|
||||
<Limb Name="gTwinrovaKoumeRightFootLimb" LimbType="Standard" Offset="0x1F730"/>
|
||||
<Limb Name="gTwinrovaKoumeTorsoLimb" LimbType="Standard" Offset="0x1F73C"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftSleeveStartLimb" LimbType="Standard" Offset="0x1F748"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftSleeveMidLimb" LimbType="Standard" Offset="0x1F754"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftSleeveEndLimb" LimbType="Standard" Offset="0x1F760"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftSleeveFrontLimb" LimbType="Standard" Offset="0x1F76C"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftHandLimb" LimbType="Standard" Offset="0x1F778"/>
|
||||
<Limb Name="gTwinrovaKoumeBroomLimb" LimbType="Standard" Offset="0x1F784"/>
|
||||
<Limb Name="gTwinrovaKoumeRightSleeveStartLimb" LimbType="Standard" Offset="0x1F790"/>
|
||||
<Limb Name="gTwinrovaKoumeRightSleeveMidLimb" LimbType="Standard" Offset="0x1F79C"/>
|
||||
<Limb Name="gTwinrovaKoumeRightSleeveEndLimb" LimbType="Standard" Offset="0x1F7A8"/>
|
||||
<Limb Name="gTwinrovaKoumeRightSleeveFrontLimb" LimbType="Standard" Offset="0x1F7B4"/>
|
||||
<Limb Name="gTwinrovaKoumeRightHandLimb" LimbType="Standard" Offset="0x1F7C0"/>
|
||||
<Limb Name="gTwinrovaKoumeNeckLimb" LimbType="Standard" Offset="0x1F7CC"/>
|
||||
<Limb Name="gTwinrovaKoumeHeadLimb" LimbType="Standard" Offset="0x1F7D8"/>
|
||||
<Limb Name="gTwinrovaKoumeRightBraidStartLimb" LimbType="Standard" Offset="0x1F7E4"/>
|
||||
<Limb Name="gTwinrovaKoumeRightBraidEndLimb" LimbType="Standard" Offset="0x1F7F0"/>
|
||||
<Limb Name="gTwinrovaKoumeTeethLimb" LimbType="Standard" Offset="0x1F7FC"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftBraidStartLimb" LimbType="Standard" Offset="0x1F808"/>
|
||||
<Limb Name="gTwinrovaKoumeLeftBraidEndLimb" LimbType="Standard" Offset="0x1F814"/>
|
||||
<Skeleton Name="gTwinrovaKoumeSkel" Type="Flex" LimbType="Standard" Offset="0x1F888"/>
|
||||
|
||||
<!-- Twinrova Texture -->
|
||||
<Texture Name="gTwinrovaEyeHalfTex" OutName="twinrova_eye_half" Format="ci8" Width="32" Height="32" Offset="0x2A070" TlutOffset="0x29E50"/>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<Texture Name="gBombchuItemNameENGTex" OutName="bombchu_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2400"/>
|
||||
<Texture Name="gHookshotItemNameENGTex" OutName="hookshot_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2800"/>
|
||||
<Texture Name="gLongshotItemNameENGTex" OutName="longshot_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x2C00"/>
|
||||
<Texture Name="gIceArrowItemNameENGTex" OutName="icearrow_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3000"/>
|
||||
<Texture Name="gIceArrowItemNameENGTex" OutName="ice_arrow_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3000"/>
|
||||
<Texture Name="gFaroresWindItemNameENGTex" OutName="farores_wind_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3400"/>
|
||||
<Texture Name="gBoomerangItemNameENGTex" OutName="boomerang_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3800"/>
|
||||
<Texture Name="gLensItemNameENGTex" OutName="lens_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x3C00"/>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<Texture Name="gUnusedBossKeyItemName7JPNTex" OutName="boss_key_item_name_unused_jpn_7" Format="ia4" Width="128" Height="16" Offset="0x1E400"/>
|
||||
<Texture Name="gBiggoronsSwordItemNameENGTex" OutName="biggorons_sword_item_name_eng" Format="ia4" Width="128" Height="16" Offset="0x1E800"/>
|
||||
<Texture Name="gDekuStickItemNameGERTex" OutName="deku_stick_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1EC00"/>
|
||||
<Texture Name="gDekuNutItemNameGERTex" OutName="dekunut_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F000"/>
|
||||
<Texture Name="gDekuNutItemNameGERTex" OutName="deku_nut_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F000"/>
|
||||
<Texture Name="gBombItemNameItemNameGERTex" OutName="bomb_item_name_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F400"/>
|
||||
<Texture Name="gFairyBowItemNameGERTex" OutName="fairy_bow_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x1F800"/>
|
||||
<Texture Name="gFireArrowItemNameUnk2GERTex" OutName="fire_arrow_item_name_unk2_ger" Format="ia4" Width="128" Height="16" Offset="0x1FC00"/>
|
||||
|
@ -135,7 +135,7 @@
|
|||
<Texture Name="gBombchuItemNameGERTex" OutName="bombchu_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21000"/>
|
||||
<Texture Name="gHookshotItemNameGERTex" OutName="hookshot_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21400"/>
|
||||
<Texture Name="gLongshotItemNameGERTex" OutName="longshot_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21800"/>
|
||||
<Texture Name="gIceArrowItemNameGERTex" OutName="icearrow_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21C00"/>
|
||||
<Texture Name="gIceArrowItemNameGERTex" OutName="ice_arrow_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x21C00"/>
|
||||
<Texture Name="gFaroresWindItemNameGERTex" OutName="farores_wind_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x22000"/>
|
||||
<Texture Name="gBoomerangItemNameGERTex" OutName="boomerang_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x22400"/>
|
||||
<Texture Name="gLensItemNameGERTex" OutName="lens_item_name_ger" Format="ia4" Width="128" Height="16" Offset="0x22800"/>
|
||||
|
|
|
@ -13,4 +13,16 @@
|
|||
#define ALIGNED8
|
||||
#endif
|
||||
|
||||
#ifdef __sgi /* IDO compiler */
|
||||
#define ALIGNOF(x) __builtin_alignof(x)
|
||||
#elif (__STDC_VERSION__ >= 201112L) /* C11 */
|
||||
#define ALIGNOF(x) _Alignof(x)
|
||||
#else /* __GNUC__ */
|
||||
#define ALIGNOF(x) __alignof__(x)
|
||||
#endif
|
||||
|
||||
#define ALIGN_MASK(n) (~((n) - 1))
|
||||
|
||||
#define ALIGNOF_MASK(x) ALIGN_MASK(ALIGNOF(x))
|
||||
|
||||
#endif
|
||||
|
|
|
@ -78,7 +78,7 @@ void __osPiGetAccess(void);
|
|||
void __osPiRelAccess(void);
|
||||
s32 osSendMesg(OSMesgQueue* mq, OSMesg msg, s32 flag);
|
||||
void osStopThread(OSThread* thread);
|
||||
void osViExtendVStart(u32 arg0);
|
||||
void osViExtendVStart(u32 value);
|
||||
s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag);
|
||||
void __osInitialize_common(void);
|
||||
void __osInitialize_autodetect(void);
|
||||
|
@ -120,7 +120,7 @@ s32 osJamMesg(OSMesgQueue* mq, OSMesg msg, s32 flag);
|
|||
void osSetThreadPri(OSThread* thread, OSPri pri);
|
||||
OSPri osGetThreadPri(OSThread* thread);
|
||||
s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
|
||||
void osViSwapBuffer(void* vaddr);
|
||||
void osViSwapBuffer(void* frameBufPtr);
|
||||
s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size);
|
||||
u32 bcmp(void* __sl, void* __s2, u32 __n);
|
||||
OSTime osGetTime(void);
|
||||
|
@ -911,7 +911,7 @@ void Lights_Draw(Lights* lights, GraphicsContext* gfxCtx);
|
|||
void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* vec);
|
||||
void LightContext_Init(PlayState* play, LightContext* lightCtx);
|
||||
void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b);
|
||||
void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 fogNear, s16 fogFar);
|
||||
void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 fogNear, s16 zFar);
|
||||
Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx);
|
||||
void LightContext_InitList(PlayState* play, LightContext* lightCtx);
|
||||
void LightContext_DestroyList(PlayState* play, LightContext* lightCtx);
|
||||
|
@ -1291,8 +1291,8 @@ s32 View_UpdateViewingMatrix(View* view);
|
|||
s32 View_ApplyTo(View* view, s32 mask, Gfx** gfxp);
|
||||
s32 View_ErrorCheckEyePosition(f32 eyeX, f32 eyeY, f32 eyeZ);
|
||||
void ViMode_LogPrint(OSViMode* osViMode);
|
||||
void ViMode_Configure(ViMode* viMode, s32 mode, s32 type, s32 unk_70, s32 unk_74, s32 unk_78, s32 unk_7C, s32 width,
|
||||
s32 height, s32 unk_left, s32 unk_right, s32 unk_top, s32 unk_bottom);
|
||||
void ViMode_Configure(ViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antialiasOff, s32 modeN, s32 fb16Bit,
|
||||
s32 width, s32 height, s32 leftAdjust, s32 rightAdjust, s32 upperAdjust, s32 lowerAdjust);
|
||||
void ViMode_Save(ViMode* viMode);
|
||||
void ViMode_Load(ViMode* viMode);
|
||||
void ViMode_Init(ViMode* viMode);
|
||||
|
@ -1460,35 +1460,6 @@ void func_800C213C(PreRender* this, Gfx** gfxp);
|
|||
void PreRender_RestoreFramebuffer(PreRender* this, Gfx** gfxp);
|
||||
void PreRender_CopyImageRegion(PreRender* this, Gfx** gfxp);
|
||||
void PreRender_ApplyFilters(PreRender* this);
|
||||
void THGA_Ct(TwoHeadGfxArena* thga, Gfx* start, u32 size);
|
||||
void THGA_Dt(TwoHeadGfxArena* thga);
|
||||
u32 THGA_IsCrash(TwoHeadGfxArena* thga);
|
||||
void THGA_Init(TwoHeadGfxArena* thga);
|
||||
s32 THGA_GetSize(TwoHeadGfxArena* thga);
|
||||
Gfx* THGA_GetHead(TwoHeadGfxArena* thga);
|
||||
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* start);
|
||||
Gfx* THGA_GetTail(TwoHeadGfxArena* thga);
|
||||
Gfx* THGA_AllocStartArray8(TwoHeadGfxArena* thga, u32 count);
|
||||
Gfx* THGA_AllocStart8(TwoHeadGfxArena* thga);
|
||||
Gfx* THGA_AllocStart8Wrapper(TwoHeadGfxArena* thga);
|
||||
Gfx* THGA_AllocEnd(TwoHeadGfxArena* thga, u32 size);
|
||||
Gfx* THGA_AllocEndArray64(TwoHeadGfxArena* thga, u32 count);
|
||||
Gfx* THGA_AllocEnd64(TwoHeadGfxArena* thga);
|
||||
Gfx* THGA_AllocEndArray16(TwoHeadGfxArena* thga, u32 count);
|
||||
Gfx* THGA_AllocEnd16(TwoHeadGfxArena* thga);
|
||||
void* THA_GetHead(TwoHeadArena* tha);
|
||||
void THA_SetHead(TwoHeadArena* tha, void* start);
|
||||
void* THA_GetTail(TwoHeadArena* tha);
|
||||
void* THA_AllocStart(TwoHeadArena* tha, u32 size);
|
||||
void* THA_AllocStart1(TwoHeadArena* tha);
|
||||
void* THA_AllocEnd(TwoHeadArena* tha, u32 size);
|
||||
void* THA_AllocEndAlign16(TwoHeadArena* tha, u32 size);
|
||||
void* THA_AllocEndAlign(TwoHeadArena* tha, u32 size, u32 mask);
|
||||
s32 THA_GetSize(TwoHeadArena* tha);
|
||||
u32 THA_IsCrash(TwoHeadArena* tha);
|
||||
void THA_Init(TwoHeadArena* tha);
|
||||
void THA_Ct(TwoHeadArena* tha, void* ptr, u32 size);
|
||||
void THA_Dt(TwoHeadArena* tha);
|
||||
void AudioMgr_StopAllSfx(void);
|
||||
void func_800C3C80(AudioMgr* audioMgr);
|
||||
void AudioMgr_HandleRetrace(AudioMgr* audioMgr);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef MATH_H
|
||||
#define MATH_H
|
||||
|
||||
#include "ultra64/types.h"
|
||||
#include "ultra64/ultratypes.h"
|
||||
|
||||
#define M_PI 3.14159265358979323846f
|
||||
#define M_SQRT2 1.41421356237309504880f
|
||||
|
|
|
@ -119,6 +119,7 @@
|
|||
#define LOG_TIME(exp, value, file, line) LOG(exp, value, "%lld", file, line)
|
||||
#define LOG_NUM(exp, value, file, line) LOG(exp, value, "%d", file, line)
|
||||
#define LOG_HEX(exp, value, file, line) LOG(exp, value, "%x", file, line)
|
||||
#define LOG_HEX32(exp, value, file, line) LOG(exp, value, "%08x", file, line)
|
||||
#define LOG_FLOAT(exp, value, file, line) LOG(exp, value, "%f", file, line)
|
||||
|
||||
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#define R_ENV_LIGHT2_COLOR(i) REG(6 + (i))
|
||||
#define R_ENV_DISABLE_DBG REG(9)
|
||||
#define R_ENV_FOG_COLOR(i) REG(10 + (i))
|
||||
#define R_ENV_FOG_FAR REG(13)
|
||||
#define R_ENV_Z_FAR REG(13)
|
||||
#define R_ENV_FOG_NEAR REG(14)
|
||||
#define R_ENV_TIME_SPEED_OLD REG(15) // Most likely used during development. Unused in the final game.
|
||||
#define R_RUN_SPEED_LIMIT REG(45)
|
||||
|
@ -53,6 +53,13 @@
|
|||
#define R_UPDATE_RATE SREG(30)
|
||||
#define R_GRAPH_TASKSET00_FLAGS SREG(33)
|
||||
#define R_ENABLE_AUDIO_DBG SREG(36)
|
||||
#define R_VI_MODE_EDIT_STATE SREG(48)
|
||||
#define R_VI_MODE_EDIT_WIDTH SREG(49)
|
||||
#define R_VI_MODE_EDIT_HEIGHT SREG(50)
|
||||
#define R_VI_MODE_EDIT_ULY_ADJ SREG(51)
|
||||
#define R_VI_MODE_EDIT_LRY_ADJ SREG(52)
|
||||
#define R_VI_MODE_EDIT_ULX_ADJ SREG(53)
|
||||
#define R_VI_MODE_EDIT_LRX_ADJ SREG(54)
|
||||
#define R_FB_FILTER_TYPE SREG(80)
|
||||
#define R_FB_FILTER_PRIM_COLOR(c) SREG(81 + (c))
|
||||
#define R_FB_FILTER_A SREG(84)
|
||||
|
|
|
@ -65,6 +65,6 @@ typedef struct {
|
|||
} Scheduler; // size = 0x258
|
||||
|
||||
void Sched_Notify(Scheduler* sc);
|
||||
void Sched_Init(Scheduler* sc, void* stack, OSPri priority, UNK_TYPE arg3, UNK_TYPE arg4, IrqMgr* irqMgr);
|
||||
void Sched_Init(Scheduler* sc, void* stack, OSPri priority, u8 viModeType, UNK_TYPE arg4, IrqMgr* irqMgr);
|
||||
|
||||
#endif
|
||||
|
|
40
include/terminal.h
Normal file
40
include/terminal.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef TERMINAL_H
|
||||
#define TERMINAL_H
|
||||
|
||||
// VT_: Helper macros for printing colored text to terminals, using ANSI escape codes
|
||||
// VT stands for Virtual Terminal
|
||||
|
||||
// 3-bit color codes
|
||||
#define VT_COLOR_BLACK 0
|
||||
#define VT_COLOR_RED 1
|
||||
#define VT_COLOR_GREEN 2
|
||||
#define VT_COLOR_YELLOW 3
|
||||
#define VT_COLOR_BLUE 4
|
||||
#define VT_COLOR_MAGENTA 5
|
||||
#define VT_COLOR_CYAN 6
|
||||
#define VT_COLOR_WHITE 7
|
||||
|
||||
#define VT_COLOR_FOREGROUND 3
|
||||
#define VT_COLOR_BACKGROUND 4
|
||||
|
||||
#define VT_COLOR_EXPAND0(type, color) #type #color
|
||||
#define VT_COLOR_EXPAND1(type, color) VT_COLOR_EXPAND0(type, color)
|
||||
#define VT_COLOR(type, color) VT_COLOR_EXPAND1(VT_COLOR_##type, VT_COLOR_##color)
|
||||
|
||||
#define VT_ESC "\x1b"
|
||||
#define VT_CSI "["
|
||||
#define VT_CUP(x, y) VT_ESC VT_CSI y ";" x "H"
|
||||
#define VT_ED(n) VT_ESC VT_CSI #n "J"
|
||||
#define VT_SGR(n) VT_ESC VT_CSI n "m"
|
||||
|
||||
// Add more macros if necessary
|
||||
#define VT_COL(back, fore) VT_SGR(VT_COLOR(BACKGROUND, back) ";" VT_COLOR(FOREGROUND, fore))
|
||||
#define VT_FGCOL(color) VT_SGR(VT_COLOR(FOREGROUND, color))
|
||||
#define VT_BGCOL(color) VT_SGR(VT_COLOR(BACKGROUND, color))
|
||||
#define VT_RST VT_SGR("")
|
||||
#define VT_CLS VT_ED(2)
|
||||
|
||||
// ASCII BEL character, plays an alert tone
|
||||
#define BEL '\a'
|
||||
|
||||
#endif
|
28
include/tha.h
Normal file
28
include/tha.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef THA_H
|
||||
#define THA_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "alignment.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ size_t size;
|
||||
/* 0x04 */ void* start;
|
||||
/* 0x08 */ void* head;
|
||||
/* 0x0C */ void* tail;
|
||||
} TwoHeadArena; // size = 0x10
|
||||
|
||||
void* THA_GetHead(TwoHeadArena* tha);
|
||||
void THA_SetHead(TwoHeadArena* tha, void* newHead);
|
||||
void* THA_GetTail(TwoHeadArena* tha);
|
||||
void* THA_AllocHead(TwoHeadArena* tha, size_t size);
|
||||
void* THA_AllocHeadByte(TwoHeadArena* tha);
|
||||
void* THA_AllocTail(TwoHeadArena* tha, size_t size);
|
||||
void* THA_AllocTailAlign16(TwoHeadArena* tha, size_t size);
|
||||
void* THA_AllocTailAlign(TwoHeadArena* tha, size_t size, uintptr_t mask);
|
||||
s32 THA_GetRemaining(TwoHeadArena* tha);
|
||||
u32 THA_IsCrash(TwoHeadArena* tha);
|
||||
void THA_Reset(TwoHeadArena* tha);
|
||||
void THA_Init(TwoHeadArena* tha, void* start, size_t size);
|
||||
void THA_Destroy(TwoHeadArena* tha);
|
||||
|
||||
#endif
|
33
include/thga.h
Normal file
33
include/thga.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
#ifndef THGA_H
|
||||
#define THGA_H
|
||||
|
||||
#include "tha.h"
|
||||
|
||||
typedef union {
|
||||
/* 0x00 */ TwoHeadArena tha;
|
||||
struct { // Same as TwoHeadArena, with different types and field names for the head and tail pointers
|
||||
/* 0x00 */ size_t size;
|
||||
/* 0x04 */ void* start;
|
||||
/* 0x08 */ Gfx* p;
|
||||
/* 0x0C */ void* d;
|
||||
};
|
||||
} TwoHeadGfxArena; // size = 0x10
|
||||
|
||||
void THGA_Init(TwoHeadGfxArena* thga, void* start, size_t size);
|
||||
void THGA_Destroy(TwoHeadGfxArena* thga);
|
||||
u32 THGA_IsCrash(TwoHeadGfxArena* thga);
|
||||
void THGA_Reset(TwoHeadGfxArena* thga);
|
||||
s32 THGA_GetRemaining(TwoHeadGfxArena* thga);
|
||||
Gfx* THGA_GetHead(TwoHeadGfxArena* thga);
|
||||
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* newHead);
|
||||
void* THGA_GetTail(TwoHeadGfxArena* thga);
|
||||
Gfx* THGA_AllocDisplayList(TwoHeadGfxArena* thga, size_t num);
|
||||
Gfx* THGA_AllocGfx(TwoHeadGfxArena* thga);
|
||||
Gfx* THGA_AllocGfx2(TwoHeadGfxArena* thga);
|
||||
void* THGA_AllocTail(TwoHeadGfxArena* thga, size_t size);
|
||||
Mtx* THGA_AllocMtxArray(TwoHeadGfxArena* thga, size_t num);
|
||||
Mtx* THGA_AllocMtx(TwoHeadGfxArena* thga);
|
||||
Vtx* THGA_AllocVtxArray(TwoHeadGfxArena* thga, size_t num);
|
||||
Vtx* THGA_AllocVtx(TwoHeadGfxArena* thga);
|
||||
|
||||
#endif
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef ULTRA64_H
|
||||
#define ULTRA64_H
|
||||
|
||||
#include "ultra64/types.h"
|
||||
#include "ultra64/ultratypes.h"
|
||||
#include "unk.h"
|
||||
|
||||
#include "libc/stdarg.h"
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include "ultra64/exception.h"
|
||||
#include "ultra64/rcp.h"
|
||||
#include "ultra64/rdp.h"
|
||||
#include "ultra64/rsp.h"
|
||||
#include "ultra64/thread.h"
|
||||
#include "ultra64/convert.h"
|
||||
#include "ultra64/time.h"
|
||||
|
@ -28,7 +26,7 @@
|
|||
#include "ultra64/mbi.h"
|
||||
#include "ultra64/pfs.h"
|
||||
#include "ultra64/motor.h"
|
||||
#include "ultra64/r4300.h"
|
||||
#include "ultra64/R4300.h"
|
||||
#include "ultra64/ucode.h"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define ULTRA64_R4300_H
|
||||
|
||||
#ifdef _LANGUAGE_C
|
||||
#include "types.h"
|
||||
#include "ultratypes.h"
|
||||
#define U32(x) ((u32)x)
|
||||
#define C_REG(x) (x)
|
||||
#else
|
|
@ -3,19 +3,6 @@
|
|||
|
||||
#include "message.h"
|
||||
|
||||
/**
|
||||
* Controller channel
|
||||
* Each game controller channel has 4 error bits that are defined in bit 6-7 of
|
||||
* the Rx and Tx data size area bytes. Programmers need to clear these bits
|
||||
* when setting the Tx/Rx size area values for a channel
|
||||
*/
|
||||
#define CHNL_ERR_NORESP 0x80 /* Bit 7 (Rx): No response error */
|
||||
#define CHNL_ERR_OVERRUN 0x40 /* Bit 6 (Rx): Overrun error */
|
||||
#define CHNL_ERR_FRAME 0x80 /* Bit 7 (Tx): Frame error */
|
||||
#define CHNL_ERR_COLLISION 0x40 /* Bit 6 (Tx): Collision error */
|
||||
|
||||
#define CHNL_ERR_MASK 0xC0 /* Bit 6-7: channel errors */
|
||||
|
||||
#define CHNL_ERR(readFormat) (((readFormat).rxsize & CHNL_ERR_MASK) >> 4)
|
||||
|
||||
#define BLOCKSIZE 32
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#ifdef _LANGUAGE_C
|
||||
|
||||
#include "types.h"
|
||||
#include "ultratypes.h"
|
||||
|
||||
typedef u32 OSIntMask;
|
||||
typedef u32 OSHWIntr;
|
||||
|
|
|
@ -4,21 +4,21 @@
|
|||
#include "pi.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 initialized;
|
||||
/* 0x04 */ OSThread* mgrThread;
|
||||
/* 0x00 */ u32 active;
|
||||
/* 0x04 */ OSThread* thread;
|
||||
/* 0x08 */ OSMesgQueue* cmdQueue;
|
||||
/* 0x0C */ OSMesgQueue* eventQueue;
|
||||
/* 0x10 */ OSMesgQueue* acccessQueue;
|
||||
/* 0x14 */ s32 (*piDmaCallback)(s32, u32, void*, size_t);
|
||||
/* 0x18 */ s32 (*epiDmaCallback)(OSPiHandle*, s32, u32, void*, size_t);
|
||||
} OSMgrArgs; // size = 0x1C
|
||||
/* 0x0C */ OSMesgQueue* evtQueue;
|
||||
/* 0x10 */ OSMesgQueue* acsQueue;
|
||||
/* 0x14 */ s32 (*dma)(s32, u32, void*, size_t);
|
||||
/* 0x18 */ s32 (*edma)(OSPiHandle*, s32, u32, void*, size_t);
|
||||
} OSDevMgr; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSMesgQueue* queue;
|
||||
/* 0x04 */ OSMesg msg;
|
||||
} __OSEventState; // size = 0x08
|
||||
|
||||
extern OSMgrArgs __osPiDevMgr;
|
||||
extern OSDevMgr __osPiDevMgr;
|
||||
extern __OSEventState __osEventStateTab[];
|
||||
|
||||
#endif
|
||||
|
|
47
include/ultra64/leodrive.h
Normal file
47
include/ultra64/leodrive.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
#ifndef ULTRA64_LEODRIVE_H
|
||||
#define ULTRA64_LEODRIVE_H
|
||||
|
||||
#include "rcp.h"
|
||||
|
||||
#define ASIC_BASE PI_DOM2_ADDR1
|
||||
|
||||
#define ASIC_C2_BUFF (ASIC_BASE + 0x000) // C2 Sector Buffer
|
||||
#define ASIC_SECTOR_BUFF (ASIC_BASE + 0x400) // Data Sector Buffer
|
||||
#define ASIC_DATA (ASIC_BASE + 0x500) // Data
|
||||
#define ASIC_MISC_REG (ASIC_BASE + 0x504) // Misc Register
|
||||
#define ASIC_CMD (ASIC_BASE + 0x508) // Command (write)
|
||||
#define ASIC_STATUS (ASIC_BASE + 0x508) // Status (read)
|
||||
#define ASIC_CUR_TK (ASIC_BASE + 0x50C) // Current Track
|
||||
#define ASIC_BM_CTL (ASIC_BASE + 0x510) // Buffer Manager Control (write)
|
||||
#define ASIC_BM_STATUS (ASIC_BASE + 0x510) // Buffer Manager Status (read)
|
||||
#define ASIC_ERR_SECTOR (ASIC_BASE + 0x514) // Sector Error Status
|
||||
#define ASIC_SEQ_CTL (ASIC_BASE + 0x518) // Sequencer Control (write)
|
||||
#define ASIC_SEQ_STATUS (ASIC_BASE + 0x518) // Sequencer Status (read)
|
||||
#define ASIC_CUR_SECTOR (ASIC_BASE + 0x51C) // Current Sector
|
||||
#define ASIC_HARD_RESET (ASIC_BASE + 0x520) // Hard Reset
|
||||
#define ASIC_C1_S0 (ASIC_BASE + 0x524) // C1
|
||||
#define ASIC_HOST_SECBYTE (ASIC_BASE + 0x528) // Sector Size (in bytes)
|
||||
#define ASIC_C1_S2 (ASIC_BASE + 0x52C) // C1
|
||||
#define ASIC_SEC_BYTE (ASIC_BASE + 0x530) // Sectors per Block, Full Size
|
||||
#define ASIC_C1_S4 (ASIC_BASE + 0x534) // C1
|
||||
#define ASIC_C1_S6 (ASIC_BASE + 0x538) // C1
|
||||
#define ASIC_CUR_ADDR (ASIC_BASE + 0x53C) // Current Address
|
||||
#define ASIC_ID_REG (ASIC_BASE + 0x540) // ID
|
||||
#define ASIC_TEST_REG (ASIC_BASE + 0x544) // Test Read
|
||||
#define ASIC_TEST_PIN_SEL (ASIC_BASE + 0x548) // Test Write
|
||||
#define MSEQ_RAM_ADDR (ASIC_BASE + 0x580) // Microsequencer RAM
|
||||
|
||||
// ASIC_BM_CTL write bits
|
||||
#define LEO_BM_START 0x80000000 // Start Buffer Manager
|
||||
#define LEO_BM_MODE 0x40000000 // Buffer Manager Mode
|
||||
#define LEO_BM_IMASK 0x20000000 // BM Interrupt Mask
|
||||
#define LEO_BM_RESET 0x10000000 // Buffer Manager Reset
|
||||
#define LEO_BM_DISABLE_OR_CHECK 0x08000000 // Disable OR Check
|
||||
#define LEO_BM_DISABLE_C1 0x04000000 // Disable C1 Correction
|
||||
#define LEO_BM_XFER_BLOCK 0x02000000 // Block Transfer
|
||||
#define LEO_BM_CLR_MECHANIC_INTR 0x01000000 // Mechanic Interrupt Reset
|
||||
|
||||
// ASIC_STATUS read bits
|
||||
#define LEO_STATUS_MECHANIC_INTR 0x02000000 // Mechanic Interrupt Raised
|
||||
|
||||
#endif
|
|
@ -74,10 +74,4 @@ typedef struct {
|
|||
#define OS_MESG_PRI_NORMAL 0
|
||||
#define OS_MESG_PRI_HIGH 1
|
||||
|
||||
#define DEVICE_TYPE_CART 0 /* ROM cartridge */
|
||||
#define DEVICE_TYPE_BULK 1 /* ROM bulk */
|
||||
#define DEVICE_TYPE_64DD 2 /* 64 Disk Drive */
|
||||
#define DEVICE_TYPE_SRAM 3 /* SRAM */
|
||||
#define DEVICE_TYPE_INIT 7 /* initial value */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef ULTRA64_PRINTF_H
|
||||
#define ULTRA64_PRINTF_H
|
||||
|
||||
#include "types.h"
|
||||
#include "ultratypes.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ union {
|
||||
|
|
|
@ -1,139 +1,811 @@
|
|||
#ifndef ULTRA64_RCP_H
|
||||
#define ULTRA64_RCP_H
|
||||
|
||||
#ifdef _LANGUAGE_C
|
||||
#define HW_REG(reg, type) *(volatile type*)((reg) | 0xA0000000)
|
||||
#endif
|
||||
#include "R4300.h"
|
||||
#include "ultratypes.h"
|
||||
|
||||
#define AI_DRAM_ADDR_REG 0x04500000
|
||||
#define AI_LEN_REG 0x04500004
|
||||
#define AI_CONTROL_REG 0x04500008
|
||||
#define AI_STATUS_REG 0x0450000C
|
||||
#define AI_DACRATE_REG 0x04500010
|
||||
#define AI_BITRATE_REG 0x04500014
|
||||
/**
|
||||
* RCP memory map overview:
|
||||
*
|
||||
* 0x0000_0000 .. 0x03EF_FFFF RDRAM memory
|
||||
* 0x03F0_0000 .. 0x03FF_FFFF RDRAM registers
|
||||
*
|
||||
* 0x0400_0000 .. 0x0400_2000 SP memory
|
||||
* 0x0404_0000 .. 0x040F_FFFF SP registers
|
||||
* 0x0410_0000 .. 0x041F_FFFF DP command registers
|
||||
* 0x0420_0000 .. 0x042F_FFFF DP span registers
|
||||
* 0x0430_0000 .. 0x043F_FFFF MI registers
|
||||
* 0x0440_0000 .. 0x044F_FFFF VI registers
|
||||
* 0x0450_0000 .. 0x045F_FFFF AI registers
|
||||
* 0x0460_0000 .. 0x046F_FFFF PI registers
|
||||
* 0x0470_0000 .. 0x047F_FFFF RI registers
|
||||
* 0x0480_0000 .. 0x048F_FFFF SI registers
|
||||
* 0x0490_0000 .. 0x04FF_FFFF unused
|
||||
*
|
||||
* 0x0500_0000 .. 0x05FF_FFFF cartridge domain 2
|
||||
* 0x0600_0000 .. 0x07FF_FFFF cartridge domain 1
|
||||
* 0x0800_0000 .. 0x0FFF_FFFF cartridge domain 2
|
||||
* 0x1000_0000 .. 0x1FBF_FFFF cartridge domain 1
|
||||
*
|
||||
* 0x1FC0_0000 .. 0x1FC0_07BF PIF Boot Rom (1984 bytes)
|
||||
* 0x1FC0_07C0 .. 0x1FC0_07FF PIF (JoyChannel) RAM (64 bytes)
|
||||
* 0x1FC0_0800 .. 0x1FCF_FFFF Reserved
|
||||
* 0x1FD0_0000 .. 0x7FFF_FFFF cartridge domain 1
|
||||
* 0x8000_0000 .. 0xFFFF_FFFF external SysAD device
|
||||
*/
|
||||
|
||||
#define AI_STATUS_AI_FULL (1 << 31)
|
||||
#define AI_STATUS_AI_BUSY (1 << 30)
|
||||
|
||||
#define VI_STATUS_REG 0x04400000
|
||||
#define VI_CONTROL_REG VI_STATUS_REG
|
||||
#define VI_ORIGIN_REG 0x04400004
|
||||
#define VI_DRAM_ADDR_REG VI_ORIGIN_REG
|
||||
#define VI_WIDTH_REG 0x04400008
|
||||
#define VI_H_WIDTH_REG VI_WIDTH_REG
|
||||
#define VI_INTR_REG 0x0440000C
|
||||
#define VI_V_INTER_REG VI_INTR_REG
|
||||
#define VI_CURRENT_REG 0x04400010
|
||||
/**
|
||||
* RDRAM memory
|
||||
*/
|
||||
|
||||
#define RDRAM_0_START 0x00000000
|
||||
#define RDRAM_0_END 0x001FFFFF
|
||||
#define RDRAM_1_START 0x00200000
|
||||
#define RDRAM_1_END 0x003FFFFF
|
||||
|
||||
#define RDRAM_START RDRAM_0_START
|
||||
#define RDRAM_END RDRAM_1_END
|
||||
|
||||
|
||||
/**
|
||||
* RDRAM registers
|
||||
*/
|
||||
#define RDRAM_BASE_REG 0x03F00000
|
||||
|
||||
#define RDRAM_CONFIG_REG (RDRAM_BASE_REG + 0x00)
|
||||
#define RDRAM_DEVICE_TYPE_REG (RDRAM_BASE_REG + 0x00)
|
||||
#define RDRAM_DEVICE_ID_REG (RDRAM_BASE_REG + 0x04)
|
||||
#define RDRAM_DELAY_REG (RDRAM_BASE_REG + 0x08)
|
||||
#define RDRAM_MODE_REG (RDRAM_BASE_REG + 0x0C)
|
||||
#define RDRAM_REF_INTERVAL_REG (RDRAM_BASE_REG + 0x10)
|
||||
#define RDRAM_REF_ROW_REG (RDRAM_BASE_REG + 0x14)
|
||||
#define RDRAM_RAS_INTERVAL_REG (RDRAM_BASE_REG + 0x18)
|
||||
#define RDRAM_MIN_INTERVAL_REG (RDRAM_BASE_REG + 0x1C)
|
||||
#define RDRAM_ADDR_SELECT_REG (RDRAM_BASE_REG + 0x20)
|
||||
#define RDRAM_DEVICE_MANUF_REG (RDRAM_BASE_REG + 0x24)
|
||||
|
||||
#define RDRAM_0_DEVICE_ID 0
|
||||
#define RDRAM_1_DEVICE_ID 1
|
||||
|
||||
#define RDRAM_RESET_MODE 0
|
||||
#define RDRAM_ACTIVE_MODE 1
|
||||
#define RDRAM_STANDBY_MODE 2
|
||||
|
||||
#define RDRAM_LENGTH (2 * 512 * 2048)
|
||||
#define RDRAM_0_BASE_ADDRESS (RDRAM_0_DEVICE_ID * RDRAM_LENGTH)
|
||||
#define RDRAM_1_BASE_ADDRESS (RDRAM_1_DEVICE_ID * RDRAM_LENGTH)
|
||||
|
||||
#define RDRAM_0_CONFIG 0x00000
|
||||
#define RDRAM_1_CONFIG 0x00400
|
||||
#define RDRAM_GLOBAL_CONFIG 0x80000
|
||||
|
||||
|
||||
/**
|
||||
* PIF Physical memory map (total size = 2 KB)
|
||||
*
|
||||
* Size Description Mode
|
||||
* 1FC007FF +-------+-----------------+-----+
|
||||
* | 64 B | JoyChannel RAM | R/W |
|
||||
* 1FC007C0 +-------+-----------------+-----+
|
||||
* |1984 B | Boot ROM | * | * = Reserved
|
||||
* 1FC00000 +-------+-----------------+-----+
|
||||
*/
|
||||
#define PIF_ROM_START 0x1FC00000
|
||||
#define PIF_ROM_END 0x1FC007BF
|
||||
#define PIF_RAM_START 0x1FC007C0
|
||||
#define PIF_RAM_END 0x1FC007FF
|
||||
|
||||
|
||||
/**
|
||||
* Controller channel
|
||||
* Each game controller channel has 4 error bits that are defined in bit 6-7 of
|
||||
* the Rx and Tx data size area bytes. Programmers need to clear these bits
|
||||
* when setting the Tx/Rx size area values for a channel
|
||||
*/
|
||||
#define CHNL_ERR_NORESP 0x80 /* Bit 7 (Rx): No response error */
|
||||
#define CHNL_ERR_OVERRUN 0x40 /* Bit 6 (Rx): Overrun error */
|
||||
#define CHNL_ERR_FRAME 0x80 /* Bit 7 (Tx): Frame error */
|
||||
#define CHNL_ERR_COLLISION 0x40 /* Bit 6 (Tx): Collision error */
|
||||
|
||||
#define CHNL_ERR_MASK 0xC0 /* Bit 6-7: channel errors */
|
||||
|
||||
|
||||
/**
|
||||
* External device info
|
||||
*/
|
||||
#define DEVICE_TYPE_CART 0 // ROM cartridge
|
||||
#define DEVICE_TYPE_BULK 1 // ROM bulk
|
||||
#define DEVICE_TYPE_64DD 2 // 64 Disk Drive
|
||||
#define DEVICE_TYPE_SRAM 3 // SRAM
|
||||
// 4-6 are reserved
|
||||
#define DEVICE_TYPE_INIT 7 // initial value
|
||||
// 8-14 are reserved
|
||||
|
||||
|
||||
/**
|
||||
* Signal Processor (SP) Memory
|
||||
*/
|
||||
#define SP_DMEM_START 0x04000000
|
||||
#define SP_DMEM_END 0x04000FFF
|
||||
#define SP_IMEM_START 0x04001000
|
||||
#define SP_IMEM_END 0x04001FFF
|
||||
|
||||
|
||||
/**
|
||||
* Signal Processor (SP) CP0 Registers
|
||||
*/
|
||||
|
||||
#define SP_BASE_REG 0x04040000
|
||||
|
||||
// SP memory address (R/W): [12] 0=DMEM,1=IMEM, [11:0] DMEM/IMEM address
|
||||
#define SP_MEM_ADDR_REG (SP_BASE_REG + 0x00)
|
||||
|
||||
// SP DRAM DMA address (R/W): [23:0] RDRAM address
|
||||
#define SP_DRAM_ADDR_REG (SP_BASE_REG + 0x04)
|
||||
|
||||
// SP read DMA length (R/W): [31:20] skip, [19:12] count, [11:0] length; RDRAM -> I/DMEM
|
||||
#define SP_RD_LEN_REG (SP_BASE_REG + 0x08)
|
||||
|
||||
// SP write DMA length (R/W): [31:20] skip, [19:12] count, [11:0] length; I/DMEM -> RDRAM
|
||||
#define SP_WR_LEN_REG (SP_BASE_REG + 0x0C)
|
||||
|
||||
// SP status (R/W): [14:0] valid bits; see below for write/read mode
|
||||
#define SP_STATUS_REG (SP_BASE_REG + 0x10)
|
||||
|
||||
// SP DMA full (R): [0] dma full
|
||||
#define SP_DMA_FULL_REG (SP_BASE_REG + 0x14)
|
||||
|
||||
// SP DMA busy (R): [0] dma busy
|
||||
#define SP_DMA_BUSY_REG (SP_BASE_REG + 0x18)
|
||||
|
||||
// SP semaphore (R/W): Read: [0] acquire semaphore; Write: [] release semaphore
|
||||
#define SP_SEMAPHORE_REG (SP_BASE_REG + 0x1C)
|
||||
|
||||
// SP PC (R/W): [11:0] program counter
|
||||
#define SP_PC_REG 0x04080000
|
||||
|
||||
/*
|
||||
* SP_MEM_ADDR_REG: bit 12
|
||||
*/
|
||||
#define SP_DMA_DMEM (0 << 12)
|
||||
#define SP_DMA_IMEM (1 << 12)
|
||||
|
||||
/*
|
||||
* SP_STATUS_REG: write bits
|
||||
*/
|
||||
#define SP_CLR_HALT (1 << 0) // clear halt
|
||||
#define SP_SET_HALT (1 << 1) // set halt
|
||||
#define SP_CLR_BROKE (1 << 2) // clear broke
|
||||
#define SP_CLR_INTR (1 << 3) // clear interrupt
|
||||
#define SP_SET_INTR (1 << 4) // set interrupt
|
||||
#define SP_CLR_SSTEP (1 << 5) // clear sstep
|
||||
#define SP_SET_SSTEP (1 << 6) // set sstep
|
||||
#define SP_CLR_INTR_BREAK (1 << 7) // clear interrupt on break
|
||||
#define SP_SET_INTR_BREAK (1 << 8) // set interrupt on break
|
||||
#define SP_CLR_SIG0 (1 << 9) // clear signal 0
|
||||
#define SP_SET_SIG0 (1 << 10) // set signal 0
|
||||
#define SP_CLR_SIG1 (1 << 11) // clear signal 1
|
||||
#define SP_SET_SIG1 (1 << 12) // set signal 1
|
||||
#define SP_CLR_SIG2 (1 << 13) // clear signal 2
|
||||
#define SP_SET_SIG2 (1 << 14) // set signal 2
|
||||
#define SP_CLR_SIG3 (1 << 15) // clear signal 3
|
||||
#define SP_SET_SIG3 (1 << 16) // set signal 3
|
||||
#define SP_CLR_SIG4 (1 << 17) // clear signal 4
|
||||
#define SP_SET_SIG4 (1 << 18) // set signal 4
|
||||
#define SP_CLR_SIG5 (1 << 19) // clear signal 5
|
||||
#define SP_SET_SIG5 (1 << 20) // set signal 5
|
||||
#define SP_CLR_SIG6 (1 << 21) // clear signal 6
|
||||
#define SP_SET_SIG6 (1 << 22) // set signal 6
|
||||
#define SP_CLR_SIG7 (1 << 23) // clear signal 7
|
||||
#define SP_SET_SIG7 (1 << 24) // set signal 7
|
||||
|
||||
/*
|
||||
* SP_STATUS_REG: read bits
|
||||
*/
|
||||
#define SP_STATUS_HALT (1 << 0)
|
||||
#define SP_STATUS_BROKE (1 << 1)
|
||||
#define SP_STATUS_DMA_BUSY (1 << 2)
|
||||
#define SP_STATUS_DMA_FULL (1 << 3)
|
||||
#define SP_STATUS_IO_FULL (1 << 4)
|
||||
#define SP_STATUS_SSTEP (1 << 5)
|
||||
#define SP_STATUS_INTR_BREAK (1 << 6)
|
||||
#define SP_STATUS_SIG0 (1 << 7)
|
||||
#define SP_STATUS_SIG1 (1 << 8)
|
||||
#define SP_STATUS_SIG2 (1 << 9)
|
||||
#define SP_STATUS_SIG3 (1 << 10)
|
||||
#define SP_STATUS_SIG4 (1 << 11)
|
||||
#define SP_STATUS_SIG5 (1 << 12)
|
||||
#define SP_STATUS_SIG6 (1 << 13)
|
||||
#define SP_STATUS_SIG7 (1 << 14)
|
||||
|
||||
/*
|
||||
* SP_STATUS_REG: use of SIG bits
|
||||
*/
|
||||
#define SP_CLR_YIELD SP_CLR_SIG0
|
||||
#define SP_SET_YIELD SP_SET_SIG0
|
||||
#define SP_STATUS_YIELD SP_STATUS_SIG0
|
||||
#define SP_CLR_YIELDED SP_CLR_SIG1
|
||||
#define SP_SET_YIELDED SP_SET_SIG1
|
||||
#define SP_STATUS_YIELDED SP_STATUS_SIG1
|
||||
#define SP_CLR_TASKDONE SP_CLR_SIG2
|
||||
#define SP_SET_TASKDONE SP_SET_SIG2
|
||||
#define SP_STATUS_TASKDONE SP_STATUS_SIG2
|
||||
#define SP_CLR_RSPSIGNAL SP_CLR_SIG3
|
||||
#define SP_SET_RSPSIGNAL SP_SET_SIG3
|
||||
#define SP_STATUS_RSPSIGNAL SP_STATUS_SIG3
|
||||
#define SP_CLR_CPUSIGNAL SP_CLR_SIG4
|
||||
#define SP_SET_CPUSIGNAL SP_SET_SIG4
|
||||
#define SP_STATUS_CPUSIGNAL SP_STATUS_SIG4
|
||||
|
||||
// SP IMEM BIST REG (R/W): [6:0] BIST status bits; see below for detail
|
||||
#define SP_IBIST_REG 0x04080004
|
||||
|
||||
/*
|
||||
* SP_IBIST_REG: write bits
|
||||
*/
|
||||
#define SP_IBIST_CHECK (1 << 0) // BIST check
|
||||
#define SP_IBIST_GO (1 << 1) // BIST go
|
||||
#define SP_IBIST_CLEAR (1 << 2) // BIST clear
|
||||
|
||||
/*
|
||||
* SP_BIST_REG: read bits
|
||||
* First 2 bits are same as in write mode
|
||||
*/
|
||||
#define SP_IBIST_DONE (1 << 2)
|
||||
#define SP_IBIST_FAILED 0x78 // bits [6:3], BIST fail
|
||||
|
||||
|
||||
/**
|
||||
* Display Processor Command (DPC) Registers
|
||||
*/
|
||||
#define DPC_BASE_REG 0x04100000
|
||||
|
||||
// DP CMD DMA start (R/W): [23:0] DMEM/RDRAM start address
|
||||
#define DPC_START_REG (DPC_BASE_REG + 0x00)
|
||||
|
||||
// DP CMD DMA end (R/W): [23:0] DMEM/RDRAM end address
|
||||
#define DPC_END_REG (DPC_BASE_REG + 0x04)
|
||||
|
||||
// DP CMD DMA end (R): [23:0] DMEM/RDRAM current address
|
||||
#define DPC_CURRENT_REG (DPC_BASE_REG + 0x08)
|
||||
|
||||
// DP CMD status (R/W): [9:0] valid bits - see below for definitions
|
||||
#define DPC_STATUS_REG (DPC_BASE_REG + 0x0C)
|
||||
|
||||
// DP clock counter (R): [23:0] clock counter
|
||||
#define DPC_CLOCK_REG (DPC_BASE_REG + 0x10)
|
||||
|
||||
// DP buffer busy counter (R): [23:0] clock counter
|
||||
#define DPC_BUFBUSY_REG (DPC_BASE_REG + 0x14)
|
||||
|
||||
// DP pipe busy counter (R): [23:0] clock counter
|
||||
#define DPC_PIPEBUSY_REG (DPC_BASE_REG + 0x18)
|
||||
|
||||
// DP TMEM load counter (R): [23:0] clock counter
|
||||
#define DPC_TMEM_REG (DPC_BASE_REG + 0x1C)
|
||||
|
||||
/*
|
||||
* DPC_STATUS_REG: write bits
|
||||
*/
|
||||
#define DPC_CLR_XBUS_DMEM_DMA (1 << 0)
|
||||
#define DPC_SET_XBUS_DMEM_DMA (1 << 1)
|
||||
#define DPC_CLR_FREEZE (1 << 2)
|
||||
#define DPC_SET_FREEZE (1 << 3)
|
||||
#define DPC_CLR_FLUSH (1 << 4)
|
||||
#define DPC_SET_FLUSH (1 << 5)
|
||||
#define DPC_CLR_TMEM_CTR (1 << 6)
|
||||
#define DPC_CLR_PIPE_CTR (1 << 7)
|
||||
#define DPC_CLR_CMD_CTR (1 << 8)
|
||||
#define DPC_CLR_CLOCK_CTR (1 << 9)
|
||||
|
||||
/*
|
||||
* DPC_STATUS_REG: read bits
|
||||
*/
|
||||
#define DPC_STATUS_XBUS_DMEM_DMA (1 << 0)
|
||||
#define DPC_STATUS_FREEZE (1 << 1)
|
||||
#define DPC_STATUS_FLUSH (1 << 2)
|
||||
#define DPC_STATUS_START_GCLK (1 << 3)
|
||||
#define DPC_STATUS_TMEM_BUSY (1 << 4)
|
||||
#define DPC_STATUS_PIPE_BUSY (1 << 5)
|
||||
#define DPC_STATUS_CMD_BUSY (1 << 6)
|
||||
#define DPC_STATUS_CBUF_READY (1 << 7)
|
||||
#define DPC_STATUS_DMA_BUSY (1 << 8)
|
||||
#define DPC_STATUS_END_VALID (1 << 9)
|
||||
#define DPC_STATUS_START_VALID (1 << 10)
|
||||
|
||||
|
||||
/**
|
||||
* Display Processor Span (DPS) Registers
|
||||
*/
|
||||
#define DPS_BASE_REG 0x04200000
|
||||
|
||||
// DP tmem built-in self-test (R/W): [10:0] BIST status bits
|
||||
#define DPS_TBIST_REG (DPS_BASE_REG + 0x00)
|
||||
|
||||
// DP span test mode (R/W): [0] Span buffer test access enable
|
||||
#define DPS_TEST_MODE_REG (DPS_BASE_REG + 0x04)
|
||||
|
||||
// DP span buffer test address (R/W): [6:0] bits
|
||||
#define DPS_BUFTEST_ADDR_REG (DPS_BASE_REG + 0x08)
|
||||
|
||||
// DP span buffer test data (R/W): [31:0] span buffer data
|
||||
#define DPS_BUFTEST_DATA_REG (DPS_BASE_REG + 0x0C)
|
||||
|
||||
/*
|
||||
* DPS_TMEM_BIST_REG: write bits
|
||||
*/
|
||||
#define DPS_TBIST_CHECK (1 << 0)
|
||||
#define DPS_TBIST_GO (1 << 1)
|
||||
#define DPS_TBIST_CLEAR (1 << 2)
|
||||
|
||||
/*
|
||||
* DPS_TMEM_BIST_REG: read bits
|
||||
* First 2 bits are same as in write mode
|
||||
*/
|
||||
#define DPS_TBIST_DONE (1 << 2)
|
||||
#define DPS_TBIST_FAILED 0x7F8 // bits [10:3], BIST fail
|
||||
|
||||
|
||||
/**
|
||||
* MIPS Interface (MI) Registers
|
||||
*/
|
||||
#define MI_BASE_REG 0x04300000
|
||||
|
||||
// MI init mode (W): [11] clear DP interrupt, [9/10] clear/set ebus test mode
|
||||
// [8] set init mode, [7] clear init mode, [6:0] init length
|
||||
// (R): [8] ebus test mode, [7] init mode, [6:0] init length
|
||||
#define MI_INIT_MODE_REG (MI_BASE_REG + 0x00)
|
||||
#define MI_MODE_REG MI_INIT_MODE_REG
|
||||
|
||||
/*
|
||||
* MI_MODE_REG: write bits
|
||||
*/
|
||||
#define MI_CLR_INIT (1 << 7) // clear init mode
|
||||
#define MI_SET_INIT (1 << 8) // set init mode
|
||||
#define MI_CLR_EBUS (1 << 9) // clear ebus test
|
||||
#define MI_SET_EBUS (1 << 10) // set ebus test mode
|
||||
#define MI_CLR_DP_INTR (1 << 11) // clear dp interrupt
|
||||
#define MI_CLR_RDRAM (1 << 12) // clear RDRAM reg
|
||||
#define MI_SET_RDRAM (1 << 13) // set RDRAM reg mode
|
||||
|
||||
/*
|
||||
* MI_MODE_REG: read bits
|
||||
*/
|
||||
#define MI_MODE_INIT (1 << 7) /* init mode */
|
||||
#define MI_MODE_EBUS (1 << 8) /* ebus test mode */
|
||||
#define MI_MODE_RDRAM (1 << 9) /* RDRAM reg mode */
|
||||
|
||||
// MI version (R): [31:24] rsp, [23:16] rdp, [15:8] rac, [7:0] io
|
||||
#define MI_VERSION_REG (MI_BASE_REG + 0x04)
|
||||
#define MI_NOOP_REG MI_VERSION_REG
|
||||
|
||||
// MI interrupt (R): [5:0] valid bits - see below for bit patterns
|
||||
#define MI_INTR_REG (MI_BASE_REG + 0x08)
|
||||
|
||||
// MI interrupt mask (R): [5:0] valid bits - see below for bit patterns
|
||||
// (W): [11:0] valid bits - see below for bit patterns
|
||||
#define MI_INTR_MASK_REG (MI_BASE_REG + 0x0C)
|
||||
|
||||
/*
|
||||
* MI_INTR_REG: read bits
|
||||
*/
|
||||
#define MI_INTR_SP (1 << 0) // SP intr
|
||||
#define MI_INTR_SI (1 << 1) // SI intr
|
||||
#define MI_INTR_AI (1 << 2) // AI intr
|
||||
#define MI_INTR_VI (1 << 3) // VI intr
|
||||
#define MI_INTR_PI (1 << 4) // PI intr
|
||||
#define MI_INTR_DP (1 << 5) // DP intr
|
||||
|
||||
/*
|
||||
* MI_INTR_MASK_REG: write bits
|
||||
*/
|
||||
#define MI_INTR_MASK_CLR_SP (1 << 0) // clear SP mask
|
||||
#define MI_INTR_MASK_SET_SP (1 << 1) // set SP mask
|
||||
#define MI_INTR_MASK_CLR_SI (1 << 2) // clear SI mask
|
||||
#define MI_INTR_MASK_SET_SI (1 << 3) // set SI mask
|
||||
#define MI_INTR_MASK_CLR_AI (1 << 4) // clear AI mask
|
||||
#define MI_INTR_MASK_SET_AI (1 << 5) // set AI mask
|
||||
#define MI_INTR_MASK_CLR_VI (1 << 6) // clear VI mask
|
||||
#define MI_INTR_MASK_SET_VI (1 << 7) // set VI mask
|
||||
#define MI_INTR_MASK_CLR_PI (1 << 8) // clear PI mask
|
||||
#define MI_INTR_MASK_SET_PI (1 << 9) // set PI mask
|
||||
#define MI_INTR_MASK_CLR_DP (1 << 10) // clear DP mask
|
||||
#define MI_INTR_MASK_SET_DP (1 << 11) // set DP mask
|
||||
|
||||
/*
|
||||
* MI_INTR_MASK_REG: read bits
|
||||
*/
|
||||
#define MI_INTR_MASK_SP (1 << 0) // SP intr mask
|
||||
#define MI_INTR_MASK_SI (1 << 1) // SI intr mask
|
||||
#define MI_INTR_MASK_AI (1 << 2) // AI intr mask
|
||||
#define MI_INTR_MASK_VI (1 << 3) // VI intr mask
|
||||
#define MI_INTR_MASK_PI (1 << 4) // PI intr mask
|
||||
#define MI_INTR_MASK_DP (1 << 5) // DP intr mask
|
||||
|
||||
|
||||
/**
|
||||
* Video Interface (VI) Registers
|
||||
*/
|
||||
#define VI_BASE_REG 0x04400000
|
||||
|
||||
/*
|
||||
* VI status/control (R/W): [15-0] valid bits:
|
||||
* [1:0] = type[1:0] (pixel size)
|
||||
* 0: blank (no data, no sync)
|
||||
* 1: reserved
|
||||
* 2: 5/5/5/3 ("16" bit)
|
||||
* 3: 8/8/8/8 (32 bit)
|
||||
* [2] = gamma_dither_enable (normally on, unless "special effect")
|
||||
* [3] = gamma_enable (normally on, unless MPEG/JPEG)
|
||||
* [4] = divot_enable (normally on if antialiased, unless decal lines)
|
||||
* [5] = vbus_clock_enable - always off
|
||||
* [6] = serrate (always on if interlaced, off if not)
|
||||
* [7] = test_mode - diagnostics only
|
||||
* [9:8] = anti-alias (aa) mode[1:0]
|
||||
* 0: aa & resamp (always fetch extra lines)
|
||||
* 1: aa & resamp (fetch extra lines if needed)
|
||||
* 2: resamp only (treat as all fully covered)
|
||||
* 3: neither (replicate pixels, no interpolate)
|
||||
* [11] = kill_we - diagnostics only
|
||||
* [15:12] = pixel_advance
|
||||
* [16] = dither_filter_enable
|
||||
*/
|
||||
#define VI_CONTROL_REG (VI_BASE_REG + 0x00)
|
||||
#define VI_STATUS_REG VI_CONTROL_REG
|
||||
|
||||
// VI origin (R/W): [23:0] frame buffer origin in bytes
|
||||
#define VI_ORIGIN_REG (VI_BASE_REG + 0x04)
|
||||
#define VI_DRAM_ADDR_REG VI_ORIGIN_REG
|
||||
|
||||
// VI width (R/W): [11:0] frame buffer line width in pixels
|
||||
#define VI_WIDTH_REG (VI_BASE_REG + 0x08)
|
||||
#define VI_H_WIDTH_REG VI_WIDTH_REG
|
||||
|
||||
// VI vertical intr (R/W): [9:0] interrupt when current half-line = V_INTR
|
||||
#define VI_INTR_REG (VI_BASE_REG + 0x0C)
|
||||
#define VI_V_INTR_REG VI_INTR_REG
|
||||
|
||||
// VI current vertical line (R/W): [9:0] current half line, sampled once per
|
||||
// line (the lsb of V_CURRENT is constant within a field, and in interlaced
|
||||
// modes gives the field number - which is constant for non-interlaced modes)
|
||||
// - Any write to this register will clear interrupt line
|
||||
#define VI_CURRENT_REG (VI_BASE_REG + 0x10)
|
||||
#define VI_V_CURRENT_LINE_REG VI_CURRENT_REG
|
||||
#define VI_BURST_REG 0x04400014
|
||||
#define VI_TIMING_REG VI_BURST_REG
|
||||
#define VI_V_SYNC_REG 0x04400018 //VI vertical sync
|
||||
#define VI_H_SYNC_REG 0x0440001C //VI horizontal sync
|
||||
#define VI_LEAP_REG 0x04400020 //VI horizontal sync leap
|
||||
#define VI_H_SYNC_LEAP_REG VI_LEAP_REG
|
||||
#define VI_H_START_REG 0x04400024 //VI horizontal video
|
||||
#define VI_H_VIDEO_REG VI_H_START_REG
|
||||
#define VI_V_START_REG 0x04400028 //VI vertical video
|
||||
#define VI_V_VIDEO_REG VI_V_START_REG
|
||||
#define VI_V_BURST_REG 0x0440002C //VI vertical burst
|
||||
#define VI_X_SCALE_REG 0x04400030 //VI x-scale
|
||||
#define VI_Y_SCALE_REG 0x04400034 //VI y-scale
|
||||
|
||||
#define SP_IMEM_START 0x04001000
|
||||
#define SP_DMEM_START 0x04000000
|
||||
// VI video timing (R/W): [29:20] start of color burst in pixels from h-sync
|
||||
// [19:16] vertical sync width in half lines,
|
||||
// [15: 8] color burst width in pixels,
|
||||
// [ 7: 0] horizontal sync width in pixels,
|
||||
#define VI_BURST_REG (VI_BASE_REG + 0x14)
|
||||
#define VI_TIMING_REG VI_BURST_REG
|
||||
|
||||
#define SP_MEM_ADDR_REG 0x04040000
|
||||
#define SP_DRAM_ADDR_REG 0x04040004
|
||||
#define SP_RD_LEN_REG 0x04040008
|
||||
#define SP_WR_LEN_REG 0x0404000C
|
||||
#define SP_STATUS_REG 0x04040010
|
||||
#define SP_PC_REG 0x04080000
|
||||
// VI vertical sync (R/W): [9:0] number of half-lines per field
|
||||
#define VI_V_SYNC_REG (VI_BASE_REG + 0x18)
|
||||
|
||||
#define PI_DRAM_ADDR_REG 0x04600000 //PI DRAM address
|
||||
#define PI_CART_ADDR_REG 0x04600004 //PI pbus (cartridge) address
|
||||
#define PI_RD_LEN_REG 0x04600008 //PI read length
|
||||
#define PI_WR_LEN_REG 0x0460000C //PI write length
|
||||
#define PI_STATUS_REG 0x04600010 //PI status
|
||||
#define PI_BSD_DOM1_LAT_REG 0x04600014 //PI dom1 latency
|
||||
#define PI_DOMAIN1_REG 0x04600014
|
||||
#define PI_BSD_DOM1_PWD_REG 0x04600018 //PI dom1 pulse width
|
||||
#define PI_BSD_DOM1_PGS_REG 0x0460001C //PI dom1 page size
|
||||
#define PI_BSD_DOM1_RLS_REG 0x04600020 //PI dom1 release
|
||||
#define PI_BSD_DOM2_LAT_REG 0x04600024 //PI dom2 latency
|
||||
#define PI_DOMAIN2_REG 0x04600024
|
||||
#define PI_BSD_DOM2_PWD_REG 0x04600028 //PI dom2 pulse width
|
||||
#define PI_BSD_DOM2_PGS_REG 0x0460002C //PI dom2 page size
|
||||
#define PI_BSD_DOM2_RLS_REG 0x04600030 //PI dom2 release
|
||||
// VI horizontal sync (R/W): [20:16] a 5-bit leap pattern used for PAL only (h_sync_period)
|
||||
// [11: 0] total duration of a line in 1/4 pixel
|
||||
#define VI_H_SYNC_REG (VI_BASE_REG + 0x1C)
|
||||
|
||||
// PI_STATUS (read) bits
|
||||
#define PI_STATUS_BUSY (1 << 0)
|
||||
#define PI_STATUS_IOBUSY (1 << 1)
|
||||
#define PI_STATUS_ERROR (1 << 2)
|
||||
// VI horizontal sync leap (R/W): [27:16] identical to h_sync_period
|
||||
// [11: 0] identical to h_sync_period
|
||||
#define VI_LEAP_REG (VI_BASE_REG + 0x20)
|
||||
#define VI_H_SYNC_LEAP_REG VI_LEAP_REG
|
||||
|
||||
// PI_STATUS (write) bits
|
||||
#define PI_STATUS_RESET (1 << 0)
|
||||
#define PI_STATUS_CLR_INTR (1 << 1)
|
||||
// VI horizontal video (R/W): [25:16] start of active video in screen pixels
|
||||
// [ 9: 0] end of active video in screen pixels
|
||||
#define VI_H_START_REG (VI_BASE_REG + 0x24)
|
||||
#define VI_H_VIDEO_REG VI_H_START_REG
|
||||
|
||||
#define SI_DRAM_ADDR_REG 0x04800000
|
||||
#define SI_PIF_ADDR_RD64B_REG 0x04800004
|
||||
#define SI_PIF_ADDR_WR64B_REG 0x04800010
|
||||
#define SI_STATUS_REG 0x04800018
|
||||
// VI vertical video (R/W): [25:16] start of active video in screen half-lines
|
||||
// [ 9: 0] end of active video in screen half-lines
|
||||
#define VI_V_START_REG (VI_BASE_REG + 0x28)
|
||||
#define VI_V_VIDEO_REG VI_V_START_REG
|
||||
|
||||
// SI_STATUS (read) bits
|
||||
#define SI_STATUS_DMA_BUSY (1 << 0)
|
||||
#define SI_STATUS_IO_READ_BUSY (1 << 1)
|
||||
#define SI_STATUS_DMA_ERROR (1 << 3)
|
||||
#define SI_STATUS_INTERRUPT (1 << 12)
|
||||
// VI vertical burst (R/W): [25:16] start of color burst enable in half-lines
|
||||
// [ 9: 0] end of color burst enable in half-lines
|
||||
#define VI_V_BURST_REG (VI_BASE_REG + 0x2C)
|
||||
|
||||
#define PIF_RAM_START 0x1FC007C0
|
||||
// VI x-scale (R/W): [27:16] horizontal subpixel offset (2.10 format)
|
||||
// [11: 0] 1/horizontal scale up factor (2.10 format)
|
||||
#define VI_X_SCALE_REG (VI_BASE_REG + 0x30)
|
||||
|
||||
#define MI_INIT_MODE_REG 0x04300000
|
||||
#define MI_MODE_REG MI_INIT_MODE_REG
|
||||
#define MI_VERSION_REG 0x04300004
|
||||
#define MI_INTR_REG 0x04300008
|
||||
#define MI_INTR_MASK_REG 0x0430000C
|
||||
// VI y-scale (R/W): [27:16] vertical subpixel offset (2.10 format)
|
||||
// [11: 0] 1/vertical scale up factor (2.10 format)
|
||||
#define VI_Y_SCALE_REG (VI_BASE_REG + 0x34)
|
||||
|
||||
// MI_INIT_MODE_REG bits (write)
|
||||
#define MI_CLR_INIT (1 << 7)
|
||||
#define MI_SET_INIT (1 << 8)
|
||||
#define MI_CLR_EBUS (1 << 9)
|
||||
#define MI_SET_EBUS (1 << 10)
|
||||
#define MI_CLR_DP_INTR (1 << 11)
|
||||
#define MI_CLR_RDRAM (1 << 12)
|
||||
#define MI_SET_RDRAM (1 << 13)
|
||||
/*
|
||||
* VI_CONTROL_REG: read bits
|
||||
*/
|
||||
#define VI_CTRL_TYPE_16 0x00002 // [1:0] pixel size: 16 bit
|
||||
#define VI_CTRL_TYPE_32 0x00003 // [1:0] pixel size: 32 bit
|
||||
#define VI_CTRL_GAMMA_DITHER_ON 0x00004 // 2: default = on
|
||||
#define VI_CTRL_GAMMA_ON 0x00008 // 3: default = on
|
||||
#define VI_CTRL_DIVOT_ON 0x00010 // 4: default = on
|
||||
#define VI_CTRL_SERRATE_ON 0x00040 // 6: on if interlaced
|
||||
#define VI_CTRL_ANTIALIAS_MASK 0x00300 // [9:8] anti-alias mode
|
||||
#define VI_CTRL_ANTIALIAS_MODE_0 0x00000 // Bit [9:8] anti-alias mode: AA enabled, resampling enabled, always fetch extra lines
|
||||
#define VI_CTRL_ANTIALIAS_MODE_1 0x00100 // Bit [9:8] anti-alias mode: AA enabled, resampling enabled, fetch extra lines as-needed
|
||||
#define VI_CTRL_ANTIALIAS_MODE_2 0x00200 // Bit [9:8] anti-alias mode: AA disabled, resampling enabled, operate as if everything is covered
|
||||
#define VI_CTRL_ANTIALIAS_MODE_3 0x00300 // Bit [9:8] anti-alias mode: AA disabled, resampling disabled, replicate pixels
|
||||
#define VI_CTRL_PIXEL_ADV_MASK 0x0F000 // [15:12] pixel advance mode
|
||||
#define VI_CTRL_PIXEL_ADV(n) (((n) << 12) & VI_CTRL_PIXEL_ADV_MASK) // Bit [15:12] pixel advance mode: Always 3 on N64
|
||||
#define VI_CTRL_DITHER_FILTER_ON 0x10000 // 16: dither-filter mode
|
||||
|
||||
// MI_INTR_REG bits
|
||||
#define MI_INTR_SP (1 << 0)
|
||||
#define MI_INTR_SI (1 << 1)
|
||||
#define MI_INTR_AI (1 << 2)
|
||||
#define MI_INTR_VI (1 << 3)
|
||||
#define MI_INTR_PI (1 << 4)
|
||||
#define MI_INTR_DP (1 << 5)
|
||||
/*
|
||||
* Possible video clocks (NTSC or PAL)
|
||||
*/
|
||||
#define VI_NTSC_CLOCK 48681812 // Hz = 48.681812 MHz
|
||||
#define VI_PAL_CLOCK 49656530 // Hz = 49.656530 MHz
|
||||
#define VI_MPAL_CLOCK 48628316 // Hz = 48.628316 MHz
|
||||
|
||||
// MI_INTR_MASK_REG masks (read)
|
||||
#define MI_INTR_MASK_SP 0x01
|
||||
#define MI_INTR_MASK_SI 0x02
|
||||
#define MI_INTR_MASK_AI 0x04
|
||||
#define MI_INTR_MASK_VI 0x08
|
||||
#define MI_INTR_MASK_PI 0x10
|
||||
#define MI_INTR_MASK_DP 0x20
|
||||
|
||||
// MI_INTR_MASK_REG masks (write)
|
||||
#define MI_INTR_MASK_CLR_SP 0x0001
|
||||
#define MI_INTR_MASK_SET_SP 0x0002
|
||||
#define MI_INTR_MASK_CLR_SI 0x0004
|
||||
#define MI_INTR_MASK_SET_SI 0x0008
|
||||
#define MI_INTR_MASK_CLR_AI 0x0010
|
||||
#define MI_INTR_MASK_SET_AI 0x0020
|
||||
#define MI_INTR_MASK_CLR_VI 0x0040
|
||||
#define MI_INTR_MASK_SET_VI 0x0080
|
||||
#define MI_INTR_MASK_CLR_PI 0x0100
|
||||
#define MI_INTR_MASK_SET_PI 0x0200
|
||||
#define MI_INTR_MASK_CLR_DP 0x0400
|
||||
#define MI_INTR_MASK_SET_DP 0x0800
|
||||
/**
|
||||
* Audio Interface (AI) Registers
|
||||
*
|
||||
* The address and length registers are double buffered; that is, they
|
||||
* can be written twice before becoming full.
|
||||
* The address must be written before the length.
|
||||
*/
|
||||
#define AI_BASE_REG 0x04500000
|
||||
|
||||
#define VI_NTSC_CLOCK 48681812 /* Hz = 48.681812 MHz */
|
||||
#define VI_PAL_CLOCK 49656530 /* Hz = 49.656530 MHz */
|
||||
#define VI_MPAL_CLOCK 48628316 /* Hz = 48.628316 MHz */
|
||||
// AI DRAM address (W): [23:0] starting RDRAM address (8B-aligned)
|
||||
#define AI_DRAM_ADDR_REG (AI_BASE_REG + 0x00)
|
||||
|
||||
// AI length (R/W): [14:0] transfer length (v1.0) - Bottom 3 bits are ignored
|
||||
// [17:0] transfer length (v2.0) - Bottom 3 bits are ignored
|
||||
#define AI_LEN_REG (AI_BASE_REG + 0x04)
|
||||
|
||||
// AI control (W): [0] DMA enable - if LSB == 1, DMA is enabled
|
||||
#define AI_CONTROL_REG (AI_BASE_REG + 0x08)
|
||||
|
||||
/*
|
||||
* AI_CONTROL_REG: write bits
|
||||
*/
|
||||
#define AI_CONTROL_DMA_ON 1 // LSB = 1: DMA enable
|
||||
#define AI_CONTROL_DMA_OFF 0 // LSB = 1: DMA enable
|
||||
|
||||
// AI status (R): [31]/[0] ai_full (addr & len buffer full), [30] ai_busy
|
||||
// Note that a 1->0 transition in ai_full will set interrupt
|
||||
// (W): clear audio interrupt
|
||||
#define AI_STATUS_REG (AI_BASE_REG + 0x0C)
|
||||
|
||||
/*
|
||||
* AI_STATUS_REG: read bits
|
||||
*/
|
||||
#define AI_STATUS_FIFO_FULL (1 << 31)
|
||||
#define AI_STATUS_DMA_BUSY (1 << 30)
|
||||
|
||||
// AI DAC sample period register (W): [13:0] dac rate
|
||||
// - vid_clock/(dperiod + 1) is the DAC sample rate
|
||||
// - (dperiod + 1) >= 66 * (aclockhp + 1) must be true
|
||||
#define AI_DACRATE_REG (AI_BASE_REG + 0x10)
|
||||
|
||||
// DAC rate = video clock / audio frequency
|
||||
// - DAC rate >= (66 * Bit rate) must be true
|
||||
#define AI_MAX_DAC_RATE 16384 // 14-bit+1
|
||||
#define AI_MIN_DAC_RATE 132
|
||||
|
||||
// AI bit rate (W): [3:0] bit rate (abus clock half period register - aclockhp)
|
||||
// - vid_clock/(2 * (aclockhp + 1)) is the DAC clock rate
|
||||
// - The abus clock stops if aclockhp is zero
|
||||
#define AI_BITRATE_REG (AI_BASE_REG + 0x14)
|
||||
|
||||
// Bit rate <= (DAC rate / 66)
|
||||
#define AI_MAX_BIT_RATE 16 // 4-bit+1
|
||||
#define AI_MIN_BIT_RATE 2
|
||||
|
||||
/*
|
||||
* Maximum and minimum values for audio frequency based on video clocks
|
||||
* max frequency = (video clock / min dac rate)
|
||||
* min frequency = (video clock / max dac rate)
|
||||
*/
|
||||
#define AI_NTSC_MAX_FREQ 368000 // 368 KHz
|
||||
#define AI_NTSC_MIN_FREQ 3000 // 3 KHz ~ 2971 Hz
|
||||
|
||||
#define AI_PAL_MAX_FREQ 376000 // 376 KHz
|
||||
#define AI_PAL_MIN_FREQ 3050 // 3 KHz ~ 3031 Hz
|
||||
|
||||
#define AI_MPAL_MAX_FREQ 368000 // 368 KHz
|
||||
#define AI_MPAL_MIN_FREQ 3000 // 3 KHz ~ 2968 Hz
|
||||
|
||||
|
||||
/**
|
||||
* Peripheral Interface (PI) Registers
|
||||
*/
|
||||
#define PI_BASE_REG 0x04600000
|
||||
|
||||
// PI DRAM address (R/W): [23:0] starting RDRAM address
|
||||
#define PI_DRAM_ADDR_REG (PI_BASE_REG + 0x00)
|
||||
|
||||
// PI pbus (cartridge) address (R/W): [31:0] starting AD16 address
|
||||
#define PI_CART_ADDR_REG (PI_BASE_REG + 0x04)
|
||||
|
||||
// PI read length (R/W): [23:0] read data length
|
||||
#define PI_RD_LEN_REG (PI_BASE_REG + 0x08)
|
||||
|
||||
// PI write length (R/W): [23:0] write data length
|
||||
#define PI_WR_LEN_REG (PI_BASE_REG + 0x0C)
|
||||
|
||||
// PI status (R): [3] interrupt flag, [2] error, [1] IO busy, [0] DMA busy
|
||||
// (W): [1] clear intr, [0] reset controller (and abort current op)
|
||||
#define PI_STATUS_REG (PI_BASE_REG + 0x10)
|
||||
|
||||
// PI dom1 latency (R/W): [7:0] domain 1 device latency
|
||||
#define PI_BSD_DOM1_LAT_REG (PI_BASE_REG + 0x14)
|
||||
|
||||
// PI dom1 pulse width (R/W): [7:0] domain 1 device R/W strobe pulse width
|
||||
#define PI_BSD_DOM1_PWD_REG (PI_BASE_REG + 0x18)
|
||||
|
||||
// PI dom1 page size (R/W): [3:0] domain 1 device page size
|
||||
#define PI_BSD_DOM1_PGS_REG (PI_BASE_REG + 0x1C)
|
||||
|
||||
// PI dom1 release (R/W): [1:0] domain 1 device R/W release duration
|
||||
#define PI_BSD_DOM1_RLS_REG (PI_BASE_REG + 0x20)
|
||||
|
||||
// PI dom2 latency (R/W): [7:0] domain 2 device latency
|
||||
#define PI_BSD_DOM2_LAT_REG (PI_BASE_REG + 0x24)
|
||||
|
||||
// PI dom2 pulse width (R/W): [7:0] domain 2 device R/W strobe pulse width
|
||||
#define PI_BSD_DOM2_PWD_REG (PI_BASE_REG + 0x28)
|
||||
|
||||
// PI dom2 page size (R/W): [3:0] domain 2 device page size
|
||||
#define PI_BSD_DOM2_PGS_REG (PI_BASE_REG + 0x2C)
|
||||
|
||||
// PI dom2 release (R/W): [1:0] domain 2 device R/W release duration
|
||||
#define PI_BSD_DOM2_RLS_REG (PI_BASE_REG + 0x30)
|
||||
|
||||
#define PI_DOMAIN1_REG PI_BSD_DOM1_LAT_REG
|
||||
#define PI_DOMAIN2_REG PI_BSD_DOM2_LAT_REG
|
||||
|
||||
#define PI_DOM_LAT_OFS 0x00
|
||||
#define PI_DOM_PWD_OFS 0x04
|
||||
#define PI_DOM_PGS_OFS 0x08
|
||||
#define PI_DOM_RLS_OFS 0x0C
|
||||
|
||||
/*
|
||||
* PI_STATUS_REG: read bits
|
||||
* Bit 0: DMA busy - set when DMA is in progress
|
||||
* Bit 1: IO busy - set when IO is in progress
|
||||
* Bit 2: Error - set when CPU issues IO request while DMA is busy
|
||||
*/
|
||||
#define PI_STATUS_DMA_BUSY (1 << 0)
|
||||
#define PI_STATUS_IO_BUSY (1 << 1)
|
||||
#define PI_STATUS_ERROR (1 << 2)
|
||||
|
||||
/*
|
||||
* PI status register has 2 bits active when written to:
|
||||
* Bit 0: When set, reset PIC
|
||||
* Bit 1: When set, clear interrupt flag
|
||||
* The values of the two bits can be ORed together to both reset PIC and
|
||||
* clear interrupt at the same time.
|
||||
*
|
||||
* Note:
|
||||
* - The PIC does generate an interrupt at the end of each DMA. CPU
|
||||
* needs to clear the interrupt flag explicitly (from an interrupt
|
||||
* handler) by writing into the STATUS register with bit 1 set.
|
||||
*
|
||||
* - When a DMA completes, the interrupt flag is set. CPU can issue
|
||||
* another request even while the interrupt flag is set (as long as
|
||||
* PIC is idle). However, it is the CPU's responsibility for
|
||||
* maintaining accurate correspondence between DMA completions and
|
||||
* interrupts.
|
||||
*
|
||||
* - When PIC is reset, if PIC happens to be busy, an interrupt will
|
||||
* be generated as PIC returns to idle. Otherwise, no interrupt will
|
||||
* be generated and PIC remains idle.
|
||||
*/
|
||||
|
||||
/*
|
||||
* PI_STATUS_REG: write bits
|
||||
*/
|
||||
#define PI_STATUS_RESET (1 << 0)
|
||||
#define PI_SET_RESET PI_STATUS_RESET
|
||||
|
||||
#define PI_STATUS_CLR_INTR (1 << 1)
|
||||
#define PI_CLR_INTR PI_STATUS_CLR_INTR
|
||||
|
||||
#define PI_DMA_BUFFER_SIZE 128
|
||||
|
||||
#define PI_DOM1_ADDR1 0x06000000 /* to 0x07FFFFFF */
|
||||
#define PI_DOM1_ADDR2 0x10000000 /* to 0x1FBFFFFF */
|
||||
#define PI_DOM1_ADDR3 0x1FD00000 /* to 0x7FFFFFFF */
|
||||
#define PI_DOM2_ADDR1 0x05000000 /* to 0x05FFFFFF */
|
||||
#define PI_DOM2_ADDR2 0x08000000 /* to 0x0FFFFFFF */
|
||||
|
||||
|
||||
/**
|
||||
* RDRAM Interface (RI) Registers
|
||||
*/
|
||||
#define RI_BASE_REG 0x04700000
|
||||
|
||||
// RI mode (R/W): [3] stop R active, [2] stop T active, [1:0] operating mode
|
||||
#define RI_MODE_REG (RI_BASE_REG + 0x00)
|
||||
|
||||
// RI config (R/W): [6] current control enable, [5:0] current control input
|
||||
#define RI_CONFIG_REG (RI_BASE_REG + 0x04)
|
||||
|
||||
// RI current load (W): [] any write updates current control register
|
||||
#define RI_CURRENT_LOAD_REG (RI_BASE_REG + 0x08)
|
||||
|
||||
// RI select (R/W): [3:2] receive select, [1:0] transmit select
|
||||
#define RI_SELECT_REG (RI_BASE_REG + 0x0C)
|
||||
|
||||
// RI refresh (R/W): [16] refresh bank, [17] refresh enable, [18] refresh optimize
|
||||
// [7:0] clean refresh delay, [15:8] dirty refresh dela
|
||||
#define RI_REFRESH_REG (RI_BASE_REG + 0x10)
|
||||
#define RI_COUNT_REG RI_REFRESH_REG
|
||||
|
||||
// RI latency (R/W): [3:0] DMA latency/overlap
|
||||
#define RI_LATENCY_REG (RI_BASE_REG + 0x14)
|
||||
|
||||
// RI error (R): [1] ack error, [0] nack error
|
||||
#define RI_RERROR_REG (RI_BASE_REG + 0x18)
|
||||
|
||||
// RI error (W): [] any write clears all error bits
|
||||
#define RI_WERROR_REG (RI_BASE_REG + 0x1C)
|
||||
|
||||
|
||||
/**
|
||||
* Serial Interface (SI) Registers
|
||||
*/
|
||||
#define SI_BASE_REG 0x04800000
|
||||
|
||||
// SI DRAM address (R/W): [23:0] starting RDRAM address
|
||||
#define SI_DRAM_ADDR_REG (SI_BASE_REG + 0x00)
|
||||
|
||||
// SI address read 64B (W): [] write begins a 64B DMA write PIF RAM -> RDRAM
|
||||
#define SI_PIF_ADDR_RD64B_REG (SI_BASE_REG + 0x04)
|
||||
|
||||
// Address SI_BASE_REG + (0x08, 0x0C, 0x14) are reserved
|
||||
|
||||
// SI address write 64B (W): [] write begins a 64B DMA read RDRAM -> PIF RAM */
|
||||
#define SI_PIF_ADDR_WR64B_REG (SI_BASE_REG + 0x10)
|
||||
|
||||
// SI status (R/W): [] any write clears interrupt
|
||||
#define SI_STATUS_REG (SI_BASE_REG + 0x18)
|
||||
|
||||
/*
|
||||
* SI_STATUS_REG: read bits
|
||||
*/
|
||||
#define SI_STATUS_DMA_BUSY (1 << 0) // DMA in progress
|
||||
#define SI_STATUS_RD_BUSY (1 << 1) // IO access in progress
|
||||
#define SI_STATUS_DMA_ERROR (1 << 3) // Overlapping DMA requests
|
||||
#define SI_STATUS_INTERRUPT (1 << 12) // Interrupt is set
|
||||
|
||||
|
||||
/**
|
||||
* Development Board GIO Control Registers
|
||||
*/
|
||||
|
||||
#define GIO_BASE_REG 0x18000000
|
||||
|
||||
// Game to Host Interrupt
|
||||
#define GIO_GIO_INTR_REG (GIO_BASE_REG+0x000)
|
||||
|
||||
// Game to Host SYNC
|
||||
#define GIO_GIO_SYNC_REG (GIO_BASE_REG+0x400)
|
||||
|
||||
// Host to Game Interrupt
|
||||
#define GIO_CART_INTR_REG (GIO_BASE_REG+0x800)
|
||||
|
||||
|
||||
/**
|
||||
* Common macros
|
||||
*/
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
#define IO_READ(addr) (*(vu32*)PHYS_TO_K1(addr))
|
||||
#define IO_WRITE(addr,data) (*(vu32*)PHYS_TO_K1(addr)=(u32)(data))
|
||||
|
||||
#define RCP_STAT_PRINT \
|
||||
rmonPrintf("current=%x start=%x end=%x dpstat=%x spstat=%x\n", \
|
||||
IO_READ(DPC_CURRENT_REG), \
|
||||
IO_READ(DPC_START_REG), \
|
||||
IO_READ(DPC_END_REG), \
|
||||
IO_READ(DPC_STATUS_REG), \
|
||||
IO_READ(SP_STATUS_REG))
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
#include "types.h"
|
||||
#include "ultratypes.h"
|
||||
|
||||
/* Structure for debug port */
|
||||
typedef struct {
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
#ifndef ULTRA64_RDP_H
|
||||
#define ULTRA64_RDP_H
|
||||
|
||||
/* DP Command Registers */
|
||||
|
||||
#define DPC_REG_BASE 0xA4100000
|
||||
|
||||
#define DPC_START_REG (*(vu32*)(DPC_REG_BASE + 0x00))
|
||||
#define DPC_END_REG (*(vu32*)(DPC_REG_BASE + 0x04))
|
||||
#define DPC_CURRENT_REG (*(vu32*)(DPC_REG_BASE + 0x08))
|
||||
#define DPC_STATUS_REG (*(vu32*)(DPC_REG_BASE + 0x0C))
|
||||
#define DPC_CLOCK_REG (*(vu32*)(DPC_REG_BASE + 0x10))
|
||||
#define DPC_BUFBUSY_REG (*(vu32*)(DPC_REG_BASE + 0x14))
|
||||
#define DPC_PIPEBUSY_REG (*(vu32*)(DPC_REG_BASE + 0x18))
|
||||
#define DPC_TMEM_REG (*(vu32*)(DPC_REG_BASE + 0x1C))
|
||||
|
||||
/* DP Span Registers */
|
||||
|
||||
#define DPS_REG_BASE 0xA4200000
|
||||
|
||||
#define DPS_TBIST_REG (*(vu32*)(DPS_REG_BASE + 0x00))
|
||||
#define DPS_TEST_MODE_REG (*(vu32*)(DPS_REG_BASE + 0x04))
|
||||
#define DPS_BUFTEST_ADDR_REG (*(vu32*)(DPS_REG_BASE + 0x08))
|
||||
#define DPS_BUFTEST_DATA_REG (*(vu32*)(DPS_REG_BASE + 0x0C))
|
||||
|
||||
/* DP Status Read Flags */
|
||||
#define DPC_STATUS_XBUS_DMEM_DMA 0x001
|
||||
#define DPC_STATUS_FREEZE 0x002
|
||||
#define DPC_STATUS_FLUSH 0x004
|
||||
#define DPC_STATUS_START_GCLK 0x008
|
||||
#define DPC_STATUS_TMEM_BUSY 0x010
|
||||
#define DPC_STATUS_PIPE_BUSY 0x020
|
||||
#define DPC_STATUS_CMD_BUSY 0x040
|
||||
#define DPC_STATUS_CBUF_READY 0x080
|
||||
#define DPC_STATUS_DMA_BUSY 0x100
|
||||
#define DPC_STATUS_END_VALID 0x200
|
||||
#define DPC_STATUS_START_VALID 0x400
|
||||
|
||||
/* DP Status Write Flags */
|
||||
#define DPC_CLR_XBUS_DMEM_DMA 0x0001
|
||||
#define DPC_SET_XBUS_DMEM_DMA 0x0002
|
||||
#define DPC_CLR_FREEZE 0x0004
|
||||
#define DPC_SET_FREEZE 0x0008
|
||||
#define DPC_CLR_FLUSH 0x0010
|
||||
#define DPC_SET_FLUSH 0x0020
|
||||
#define DPC_CLR_TMEM_CTR 0x0040
|
||||
#define DPC_CLR_PIPE_CTR 0x0080
|
||||
#define DPC_CLR_CMD_CTR 0x0100
|
||||
#define DPC_CLR_CLOCK_CTR 0x0200
|
||||
|
||||
#endif
|
|
@ -1,50 +0,0 @@
|
|||
#ifndef ULTRA64_RSP_H
|
||||
#define ULTRA64_RSP_H
|
||||
|
||||
/* SP Status Flags */
|
||||
#define SP_STATUS_HALT 0x001
|
||||
#define SP_STATUS_BROKE 0x002
|
||||
#define SP_STATUS_DMA_BUSY 0x004
|
||||
#define SP_STATUS_DMA_FULL 0x008
|
||||
#define SP_STATUS_IO_FULL 0x010
|
||||
#define SP_STATUS_SSTEP 0x020
|
||||
#define SP_STATUS_INTR_BREAK 0x040
|
||||
#define SP_STATUS_YIELD 0x080
|
||||
#define SP_STATUS_YIELDED 0x100
|
||||
#define SP_STATUS_TASKDONE 0x200
|
||||
//#define SP_STATUS_SIG0 0x080
|
||||
//#define SP_STATUS_SIG1 0x100
|
||||
//#define SP_STATUS_SIG2 0x200
|
||||
#define SP_STATUS_SIG3 0x400
|
||||
#define SP_STATUS_SIG4 0x800
|
||||
#define SP_STATUS_SIG5 0x1000
|
||||
#define SP_STATUS_SIG6 0x2000
|
||||
#define SP_STATUS_SIG7 0x4000
|
||||
|
||||
#define SP_CLR_HALT 0x00001
|
||||
#define SP_SET_HALT 0x00002
|
||||
#define SP_CLR_BROKE 0x00004
|
||||
#define SP_CLR_INTR 0x00008
|
||||
#define SP_SET_INTR 0x00010
|
||||
#define SP_CLR_SSTEP 0x00020
|
||||
#define SP_SET_SSTEP 0x00040
|
||||
#define SP_CLR_INTR_BREAK 0x00080
|
||||
#define SP_SET_INTR_BREAK 0x00100
|
||||
#define SP_CLR_SIG0 0x00200
|
||||
#define SP_SET_SIG0 0x00400
|
||||
#define SP_CLR_SIG1 0x00800
|
||||
#define SP_SET_SIG1 0x01000
|
||||
#define SP_CLR_SIG2 0x02000
|
||||
#define SP_SET_SIG2 0x04000
|
||||
#define SP_CLR_SIG3 0x08000
|
||||
#define SP_SET_SIG3 0x10000
|
||||
#define SP_CLR_SIG4 0x20000
|
||||
#define SP_SET_SIG4 0x40000
|
||||
#define SP_CLR_SIG5 0x80000
|
||||
#define SP_SET_SIG5 0x100000
|
||||
#define SP_CLR_SIG6 0x200000
|
||||
#define SP_SET_SIG6 0x400000
|
||||
#define SP_CLR_SIG7 0x800000
|
||||
#define SP_SET_SIG7 0x1000000
|
||||
|
||||
#endif
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef ULTRA64_SPTASK_H
|
||||
#define ULTRA64_SPTASK_H
|
||||
|
||||
#include "types.h"
|
||||
#include "ultratypes.h"
|
||||
|
||||
/* Task Types */
|
||||
#define M_NULTASK 0
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#ifdef _LANGUAGE_C
|
||||
|
||||
#include "types.h"
|
||||
#include "ultratypes.h"
|
||||
|
||||
typedef s32 OSPri;
|
||||
typedef s32 OSId;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef ULTRA64_UCODE_H
|
||||
#define ULTRA64_UCODE_H
|
||||
|
||||
#include "types.h"
|
||||
#include "ultratypes.h"
|
||||
|
||||
#define SP_DRAM_STACK_SIZE8 (0x400)
|
||||
#define SP_DRAM_STACK_SIZE64 (SP_DRAM_STACK_SIZE8 >> 3)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#ifndef ULTRA64_TYPES_H
|
||||
#define ULTRA64_TYPES_H
|
||||
#ifndef ULTRA64_ULTRATYPES_H
|
||||
#define ULTRA64_ULTRATYPES_H
|
||||
|
||||
#ifdef _LANGUAGE_C
|
||||
|
||||
typedef signed char s8;
|
||||
typedef unsigned char u8;
|
||||
|
@ -37,3 +39,5 @@ typedef union {
|
|||
} MtxF;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -13,18 +13,6 @@
|
|||
#define OS_VI_DITHER_FILTER_ON 0x0040
|
||||
#define OS_VI_DITHER_FILTER_OFF 0x0080
|
||||
|
||||
#define OS_VI_GAMMA 0x08
|
||||
#define OS_VI_GAMMA_DITHER 0x04
|
||||
#define OS_VI_DIVOT 0x10
|
||||
#define OS_VI_DITHER_FILTER 0x10000
|
||||
#define OS_VI_UNK1 0x1
|
||||
#define OS_VI_UNK2 0x2
|
||||
#define OS_VI_UNK40 0x40
|
||||
#define OS_VI_UNK100 0x100
|
||||
#define OS_VI_UNK200 0x200
|
||||
#define OS_VI_UNK1000 0x1000
|
||||
#define OS_VI_UNK2000 0x2000
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 ctrl;
|
||||
/* 0x04 */ u32 width;
|
||||
|
@ -60,7 +48,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
/* 0x00 */ u16 state;
|
||||
/* 0x02 */ u16 retraceCount;
|
||||
/* 0x04 */ void* buffer;
|
||||
/* 0x04 */ void* framep;
|
||||
/* 0x08 */ OSViMode* modep;
|
||||
/* 0x0C */ u32 features;
|
||||
/* 0x10 */ OSMesgQueue* mq;
|
||||
|
@ -132,6 +120,5 @@ typedef struct {
|
|||
#define OS_TV_PAL 0
|
||||
#define OS_TV_NTSC 1
|
||||
#define OS_TV_MPAL 2
|
||||
#define OS_VI_UNK28 28
|
||||
|
||||
#endif
|
||||
|
|
37
include/ultra64/viint.h
Normal file
37
include/ultra64/viint.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#ifndef ULTRA64_VIINT_H
|
||||
#define ULTRA64_VIINT_H
|
||||
|
||||
#define VI_STATE_MODE_SET (1 << 0)
|
||||
#define VI_STATE_XSCALE_SET (1 << 1)
|
||||
#define VI_STATE_YSCALE_FACTOR_SET (1 << 2)
|
||||
#define VI_STATE_CTRL_SET (1 << 3)
|
||||
#define VI_STATE_BUFFER_SET (1 << 4)
|
||||
#define VI_STATE_BLACK (1 << 5)
|
||||
#define VI_STATE_REPEATLINE (1 << 6)
|
||||
#define VI_STATE_FADE (1 << 7)
|
||||
|
||||
#define VI_SCALE_MASK 0xFFF
|
||||
#define VI_2_10_FPART_MASK 0x3FF
|
||||
#define VI_SUBPIXEL_SH 0x10
|
||||
|
||||
// For use in initializing OSViMode structures
|
||||
|
||||
#define BURST(hsync_width, color_width, vsync_width, color_start) \
|
||||
(hsync_width | (color_width << 8) | (vsync_width << 16) | (color_start << 20))
|
||||
#define WIDTH(v) v
|
||||
#define VSYNC(v) v
|
||||
#define HSYNC(duration, leap) (duration | (leap << 16))
|
||||
#define LEAP(upper, lower) ((upper << 16) | lower)
|
||||
#define START(start, end) ((start << 16) | end)
|
||||
|
||||
#define FTOFIX(val, i, f) ((u32)(val * (f32)(1 << f)) & ((1 << (i + f)) - 1))
|
||||
|
||||
#define F210(val) FTOFIX(val, 2, 10)
|
||||
#define SCALE(scaleup, off) (F210((1.0f / (f32)scaleup)) | (F210((f32)off) << 16))
|
||||
|
||||
#define VCURRENT(v) v
|
||||
#define ORIGIN(v) v
|
||||
#define VINTR(v) v
|
||||
#define HSTART START
|
||||
|
||||
#endif
|
|
@ -45,7 +45,7 @@ extern u8 gBuildDate[];
|
|||
extern u8 gBuildMakeOption[];
|
||||
extern OSMesgQueue gPiMgrCmdQueue;
|
||||
extern OSViMode gViConfigMode;
|
||||
extern u8 D_80013960;
|
||||
extern u8 gViConfigModeType;
|
||||
extern OSMesgQueue __osPiAccessQueue;
|
||||
extern OSPiHandle __Dom1SpeedParam;
|
||||
extern OSPiHandle __Dom2SpeedParam;
|
||||
|
|
37
include/vt.h
37
include/vt.h
|
@ -1,37 +0,0 @@
|
|||
#ifndef VT_H
|
||||
#define VT_H
|
||||
|
||||
// 3-bit color codes
|
||||
#define VT_COLOR_BLACK 0
|
||||
#define VT_COLOR_RED 1
|
||||
#define VT_COLOR_GREEN 2
|
||||
#define VT_COLOR_YELLOW 3
|
||||
#define VT_COLOR_BLUE 4
|
||||
#define VT_COLOR_MAGENTA 5
|
||||
#define VT_COLOR_CYAN 6
|
||||
#define VT_COLOR_WHITE 7
|
||||
|
||||
#define VT_COLOR_FOREGROUND 3
|
||||
#define VT_COLOR_BACKGROUND 4
|
||||
|
||||
#define VT_COLOR_EXPAND0(type, color) #type #color
|
||||
#define VT_COLOR_EXPAND1(type, color) VT_COLOR_EXPAND0(type, color)
|
||||
#define VT_COLOR(type, color) VT_COLOR_EXPAND1(VT_COLOR_##type, VT_COLOR_##color)
|
||||
|
||||
#define VT_ESC "\x1b"
|
||||
#define VT_CSI "["
|
||||
#define VT_CUP(x, y) VT_ESC VT_CSI y ";" x "H"
|
||||
#define VT_ED(n) VT_ESC VT_CSI #n "J"
|
||||
#define VT_SGR(n) VT_ESC VT_CSI n "m"
|
||||
|
||||
// Add more macros if necessary
|
||||
#define VT_COL(back, fore) VT_SGR(VT_COLOR(BACKGROUND, back) ";" VT_COLOR(FOREGROUND, fore))
|
||||
#define VT_FGCOL(color) VT_SGR(VT_COLOR(FOREGROUND, color))
|
||||
#define VT_BGCOL(color) VT_SGR(VT_COLOR(BACKGROUND, color))
|
||||
#define VT_RST VT_SGR("")
|
||||
#define VT_CLS VT_ED(2)
|
||||
|
||||
// ASCII BEL character, plays an alert tone
|
||||
#define BEL '\a'
|
||||
|
||||
#endif
|
|
@ -38,6 +38,8 @@
|
|||
#include "fault.h"
|
||||
#include "sched.h"
|
||||
#include "rumble.h"
|
||||
#include "tha.h"
|
||||
#include "thga.h"
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
@ -106,20 +108,6 @@ typedef struct {
|
|||
/* 0x12408 */ u16 tailMagic; // GFXPOOL_TAIL_MAGIC
|
||||
} GfxPool; // size = 0x12410
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ u32 size;
|
||||
/* 0x0004 */ void* bufp;
|
||||
/* 0x0008 */ void* head;
|
||||
/* 0x000C */ void* tail;
|
||||
} TwoHeadArena; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ u32 size;
|
||||
/* 0x0004 */ Gfx* bufp;
|
||||
/* 0x0008 */ Gfx* p;
|
||||
/* 0x000C */ Gfx* d;
|
||||
} TwoHeadGfxArena; // size = 0x10
|
||||
|
||||
typedef struct GraphicsContext {
|
||||
/* 0x0000 */ Gfx* polyOpaBuffer; // Pointer to "Zelda 0"
|
||||
/* 0x0004 */ Gfx* polyXluBuffer; // Pointer to "Zelda 1"
|
||||
|
@ -1834,20 +1822,27 @@ typedef struct {
|
|||
/* 0x10 */ s16 unk_10;
|
||||
} JpegDecoderState; // size = 0x14
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ VI_MODE_EDIT_STATE_INACTIVE,
|
||||
/* 1 */ VI_MODE_EDIT_STATE_ACTIVE,
|
||||
/* 2 */ VI_MODE_EDIT_STATE_2, // active, more adjustments
|
||||
/* 3 */ VI_MODE_EDIT_STATE_3 // active, more adjustments, print comparison with NTSC LAN1 mode
|
||||
} ViModeEditState;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ OSViMode customViMode;
|
||||
/* 0x0050 */ s32 viHeight;
|
||||
/* 0x0054 */ s32 viWidth;
|
||||
/* 0x0058 */ s32 unk_58; // Right adjustment?
|
||||
/* 0x005C */ s32 unk_5C; // Left adjustment?
|
||||
/* 0x0060 */ s32 unk_60; // Bottom adjustment?
|
||||
/* 0x0064 */ s32 unk_64; // Top adjustment?
|
||||
/* 0x0068 */ s32 viModeBase; // enum: {0, 1, 2, 3}
|
||||
/* 0x006C */ s32 viTvType;
|
||||
/* 0x0070 */ u32 unk_70; // bool
|
||||
/* 0x0074 */ u32 unk_74; // bool
|
||||
/* 0x0078 */ u32 unk_78; // bool
|
||||
/* 0x007C */ u32 unk_7C; // bool
|
||||
/* 0x0058 */ s32 rightAdjust;
|
||||
/* 0x005C */ s32 leftAdjust;
|
||||
/* 0x0060 */ s32 lowerAdjust;
|
||||
/* 0x0064 */ s32 upperAdjust;
|
||||
/* 0x0068 */ s32 editState;
|
||||
/* 0x006C */ s32 tvType;
|
||||
/* 0x0070 */ u32 loRes;
|
||||
/* 0x0074 */ u32 antialiasOff;
|
||||
/* 0x0078 */ u32 modeN; // Controls interlacing, the meaning of this mode is different based on choice of resolution
|
||||
/* 0x007C */ u32 fb16Bit;
|
||||
/* 0x0080 */ u32 viFeatures;
|
||||
/* 0x0084 */ u32 unk_84;
|
||||
} ViMode;
|
||||
|
|
|
@ -55,7 +55,9 @@ typedef struct {
|
|||
/* 0x4 */ Vec3s* bgCamFuncData; // s16 data grouped in threes (ex. Vec3s), is usually of type `BgCamFuncData`, but can be a list of points of type `Vec3s` for crawlspaces
|
||||
} BgCamInfo; // size = 0x8
|
||||
|
||||
typedef BgCamInfo CamData; // Todo: Zapd compatibility
|
||||
// ZAPD compatibility typedefs
|
||||
// TODO: Remove when ZAPD adds support for them
|
||||
typedef BgCamInfo CamData;
|
||||
|
||||
// The structure used for all instances of s16 data from `BgCamInfo` with the exception of crawlspaces.
|
||||
// See `Camera_Subj4` for Vec3s data usage in crawlspaces
|
||||
|
|
|
@ -231,16 +231,16 @@ typedef struct {
|
|||
} OcLine; // size = 0x1C
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
|
||||
/* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
|
||||
/* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
|
||||
/* 3 */ COLTYPE_HIT3, // No blood, white hitmark
|
||||
/* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
|
||||
/* 5 */ COLTYPE_HIT5, // No blood, red hitmark
|
||||
/* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
|
||||
/* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
|
||||
/* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
|
||||
/* 9 */ COLTYPE_METAL,
|
||||
/* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
|
||||
/* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
|
||||
/* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
|
||||
/* 3 */ COLTYPE_HIT3, // No blood, white hitmark
|
||||
/* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
|
||||
/* 5 */ COLTYPE_HIT5, // No blood, red hitmark
|
||||
/* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
|
||||
/* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
|
||||
/* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
|
||||
/* 9 */ COLTYPE_METAL,
|
||||
/* 10 */ COLTYPE_NONE,
|
||||
/* 11 */ COLTYPE_WOOD,
|
||||
/* 12 */ COLTYPE_HARD,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef Z64_CURVE_H
|
||||
#define Z64_CURVE_H
|
||||
|
||||
#include "ultra64/types.h"
|
||||
#include "ultra64/ultratypes.h"
|
||||
#include "z64math.h"
|
||||
|
||||
struct PlayState;
|
||||
|
|
|
@ -95,16 +95,16 @@ typedef enum {
|
|||
} StormState;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ TIMESEQ_DAY_BGM,
|
||||
/* 0x01 */ TIMESEQ_FADE_DAY_BGM,
|
||||
/* 0x02 */ TIMESEQ_NIGHT_BEGIN_SFX,
|
||||
/* 0x03 */ TIMESEQ_EARLY_NIGHT_CRITTERS,
|
||||
/* 0x04 */ TIMESEQ_NIGHT_DELAY,
|
||||
/* 0x05 */ TIMESEQ_NIGHT_CRITTERS,
|
||||
/* 0x06 */ TIMESEQ_DAY_BEGIN_SFX,
|
||||
/* 0x07 */ TIMESEQ_MORNING_CRITTERS,
|
||||
/* 0x08 */ TIMESEQ_DAY_DELAY,
|
||||
/* 0xFF */ TIMESEQ_DISABLED = 0xFF
|
||||
/* 0x00 */ TIMESEQ_DAY_BGM,
|
||||
/* 0x01 */ TIMESEQ_FADE_DAY_BGM,
|
||||
/* 0x02 */ TIMESEQ_NIGHT_BEGIN_SFX,
|
||||
/* 0x03 */ TIMESEQ_EARLY_NIGHT_CRITTERS,
|
||||
/* 0x04 */ TIMESEQ_NIGHT_DELAY,
|
||||
/* 0x05 */ TIMESEQ_NIGHT_CRITTERS,
|
||||
/* 0x06 */ TIMESEQ_DAY_BEGIN_SFX,
|
||||
/* 0x07 */ TIMESEQ_MORNING_CRITTERS,
|
||||
/* 0x08 */ TIMESEQ_DAY_DELAY,
|
||||
/* 0xFF */ TIMESEQ_DISABLED = 0xFF
|
||||
} TimeBasedSeqState;
|
||||
|
||||
typedef enum {
|
||||
|
@ -139,10 +139,34 @@ typedef struct {
|
|||
/* 0x09 */ s8 light2Dir[3];
|
||||
/* 0x0C */ u8 light2Color[3];
|
||||
/* 0x0F */ u8 fogColor[3];
|
||||
/* 0x12 */ s16 fogNear;
|
||||
/* 0x14 */ s16 fogFar;
|
||||
/* 0x12 */ s16 fogNear; // ranges from 0-1000 (0: starts immediately, 1000: no fog), but is clamped to ENV_FOGNEAR_MAX
|
||||
/* 0x14 */ s16 zFar; // Max depth (render distance) of the view as a whole. fogFar will always match zFar
|
||||
} CurrentEnvLightSettings; // size = 0x16
|
||||
|
||||
// `EnvLightSettings` is very similar to `CurrentEnvLightSettings` with one key difference.
|
||||
// The light settings data in the scene packs blend rate information with the fog near value.
|
||||
// The blendRate determines how fast the current light settings fade to the next one
|
||||
// (under LIGHT_MODE_SETTINGS, otherwise unused).
|
||||
|
||||
// Get blend rate from `EnvLightSettings.blendRateAndFogNear` in 0-255 range
|
||||
#define ENV_LIGHT_SETTINGS_BLEND_RATE_U8(blendRateAndFogNear) (((blendRateAndFogNear) >> 10) * 4)
|
||||
#define ENV_LIGHT_SETTINGS_FOG_NEAR(blendRateAndFogNear) ((blendRateAndFogNear) & 0x3FF)
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 ambientColor[3];
|
||||
/* 0x03 */ s8 light1Dir[3];
|
||||
/* 0x06 */ u8 light1Color[3];
|
||||
/* 0x09 */ s8 light2Dir[3];
|
||||
/* 0x0C */ u8 light2Color[3];
|
||||
/* 0x0F */ u8 fogColor[3];
|
||||
/* 0x12 */ s16 blendRateAndFogNear;
|
||||
/* 0x14 */ s16 zFar;
|
||||
} EnvLightSettings; // size = 0x16
|
||||
|
||||
// ZAPD compatibility typedefs
|
||||
// TODO: Remove when ZAPD adds support for them
|
||||
typedef EnvLightSettings LightSettings;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ char unk_00[0x02];
|
||||
/* 0x02 */ u16 sceneTimeSpeed; // time speed value from the scene file
|
||||
|
@ -178,7 +202,7 @@ typedef struct {
|
|||
/* 0x92 */ s16 adjLight1Color[3];
|
||||
/* 0x98 */ s16 adjFogColor[3];
|
||||
/* 0x9E */ s16 adjFogNear;
|
||||
/* 0xA0 */ s16 adjFogFar;
|
||||
/* 0xA0 */ s16 adjZFar;
|
||||
/* 0xA2 */ char unk_A2[0x06];
|
||||
/* 0xA8 */ Vec3s windDirection;
|
||||
/* 0xB0 */ f32 windSpeed;
|
||||
|
@ -188,7 +212,7 @@ typedef struct {
|
|||
/* 0xBD */ u8 lightSetting; // only used with `LIGHT_MODE_SETTINGS` or on override
|
||||
/* 0xBE */ u8 prevLightSetting;
|
||||
/* 0xBF */ u8 lightSettingOverride;
|
||||
/* 0xC0 */ EnvLightSettings lightSettings; // settings for the currently "live" lights
|
||||
/* 0xC0 */ CurrentEnvLightSettings lightSettings; // settings for the currently "live" lights
|
||||
/* 0xD6 */ u16 lightBlendRateOverride;
|
||||
/* 0xD8 */ f32 lightBlend; // only used with `LIGHT_MODE_SETTINGS` or on setting override
|
||||
/* 0xDC */ u8 lightBlendOverride;
|
||||
|
|
|
@ -43,12 +43,15 @@ typedef struct LightNode {
|
|||
/* 0x8 */ struct LightNode* next;
|
||||
} LightNode; // size = 0xC
|
||||
|
||||
#define ENV_FOGNEAR_MAX 996
|
||||
#define ENV_ZFAR_MAX 12800
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ LightNode* listHead;
|
||||
/* 0x4 */ u8 ambientColor[3];
|
||||
/* 0x7 */ u8 fogColor[3];
|
||||
/* 0xA */ s16 fogNear; // how close until fog starts taking effect. range 0 - 1000
|
||||
/* 0xC */ s16 fogFar; // how far until fog starts to saturate. range 0 - 1000
|
||||
/* 0xA */ s16 fogNear; // how close until fog starts taking effect. range 0 - ENV_FOGNEAR_MAX
|
||||
/* 0xC */ s16 zFar; // draw distance. range 0 - ENV_ZFAR_MAX
|
||||
} LightContext; // size = 0x10
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -111,9 +111,9 @@ typedef VecSphGeo VecGeo;
|
|||
#define BINANG_TO_RAD_ALT2(binang) (((f32)(binang) * M_PI) / 0x8000)
|
||||
|
||||
// Vector macros
|
||||
#define SQXZ(vec) ((vec.x) * (vec.x) + (vec.z) * (vec.z))
|
||||
#define DOTXZ(vec1, vec2) ((vec1.x) * (vec2.x) + (vec1.z) * (vec2.z))
|
||||
#define SQXYZ(vec) ((vec.x) * (vec.x) + (vec.y) * (vec.y) + (vec.z) * (vec.z))
|
||||
#define DOTXYZ(vec1, vec2) ((vec1.x) * (vec2.x) + (vec1.y) * (vec2.y) + (vec1.z) * (vec2.z))
|
||||
#define SQXZ(vec) ((vec).x * (vec).x + (vec).z * (vec).z)
|
||||
#define DOTXZ(vec1, vec2) ((vec1).x * (vec2).x + (vec1).z * (vec2).z)
|
||||
#define SQXYZ(vec) ((vec).x * (vec).x + (vec).y * (vec).y + (vec).z * (vec).z)
|
||||
#define DOTXYZ(vec1, vec2) ((vec1).x * (vec2).x + (vec1).y * (vec2).y + (vec1).z * (vec2).z)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -140,9 +140,9 @@ typedef enum {
|
|||
} OcarinaInstrumentId;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ OCARINA_RECORD_OFF,
|
||||
/* 1 */ OCARINA_RECORD_SCARECROW_LONG,
|
||||
/* 2 */ OCARINA_RECORD_SCARECROW_SPAWN,
|
||||
/* 0 */ OCARINA_RECORD_OFF,
|
||||
/* 1 */ OCARINA_RECORD_SCARECROW_LONG,
|
||||
/* 2 */ OCARINA_RECORD_SCARECROW_SPAWN,
|
||||
/* 0xFF */ OCARINA_RECORD_REJECTED = 0xFF
|
||||
} OcarinaRecordingState;
|
||||
|
||||
|
|
|
@ -45,17 +45,6 @@ typedef struct {
|
|||
// TODO: ZAPD Compatibility
|
||||
typedef Spawn EntranceEntry;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 ambientColor[3];
|
||||
/* 0x03 */ s8 diffuseDir1[3];
|
||||
/* 0x06 */ u8 diffuseColor1[3];
|
||||
/* 0x09 */ s8 diffuseDir2[3];
|
||||
/* 0x0C */ u8 diffuseColor2[3];
|
||||
/* 0x0F */ u8 fogColor[3];
|
||||
/* 0x12 */ u16 fogNear;
|
||||
/* 0x14 */ u16 fogFar;
|
||||
} LightSettings; // size = 0x16
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 count; // number of points in the path
|
||||
/* 0x04 */ Vec3s* points; // Segment Address to the array of points
|
||||
|
@ -157,7 +146,8 @@ typedef union {
|
|||
RoomShapeCullable cullable;
|
||||
} RoomShape; // "Ground Shape"
|
||||
|
||||
// TODO update ZAPD
|
||||
// ZAPD compatibility typedefs
|
||||
// TODO: Remove when ZAPD adds support for them
|
||||
typedef RoomShapeDListsEntry PolygonDlist;
|
||||
typedef RoomShapeNormal PolygonType0;
|
||||
typedef RoomShapeImageSingle MeshHeader1Single;
|
||||
|
|
3
spec
3
spec
|
@ -30,7 +30,7 @@ beginseg
|
|||
include "build/src/libultra/io/piacs.o"
|
||||
include "build/src/libultra/os/sendmesg.o"
|
||||
include "build/src/libultra/os/stopthread.o"
|
||||
include "build/src/libultra/io/viextend.o"
|
||||
include "build/src/libultra/io/viextendvstart.o"
|
||||
include "build/src/libultra/io/vimodepallan1.o"
|
||||
include "build/src/libultra/os/recvmesg.o"
|
||||
include "build/src/libultra/os/initialize.o"
|
||||
|
@ -385,6 +385,7 @@ beginseg
|
|||
include "build/src/code/z_kaleido_scope_call.o"
|
||||
include "build/src/code/z_play.o"
|
||||
include "build/src/code/PreRender.o"
|
||||
include "build/src/code/TwoHeadGfxArena.o"
|
||||
include "build/src/code/TwoHeadArena.o"
|
||||
include "build/src/code/code_800C3C20.o"
|
||||
include "build/src/code/audioMgr.o"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
OSThread gMainThread;
|
||||
STACK(sMainStack, 0x900);
|
||||
|
@ -7,7 +7,7 @@ StackEntry sMainStackInfo;
|
|||
OSMesg sPiMgrCmdBuff[50];
|
||||
OSMesgQueue gPiMgrCmdQueue;
|
||||
OSViMode gViConfigMode;
|
||||
u8 D_80013960;
|
||||
u8 gViConfigModeType;
|
||||
|
||||
s8 D_80009430 = 1;
|
||||
vu8 gViConfigBlack = true;
|
||||
|
@ -58,17 +58,17 @@ void Idle_ThreadEntry(void* arg) {
|
|||
|
||||
switch (osTvType) {
|
||||
case OS_TV_NTSC:
|
||||
D_80013960 = 2;
|
||||
gViConfigModeType = OS_VI_NTSC_LAN1;
|
||||
gViConfigMode = osViModeNtscLan1;
|
||||
break;
|
||||
|
||||
case OS_TV_MPAL:
|
||||
D_80013960 = 0x1E;
|
||||
gViConfigModeType = OS_VI_MPAL_LAN1;
|
||||
gViConfigMode = osViModeMpalLan1;
|
||||
break;
|
||||
|
||||
case OS_TV_PAL:
|
||||
D_80013960 = 0x2C;
|
||||
gViConfigModeType = OS_VI_FPAL_LAN1;
|
||||
gViConfigMode = osViModeFpalLan1;
|
||||
gViConfigYScale = 0.833f;
|
||||
break;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
f32 LogUtils_CheckFloatRange(const char* exp, s32 line, const char* valueName, f32 value, const char* minName, f32 min,
|
||||
const char* maxName, f32 max) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
StackEntry* sStackInfoListStart = NULL;
|
||||
StackEntry* sStackInfoListEnd = NULL;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
// this should probably go elsewhere but right now viconfig.o is the only object between idle and z_std_dma
|
||||
OSPiHandle* gCartHandle = NULL;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
u32 gCurrentRegion = 0;
|
||||
LocaleCartInfo sCartInfo;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
StackEntry sDmaMgrStackInfo;
|
||||
OSMesgQueue sDmaMgrMsgQueue;
|
||||
|
|
|
@ -1,140 +1,135 @@
|
|||
/**
|
||||
* @file TwoHeadArena.c
|
||||
*
|
||||
* This file implements a simple general purpose double-ended stack allocator.
|
||||
*
|
||||
* A double-ended stack allocator accepts allocations at either the "head" or "tail" of its allotted memory region.
|
||||
* While in general this type of allocator could accept deallocations on the most recently allocated block at either
|
||||
* end, this implementation does not support any individual deallocations; the only provided way to deallocate anything
|
||||
* is to reset the entire arena, deallocating everything. This scheme is most applicable to allocating similar data
|
||||
* with identical lifetime.
|
||||
*/
|
||||
#include "global.h"
|
||||
|
||||
void THGA_Ct(TwoHeadGfxArena* thga, Gfx* start, u32 size) {
|
||||
THA_Ct((TwoHeadArena*)thga, start, size);
|
||||
}
|
||||
|
||||
void THGA_Dt(TwoHeadGfxArena* thga) {
|
||||
THA_Dt((TwoHeadArena*)thga);
|
||||
}
|
||||
|
||||
u32 THGA_IsCrash(TwoHeadGfxArena* thga) {
|
||||
return THA_IsCrash((TwoHeadArena*)thga);
|
||||
}
|
||||
|
||||
void THGA_Init(TwoHeadGfxArena* thga) {
|
||||
THA_Init((TwoHeadArena*)thga);
|
||||
}
|
||||
|
||||
s32 THGA_GetSize(TwoHeadGfxArena* thga) {
|
||||
return THA_GetSize((TwoHeadArena*)thga);
|
||||
}
|
||||
|
||||
Gfx* THGA_GetHead(TwoHeadGfxArena* thga) {
|
||||
return THA_GetHead((TwoHeadArena*)thga);
|
||||
}
|
||||
|
||||
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* start) {
|
||||
THA_SetHead((TwoHeadArena*)thga, start);
|
||||
}
|
||||
|
||||
Gfx* THGA_GetTail(TwoHeadGfxArena* thga) {
|
||||
return THA_GetTail((TwoHeadArena*)thga);
|
||||
}
|
||||
|
||||
Gfx* THGA_AllocStartArray8(TwoHeadGfxArena* thga, u32 count) {
|
||||
return THA_AllocStart((TwoHeadArena*)thga, count * 8);
|
||||
}
|
||||
|
||||
Gfx* THGA_AllocStart8(TwoHeadGfxArena* thga) {
|
||||
return THGA_AllocStartArray8(thga, 1);
|
||||
}
|
||||
|
||||
Gfx* THGA_AllocStart8Wrapper(TwoHeadGfxArena* thga) {
|
||||
return THGA_AllocStart8(thga);
|
||||
}
|
||||
|
||||
Gfx* THGA_AllocEnd(TwoHeadGfxArena* thga, u32 size) {
|
||||
return THA_AllocEnd((TwoHeadArena*)thga, size);
|
||||
}
|
||||
|
||||
Gfx* THGA_AllocEndArray64(TwoHeadGfxArena* thga, u32 count) {
|
||||
return THGA_AllocEnd(thga, count * 0x40);
|
||||
}
|
||||
|
||||
Gfx* THGA_AllocEnd64(TwoHeadGfxArena* thga) {
|
||||
return THGA_AllocEnd(thga, 0x40);
|
||||
}
|
||||
|
||||
Gfx* THGA_AllocEndArray16(TwoHeadGfxArena* thga, u32 count) {
|
||||
return THGA_AllocEnd(thga, count * 0x10);
|
||||
}
|
||||
|
||||
Gfx* THGA_AllocEnd16(TwoHeadGfxArena* thga) {
|
||||
return THGA_AllocEnd(thga, 0x10);
|
||||
}
|
||||
|
||||
void* THA_GetHead(TwoHeadArena* tha) {
|
||||
return tha->head;
|
||||
}
|
||||
|
||||
void THA_SetHead(TwoHeadArena* tha, void* start) {
|
||||
tha->head = start;
|
||||
void THA_SetHead(TwoHeadArena* tha, void* newHead) {
|
||||
tha->head = newHead;
|
||||
}
|
||||
|
||||
void* THA_GetTail(TwoHeadArena* tha) {
|
||||
return tha->tail;
|
||||
}
|
||||
|
||||
void* THA_AllocStart(TwoHeadArena* tha, u32 size) {
|
||||
/**
|
||||
* Allocates to the head of the Two Head Arena. The allocation will not have any alignment guarantees.
|
||||
*/
|
||||
void* THA_AllocHead(TwoHeadArena* tha, size_t size) {
|
||||
void* start = tha->head;
|
||||
|
||||
tha->head = (void*)((u32)tha->head + size);
|
||||
tha->head = (u8*)tha->head + size;
|
||||
return start;
|
||||
}
|
||||
|
||||
void* THA_AllocStart1(TwoHeadArena* tha) {
|
||||
return THA_AllocStart(tha, 1);
|
||||
void* THA_AllocHeadByte(TwoHeadArena* tha) {
|
||||
return THA_AllocHead(tha, 1);
|
||||
}
|
||||
|
||||
void* THA_AllocEnd(TwoHeadArena* tha, u32 size) {
|
||||
u32 mask;
|
||||
/**
|
||||
* Allocates to the tail end of the Two Head Arena. The allocation will be aligned based on the size of the allocation.
|
||||
* All allocations of 16 bytes or more will be aligned to 16-bytes. Otherwise, the alignment will be the largest power
|
||||
* of 2 for which the size is a multiple, in order to accommodate the alignment requirements of any data types that can
|
||||
* fit within the allocation.
|
||||
*/
|
||||
void* THA_AllocTail(TwoHeadArena* tha, size_t size) {
|
||||
uintptr_t mask;
|
||||
|
||||
if (size == 8) {
|
||||
mask = ~7;
|
||||
// Align 8 for multiples of 8
|
||||
mask = ALIGN_MASK(8);
|
||||
} else if (size == 4 || size == 12) {
|
||||
mask = ~3;
|
||||
// Align 4 for multiples of 4
|
||||
mask = ALIGN_MASK(4);
|
||||
} else if (size == 2 || size == 6 || size == 10 || size == 12 || size == 14) {
|
||||
mask = ~1;
|
||||
// Align 2 for multiples of 2
|
||||
mask = ALIGN_MASK(2);
|
||||
} else if (size >= 0x10) {
|
||||
// Align 0x10 for allocations greater than 0x10
|
||||
mask = ALIGN_MASK(0x10);
|
||||
} else {
|
||||
mask = (size >= 0x10) ? ~0xF : 0;
|
||||
//! @bug if size is less than 16 and odd the computation below will give NULL. The mask for this case would be
|
||||
//! more sensible as ~0, for no extra alignment
|
||||
mask = 0;
|
||||
}
|
||||
|
||||
tha->tail = (void*)((((u32)tha->tail & mask) - size) & mask);
|
||||
tha->tail = (void*)((((uintptr_t)tha->tail & mask) - size) & mask);
|
||||
return tha->tail;
|
||||
}
|
||||
|
||||
void* THA_AllocEndAlign16(TwoHeadArena* tha, u32 size) {
|
||||
u32 mask = ~0xF;
|
||||
/**
|
||||
* Allocates to the tail end of the Two Head Arena with guaranteed 16-byte alignment.
|
||||
*/
|
||||
void* THA_AllocTailAlign16(TwoHeadArena* tha, size_t size) {
|
||||
uintptr_t mask = ALIGN_MASK(0x10);
|
||||
|
||||
tha->tail = (void*)((((u32)tha->tail & mask) - size) & (u32)(u64)mask);
|
||||
tha->tail = (void*)((((uintptr_t)tha->tail & mask) - size) & (uintptr_t)(u64)mask);
|
||||
return tha->tail;
|
||||
}
|
||||
|
||||
void* THA_AllocEndAlign(TwoHeadArena* tha, u32 size, u32 mask) {
|
||||
tha->tail = (void*)((((u32)tha->tail & mask) - size) & mask);
|
||||
/**
|
||||
* Allocates to the tail end of the Two Head Arena using the provided mask to align the allocated region.
|
||||
*
|
||||
* @param tha Arena to allocate to
|
||||
* @param size Size of the allocation
|
||||
* @param mask Mask to use to align the allocated region. To align to n-bytes where n is a power of 2, use the
|
||||
* ALIGN_MASK(n) macro
|
||||
*
|
||||
* @return Pointer to the start of the allocated block
|
||||
*/
|
||||
void* THA_AllocTailAlign(TwoHeadArena* tha, size_t size, uintptr_t mask) {
|
||||
tha->tail = (void*)((((uintptr_t)tha->tail & mask) - size) & mask);
|
||||
return tha->tail;
|
||||
}
|
||||
|
||||
s32 THA_GetSize(TwoHeadArena* tha) {
|
||||
return (u32)tha->tail - (u32)tha->head;
|
||||
/**
|
||||
* Gets the remaining size of the Two Head Arena
|
||||
*
|
||||
* @return Remaining size. A negative number indicates an overflow.
|
||||
*/
|
||||
s32 THA_GetRemaining(TwoHeadArena* tha) {
|
||||
return (s32)((u8*)tha->tail - (u8*)tha->head);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the Two Head Arena has overflowed, false otherwise
|
||||
*/
|
||||
u32 THA_IsCrash(TwoHeadArena* tha) {
|
||||
return THA_GetSize(tha) < 0;
|
||||
return THA_GetRemaining(tha) < 0;
|
||||
}
|
||||
|
||||
void THA_Init(TwoHeadArena* tha) {
|
||||
tha->head = tha->bufp;
|
||||
tha->tail = (void*)((u32)tha->bufp + tha->size);
|
||||
/**
|
||||
* Resets the head and tail positions of the Two Head Arena, all prior allocations are effectively considered free
|
||||
* as any new allocations will begin to overwrite them.
|
||||
*/
|
||||
void THA_Reset(TwoHeadArena* tha) {
|
||||
tha->head = tha->start;
|
||||
tha->tail = (u8*)tha->start + tha->size;
|
||||
}
|
||||
|
||||
void THA_Ct(TwoHeadArena* tha, void* ptr, u32 size) {
|
||||
tha->bufp = ptr;
|
||||
/**
|
||||
* Creates a new Two Head Arena at `start` with available size `size`
|
||||
*/
|
||||
void THA_Init(TwoHeadArena* tha, void* start, size_t size) {
|
||||
tha->start = start;
|
||||
tha->size = size;
|
||||
THA_Init(tha);
|
||||
THA_Reset(tha);
|
||||
}
|
||||
|
||||
void THA_Dt(TwoHeadArena* tha) {
|
||||
/**
|
||||
* Destroys the Two Head Arena, no further allocations are possible
|
||||
*/
|
||||
void THA_Destroy(TwoHeadArena* tha) {
|
||||
bzero(tha, sizeof(TwoHeadArena));
|
||||
}
|
||||
|
|
102
src/code/TwoHeadGfxArena.c
Normal file
102
src/code/TwoHeadGfxArena.c
Normal file
|
@ -0,0 +1,102 @@
|
|||
/**
|
||||
* @file TwoHeadGfxArena.c
|
||||
*
|
||||
* This file implements a particular use of the double-ended stack allocator from TwoHeadArena.c for graphics data.
|
||||
*
|
||||
* Display list commands are allocated from the head while other graphics data such as matrices and vertices are
|
||||
* allocated from the tail end.
|
||||
*
|
||||
* @see TwoHeadArena.c
|
||||
*/
|
||||
#include "global.h"
|
||||
|
||||
void THGA_Init(TwoHeadGfxArena* thga, void* start, size_t size) {
|
||||
THA_Init(&thga->tha, start, size);
|
||||
}
|
||||
|
||||
void THGA_Destroy(TwoHeadGfxArena* thga) {
|
||||
THA_Destroy(&thga->tha);
|
||||
}
|
||||
|
||||
u32 THGA_IsCrash(TwoHeadGfxArena* thga) {
|
||||
return THA_IsCrash(&thga->tha);
|
||||
}
|
||||
|
||||
void THGA_Reset(TwoHeadGfxArena* thga) {
|
||||
THA_Reset(&thga->tha);
|
||||
}
|
||||
|
||||
s32 THGA_GetRemaining(TwoHeadGfxArena* thga) {
|
||||
return THA_GetRemaining(&thga->tha);
|
||||
}
|
||||
|
||||
Gfx* THGA_GetHead(TwoHeadGfxArena* thga) {
|
||||
return THA_GetHead(&thga->tha);
|
||||
}
|
||||
|
||||
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* newHead) {
|
||||
THA_SetHead(&thga->tha, newHead);
|
||||
}
|
||||
|
||||
void* THGA_GetTail(TwoHeadGfxArena* thga) {
|
||||
return THA_GetTail(&thga->tha);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates a display list of `num` Gfx commands to the head of the Two Head Gfx Arena.
|
||||
*/
|
||||
Gfx* THGA_AllocDisplayList(TwoHeadGfxArena* thga, size_t num) {
|
||||
return THA_AllocHead(&thga->tha, num * sizeof(Gfx));
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates a single Gfx command to the head of the Two Head Gfx Arena.
|
||||
*/
|
||||
Gfx* THGA_AllocGfx(TwoHeadGfxArena* thga) {
|
||||
return THGA_AllocDisplayList(thga, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identical to `THGA_AllocGfx`
|
||||
*
|
||||
* @see THGA_AllocGfx
|
||||
*/
|
||||
Gfx* THGA_AllocGfx2(TwoHeadGfxArena* thga) {
|
||||
return THGA_AllocGfx(thga);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates to the end of the Two Head Gfx Arena. Intended for data complementary to the display lists such as
|
||||
* matrices and vertices that are only needed for a single graphics task.
|
||||
*/
|
||||
void* THGA_AllocTail(TwoHeadGfxArena* thga, size_t size) {
|
||||
return THA_AllocTail(&thga->tha, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates `num` matrices to the tail end of the Two Head Gfx Arena.
|
||||
*/
|
||||
Mtx* THGA_AllocMtxArray(TwoHeadGfxArena* thga, size_t num) {
|
||||
return THGA_AllocTail(thga, num * sizeof(Mtx));
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates a matrix to the tail end of the Two Head Gfx Arena.
|
||||
*/
|
||||
Mtx* THGA_AllocMtx(TwoHeadGfxArena* thga) {
|
||||
return THGA_AllocTail(thga, sizeof(Mtx));
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates `num` vertices to the tail end of the Two Head Gfx Arena.
|
||||
*/
|
||||
Vtx* THGA_AllocVtxArray(TwoHeadGfxArena* thga, size_t num) {
|
||||
return THGA_AllocTail(thga, num * sizeof(Vtx));
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates a vertex to the tail end of the Two Head Gfx Arena.
|
||||
*/
|
||||
Vtx* THGA_AllocVtx(TwoHeadGfxArena* thga) {
|
||||
return THGA_AllocTail(thga, sizeof(Vtx));
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#define FILL_ALLOCBLOCK (1 << 0)
|
||||
#define FILL_FREEBLOCK (1 << 1)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
/**
|
||||
* Update the `carriedActor`'s position based on the dynapoly actor identified by `bgId`.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
u32 gIsCtrlr2Valid = false;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 sfxId;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
* DPad-Down disables sending fault pages over osSyncPrintf.
|
||||
*/
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "alloca.h"
|
||||
|
||||
void FaultDrawer_Init(void);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* the crash screen implemented by fault.c
|
||||
*/
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16* fb;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
SpeedMeter D_801664D0;
|
||||
struct_801664F0 D_801664F0;
|
||||
|
@ -173,7 +173,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
|
|||
DebugArena_Display();
|
||||
SystemArena_Display();
|
||||
// "%08x bytes left until the death of Hyrule (game_alloc)"
|
||||
osSyncPrintf("ハイラル滅亡まであと %08x バイト(game_alloc)\n", THA_GetSize(&gameState->tha));
|
||||
osSyncPrintf("ハイラル滅亡まであと %08x バイト(game_alloc)\n", THA_GetRemaining(&gameState->tha));
|
||||
R_ENABLE_ARENA_DBG = 0;
|
||||
}
|
||||
|
||||
|
@ -243,14 +243,14 @@ void GameState_Update(GameState* gameState) {
|
|||
func_800C4344(gameState);
|
||||
|
||||
if (SREG(63) == 1u) {
|
||||
if (SREG(48) < 0) {
|
||||
SREG(48) = 0;
|
||||
if (R_VI_MODE_EDIT_STATE < VI_MODE_EDIT_STATE_INACTIVE) {
|
||||
R_VI_MODE_EDIT_STATE = VI_MODE_EDIT_STATE_INACTIVE;
|
||||
gfxCtx->viMode = &gViConfigMode;
|
||||
gfxCtx->viFeatures = gViConfigFeatures;
|
||||
gfxCtx->xScale = gViConfigXScale;
|
||||
gfxCtx->yScale = gViConfigYScale;
|
||||
} else if (SREG(48) > 0) {
|
||||
ViMode_Update(&sViMode, gameState->input);
|
||||
} else if (R_VI_MODE_EDIT_STATE > VI_MODE_EDIT_STATE_INACTIVE) {
|
||||
ViMode_Update(&sViMode, &gameState->input[0]);
|
||||
gfxCtx->viMode = &sViMode.customViMode;
|
||||
gfxCtx->viFeatures = sViMode.viFeatures;
|
||||
gfxCtx->xScale = 1.0f;
|
||||
|
@ -261,6 +261,7 @@ void GameState_Update(GameState* gameState) {
|
|||
gfxCtx->viFeatures = gViConfigFeatures;
|
||||
gfxCtx->xScale = gViConfigXScale;
|
||||
gfxCtx->yScale = gViConfigYScale;
|
||||
|
||||
if (SREG(63) == 6 || (SREG(63) == 2u && osTvType == OS_TV_NTSC)) {
|
||||
gfxCtx->viMode = &osViModeNtscLan1;
|
||||
gfxCtx->yScale = 1.0f;
|
||||
|
@ -304,7 +305,8 @@ void GameState_Update(GameState* gameState) {
|
|||
HREG(83) = HREG(82);
|
||||
HREG(84) = HREG(81);
|
||||
gViConfigAdditionalScanLines = HREG(82);
|
||||
gViConfigYScale = HREG(81) == 0 ? 240.0f / (gViConfigAdditionalScanLines + 240.0f) : 1.0f;
|
||||
gViConfigYScale =
|
||||
HREG(81) == 0 ? ((f32)SCREEN_HEIGHT) / (gViConfigAdditionalScanLines + (f32)SCREEN_HEIGHT) : 1.0f;
|
||||
D_80009430 = 1;
|
||||
}
|
||||
}
|
||||
|
@ -323,10 +325,10 @@ void GameState_InitArena(GameState* gameState, size_t size) {
|
|||
osSyncPrintf("ハイラル確保 サイズ=%u バイト\n"); // "Hyrule reserved size = %u bytes"
|
||||
arena = GameAlloc_MallocDebug(&gameState->alloc, size, "../game.c", 992);
|
||||
if (arena != NULL) {
|
||||
THA_Ct(&gameState->tha, arena, size);
|
||||
THA_Init(&gameState->tha, arena, size);
|
||||
osSyncPrintf("ハイラル確保成功\n"); // "Successful Hyral"
|
||||
} else {
|
||||
THA_Ct(&gameState->tha, NULL, 0);
|
||||
THA_Init(&gameState->tha, NULL, 0);
|
||||
osSyncPrintf("ハイラル確保失敗\n"); // "Failure to secure Hyrule"
|
||||
Fault_AddHungupAndCrash("../game.c", 999);
|
||||
}
|
||||
|
@ -338,10 +340,10 @@ void GameState_Realloc(GameState* gameState, size_t size) {
|
|||
u32 systemMaxFree;
|
||||
u32 systemFree;
|
||||
u32 systemAlloc;
|
||||
void* thaBufp = gameState->tha.bufp;
|
||||
void* thaStart = gameState->tha.start;
|
||||
|
||||
THA_Dt(&gameState->tha);
|
||||
GameAlloc_Free(alloc, thaBufp);
|
||||
THA_Destroy(&gameState->tha);
|
||||
GameAlloc_Free(alloc, thaStart);
|
||||
osSyncPrintf("ハイラル一時解放!!\n"); // "Hyrule temporarily released!!"
|
||||
SystemArena_GetSizes(&systemMaxFree, &systemFree, &systemAlloc);
|
||||
if ((systemMaxFree - 0x10) < size) {
|
||||
|
@ -358,10 +360,10 @@ void GameState_Realloc(GameState* gameState, size_t size) {
|
|||
osSyncPrintf("ハイラル再確保 サイズ=%u バイト\n", size); // "Hyral reallocate size = %u bytes"
|
||||
gameArena = GameAlloc_MallocDebug(alloc, size, "../game.c", 1033);
|
||||
if (gameArena != NULL) {
|
||||
THA_Ct(&gameState->tha, gameArena, size);
|
||||
THA_Init(&gameState->tha, gameArena, size);
|
||||
osSyncPrintf("ハイラル再確保成功\n"); // "Successful reacquisition of Hyrule"
|
||||
} else {
|
||||
THA_Ct(&gameState->tha, NULL, 0);
|
||||
THA_Init(&gameState->tha, NULL, 0);
|
||||
osSyncPrintf("ハイラル再確保失敗\n"); // "Failure to secure Hyral"
|
||||
SystemArena_Display();
|
||||
Fault_AddHungupAndCrash("../game.c", 1044);
|
||||
|
@ -406,7 +408,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
|
|||
func_800ACE70(&D_801664F0);
|
||||
func_800AD920(&D_80166500);
|
||||
VisMono_Init(&sMonoColors);
|
||||
if (SREG(48) == 0) {
|
||||
if (R_VI_MODE_EDIT_STATE == VI_MODE_EDIT_STATE_INACTIVE) {
|
||||
ViMode_Init(&sViMode);
|
||||
}
|
||||
SpeedMeter_Init(&D_801664D0);
|
||||
|
@ -436,10 +438,10 @@ void GameState_Destroy(GameState* gameState) {
|
|||
func_800ACE90(&D_801664F0);
|
||||
func_800AD950(&D_80166500);
|
||||
VisMono_Destroy(&sMonoColors);
|
||||
if (SREG(48) == 0) {
|
||||
if (R_VI_MODE_EDIT_STATE == VI_MODE_EDIT_STATE_INACTIVE) {
|
||||
ViMode_Destroy(&sViMode);
|
||||
}
|
||||
THA_Dt(&gameState->tha);
|
||||
THA_Destroy(&gameState->tha);
|
||||
GameAlloc_Cleanup(&gameState->alloc);
|
||||
SystemArena_Display();
|
||||
Fault_RemoveClient(&sGameFaultClient);
|
||||
|
@ -465,13 +467,13 @@ void* GameState_Alloc(GameState* gameState, size_t size, char* file, s32 line) {
|
|||
if (THA_IsCrash(&gameState->tha)) {
|
||||
osSyncPrintf("ハイラルは滅亡している\n");
|
||||
ret = NULL;
|
||||
} else if ((u32)THA_GetSize(&gameState->tha) < size) {
|
||||
} else if ((u32)THA_GetRemaining(&gameState->tha) < size) {
|
||||
// "Hyral on the verge of extinction does not have %d bytes left (%d bytes until extinction)"
|
||||
osSyncPrintf("滅亡寸前のハイラルには %d バイトの余力もない(滅亡まであと %d バイト)\n", size,
|
||||
THA_GetSize(&gameState->tha));
|
||||
THA_GetRemaining(&gameState->tha));
|
||||
ret = NULL;
|
||||
} else {
|
||||
ret = THA_AllocEndAlign16(&gameState->tha, size);
|
||||
ret = THA_AllocTailAlign16(&gameState->tha, size);
|
||||
if (THA_IsCrash(&gameState->tha)) {
|
||||
osSyncPrintf("ハイラルは滅亡してしまった\n"); // "Hyrule has been destroyed"
|
||||
ret = NULL;
|
||||
|
@ -486,9 +488,9 @@ void* GameState_Alloc(GameState* gameState, size_t size, char* file, s32 line) {
|
|||
}
|
||||
|
||||
void* GameState_AllocEndAlign16(GameState* gameState, size_t size) {
|
||||
return THA_AllocEndAlign16(&gameState->tha, size);
|
||||
return THA_AllocTailAlign16(&gameState->tha, size);
|
||||
}
|
||||
|
||||
s32 GameState_GetArenaSize(GameState* gameState) {
|
||||
return THA_GetSize(&gameState->tha);
|
||||
return THA_GetRemaining(&gameState->tha);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#define GFXPOOL_HEAD_MAGIC 0x1234
|
||||
#define GFXPOOL_TAIL_MAGIC 0x5678
|
||||
|
@ -93,10 +93,10 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx) {
|
|||
|
||||
pool->headMagic = GFXPOOL_HEAD_MAGIC;
|
||||
pool->tailMagic = GFXPOOL_TAIL_MAGIC;
|
||||
THGA_Ct(&gfxCtx->polyOpa, pool->polyOpaBuffer, sizeof(pool->polyOpaBuffer));
|
||||
THGA_Ct(&gfxCtx->polyXlu, pool->polyXluBuffer, sizeof(pool->polyXluBuffer));
|
||||
THGA_Ct(&gfxCtx->overlay, pool->overlayBuffer, sizeof(pool->overlayBuffer));
|
||||
THGA_Ct(&gfxCtx->work, pool->workBuffer, sizeof(pool->workBuffer));
|
||||
THGA_Init(&gfxCtx->polyOpa, pool->polyOpaBuffer, sizeof(pool->polyOpaBuffer));
|
||||
THGA_Init(&gfxCtx->polyXlu, pool->polyXluBuffer, sizeof(pool->polyXluBuffer));
|
||||
THGA_Init(&gfxCtx->overlay, pool->overlayBuffer, sizeof(pool->overlayBuffer));
|
||||
THGA_Init(&gfxCtx->work, pool->workBuffer, sizeof(pool->workBuffer));
|
||||
|
||||
gfxCtx->polyOpaBuffer = pool->polyOpaBuffer;
|
||||
gfxCtx->polyXluBuffer = pool->polyXluBuffer;
|
||||
|
@ -175,8 +175,8 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
|
|||
osSyncPrintf("RCPが帰ってきませんでした。"); // "RCP did not return."
|
||||
osSyncPrintf(VT_RST);
|
||||
|
||||
LogUtils_LogHexDump((void*)&HW_REG(SP_MEM_ADDR_REG, u32), 0x20);
|
||||
LogUtils_LogHexDump((void*)&DPC_START_REG, 0x20);
|
||||
LogUtils_LogHexDump((void*)PHYS_TO_K1(SP_BASE_REG), 0x20);
|
||||
LogUtils_LogHexDump((void*)PHYS_TO_K1(DPC_BASE_REG), 0x20);
|
||||
LogUtils_LogHexDump(gGfxSPTaskYieldBuffer, sizeof(gGfxSPTaskYieldBuffer));
|
||||
|
||||
SREG(6) = -1;
|
||||
|
@ -321,8 +321,8 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
}
|
||||
|
||||
if (HREG(81) < 0) {
|
||||
LogUtils_LogHexDump((void*)&HW_REG(SP_MEM_ADDR_REG, u32), 0x20);
|
||||
LogUtils_LogHexDump((void*)&DPC_START_REG, 0x20);
|
||||
LogUtils_LogHexDump((void*)PHYS_TO_K1(SP_BASE_REG), 0x20);
|
||||
LogUtils_LogHexDump((void*)PHYS_TO_K1(DPC_BASE_REG), 0x20);
|
||||
}
|
||||
|
||||
if (HREG(81) < 0) {
|
||||
|
@ -458,20 +458,20 @@ void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size) {
|
|||
TwoHeadGfxArena* thga = &gfxCtx->polyOpa;
|
||||
|
||||
if (HREG(59) == 1) {
|
||||
osSyncPrintf("graph_alloc siz=%d thga size=%08x bufp=%08x head=%08x tail=%08x\n", size, thga->size, thga->bufp,
|
||||
osSyncPrintf("graph_alloc siz=%d thga size=%08x bufp=%08x head=%08x tail=%08x\n", size, thga->size, thga->start,
|
||||
thga->p, thga->d);
|
||||
}
|
||||
return THGA_AllocEnd(&gfxCtx->polyOpa, ALIGN16(size));
|
||||
return THGA_AllocTail(&gfxCtx->polyOpa, ALIGN16(size));
|
||||
}
|
||||
|
||||
void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size) {
|
||||
TwoHeadGfxArena* thga = &gfxCtx->polyOpa;
|
||||
|
||||
if (HREG(59) == 1) {
|
||||
osSyncPrintf("graph_alloc siz=%d thga size=%08x bufp=%08x head=%08x tail=%08x\n", size, thga->size, thga->bufp,
|
||||
osSyncPrintf("graph_alloc siz=%d thga size=%08x bufp=%08x head=%08x tail=%08x\n", size, thga->size, thga->start,
|
||||
thga->p, thga->d);
|
||||
}
|
||||
return THGA_AllocEnd(&gfxCtx->polyOpa, ALIGN16(size));
|
||||
return THGA_AllocTail(&gfxCtx->polyOpa, ALIGN16(size));
|
||||
}
|
||||
|
||||
void Graph_OpenDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, s32 line) {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* @see sched.c
|
||||
*/
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
vu32 gIrqMgrResetStatus = IRQ_RESET_STATUS_IDLE;
|
||||
volatile OSTime sIrqMgrResetTime = 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
s32 gScreenWidth = SCREEN_WIDTH;
|
||||
s32 gScreenHeight = SCREEN_HEIGHT;
|
||||
|
@ -80,7 +80,7 @@ void Main(void* arg) {
|
|||
|
||||
osSyncPrintf("タスクスケジューラの初期化\n"); // "Initialize the task scheduler"
|
||||
StackCheck_Init(&sSchedStackInfo, sSchedStack, STACK_TOP(sSchedStack), 0, 0x100, "sched");
|
||||
Sched_Init(&gScheduler, STACK_TOP(sSchedStack), THREAD_PRI_SCHED, D_80013960, 1, &gIrqMgr);
|
||||
Sched_Init(&gScheduler, STACK_TOP(sSchedStack), THREAD_PRI_SCHED, gViConfigModeType, 1, &gIrqMgr);
|
||||
|
||||
IrqMgr_AddClient(&gIrqMgr, &irqClient, &irqMgrMsgQueue);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* done while waiting for this operation to complete.
|
||||
*/
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#define PADMGR_LOG(controllerNo, msg) \
|
||||
if (1) { \
|
||||
|
|
|
@ -50,6 +50,6 @@ void RcpUtils_Reset(void) {
|
|||
// Flush the RDP pipeline and freeze clock counter
|
||||
osDpSetStatus(DPC_SET_FREEZE | DPC_SET_FLUSH);
|
||||
// Halt the RSP, disable interrupt on break and set "task done" signal
|
||||
__osSpSetStatus(SP_SET_HALT | SP_SET_SIG2 | SP_CLR_INTR_BREAK);
|
||||
__osSpSetStatus(SP_SET_HALT | SP_SET_TASKDONE | SP_CLR_INTR_BREAK);
|
||||
RcpUtils_PrintRegisterStatus();
|
||||
}
|
||||
|
|
|
@ -650,7 +650,7 @@ void Sched_ThreadEntry(void* arg) {
|
|||
}
|
||||
}
|
||||
|
||||
void Sched_Init(Scheduler* sc, void* stack, OSPri priority, UNK_TYPE arg3, UNK_TYPE arg4, IrqMgr* irqMgr) {
|
||||
void Sched_Init(Scheduler* sc, void* stack, OSPri priority, u8 viModeType, UNK_TYPE arg4, IrqMgr* irqMgr) {
|
||||
bzero(sc, sizeof(Scheduler));
|
||||
sc->isFirstSwap = true;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
/**
|
||||
* How much time the audio update on the audio thread (`func_800E4FE0`) took in total, between scheduling the last two
|
||||
|
@ -231,25 +231,26 @@ void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, Gam
|
|||
}
|
||||
|
||||
thga = (TwoHeadGfxArena*)&state->tha;
|
||||
SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THA_GetSize((TwoHeadArena*)thga),
|
||||
//! @bug THA_GetRemaining call should be THGA_GetRemaining like the others below, harmless as-is
|
||||
SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THA_GetRemaining(&thga->tha),
|
||||
GPACK_RGBA5551(0, 0, 255, 1), GPACK_RGBA5551(0, 255, 0, 1), ulx, lrx, y, y);
|
||||
SpeedMeter_DrawAllocEntry(&entry, gfxCtx);
|
||||
y++;
|
||||
|
||||
thga = &gfxCtx->polyOpa;
|
||||
SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetSize(thga), GPACK_RGBA5551(0, 0, 255, 1),
|
||||
SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetRemaining(thga), GPACK_RGBA5551(0, 0, 255, 1),
|
||||
GPACK_RGBA5551(255, 0, 255, 1), ulx, lrx, y, y);
|
||||
SpeedMeter_DrawAllocEntry(&entry, gfxCtx);
|
||||
y++;
|
||||
|
||||
thga = &gfxCtx->polyXlu;
|
||||
SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetSize(thga), GPACK_RGBA5551(0, 0, 255, 1),
|
||||
SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetRemaining(thga), GPACK_RGBA5551(0, 0, 255, 1),
|
||||
GPACK_RGBA5551(255, 255, 0, 1), ulx, lrx, y, y);
|
||||
SpeedMeter_DrawAllocEntry(&entry, gfxCtx);
|
||||
y++;
|
||||
|
||||
thga = &gfxCtx->overlay;
|
||||
SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetSize(thga), GPACK_RGBA5551(0, 0, 255, 1),
|
||||
SpeedMeter_InitAllocEntry(&entry, thga->size, thga->size - THGA_GetRemaining(thga), GPACK_RGBA5551(0, 0, 255, 1),
|
||||
GPACK_RGBA5551(255, 0, 0, 1), ulx, lrx, y, y);
|
||||
SpeedMeter_DrawAllocEntry(&entry, gfxCtx);
|
||||
y++;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB,
|
||||
Vec3f* lineAClosestToB, Vec3f* lineBClosestToA);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
|
||||
if (overlayEntry->loadedRamAddr != NULL) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "quake.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h"
|
||||
#include "overlays/actors/ovl_En_Part/z_en_part.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
|
||||
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);
|
||||
|
@ -149,7 +149,7 @@ void DynaSSNodeList_Initialize(PlayState* play, DynaSSNodeList* nodeList) {
|
|||
* Initialize DynaSSNodeList tbl
|
||||
*/
|
||||
void DynaSSNodeList_Alloc(PlayState* play, DynaSSNodeList* nodeList, s32 max) {
|
||||
nodeList->tbl = THA_AllocEndAlign(&play->state.tha, max * sizeof(SSNode), -2);
|
||||
nodeList->tbl = THA_AllocTailAlign(&play->state.tha, max * sizeof(SSNode), ALIGNOF_MASK(SSNode));
|
||||
|
||||
ASSERT(nodeList->tbl != NULL, "psst->tbl != NULL", "../z_bgcheck.c", 1811);
|
||||
|
||||
|
@ -1613,9 +1613,10 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
|
|||
colCtx->subdivAmount.z = 16;
|
||||
}
|
||||
}
|
||||
colCtx->lookupTbl = THA_AllocEndAlign(
|
||||
&play->state.tha,
|
||||
colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y * colCtx->subdivAmount.z, ~1);
|
||||
colCtx->lookupTbl = THA_AllocTailAlign(&play->state.tha,
|
||||
colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y *
|
||||
colCtx->subdivAmount.z,
|
||||
ALIGNOF_MASK(StaticLookup));
|
||||
if (colCtx->lookupTbl == NULL) {
|
||||
LogUtils_HungupThread("../z_bgcheck.c", 4176);
|
||||
}
|
||||
|
@ -2501,7 +2502,7 @@ void SSNodeList_Initialize(SSNodeList* this) {
|
|||
void SSNodeList_Alloc(PlayState* play, SSNodeList* this, s32 tblMax, s32 numPolys) {
|
||||
this->max = tblMax;
|
||||
this->count = 0;
|
||||
this->tbl = THA_AllocEndAlign(&play->state.tha, tblMax * sizeof(SSNode), -2);
|
||||
this->tbl = THA_AllocTailAlign(&play->state.tha, tblMax * sizeof(SSNode), ALIGNOF_MASK(SSNode));
|
||||
|
||||
ASSERT(this->tbl != NULL, "this->short_slist_node_tbl != NULL", "../z_bgcheck.c", 5975);
|
||||
|
||||
|
@ -2636,7 +2637,7 @@ void DynaPoly_NullPolyList(CollisionPoly** polyList) {
|
|||
* Allocate dyna.polyList
|
||||
*/
|
||||
void DynaPoly_AllocPolyList(PlayState* play, CollisionPoly** polyList, s32 numPolys) {
|
||||
*polyList = THA_AllocEndAlign(&play->state.tha, numPolys * sizeof(CollisionPoly), -2);
|
||||
*polyList = THA_AllocTailAlign(&play->state.tha, numPolys * sizeof(CollisionPoly), ALIGNOF_MASK(CollisionPoly));
|
||||
ASSERT(*polyList != NULL, "ptbl->pbuf != NULL", "../z_bgcheck.c", 6247);
|
||||
}
|
||||
|
||||
|
@ -2651,7 +2652,7 @@ void DynaPoly_NullVtxList(Vec3s** vtxList) {
|
|||
* Allocate dyna.vtxList
|
||||
*/
|
||||
void DynaPoly_AllocVtxList(PlayState* play, Vec3s** vtxList, s32 numVtx) {
|
||||
*vtxList = THA_AllocEndAlign(&play->state.tha, numVtx * sizeof(Vec3s), -2);
|
||||
*vtxList = THA_AllocTailAlign(&play->state.tha, numVtx * sizeof(Vec3s), ALIGNOF_MASK(Vec3s));
|
||||
ASSERT(*vtxList != NULL, "ptbl->pbuf != NULL", "../z_bgcheck.c", 6277);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "quake.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
|
||||
|
||||
s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags);
|
||||
|
@ -816,10 +816,10 @@ Vec3f* Camera_BGCheckCorner(Vec3f* dst, Vec3f* linePointA, Vec3f* linePointB, Ca
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks collision between at and eyeNext, if `checkEye` is set, if there is no collsion between
|
||||
* Checks collision between at and eyeNext, if `checkEye` is set, if there is no collision between
|
||||
* eyeNext->at, then eye->at is also checked.
|
||||
* Returns:
|
||||
* 0 if no collsion is found between at->eyeNext
|
||||
* 0 if no collision is found between at->eyeNext
|
||||
* 2 if the angle between the polys is between 60 degrees and 120 degrees
|
||||
* 3 ?
|
||||
* 6 if the angle between the polys is greater than 120 degrees
|
||||
|
@ -2531,7 +2531,7 @@ s32 Camera_Jump2(Camera* camera) {
|
|||
Camera_AddVecGeoToVec3f(&camBgChk.pos, at, &bgChkPara);
|
||||
if (Camera_BGCheckInfo(camera, at, &camBgChk)) {
|
||||
// Collision found between parallel at->eyeNext, set eye position to
|
||||
// first collsion point.
|
||||
// first collision point.
|
||||
*eye = bgChkPos;
|
||||
} else {
|
||||
// no collision found with the parallel at->eye, animate to be parallel
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
|
||||
|
||||
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
|
||||
|
@ -2648,8 +2648,8 @@ void CollisionCheck_SetOCvsOC(Collider* left, ColliderInfo* leftInfo, Vec3f* lef
|
|||
f32 zDelta;
|
||||
Actor* leftActor = left->actor;
|
||||
Actor* rightActor = right->actor;
|
||||
s32 leftMassType;
|
||||
s32 rightMassType;
|
||||
s32 leftMassType;
|
||||
|
||||
left->ocFlags1 |= OC1_HIT;
|
||||
left->oc = rightActor;
|
||||
|
@ -2666,8 +2666,8 @@ void CollisionCheck_SetOCvsOC(Collider* left, ColliderInfo* leftInfo, Vec3f* lef
|
|||
if (leftActor == NULL || rightActor == NULL || left->ocFlags1 & OC1_NO_PUSH || right->ocFlags1 & OC1_NO_PUSH) {
|
||||
return;
|
||||
}
|
||||
rightMassType = CollisionCheck_GetMassType(leftActor->colChkInfo.mass);
|
||||
leftMassType = CollisionCheck_GetMassType(rightActor->colChkInfo.mass);
|
||||
leftMassType = CollisionCheck_GetMassType(leftActor->colChkInfo.mass);
|
||||
rightMassType = CollisionCheck_GetMassType(rightActor->colChkInfo.mass);
|
||||
leftMass = leftActor->colChkInfo.mass;
|
||||
rightMass = rightActor->colChkInfo.mass;
|
||||
totalMass = leftMass + rightMass;
|
||||
|
@ -2679,30 +2679,30 @@ void CollisionCheck_SetOCvsOC(Collider* left, ColliderInfo* leftInfo, Vec3f* lef
|
|||
zDelta = rightPos->z - leftPos->z;
|
||||
xzDist = sqrtf(SQ(xDelta) + SQ(zDelta));
|
||||
|
||||
if (rightMassType == MASSTYPE_IMMOVABLE) {
|
||||
if (leftMassType == MASSTYPE_IMMOVABLE) {
|
||||
if (leftMassType == MASSTYPE_IMMOVABLE) {
|
||||
if (rightMassType == MASSTYPE_IMMOVABLE) {
|
||||
return;
|
||||
} else { // leftMassType == MASS_HEAVY | MASS_NORMAL
|
||||
} else { // rightMassType == MASSTYPE_HEAVY or MASSTYPE_NORMAL
|
||||
leftDispRatio = 0;
|
||||
rightDispRatio = 1;
|
||||
}
|
||||
} else if (rightMassType == MASSTYPE_HEAVY) {
|
||||
if (leftMassType == MASSTYPE_IMMOVABLE) {
|
||||
} else if (leftMassType == MASSTYPE_HEAVY) {
|
||||
if (rightMassType == MASSTYPE_IMMOVABLE) {
|
||||
leftDispRatio = 1;
|
||||
rightDispRatio = 0;
|
||||
} else if (leftMassType == MASSTYPE_HEAVY) {
|
||||
} else if (rightMassType == MASSTYPE_HEAVY) {
|
||||
leftDispRatio = 0.5f;
|
||||
rightDispRatio = 0.5f;
|
||||
} else { // leftMassType == MASS_NORMAL
|
||||
} else { // rightMassType == MASSTYPE_NORMAL
|
||||
leftDispRatio = 0;
|
||||
rightDispRatio = 1;
|
||||
}
|
||||
} else { // rightMassType == MASS_NORMAL
|
||||
if (leftMassType == MASSTYPE_NORMAL) {
|
||||
} else { // leftMassType == MASSTYPE_NORMAL
|
||||
if (rightMassType == MASSTYPE_NORMAL) {
|
||||
inverseTotalMass = 1 / totalMass;
|
||||
leftDispRatio = rightMass * inverseTotalMass;
|
||||
rightDispRatio = leftMass * inverseTotalMass;
|
||||
} else { // leftMassType == MASS_HEAVY | MASS_IMMOVABLE
|
||||
} else { // rightMassType == MASSTYPE_HEAVY or MASSTYPE_IMMOVABLE
|
||||
leftDispRatio = 1;
|
||||
rightDispRatio = 0;
|
||||
}
|
||||
|
@ -3494,7 +3494,7 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
|
|||
}
|
||||
radSqDiff = SQXZ(actorToItem) - SQ(radius);
|
||||
if (!IS_ZERO(SQXZ(itemStep))) {
|
||||
actorDotItemXZ = DOTXZ(2.0f * itemStep, actorToItem);
|
||||
actorDotItemXZ = (2.0f * itemStep.x * actorToItem.x) + (2.0f * itemStep.z * actorToItem.z);
|
||||
if (SQ(actorDotItemXZ) < (4.0f * SQXZ(itemStep) * radSqDiff)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -3511,10 +3511,10 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
|
|||
if (intersect2 == true) {
|
||||
frac2 = (-actorDotItemXZ - closeDist) / (2.0f * SQXZ(itemStep));
|
||||
}
|
||||
} else if (!IS_ZERO(DOTXZ(2.0f * itemStep, actorToItem))) {
|
||||
} else if (!IS_ZERO((2.0f * itemStep.x * actorToItem.x) + (2.0f * itemStep.z * actorToItem.z))) {
|
||||
intersect1 = true;
|
||||
intersect2 = false;
|
||||
frac1 = -radSqDiff / DOTXZ(2.0f * itemStep, actorToItem);
|
||||
frac1 = -radSqDiff / ((2.0f * itemStep.x * actorToItem.x) + (2.0f * itemStep.z * actorToItem.z));
|
||||
} else {
|
||||
if (radSqDiff <= 0.0f) {
|
||||
test1 = (0.0f < actorToItem.y) && (actorToItem.y < height);
|
||||
|
|
|
@ -248,8 +248,8 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (play->envCtx.adjFogFar < 12800) {
|
||||
play->envCtx.adjFogFar += 35;
|
||||
if (play->envCtx.adjZFar < ENV_ZFAR_MAX) {
|
||||
play->envCtx.adjZFar += 35;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
static Vtx sVertices[5] = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
EffectSsInfo sEffectSsInfo = { 0 }; // "EffectSS2Info"
|
||||
|
||||
|
|
|
@ -748,7 +748,7 @@ void EffectSsFhgFlash_SpawnLightBall(PlayState* play, Vec3f* pos, Vec3f* velocit
|
|||
* Spawn a shock effect
|
||||
*
|
||||
* param determines where the ligntning should go
|
||||
* 0: dont attach to any actor. spawns at the position specified by pos
|
||||
* 0: don't attach to any actor. spawns at the position specified by pos
|
||||
* 1: spawn at one of Player's body parts, chosen at random
|
||||
* 2: spawn at one of Phantom Ganon's body parts, chosen at random
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "assets/objects/object_d_hsblock/object_d_hsblock.h"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
static Gfx sRCPSetupFade[] = {
|
||||
gsDPPipeSync(),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "src/overlays/actors/ovl_En_Horse/z_en_horse.h"
|
||||
|
||||
s32 func_8006CFC0(s32 sceneId) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#define MARKER_ESCAPE 0x00
|
||||
#define MARKER_SOI 0xD8
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#define KALEIDO_OVERLAY(name, nameString) \
|
||||
{ \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
void (*sKaleidoScopeUpdateFunc)(PlayState* play);
|
||||
void (*sKaleidoScopeDrawFunc)(PlayState* play);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "ultra64.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
|
||||
|
@ -319,7 +319,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
|
|||
|
||||
envCtx->adjAmbientColor[0] = envCtx->adjAmbientColor[1] = envCtx->adjAmbientColor[2] = envCtx->adjLight1Color[0] =
|
||||
envCtx->adjLight1Color[1] = envCtx->adjLight1Color[2] = envCtx->adjFogColor[0] = envCtx->adjFogColor[1] =
|
||||
envCtx->adjFogColor[2] = envCtx->adjFogNear = envCtx->adjFogFar = 0;
|
||||
envCtx->adjFogColor[2] = envCtx->adjFogNear = envCtx->adjZFar = 0;
|
||||
|
||||
envCtx->sunPos.x = -(Math_SinS(((void)0, gSaveContext.dayTime) - CLOCK_TIME(12, 0)) * 120.0f) * 25.0f;
|
||||
envCtx->sunPos.y = +(Math_CosS(((void)0, gSaveContext.dayTime) - CLOCK_TIME(12, 0)) * 120.0f) * 25.0f;
|
||||
|
@ -873,8 +873,8 @@ void Environment_UpdateRain(PlayState* play);
|
|||
|
||||
void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx, PauseContext* pauseCtx,
|
||||
MessageContext* msgCtx, GameOverContext* gameOverCtx, GraphicsContext* gfxCtx) {
|
||||
f32 sp8C;
|
||||
f32 sp88 = 0.0f;
|
||||
f32 timeChangeBlend;
|
||||
f32 configChangeBlend = 0.0f;
|
||||
u16 i;
|
||||
u16 j;
|
||||
u16 time;
|
||||
|
@ -986,16 +986,18 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
u8 blend8[2];
|
||||
s16 blend16[2];
|
||||
|
||||
sp8C = Environment_LerpWeight(sTimeBasedLightConfigs[envCtx->lightConfig][i].endTime,
|
||||
sTimeBasedLightConfigs[envCtx->lightConfig][i].startTime,
|
||||
((void)0, gSaveContext.skyboxTime));
|
||||
timeChangeBlend =
|
||||
Environment_LerpWeight(sTimeBasedLightConfigs[envCtx->lightConfig][i].endTime,
|
||||
sTimeBasedLightConfigs[envCtx->lightConfig][i].startTime,
|
||||
((void)0, gSaveContext.skyboxTime));
|
||||
|
||||
sSandstormColorIndex = sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting & 3;
|
||||
sNextSandstormColorIndex = sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting & 3;
|
||||
sSandstormLerpScale = sp8C;
|
||||
sSandstormLerpScale = timeChangeBlend;
|
||||
|
||||
if (envCtx->changeLightEnabled) {
|
||||
sp88 = ((f32)envCtx->changeDuration - envCtx->changeLightTimer) / envCtx->changeDuration;
|
||||
configChangeBlend =
|
||||
((f32)envCtx->changeDuration - envCtx->changeLightTimer) / envCtx->changeDuration;
|
||||
envCtx->changeLightTimer--;
|
||||
|
||||
if (envCtx->changeLightTimer <= 0) {
|
||||
|
@ -1011,15 +1013,15 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
.ambientColor[j],
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
|
||||
.ambientColor[j],
|
||||
sp8C);
|
||||
timeChangeBlend);
|
||||
blend8[1] = LERP(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
|
||||
.ambientColor[j],
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
|
||||
.nextLightSetting]
|
||||
.ambientColor[j],
|
||||
sp8C);
|
||||
*(envCtx->lightSettings.ambientColor + j) = LERP(blend8[0], blend8[1], sp88);
|
||||
timeChangeBlend);
|
||||
*(envCtx->lightSettings.ambientColor + j) = LERP(blend8[0], blend8[1], configChangeBlend);
|
||||
}
|
||||
|
||||
// set light1 direction for the sun
|
||||
|
@ -1042,15 +1044,15 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
.light1Color[j],
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
|
||||
.light1Color[j],
|
||||
sp8C);
|
||||
timeChangeBlend);
|
||||
blend8[1] = LERP(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
|
||||
.light1Color[j],
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
|
||||
.nextLightSetting]
|
||||
.light1Color[j],
|
||||
sp8C);
|
||||
*(envCtx->lightSettings.light1Color + j) = LERP(blend8[0], blend8[1], sp88);
|
||||
timeChangeBlend);
|
||||
*(envCtx->lightSettings.light1Color + j) = LERP(blend8[0], blend8[1], configChangeBlend);
|
||||
|
||||
// blend light2Color
|
||||
blend8[0] =
|
||||
|
@ -1058,15 +1060,15 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
.light2Color[j],
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
|
||||
.light2Color[j],
|
||||
sp8C);
|
||||
timeChangeBlend);
|
||||
blend8[1] = LERP(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
|
||||
.light2Color[j],
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
|
||||
.nextLightSetting]
|
||||
.light2Color[j],
|
||||
sp8C);
|
||||
*(envCtx->lightSettings.light2Color + j) = LERP(blend8[0], blend8[1], sp88);
|
||||
timeChangeBlend);
|
||||
*(envCtx->lightSettings.light2Color + j) = LERP(blend8[0], blend8[1], configChangeBlend);
|
||||
}
|
||||
|
||||
// blend fogColor
|
||||
|
@ -1076,47 +1078,49 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
.fogColor[j],
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
|
||||
.fogColor[j],
|
||||
sp8C);
|
||||
timeChangeBlend);
|
||||
blend8[1] = LERP(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
|
||||
.fogColor[j],
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
|
||||
.nextLightSetting]
|
||||
.fogColor[j],
|
||||
sp8C);
|
||||
*(envCtx->lightSettings.fogColor + j) = LERP(blend8[0], blend8[1], sp88);
|
||||
timeChangeBlend);
|
||||
*(envCtx->lightSettings.fogColor + j) = LERP(blend8[0], blend8[1], configChangeBlend);
|
||||
}
|
||||
|
||||
blend16[0] = LERP16(
|
||||
(lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting].fogNear &
|
||||
0x3FF),
|
||||
(lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
|
||||
.fogNear &
|
||||
0x3FF),
|
||||
sp8C);
|
||||
ENV_LIGHT_SETTINGS_FOG_NEAR(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting]
|
||||
.blendRateAndFogNear),
|
||||
ENV_LIGHT_SETTINGS_FOG_NEAR(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting]
|
||||
.blendRateAndFogNear),
|
||||
timeChangeBlend);
|
||||
blend16[1] = LERP16(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
|
||||
.fogNear &
|
||||
0x3FF,
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].nextLightSetting]
|
||||
.fogNear &
|
||||
0x3FF,
|
||||
sp8C);
|
||||
ENV_LIGHT_SETTINGS_FOG_NEAR(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
|
||||
.blendRateAndFogNear),
|
||||
ENV_LIGHT_SETTINGS_FOG_NEAR(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i]
|
||||
.nextLightSetting]
|
||||
.blendRateAndFogNear),
|
||||
timeChangeBlend);
|
||||
|
||||
envCtx->lightSettings.fogNear = LERP16(blend16[0], blend16[1], sp88);
|
||||
envCtx->lightSettings.fogNear = LERP16(blend16[0], blend16[1], configChangeBlend);
|
||||
|
||||
blend16[0] = LERP16(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting].fogFar,
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting].fogFar,
|
||||
sp8C);
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].lightSetting].zFar,
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->lightConfig][i].nextLightSetting].zFar,
|
||||
timeChangeBlend);
|
||||
blend16[1] = LERP16(
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].lightSetting]
|
||||
.fogFar,
|
||||
.zFar,
|
||||
lightSettingsList[sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].nextLightSetting]
|
||||
.fogFar,
|
||||
sp8C);
|
||||
.zFar,
|
||||
timeChangeBlend);
|
||||
|
||||
envCtx->lightSettings.fogFar = LERP16(blend16[0], blend16[1], sp88);
|
||||
envCtx->lightSettings.zFar = LERP16(blend16[0], blend16[1], configChangeBlend);
|
||||
|
||||
if (sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].nextLightSetting >=
|
||||
envCtx->numLightSettings) {
|
||||
|
@ -1142,11 +1146,13 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
envCtx->lightSettings.fogColor[i] = lightSettingsList[envCtx->lightSetting].fogColor[i];
|
||||
}
|
||||
|
||||
envCtx->lightSettings.fogNear = lightSettingsList[envCtx->lightSetting].fogNear & 0x3FF;
|
||||
envCtx->lightSettings.fogFar = lightSettingsList[envCtx->lightSetting].fogFar;
|
||||
envCtx->lightSettings.fogNear =
|
||||
ENV_LIGHT_SETTINGS_FOG_NEAR(lightSettingsList[envCtx->lightSetting].blendRateAndFogNear);
|
||||
envCtx->lightSettings.zFar = lightSettingsList[envCtx->lightSetting].zFar;
|
||||
envCtx->lightBlend = 1.0f;
|
||||
} else {
|
||||
u8 blendRate = (lightSettingsList[envCtx->lightSetting].fogNear >> 0xA) * 4;
|
||||
u8 blendRate =
|
||||
ENV_LIGHT_SETTINGS_BLEND_RATE_U8(lightSettingsList[envCtx->lightSetting].blendRateAndFogNear);
|
||||
|
||||
if (blendRate == 0) {
|
||||
blendRate++;
|
||||
|
@ -1184,12 +1190,13 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
LERP(lightSettingsList[envCtx->prevLightSetting].fogColor[i],
|
||||
lightSettingsList[envCtx->lightSetting].fogColor[i], envCtx->lightBlend);
|
||||
}
|
||||
envCtx->lightSettings.fogNear =
|
||||
LERP16(lightSettingsList[envCtx->prevLightSetting].fogNear & 0x3FF,
|
||||
lightSettingsList[envCtx->lightSetting].fogNear & 0x3FF, envCtx->lightBlend);
|
||||
envCtx->lightSettings.fogFar =
|
||||
LERP16(lightSettingsList[envCtx->prevLightSetting].fogFar,
|
||||
lightSettingsList[envCtx->lightSetting].fogFar, envCtx->lightBlend);
|
||||
envCtx->lightSettings.fogNear = LERP16(
|
||||
ENV_LIGHT_SETTINGS_FOG_NEAR(lightSettingsList[envCtx->prevLightSetting].blendRateAndFogNear),
|
||||
ENV_LIGHT_SETTINGS_FOG_NEAR(lightSettingsList[envCtx->lightSetting].blendRateAndFogNear),
|
||||
envCtx->lightBlend);
|
||||
envCtx->lightSettings.zFar =
|
||||
LERP16(lightSettingsList[envCtx->prevLightSetting].zFar,
|
||||
lightSettingsList[envCtx->lightSetting].zFar, envCtx->lightBlend);
|
||||
}
|
||||
|
||||
if (envCtx->lightSetting >= envCtx->numLightSettings) {
|
||||
|
@ -1254,18 +1261,18 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
// Adjust fog near and far if necessary
|
||||
adjustment = envCtx->lightSettings.fogNear + envCtx->adjFogNear;
|
||||
|
||||
if (adjustment <= 996) {
|
||||
if (adjustment <= ENV_FOGNEAR_MAX) {
|
||||
lightCtx->fogNear = adjustment;
|
||||
} else {
|
||||
lightCtx->fogNear = 996;
|
||||
lightCtx->fogNear = ENV_FOGNEAR_MAX;
|
||||
}
|
||||
|
||||
adjustment = envCtx->lightSettings.fogFar + envCtx->adjFogFar;
|
||||
adjustment = envCtx->lightSettings.zFar + envCtx->adjZFar;
|
||||
|
||||
if (adjustment <= 12800) {
|
||||
lightCtx->fogFar = adjustment;
|
||||
if (adjustment <= ENV_ZFAR_MAX) {
|
||||
lightCtx->zFar = adjustment;
|
||||
} else {
|
||||
lightCtx->fogFar = 12800;
|
||||
lightCtx->zFar = ENV_ZFAR_MAX;
|
||||
}
|
||||
|
||||
// When environment debug is enabled, various environment related variables can be configured via the reg editor
|
||||
|
@ -1286,7 +1293,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
R_ENV_FOG_COLOR(1) = lightCtx->fogColor[1];
|
||||
R_ENV_FOG_COLOR(2) = lightCtx->fogColor[2];
|
||||
|
||||
R_ENV_FOG_FAR = lightCtx->fogFar;
|
||||
R_ENV_Z_FAR = lightCtx->zFar;
|
||||
R_ENV_FOG_NEAR = lightCtx->fogNear;
|
||||
|
||||
R_ENV_LIGHT1_DIR(0) = envCtx->dirLight1.params.dir.x;
|
||||
|
@ -1317,7 +1324,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
|
|||
lightCtx->fogColor[1] = R_ENV_FOG_COLOR(1);
|
||||
lightCtx->fogColor[2] = R_ENV_FOG_COLOR(2);
|
||||
lightCtx->fogNear = R_ENV_FOG_NEAR;
|
||||
lightCtx->fogFar = R_ENV_FOG_FAR;
|
||||
lightCtx->zFar = R_ENV_Z_FAR;
|
||||
|
||||
if (cREG(14)) {
|
||||
R_ENV_LIGHT1_DIR(0) = Math_CosS(cREG(10)) * Math_CosS(cREG(11)) * 120.0f;
|
||||
|
@ -1593,7 +1600,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
|
|||
alpha = alpha * lensFlareAlphas[i];
|
||||
alpha = CLAMP_MIN(alpha, 0.0f);
|
||||
|
||||
fogInfluence = (996 - play->lightCtx.fogNear) / 50.0f;
|
||||
fogInfluence = (ENV_FOGNEAR_MAX - play->lightCtx.fogNear) / 50.0f;
|
||||
|
||||
fogInfluence = CLAMP_MAX(fogInfluence, 1.0f);
|
||||
|
||||
|
@ -1640,7 +1647,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
|
|||
alpha = alpha * glareStrength;
|
||||
alpha = CLAMP_MIN(alpha, 0.0f);
|
||||
|
||||
fogInfluence = (996 - play->lightCtx.fogNear) / 50.0f;
|
||||
fogInfluence = (ENV_FOGNEAR_MAX - play->lightCtx.fogNear) / 50.0f;
|
||||
|
||||
fogInfluence = CLAMP_MAX(fogInfluence, 1.0f);
|
||||
|
||||
|
@ -2233,8 +2240,8 @@ void Environment_FadeInGameOverLights(PlayState* play) {
|
|||
play->envCtx.adjFogColor[i] = -255;
|
||||
}
|
||||
|
||||
if (play->envCtx.lightSettings.fogFar + play->envCtx.adjFogFar > 900) {
|
||||
play->envCtx.adjFogFar -= 100;
|
||||
if (play->envCtx.lightSettings.zFar + play->envCtx.adjZFar > 900) {
|
||||
play->envCtx.adjZFar -= 100;
|
||||
}
|
||||
|
||||
if (play->envCtx.lightSettings.fogNear + play->envCtx.adjFogNear > 950) {
|
||||
|
@ -2277,7 +2284,7 @@ void Environment_FadeOutGameOverLights(PlayState* play) {
|
|||
Math_SmoothStepToS(&play->envCtx.adjLight1Color[i], 0, 5, 12, 1);
|
||||
play->envCtx.adjFogColor[i] = 0;
|
||||
}
|
||||
play->envCtx.adjFogFar = 0;
|
||||
play->envCtx.adjZFar = 0;
|
||||
play->envCtx.adjFogNear = 0;
|
||||
} else {
|
||||
play->envCtx.fillScreen = true;
|
||||
|
|
|
@ -195,7 +195,7 @@ s32 Lights_FreeNode(LightNode* light) {
|
|||
void LightContext_Init(PlayState* play, LightContext* lightCtx) {
|
||||
LightContext_InitList(play, lightCtx);
|
||||
LightContext_SetAmbientColor(lightCtx, 80, 80, 80);
|
||||
LightContext_SetFog(lightCtx, 0, 0, 0, 996, 12800);
|
||||
LightContext_SetFog(lightCtx, 0, 0, 0, ENV_FOGNEAR_MAX, ENV_ZFAR_MAX);
|
||||
bzero(&sLightsBuffer, sizeof(sLightsBuffer));
|
||||
}
|
||||
|
||||
|
@ -205,12 +205,12 @@ void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) {
|
|||
lightCtx->ambientColor[2] = b;
|
||||
}
|
||||
|
||||
void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 fogNear, s16 fogFar) {
|
||||
void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 fogNear, s16 zFar) {
|
||||
lightCtx->fogColor[0] = r;
|
||||
lightCtx->fogColor[1] = g;
|
||||
lightCtx->fogColor[2] = b;
|
||||
lightCtx->fogNear = fogNear;
|
||||
lightCtx->fogFar = fogFar;
|
||||
lightCtx->zFar = zFar;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "assets/textures/parameter_static/parameter_static.h"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "assets/textures/parameter_static/parameter_static.h"
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "message_data_static.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "assets/textures/parameter_static/parameter_static.h"
|
||||
|
||||
s16 sTextFade = false; // original name: key_off_flag ?
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "quake.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "overlays/actors/ovl_En_Sw/z_en_sw.h"
|
||||
|
||||
static s16 sDisableAttention = false;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "assets/textures/parameter_static/parameter_static.h"
|
||||
#include "assets/textures/do_action_static/do_action_static.h"
|
||||
#include "assets/textures/icon_item_static/icon_item_static.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "quake.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
void* D_8012D1F0 = NULL;
|
||||
UNK_TYPE D_8012D1F4 = 0; // unused
|
||||
|
@ -393,8 +393,8 @@ void Play_Init(GameState* thisx) {
|
|||
D_801614B0.a = 0;
|
||||
Flags_UnsetAllEnv(this);
|
||||
|
||||
osSyncPrintf("ZELDA ALLOC SIZE=%x\n", THA_GetSize(&this->state.tha));
|
||||
zAllocSize = THA_GetSize(&this->state.tha);
|
||||
osSyncPrintf("ZELDA ALLOC SIZE=%x\n", THA_GetRemaining(&this->state.tha));
|
||||
zAllocSize = THA_GetRemaining(&this->state.tha);
|
||||
zAlloc = (u32)GameState_Alloc(&this->state, zAllocSize, "../z_play.c", 2918);
|
||||
zAllocAligned = (zAlloc + 8) & ~0xF;
|
||||
ZeldaArena_Init((void*)zAllocAligned, zAllocSize - zAllocAligned + zAlloc);
|
||||
|
@ -1051,7 +1051,7 @@ void Play_Draw(PlayState* this) {
|
|||
POLY_OPA_DISP = Play_SetFog(this, POLY_OPA_DISP);
|
||||
POLY_XLU_DISP = Play_SetFog(this, POLY_XLU_DISP);
|
||||
|
||||
View_SetPerspective(&this->view, this->view.fovy, this->view.zNear, this->lightCtx.fogFar);
|
||||
View_SetPerspective(&this->view, this->view.fovy, this->view.zNear, this->lightCtx.zFar);
|
||||
View_Apply(&this->view, VIEW_ALL);
|
||||
|
||||
// The billboard matrix temporarily stores the viewing matrix
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
void func_80092320(PreNMIState* this) {
|
||||
this->state.running = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "quake.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 index;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
Vec3f D_801270A0 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
|
@ -153,7 +153,7 @@ void Room_DrawCullable(PlayState* play, Room* room, u32 flags) {
|
|||
entryBoundsNearZ = projectedPos.z - roomShapeCullableEntry->boundsSphereRadius;
|
||||
|
||||
// If the entry bounding sphere isn't fully beyond the rendered depth range
|
||||
if (entryBoundsNearZ < play->lightCtx.fogFar) {
|
||||
if (entryBoundsNearZ < play->lightCtx.zFar) {
|
||||
|
||||
// This entry will be rendered
|
||||
insert->entry = roomShapeCullableEntry;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
RomFile sNaviQuestHintFiles[];
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#define ANIM_INTERP 1
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
// clang-format off
|
||||
MtxF sMtxFClear = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
// these are the main substructs of save context.
|
||||
// we are going to hold off on splitting save context until later on,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
|
||||
vu32 sLogOnNextViewInit = true;
|
||||
|
||||
|
|
|
@ -1,158 +1,190 @@
|
|||
#include "global.h"
|
||||
#include "ultra64/viint.h"
|
||||
|
||||
void ViMode_LogPrint(OSViMode* osViMode) {
|
||||
LOG_ADDRESS("osvimodep", osViMode, "../z_vimode.c", 87);
|
||||
LOG_ADDRESS("osvimodep->comRegs.ctrl", osViMode->comRegs.ctrl, "../z_vimode.c", 88);
|
||||
LOG_ADDRESS("osvimodep->comRegs.width", osViMode->comRegs.width, "../z_vimode.c", 89);
|
||||
LOG_ADDRESS("osvimodep->comRegs.burst", osViMode->comRegs.burst, "../z_vimode.c", 90);
|
||||
LOG_ADDRESS("osvimodep->comRegs.vSync", osViMode->comRegs.vSync, "../z_vimode.c", 91);
|
||||
LOG_ADDRESS("osvimodep->comRegs.hSync", osViMode->comRegs.hSync, "../z_vimode.c", 92);
|
||||
LOG_ADDRESS("osvimodep->comRegs.leap", osViMode->comRegs.leap, "../z_vimode.c", 93);
|
||||
LOG_ADDRESS("osvimodep->comRegs.hStart", osViMode->comRegs.hStart, "../z_vimode.c", 94);
|
||||
LOG_ADDRESS("osvimodep->comRegs.xScale", osViMode->comRegs.xScale, "../z_vimode.c", 95);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[0].vStart", osViMode->fldRegs[0].vStart, "../z_vimode.c", 96);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[0].vBurst", osViMode->fldRegs[0].vBurst, "../z_vimode.c", 97);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[0].origin", osViMode->fldRegs[0].origin, "../z_vimode.c", 98);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[0].yScale", osViMode->fldRegs[0].yScale, "../z_vimode.c", 99);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[0].vIntr", osViMode->fldRegs[0].vIntr, "../z_vimode.c", 100);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[1].vStart", osViMode->fldRegs[1].vStart, "../z_vimode.c", 101);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[1].vBurst", osViMode->fldRegs[1].vBurst, "../z_vimode.c", 102);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[1].origin", osViMode->fldRegs[1].origin, "../z_vimode.c", 103);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[1].yScale", osViMode->fldRegs[1].yScale, "../z_vimode.c", 104);
|
||||
LOG_ADDRESS("osvimodep->fldRegs[1].vIntr", osViMode->fldRegs[1].vIntr, "../z_vimode.c", 105);
|
||||
LOG_HEX32("osvimodep->comRegs.ctrl", osViMode->comRegs.ctrl, "../z_vimode.c", 88);
|
||||
LOG_HEX32("osvimodep->comRegs.width", osViMode->comRegs.width, "../z_vimode.c", 89);
|
||||
LOG_HEX32("osvimodep->comRegs.burst", osViMode->comRegs.burst, "../z_vimode.c", 90);
|
||||
LOG_HEX32("osvimodep->comRegs.vSync", osViMode->comRegs.vSync, "../z_vimode.c", 91);
|
||||
LOG_HEX32("osvimodep->comRegs.hSync", osViMode->comRegs.hSync, "../z_vimode.c", 92);
|
||||
LOG_HEX32("osvimodep->comRegs.leap", osViMode->comRegs.leap, "../z_vimode.c", 93);
|
||||
LOG_HEX32("osvimodep->comRegs.hStart", osViMode->comRegs.hStart, "../z_vimode.c", 94);
|
||||
LOG_HEX32("osvimodep->comRegs.xScale", osViMode->comRegs.xScale, "../z_vimode.c", 95);
|
||||
LOG_HEX32("osvimodep->fldRegs[0].vStart", osViMode->fldRegs[0].vStart, "../z_vimode.c", 96);
|
||||
LOG_HEX32("osvimodep->fldRegs[0].vBurst", osViMode->fldRegs[0].vBurst, "../z_vimode.c", 97);
|
||||
LOG_HEX32("osvimodep->fldRegs[0].origin", osViMode->fldRegs[0].origin, "../z_vimode.c", 98);
|
||||
LOG_HEX32("osvimodep->fldRegs[0].yScale", osViMode->fldRegs[0].yScale, "../z_vimode.c", 99);
|
||||
LOG_HEX32("osvimodep->fldRegs[0].vIntr", osViMode->fldRegs[0].vIntr, "../z_vimode.c", 100);
|
||||
LOG_HEX32("osvimodep->fldRegs[1].vStart", osViMode->fldRegs[1].vStart, "../z_vimode.c", 101);
|
||||
LOG_HEX32("osvimodep->fldRegs[1].vBurst", osViMode->fldRegs[1].vBurst, "../z_vimode.c", 102);
|
||||
LOG_HEX32("osvimodep->fldRegs[1].origin", osViMode->fldRegs[1].origin, "../z_vimode.c", 103);
|
||||
LOG_HEX32("osvimodep->fldRegs[1].yScale", osViMode->fldRegs[1].yScale, "../z_vimode.c", 104);
|
||||
LOG_HEX32("osvimodep->fldRegs[1].vIntr", osViMode->fldRegs[1].vIntr, "../z_vimode.c", 105);
|
||||
}
|
||||
|
||||
// This function configures the custom VI mode (`viMode.customViMode`) based on the other flags in `viMode`.
|
||||
void ViMode_Configure(ViMode* viMode, s32 mode, s32 type, s32 unk_70, s32 unk_74, s32 unk_78, s32 unk_7C, s32 width,
|
||||
s32 height, s32 unk_left, s32 unk_right, s32 unk_top, s32 unk_bottom) {
|
||||
s32 not_70;
|
||||
s32 not_74;
|
||||
s32 not_78;
|
||||
s32 not_7C;
|
||||
s32 cond_4C;
|
||||
s32 cond_48;
|
||||
s32 cond_44;
|
||||
s32 cond_40;
|
||||
s32 cond_3C;
|
||||
s32 cond_38;
|
||||
s32 cond_34;
|
||||
/**
|
||||
* Configures the custom OSViMode for this ViMode
|
||||
*
|
||||
* @param viMode ViMode to configure the custom OSViMode for
|
||||
* @param type Identifying type for the OSViMode
|
||||
* @param tvType TV Type: NTSC, PAL, MPAL or FPAL
|
||||
* @param loRes Boolean: true = low resolution, false = high resolution.
|
||||
* Corresponds to "L" or "H" in libultra VI mode names
|
||||
* @param antialiasOff Boolean: true = point-sampling, false = anti-aliasing.
|
||||
* Corresponds to "P" or "A" in libultra VI mode names
|
||||
* @param modeN Boolean: controls interlacing mode, different based on resolution.
|
||||
* Corresponds to "N" or "F" in libultra VI mode names
|
||||
* @param fb16Bit Bolean: true = 16-bit framebuffer, false = 32-bit framebuffer.
|
||||
* Corresponds to "1" or "2" in libultra VI mode names
|
||||
* @param width Screen width
|
||||
* @param height Screen height
|
||||
* @param leftAdjust Left edge adjustment
|
||||
* @param rightAdjust Right edge adjustment
|
||||
* @param upperAdjust Upper edge adjustment
|
||||
* @param lowerAdjust Lower edge adjustment
|
||||
*/
|
||||
void ViMode_Configure(ViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antialiasOff, s32 modeN, s32 fb16Bit,
|
||||
s32 width, s32 height, s32 leftAdjust, s32 rightAdjust, s32 upperAdjust, s32 lowerAdjust) {
|
||||
s32 hiRes;
|
||||
s32 antialiasOn;
|
||||
s32 modeF;
|
||||
s32 fb32Bit;
|
||||
s32 hiResDeflicker; // deflickered interlacing
|
||||
s32 hiResInterlaced;
|
||||
s32 loResDeinterlaced;
|
||||
s32 loResInterlaced;
|
||||
s32 modeLAN1; // L=(lo res) A=(antialias) N=(deinterlace) 1=(16-bit)
|
||||
s32 modeLPN2; // L=(lo res) P=(point-sampled) N=(deinterlace) 2=(32-bit)
|
||||
s32 modeHPN2; // H=(hi res) P=(point-sampled) N=(normal interlacing) 2=(32-bit)
|
||||
s32 yScaleLo;
|
||||
s32 yScaleHi0;
|
||||
s32 yScaleHi1;
|
||||
s32 yScaleHiEvenField;
|
||||
s32 yScaleHiOddField;
|
||||
|
||||
not_70 = !unk_70;
|
||||
not_74 = !unk_74;
|
||||
not_78 = !unk_78;
|
||||
not_7C = !unk_7C;
|
||||
hiRes = !loRes;
|
||||
antialiasOn = !antialiasOff;
|
||||
modeF = !modeN;
|
||||
fb32Bit = !fb16Bit;
|
||||
|
||||
cond_4C = not_70 && not_78;
|
||||
cond_48 = not_70 && unk_78;
|
||||
cond_44 = unk_70 && unk_78;
|
||||
cond_40 = unk_70 && not_78;
|
||||
cond_3C = unk_70 && not_74 && unk_78 && unk_7C;
|
||||
cond_38 = unk_70 && unk_74 && unk_78 && not_7C;
|
||||
cond_34 = not_70 && unk_74 && unk_78 && not_7C;
|
||||
hiResDeflicker = hiRes && modeF;
|
||||
hiResInterlaced = hiRes && modeN;
|
||||
loResDeinterlaced = loRes && modeN;
|
||||
loResInterlaced = loRes && modeF;
|
||||
|
||||
unk_top &= ~1;
|
||||
unk_bottom &= ~1;
|
||||
modeLAN1 = loRes && antialiasOn && modeN && fb16Bit;
|
||||
modeLPN2 = loRes && antialiasOff && modeN && fb32Bit;
|
||||
modeHPN2 = hiRes && antialiasOff && modeN && fb32Bit;
|
||||
|
||||
yScaleLo = (cond_4C ? 2 : 1) * ((height << 11) / (SCREEN_HEIGHT * 2 + unk_bottom - unk_top) / (unk_70 ? 1 : 2));
|
||||
upperAdjust &= ~1;
|
||||
lowerAdjust &= ~1;
|
||||
|
||||
yScaleHi0 = not_78 ? (cond_40 ? 0x1000000 : 0x2000000) : 0;
|
||||
yScaleHi1 = not_78 ? (cond_40 ? 0x3000000 : 0x2000000) : 0;
|
||||
yScaleLo =
|
||||
(hiResDeflicker ? 2 : 1) * ((height << 11) / (SCREEN_HEIGHT * 2 + lowerAdjust - upperAdjust) / (loRes ? 1 : 2));
|
||||
|
||||
viMode->customViMode.type = mode;
|
||||
viMode->customViMode.comRegs.ctrl = OS_VI_UNK2000 | OS_VI_UNK1000 | OS_VI_GAMMA | OS_VI_GAMMA_DITHER |
|
||||
(!cond_44 ? OS_VI_UNK40 : 0) | (not_74 ? OS_VI_DIVOT : 0) |
|
||||
(not_7C ? OS_VI_UNK2 | OS_VI_UNK1 : OS_VI_UNK2);
|
||||
yScaleHiEvenField = modeF ? (loResInterlaced ? (F210(0.25) << 16) : (F210(0.5) << 16)) : 0;
|
||||
yScaleHiOddField = modeF ? (loResInterlaced ? (F210(0.75) << 16) : (F210(0.5) << 16)) : 0;
|
||||
|
||||
if (cond_3C) {
|
||||
viMode->customViMode.comRegs.ctrl |= 0x100;
|
||||
} else if (cond_38 | cond_34) {
|
||||
viMode->customViMode.comRegs.ctrl |= 0x300;
|
||||
} else if (unk_74) {
|
||||
viMode->customViMode.comRegs.ctrl |= 0x200;
|
||||
viMode->customViMode.type = type;
|
||||
viMode->customViMode.comRegs.ctrl = VI_CTRL_PIXEL_ADV(3) | VI_CTRL_GAMMA_ON | VI_CTRL_GAMMA_DITHER_ON |
|
||||
(!loResDeinterlaced ? VI_CTRL_SERRATE_ON : 0) |
|
||||
(antialiasOn ? VI_CTRL_DIVOT_ON : 0) |
|
||||
(fb32Bit ? VI_CTRL_TYPE_32 : VI_CTRL_TYPE_16);
|
||||
|
||||
if (modeLAN1) {
|
||||
// Anti-aliased, fetch extra lines as-needed
|
||||
viMode->customViMode.comRegs.ctrl |= VI_CTRL_ANTIALIAS_MODE_1;
|
||||
} else if (modeLPN2 | modeHPN2) {
|
||||
// Point-sampled, resampling disabled
|
||||
viMode->customViMode.comRegs.ctrl |= VI_CTRL_ANTIALIAS_MODE_3;
|
||||
} else {
|
||||
viMode->customViMode.comRegs.ctrl |= 0;
|
||||
if (antialiasOff) {
|
||||
// Point-sampled, resampling enabled
|
||||
viMode->customViMode.comRegs.ctrl |= VI_CTRL_ANTIALIAS_MODE_2;
|
||||
} else {
|
||||
// Anti-aliased, always fetch extra lines
|
||||
viMode->customViMode.comRegs.ctrl |= VI_CTRL_ANTIALIAS_MODE_0;
|
||||
}
|
||||
}
|
||||
|
||||
viMode->customViMode.comRegs.width = width * (cond_48 ? 2 : 1);
|
||||
viMode->customViMode.comRegs.width = width * (hiResInterlaced ? 2 : 1);
|
||||
|
||||
if (type == 1) {
|
||||
viMode->customViMode.comRegs.burst = 0x3E52239;
|
||||
viMode->customViMode.comRegs.vSync = 0x20C;
|
||||
viMode->customViMode.comRegs.hSync = 0xC15;
|
||||
viMode->customViMode.comRegs.leap = 0xC150C15;
|
||||
viMode->customViMode.comRegs.hStart = 0x6C02EC;
|
||||
viMode->customViMode.fldRegs[0].vStart = 0x2501FF;
|
||||
viMode->customViMode.fldRegs[0].vBurst = 0xE0204;
|
||||
} else if (type == 0) {
|
||||
viMode->customViMode.comRegs.burst = 0x404233A;
|
||||
viMode->customViMode.comRegs.vSync = 0x270;
|
||||
viMode->customViMode.comRegs.hSync = 0x150C69;
|
||||
viMode->customViMode.comRegs.leap = 0xC6F0C6E;
|
||||
viMode->customViMode.comRegs.hStart = 0x800300;
|
||||
viMode->customViMode.fldRegs[0].vStart = 0x5F0239;
|
||||
viMode->customViMode.fldRegs[0].vBurst = 0x9026B;
|
||||
} else if (type == 2) {
|
||||
viMode->customViMode.comRegs.burst = 0x4651E39;
|
||||
viMode->customViMode.comRegs.vSync = 0x20C;
|
||||
viMode->customViMode.comRegs.hSync = 0xC10;
|
||||
viMode->customViMode.comRegs.leap = 0xC1C0C1C;
|
||||
viMode->customViMode.comRegs.hStart = 0x6C02EC;
|
||||
viMode->customViMode.fldRegs[0].vStart = 0x2501FF;
|
||||
viMode->customViMode.fldRegs[0].vBurst = 0xE0204;
|
||||
if (tvType == OS_TV_NTSC) {
|
||||
viMode->customViMode.comRegs.burst = BURST(57, 34, 5, 62);
|
||||
viMode->customViMode.comRegs.vSync = VSYNC(524);
|
||||
viMode->customViMode.comRegs.hSync = HSYNC(3093, 0);
|
||||
viMode->customViMode.comRegs.leap = LEAP(3093, 3093);
|
||||
viMode->customViMode.comRegs.hStart = HSTART(108, 748);
|
||||
viMode->customViMode.fldRegs[0].vStart = START(37, 511);
|
||||
viMode->customViMode.fldRegs[0].vBurst = BURST(4, 2, 14, 0);
|
||||
} else if (tvType == OS_TV_PAL) {
|
||||
viMode->customViMode.comRegs.burst = BURST(58, 35, 4, 64);
|
||||
viMode->customViMode.comRegs.vSync = VSYNC(624);
|
||||
viMode->customViMode.comRegs.hSync = HSYNC(3177, 21);
|
||||
viMode->customViMode.comRegs.leap = LEAP(3183, 3182);
|
||||
viMode->customViMode.comRegs.hStart = HSTART(128, 768);
|
||||
viMode->customViMode.fldRegs[0].vStart = START(95, 569);
|
||||
viMode->customViMode.fldRegs[0].vBurst = BURST(107, 2, 9, 0);
|
||||
} else if (tvType == OS_TV_MPAL) {
|
||||
viMode->customViMode.comRegs.burst = BURST(57, 30, 5, 70);
|
||||
viMode->customViMode.comRegs.vSync = VSYNC(524);
|
||||
viMode->customViMode.comRegs.hSync = HSYNC(3088, 0);
|
||||
viMode->customViMode.comRegs.leap = LEAP(3100, 3100);
|
||||
viMode->customViMode.comRegs.hStart = HSTART(108, 748);
|
||||
viMode->customViMode.fldRegs[0].vStart = START(37, 511);
|
||||
viMode->customViMode.fldRegs[0].vBurst = BURST(4, 2, 14, 0);
|
||||
}
|
||||
|
||||
viMode->customViMode.fldRegs[1].vStart = viMode->customViMode.fldRegs[0].vStart;
|
||||
|
||||
viMode->customViMode.comRegs.hStart += (unk_left << 16) + (s16)unk_right;
|
||||
viMode->customViMode.fldRegs[0].vStart += (unk_top << 16) + (s16)unk_bottom;
|
||||
viMode->customViMode.fldRegs[1].vStart += (unk_top << 16) + (s16)unk_bottom;
|
||||
viMode->customViMode.comRegs.hStart += (leftAdjust << 16) + (s16)rightAdjust;
|
||||
viMode->customViMode.fldRegs[0].vStart += (upperAdjust << 16) + (s16)lowerAdjust;
|
||||
viMode->customViMode.fldRegs[1].vStart += (upperAdjust << 16) + (s16)lowerAdjust;
|
||||
|
||||
viMode->customViMode.fldRegs[1].vBurst = viMode->customViMode.fldRegs[0].vBurst;
|
||||
|
||||
if (cond_44) {
|
||||
if (loResDeinterlaced) {
|
||||
viMode->customViMode.comRegs.vSync++;
|
||||
if (type == 2) {
|
||||
viMode->customViMode.comRegs.hSync += 0x40001;
|
||||
if (tvType == OS_TV_MPAL) {
|
||||
viMode->customViMode.comRegs.hSync += HSYNC(1, 4);
|
||||
}
|
||||
if (type == 2) {
|
||||
viMode->customViMode.comRegs.leap += 0xFFFCFFFE;
|
||||
if (tvType == OS_TV_MPAL) {
|
||||
viMode->customViMode.comRegs.leap += LEAP((u16)-4, (u16)-2);
|
||||
}
|
||||
} else {
|
||||
viMode->customViMode.fldRegs[0].vStart += 0xFFFDFFFE;
|
||||
if (type == 2) {
|
||||
viMode->customViMode.fldRegs[0].vBurst += 0xFFFCFFFE;
|
||||
viMode->customViMode.fldRegs[0].vStart += START((u16)-3, (u16)-2);
|
||||
if (tvType == OS_TV_MPAL) {
|
||||
viMode->customViMode.fldRegs[0].vBurst += BURST((u8)-2, (u8)-1, 12, -1);
|
||||
}
|
||||
if (type == 0) {
|
||||
viMode->customViMode.fldRegs[1].vBurst += 0x2FFFE;
|
||||
if (tvType == OS_TV_PAL) {
|
||||
viMode->customViMode.fldRegs[1].vBurst += BURST((u8)-2, (u8)-1, 2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
viMode->customViMode.comRegs.xScale = (width << 10) / (SCREEN_WIDTH * 2 + unk_right - unk_left);
|
||||
viMode->customViMode.comRegs.vCurrent = 0;
|
||||
viMode->customViMode.comRegs.xScale = (width << 10) / (SCREEN_WIDTH * 2 + rightAdjust - leftAdjust);
|
||||
viMode->customViMode.comRegs.vCurrent = VCURRENT(0);
|
||||
|
||||
viMode->customViMode.fldRegs[0].origin = width * 2 * (unk_7C ? 1 : 2);
|
||||
viMode->customViMode.fldRegs[1].origin = width * 2 * (unk_7C ? 1 : 2) * (unk_70 ? 1 : 2);
|
||||
viMode->customViMode.fldRegs[0].origin = ORIGIN(width * 2 * (fb16Bit ? 1 : 2));
|
||||
viMode->customViMode.fldRegs[1].origin = ORIGIN(width * 2 * (fb16Bit ? 1 : 2) * (loRes ? 1 : 2));
|
||||
|
||||
viMode->customViMode.fldRegs[0].yScale = yScaleLo | yScaleHi0;
|
||||
viMode->customViMode.fldRegs[1].yScale = yScaleLo | yScaleHi1;
|
||||
viMode->customViMode.fldRegs[0].yScale = yScaleLo | yScaleHiEvenField;
|
||||
viMode->customViMode.fldRegs[1].yScale = yScaleLo | yScaleHiOddField;
|
||||
|
||||
viMode->customViMode.fldRegs[0].vIntr = 2;
|
||||
viMode->customViMode.fldRegs[1].vIntr = 2;
|
||||
viMode->customViMode.fldRegs[0].vIntr = VINTR(2);
|
||||
viMode->customViMode.fldRegs[1].vIntr = VINTR(2);
|
||||
}
|
||||
|
||||
void ViMode_Save(ViMode* viMode) {
|
||||
SREG(48) = viMode->viModeBase;
|
||||
SREG(49) = viMode->viWidth;
|
||||
SREG(50) = viMode->viHeight;
|
||||
SREG(51) = viMode->unk_64;
|
||||
SREG(52) = viMode->unk_60;
|
||||
SREG(53) = viMode->unk_5C;
|
||||
SREG(54) = viMode->unk_58;
|
||||
R_VI_MODE_EDIT_STATE = viMode->editState;
|
||||
R_VI_MODE_EDIT_WIDTH = viMode->viWidth;
|
||||
R_VI_MODE_EDIT_HEIGHT = viMode->viHeight;
|
||||
R_VI_MODE_EDIT_ULY_ADJ = viMode->upperAdjust;
|
||||
R_VI_MODE_EDIT_LRY_ADJ = viMode->lowerAdjust;
|
||||
R_VI_MODE_EDIT_ULX_ADJ = viMode->leftAdjust;
|
||||
R_VI_MODE_EDIT_LRX_ADJ = viMode->rightAdjust;
|
||||
|
||||
if (SREG(58) == 1) {
|
||||
SREG(58) = 0;
|
||||
|
||||
switch (SREG(59)) {
|
||||
case 1:
|
||||
osSyncPrintf("osViModePalLan1\n");
|
||||
|
@ -171,33 +203,34 @@ void ViMode_Save(ViMode* viMode) {
|
|||
}
|
||||
|
||||
void ViMode_Load(ViMode* viMode) {
|
||||
if ((SREG(49) & ~3) == 1) {
|
||||
SREG(49) += 4;
|
||||
//! @bug This condition never passes as the lowest bit is always masked out to 0
|
||||
if ((R_VI_MODE_EDIT_WIDTH & ~3) == 1) {
|
||||
R_VI_MODE_EDIT_WIDTH += 4;
|
||||
}
|
||||
|
||||
viMode->viModeBase = SREG(48);
|
||||
viMode->viWidth = SREG(49) & ~3;
|
||||
viMode->viHeight = SREG(50);
|
||||
viMode->unk_64 = SREG(51);
|
||||
viMode->unk_60 = SREG(52);
|
||||
viMode->unk_5C = SREG(53);
|
||||
viMode->unk_58 = SREG(54);
|
||||
viMode->editState = R_VI_MODE_EDIT_STATE;
|
||||
viMode->viWidth = R_VI_MODE_EDIT_WIDTH & ~3;
|
||||
viMode->viHeight = R_VI_MODE_EDIT_HEIGHT;
|
||||
viMode->upperAdjust = R_VI_MODE_EDIT_ULY_ADJ;
|
||||
viMode->lowerAdjust = R_VI_MODE_EDIT_LRY_ADJ;
|
||||
viMode->leftAdjust = R_VI_MODE_EDIT_ULX_ADJ;
|
||||
viMode->rightAdjust = R_VI_MODE_EDIT_LRX_ADJ;
|
||||
}
|
||||
|
||||
void ViMode_Init(ViMode* viMode) {
|
||||
viMode->viModeBase = 0;
|
||||
viMode->editState = VI_MODE_EDIT_STATE_INACTIVE;
|
||||
viMode->viWidth = SCREEN_WIDTH;
|
||||
viMode->viHeight = SCREEN_HEIGHT;
|
||||
viMode->unk_5C = 0;
|
||||
viMode->unk_58 = 0;
|
||||
viMode->unk_64 = 0;
|
||||
viMode->unk_60 = 0;
|
||||
viMode->leftAdjust = 0;
|
||||
viMode->rightAdjust = 0;
|
||||
viMode->upperAdjust = 0;
|
||||
viMode->lowerAdjust = 0;
|
||||
viMode->viFeatures = OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF;
|
||||
viMode->viTvType = osTvType;
|
||||
viMode->unk_7C = true;
|
||||
viMode->unk_78 = true;
|
||||
viMode->unk_74 = false;
|
||||
viMode->unk_70 = true;
|
||||
viMode->tvType = osTvType;
|
||||
viMode->fb16Bit = true;
|
||||
viMode->modeN = true;
|
||||
viMode->antialiasOff = false;
|
||||
viMode->loRes = true;
|
||||
|
||||
ViMode_Save(viMode);
|
||||
}
|
||||
|
@ -209,113 +242,140 @@ void ViMode_ConfigureFeatures(ViMode* viMode, s32 viFeatures) {
|
|||
u32 ctrl = viMode->customViMode.comRegs.ctrl;
|
||||
|
||||
if (viFeatures & OS_VI_GAMMA_ON) {
|
||||
ctrl |= OS_VI_GAMMA;
|
||||
ctrl |= VI_CTRL_GAMMA_ON;
|
||||
}
|
||||
if (viFeatures & OS_VI_GAMMA_OFF) {
|
||||
ctrl &= ~OS_VI_GAMMA;
|
||||
ctrl &= ~VI_CTRL_GAMMA_ON;
|
||||
}
|
||||
if (viFeatures & OS_VI_GAMMA_DITHER_ON) {
|
||||
ctrl |= OS_VI_GAMMA_DITHER;
|
||||
ctrl |= VI_CTRL_GAMMA_DITHER_ON;
|
||||
}
|
||||
if (viFeatures & OS_VI_GAMMA_DITHER_OFF) {
|
||||
ctrl &= ~OS_VI_GAMMA_DITHER;
|
||||
ctrl &= ~VI_CTRL_GAMMA_DITHER_ON;
|
||||
}
|
||||
if (viFeatures & OS_VI_DIVOT_ON) {
|
||||
ctrl |= OS_VI_DIVOT;
|
||||
ctrl |= VI_CTRL_DIVOT_ON;
|
||||
}
|
||||
if (viFeatures & OS_VI_DIVOT_OFF) {
|
||||
ctrl &= ~OS_VI_DIVOT;
|
||||
ctrl &= ~VI_CTRL_DIVOT_ON;
|
||||
}
|
||||
viMode->customViMode.comRegs.ctrl = ctrl;
|
||||
}
|
||||
|
||||
// This function uses controller input (C buttons + D pad) to reconfigure the custom VI mode
|
||||
/**
|
||||
* Updates the custom VI mode with controller input and any edits made with the REG editor
|
||||
* (through R_VI_MODE_EDIT_* entries)
|
||||
*/
|
||||
void ViMode_Update(ViMode* viMode, Input* input) {
|
||||
// Load state from REGs
|
||||
ViMode_Load(viMode);
|
||||
if ((viMode->viModeBase == 1) || (viMode->viModeBase == 2) || (viMode->viModeBase == 3)) {
|
||||
|
||||
if ((viMode->editState == VI_MODE_EDIT_STATE_ACTIVE) || (viMode->editState == VI_MODE_EDIT_STATE_2) ||
|
||||
(viMode->editState == VI_MODE_EDIT_STATE_3)) {
|
||||
gScreenWidth = viMode->viWidth;
|
||||
gScreenHeight = viMode->viHeight;
|
||||
|
||||
// Controls to reset the ViMode to defaults
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_START | BTN_CUP | BTN_CRIGHT)) {
|
||||
ViMode_Init(viMode);
|
||||
}
|
||||
|
||||
// Controls to adjust the screen dimensions (upper-left)
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_CUP)) {
|
||||
// upper
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DUP)) {
|
||||
viMode->unk_64--;
|
||||
viMode->upperAdjust--;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DDOWN)) {
|
||||
viMode->unk_64++;
|
||||
viMode->upperAdjust++;
|
||||
}
|
||||
// left
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) {
|
||||
viMode->unk_5C--;
|
||||
viMode->leftAdjust--;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) {
|
||||
viMode->unk_5C++;
|
||||
viMode->leftAdjust++;
|
||||
}
|
||||
}
|
||||
|
||||
// Controls to adjust the screen dimensions (lower-right)
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_CRIGHT)) {
|
||||
// lower
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DUP)) {
|
||||
viMode->unk_60--;
|
||||
viMode->lowerAdjust--;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DDOWN)) {
|
||||
viMode->unk_60++;
|
||||
viMode->lowerAdjust++;
|
||||
}
|
||||
// right
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) {
|
||||
viMode->unk_58--;
|
||||
viMode->rightAdjust--;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) {
|
||||
viMode->unk_58++;
|
||||
viMode->rightAdjust++;
|
||||
}
|
||||
}
|
||||
|
||||
// Controls to adjust key features
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_CDOWN)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
viMode->unk_70 = !viMode->unk_70;
|
||||
viMode->loRes = !viMode->loRes;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
viMode->unk_74 = !viMode->unk_74;
|
||||
viMode->antialiasOff = !viMode->antialiasOff;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
viMode->unk_78 = !viMode->unk_78;
|
||||
viMode->modeN = !viMode->modeN;
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
viMode->unk_7C = !viMode->unk_7C;
|
||||
viMode->fb16Bit = !viMode->fb16Bit;
|
||||
}
|
||||
}
|
||||
if (viMode->viModeBase >= 2) {
|
||||
if (viMode->unk_5C < -16) {
|
||||
viMode->unk_5C = -16;
|
||||
|
||||
// Clamp adjustments
|
||||
if (viMode->editState >= VI_MODE_EDIT_STATE_2) {
|
||||
// Allow parts of the framebuffer to possibly be offscreen by a small margin
|
||||
if (viMode->leftAdjust < -16) {
|
||||
viMode->leftAdjust = -16;
|
||||
}
|
||||
if (viMode->unk_64 < -50) {
|
||||
viMode->unk_64 = -50;
|
||||
if (viMode->upperAdjust < -50) {
|
||||
viMode->upperAdjust = -50;
|
||||
}
|
||||
if (viMode->unk_58 > 16) {
|
||||
viMode->unk_58 = 16;
|
||||
if (viMode->rightAdjust > 16) {
|
||||
viMode->rightAdjust = 16;
|
||||
}
|
||||
if (viMode->unk_60 > 50) {
|
||||
viMode->unk_60 = 50;
|
||||
if (viMode->lowerAdjust > 50) {
|
||||
viMode->lowerAdjust = 50;
|
||||
}
|
||||
} else {
|
||||
if (viMode->unk_5C < 0) {
|
||||
viMode->unk_5C = 0;
|
||||
// Do not allow parts of the framebuffer to end up offscreen
|
||||
if (viMode->leftAdjust < 0) {
|
||||
viMode->leftAdjust = 0;
|
||||
}
|
||||
if (viMode->unk_64 < 0) {
|
||||
viMode->unk_64 = 0;
|
||||
if (viMode->upperAdjust < 0) {
|
||||
viMode->upperAdjust = 0;
|
||||
}
|
||||
if (viMode->unk_58 > 0) {
|
||||
viMode->unk_58 = 0;
|
||||
if (viMode->rightAdjust > 0) {
|
||||
viMode->rightAdjust = 0;
|
||||
}
|
||||
if (viMode->unk_60 > 0) {
|
||||
viMode->unk_60 = 0;
|
||||
if (viMode->lowerAdjust > 0) {
|
||||
viMode->lowerAdjust = 0;
|
||||
}
|
||||
}
|
||||
ViMode_Configure(viMode, OS_VI_UNK28, osTvType, viMode->unk_70, viMode->unk_74, viMode->unk_78, viMode->unk_7C,
|
||||
viMode->viWidth, viMode->viHeight, viMode->unk_5C, viMode->unk_58, viMode->unk_64,
|
||||
viMode->unk_60);
|
||||
|
||||
// Configure the custom VI mode with the selected settings
|
||||
ViMode_Configure(viMode, OS_VI_MPAL_LPN1, osTvType, viMode->loRes, viMode->antialiasOff, viMode->modeN,
|
||||
viMode->fb16Bit, viMode->viWidth, viMode->viHeight, viMode->leftAdjust, viMode->rightAdjust,
|
||||
viMode->upperAdjust, viMode->lowerAdjust);
|
||||
ViMode_ConfigureFeatures(viMode, viMode->viFeatures);
|
||||
if (viMode->viModeBase == 3) {
|
||||
|
||||
if (viMode->editState == VI_MODE_EDIT_STATE_3) {
|
||||
// Log comparison between the NTSC LAN1 mode and the custom mode
|
||||
ViMode_LogPrint(&osViModeNtscLan1);
|
||||
ViMode_LogPrint(&viMode->customViMode);
|
||||
viMode->viModeBase = 2;
|
||||
viMode->editState = VI_MODE_EDIT_STATE_2;
|
||||
}
|
||||
}
|
||||
// Save new state to REGs for interactive runtime editing
|
||||
ViMode_Save(viMode);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include "terminal.h"
|
||||
#include "z64environment.h"
|
||||
|
||||
u32 D_8012AC90[4] = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64/types.h"
|
||||
#include "ultra64/ultratypes.h"
|
||||
|
||||
static s16 sintable[0x400] = {
|
||||
0x0000, 0x0032, 0x0064, 0x0096, 0x00C9, 0x00FB, 0x012D, 0x0160, 0x0192, 0x01C4, 0x01F7, 0x0229, 0x025B, 0x028E,
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
#include "global.h"
|
||||
|
||||
/**
|
||||
* Returns the number of bytes remaining in a currently ongoing audio DMA.
|
||||
*
|
||||
* Note that audio DMA is double-buffered, a DMA can be queued while another is in-progress. This only returns
|
||||
* information about the currently in-progress DMA.
|
||||
*/
|
||||
u32 osAiGetLength(void) {
|
||||
return HW_REG(AI_LEN_REG, u32);
|
||||
return IO_READ(AI_LEN_REG);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue