diff --git a/src/XenobladeChroniclesX/Enhancements/libini/patch_ini.asm b/src/XenobladeChroniclesX/Enhancements/libini/patch_ini.asm index 4868cf4c..4fb4e3ea 100644 --- a/src/XenobladeChroniclesX/Enhancements/libini/patch_ini.asm +++ b/src/XenobladeChroniclesX/Enhancements/libini/patch_ini.asm @@ -2,269 +2,6 @@ moduleMatches = 0xF882D5CF, 0x30B6E091, 0x7672271D, 0x218F6E07, 0xAB97DE6B, 0x676EB33E, 0x785CA8A9 ; 1.0.1E, 1.0.2U, 1.0.2J, 1.0.0E, 1.0.1U, 1.0.0U, 1.0.0J .origin = codecave -;string values for luttex1 and cube setting -value_luttex1: -.uint $luttex1_s1, $luttex1_s2, 0 ;if a larger string is needed, add $luttex1_s3, $luttex1_s4, etc. to before the 0 -value_cube: -.uint $cube_s1, 0 ;if a larger string is needed, add $cube_s2, $cube_s3, etc. to before the 0 - -;list of strings that are in the lib.ini file -;this mod will be reprinting them -str_tonemap: -.string "tonemap=" -str_ssao: -.string "ssao=" -str_bloom: -.string "bloom=" -str_godray: -.string "godray=" -str_AntiAliasing: -.string "AntiAliasing=" -str_ColReduction: -.string "ColReduction=" -str_dof: -.string "dof=" -str_lensFlare: -.string "lensFlare=" - -str_lut: -.string "lut=" -str_luttex1: -.string "luttex1=" - -str_cube: -.string "cube=" - -str_tonemax: -.string "tonemax=" -str_tonemin: -.string "tonemin=" -str_tonemul: -.string "tonemul=" -str_toneLastmul: -.string "toneLastmul=" -str_toneBlmmax: -.string "toneBlmmax=" -str_toneBlmmin: -.string "toneBlmmin=" -str_toneBlmmul: -.string "toneBlmmul=" -str_toneBlmLastmul: -.string "toneBlmLastmul=" - -str_godray_inival: -.string "godray_inival=" -str_godray_decay: -.string "godray_decay=" -str_godray_scale: -.string "godray_scale=" - -str_blm_border_sub: -.string "blm_border_sub=" -str_blm_border_mul: -.string "blm_border_mul=" -str_blm_border_sub2: -.string "blm_border_sub2=" -str_blm_border_mul2: -.string "blm_border_mul2=" -str_blm_border_max: -.string "blm_border_max=" -str_blm_tex_mul: -.string "blm_tex_mul=" -str_blm_blurscale1: -.string "blm_blurscale1=" -str_blm_blurscale2: -.string "blm_blurscale2=" -str_blm_blurscale3: -.string "blm_blurscale3=" -str_blm_blurRange1: -.string "blm_blurRange1=" -str_blm_blurRange2: -.string "blm_blurRange2=" -str_blm_blurRange3: -.string "blm_blurRange3=" -str_blm_scale1: -.string "blm_scale1=" -str_blm_scale2: -.string "blm_scale2=" -str_blm_scale3: -.string "blm_scale3=" - -str_lens_max: -.string "lens_max=" -str_lens_rot: -.string "lens_rot=" -str_lens_sub: -.string "lens_sub=" -str_lens_mul: -.string "lens_mul=" -str_lens_weight: -.string "lens_weight=" -str_lens_decay: -.string "lens_decay=" -str_lens_str: -.string "lens_str=" -str_lens_paMax: -.string "lens_paMax=" -str_lens_UVDecay: -.string "lens_UVDecay=" - -str_AA_Sharpness: -.string "AA_Sharpness=" -str_AA_Range: -.string "AA_Range=" -str_AA_Threshold: -.string "AA_Threshold=" -str_AA_ThresholdMin: -.string "AA_ThresholdMin=" - -str_red_sclX: -.string "red_sclX=" -str_red_sclY: -.string "red_sclY=" - -str_red_Auto: -.string "red_Auto=" -str_red_AtMaxX: -.string "red_AtMaxX=" -str_red_AtMaxY: -.string "red_AtMaxY=" -str_red_AtMinX: -.string "red_AtMinX=" -str_red_AtMinY: -.string "red_AtMinY=" -str_red_AtRate: -.string "red_AtRate=" - -str_ao_Lengs: -.string "ao_Lengs=" -str_ao_LengsRatio: -.string "ao_LengsRatio=" -str_ao_range: -.string "ao_range=" -str_ao_rangeRatio: -.string "ao_rangeRatio=" -str_ao_sub: -.string "ao_sub=" -str_ao_subRatio: -.string "ao_subRatio=" -str_ao_Mul: -.string "ao_Mul=" -str_ao_blurRange: -.string "ao_blurRange=" -str_ao_blurScale: -.string "ao_blurScale=" - -str_blur: -.string "blur=" -str_blurStr: -.string "blurStr=" -str_blurSub: -.string "blurSub=" - -str_shadowStr: -.string "shadowStr=" -str_shadowHalf: -.string "shadowHalf=" - -str_simShwStr: -.string "simShwStr=" -str_simShwIn: -.string "simShwIn=" -str_simShwMin: -.string "simShwMin=" - -str_sRGBMode: -.string "sRGBMode=" -str_gamma: -.string "gamma=" - -str_ao_av_CenterWeight: -.string "ao_av_CenterWeight=" -str_ao_av_MaxDistance: -.string "ao_av_MaxDistance=" -str_ao_av_MaxRadius: -.string "ao_av_MaxRadius=" -str_ao_av_FadeOutStart: -.string "ao_av_FadeOutStart=" -str_ao_av_FadeOutDistance: -.string "ao_av_FadeOutDistance=" -str_ao_av_BlurFallOff: -.string "ao_av_BlurFallOff=" -str_ao_av_BlurScale: -.string "ao_av_BlurScale=" -str_ao_av_Shwstr: -.string "ao_av_Shwstr=" - -str_cam_near: -.string "cam_near=" -str_cam_far: -.string "cam_far=" - -str_avmp01: -.string "avmp01 = " -str_avmp02: -.string "avmp02 = " -str_avmp03: -.string "avmp03 = " -str_avmp04: -.string "avmp04 = " -str_avmp05: -.string "avmp05 = " -str_avmp06: -.string "avmp06 = " -str_avmp07: -.string "avmp07 = " -str_avmp08: -.string "avmp08 = " -str_avmp09: -.string "avmp09 = " -str_avmp10: -.string "avmp10 = " -str_avmp11: -.string "avmp11 = " -str_avmp12: -.string "avmp12 = " -str_avmp13: -.string "avmp13 = " -str_avmp14: -.string "avmp14 = " -str_avmp15: -.string "avmp15 = " -str_avmp16: -.string "avmp16 = " - -str_cloud_h_min: -.string "cloud_h_min=" -str_cloud_h_max: -.string "cloud_h_max=" - -;array of pointers to the list of strings above -;will be used to print the associated strings into memory -lookuptable_settingname_INImod: -.uint str_tonemap, str_ssao, str_bloom, str_godray, str_AntiAliasing, str_ColReduction, str_dof, str_lensFlare, str_lut, str_luttex1, str_cube, str_tonemax, str_tonemin, str_tonemul, str_toneLastmul, str_toneBlmmax, str_toneBlmmin, str_toneBlmmul, str_toneBlmLastmul, str_godray_inival, str_godray_decay, str_godray_scale, str_blm_border_sub, str_blm_border_mul, str_blm_border_sub2, str_blm_border_mul2, str_blm_border_max, str_blm_tex_mul, str_blm_blurscale1, str_blm_blurscale2, str_blm_blurscale3, str_blm_blurRange1, str_blm_blurRange2, str_blm_blurRange3, str_blm_scale1, str_blm_scale2, str_blm_scale3, str_lens_max, str_lens_rot, str_lens_sub, str_lens_mul, str_lens_weight, str_lens_decay, str_lens_str, str_lens_paMax, str_lens_UVDecay, str_AA_Sharpness, str_AA_Range, str_AA_Threshold, str_AA_ThresholdMin, str_red_sclX, str_red_sclY, str_red_Auto, str_red_AtMaxX, str_red_AtMaxY, str_red_AtMinX, str_red_AtMinY, str_red_AtRate, str_ao_Lengs, str_ao_LengsRatio, str_ao_range, str_ao_rangeRatio, str_ao_sub, str_ao_subRatio, str_ao_Mul, str_ao_blurRange, str_ao_blurScale, str_blur, str_blurStr, str_blurSub, str_shadowStr, str_shadowHalf, str_simShwStr, str_simShwIn, str_simShwMin, str_sRGBMode, str_gamma, str_ao_av_CenterWeight, str_ao_av_MaxDistance, str_ao_av_MaxRadius, str_ao_av_FadeOutStart, str_ao_av_FadeOutDistance, str_ao_av_BlurFallOff, str_ao_av_BlurScale, str_ao_av_Shwstr, str_cam_near, str_cam_far, str_avmp01, str_avmp02, str_avmp03, str_avmp04, str_avmp05, str_avmp06, str_avmp07, str_avmp08, str_avmp09, str_avmp10, str_avmp11, str_avmp12, str_avmp13, str_avmp14, str_avmp15, str_avmp16, str_cloud_h_min, str_cloud_h_max - -;array of short strings that either contain "on" or "off" -;will be used to print the associated setting -lookuptable_onoff_INImod: -.uint $tonemap, $ssao, $bloom, $godray, $AntiAliasing, $ColReduction, $dof, $lensFlare, $lut, $red_Auto, $blur, $shadowHalf, $sRGBMode - -;array of string pointers used to print the luttex1 and cube setting values -lookuptable_stringvalue_INImod: -.uint value_luttex1, value_cube - -;array of floats used to print the float for the associated string -lookuptable_float_INImod: -.float $tonemax, $tonemin, $tonemul, $toneLastmul, $toneBlmmax, $toneBlmmin, $toneBlmmul, $toneBlmLastmul, $godray_inival, $godray_decay, $godray_scale, $blm_border_sub, $blm_border_mul, $blm_border_sub2, $blm_border_mul2, $blm_border_max, $blm_tex_mul, $blm_blurscale1, $blm_blurscale2, $blm_blurscale3, $blm_blurRange1, $blm_blurRange2, $blm_blurRange3, $blm_scale1, $blm_scale2, $blm_scale3, $lens_max, $lens_rot, $lens_sub, $lens_mul, $lens_weight, $lens_decay, $lens_str, $lens_paMax, $lens_UVDecay, $AA_Sharpness, $AA_Range, $AA_Threshold, $AA_ThresholdMin, $red_sclX, $red_sclY, $red_AtMaxX, $red_AtMaxY, $red_AtMinX, $red_AtMinY, $red_AtRate, $ao_Lengs, $ao_LengsRatio, $ao_range, $ao_rangeRatio, $ao_sub, $ao_subRatio, $ao_Mul, $ao_blurRange, $ao_blurScale, $blurStr, $blurSub, $shadowStr, $simShwStr, $simShwIn, $simShwMin, $gamma, $ao_av_CenterWeight, $ao_av_MaxDistance, $ao_av_MaxRadius, $ao_av_FadeOutStart, $ao_av_FadeOutDistance, $ao_av_BlurFallOff, $ao_av_BlurScale, $ao_av_Shwstr, $cam_near, $cam_far, $avmp0101, $avmp0102, $avmp0103, $avmp0201, $avmp0202, $avmp0203, $avmp0301, $avmp0302, $avmp0303, $avmp0401, $avmp0402, $avmp0403, $avmp0501, $avmp0502, $avmp0503, $avmp0601, $avmp0602, $avmp0603, $avmp0701, $avmp0702, $avmp0703, $avmp0801, $avmp0802, $avmp0803, $avmp0901, $avmp0902, $avmp0903, $avmp1001, $avmp1002, $avmp1003, $avmp1101, $avmp1102, $avmp1103, $avmp1201, $avmp1202, $avmp1203, $avmp1301, $avmp1302, $avmp1303, $avmp1401, $avmp1402, $avmp1403, $avmp1501, $avmp1502, $avmp1503, $avmp1601, $avmp1602, $avmp1603, $cloud_h_min, $cloud_h_max - -;array of intigers used to set the number of decimal places printed for the associated float -lookuptable_float_precision_INImod: -.byte $tonemax_DecimalPlaces, $tonemin_DecimalPlaces, $tonemul_DecimalPlaces, $toneLastmul_DecimalPlaces, $toneBlmmax_DecimalPlaces, $toneBlmmin_DecimalPlaces, $toneBlmmul_DecimalPlaces, $toneBlmLastmul_DecimalPlaces, $godray_inival_DecimalPlaces, $godray_decay_DecimalPlaces, $godray_scale_DecimalPlaces, $blm_border_sub_DecimalPlaces, $blm_border_mul_DecimalPlaces, $blm_border_sub2_DecimalPlaces, $blm_border_mul2_DecimalPlaces, $blm_border_max_DecimalPlaces, $blm_tex_mul_DecimalPlaces, $blm_blurscale1_DecimalPlaces, $blm_blurscale2_DecimalPlaces, $blm_blurscale3_DecimalPlaces, $blm_blurRange1_DecimalPlaces, $blm_blurRange2_DecimalPlaces, $blm_blurRange3_DecimalPlaces, $blm_scale1_DecimalPlaces, $blm_scale2_DecimalPlaces, $blm_scale3_DecimalPlaces, $lens_max_DecimalPlaces, $lens_rot_DecimalPlaces, $lens_sub_DecimalPlaces, $lens_mul_DecimalPlaces, $lens_weight_DecimalPlaces, $lens_decay_DecimalPlaces, $lens_str_DecimalPlaces, $lens_paMax_DecimalPlaces, $lens_UVDecay_DecimalPlaces, $AA_Sharpness_DecimalPlaces, $AA_Range_DecimalPlaces, $AA_Threshold_DecimalPlaces, $AA_ThresholdMin_DecimalPlaces, $red_sclX_DecimalPlaces, $red_sclY_DecimalPlaces, $red_AtMaxX_DecimalPlaces, $red_AtMaxY_DecimalPlaces, $red_AtMinX_DecimalPlaces, $red_AtMinY_DecimalPlaces, $red_AtRate_DecimalPlaces, $ao_Lengs_DecimalPlaces, $ao_LengsRatio_DecimalPlaces, $ao_range_DecimalPlaces, $ao_rangeRatio_DecimalPlaces, $ao_sub_DecimalPlaces, $ao_subRatio_DecimalPlaces, $ao_Mul_DecimalPlaces, $ao_blurRange_DecimalPlaces, $ao_blurScale_DecimalPlaces, $blurStr_DecimalPlaces, $blurSub_DecimalPlaces, $shadowStr_DecimalPlaces, $simShwStr_DecimalPlaces, $simShwIn_DecimalPlaces, $simShwMin_DecimalPlaces, $gamma_DecimalPlaces, $ao_av_CenterWeight_DecimalPlaces, $ao_av_MaxDistance_DecimalPlaces, $ao_av_MaxRadius_DecimalPlaces, $ao_av_FadeOutStart_DecimalPlaces, $ao_av_FadeOutDistance_DecimalPlaces, $ao_av_BlurFallOff_DecimalPlaces, $ao_av_BlurScale_DecimalPlaces, $ao_av_Shwstr_DecimalPlaces, $cam_near_DecimalPlaces, $cam_far_DecimalPlaces, $avmp01_DecimalPlaces, $avmp02_DecimalPlaces, $avmp03_DecimalPlaces, $avmp04_DecimalPlaces, $avmp05_DecimalPlaces, $avmp06_DecimalPlaces, $avmp07_DecimalPlaces, $avmp08_DecimalPlaces, $avmp09_DecimalPlaces, $avmp10_DecimalPlaces, $avmp11_DecimalPlaces, $avmp12_DecimalPlaces, $avmp13_DecimalPlaces, $avmp14_DecimalPlaces, $avmp15_DecimalPlaces, $avmp16_DecimalPlaces, $cloud_h_min_DecimalPlaces, $cloud_h_max_DecimalPlaces - -;format string that the C function sprintf() needs -;the * will be replaced with a number that sets the number of decimal places -str_floating_precision_INImod: -.string "%.*f" ;allocates memory to back up and restore registers r0-r31 ini_register_backup: .uint 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 @@ -283,6 +20,30 @@ _whileLoopDeleteINI: bne+ _whileLoopDeleteINI blr +;passes PrintOnOff into the PrintSettings function wraper +PrintOnOffSettingsINImod: +lis r27, PrintOnOffINImod@hi +ori r27, r27, PrintOnOffINImod@l +b PrintSettingsINImod + +;passes PrintStringValue into the PrintSettings function wraper +PrintStringValueSettingsINImod: +lis r27, PrintStringValueINImod@hi +ori r27, r27, PrintStringValueINImod@l +b PrintSettingsINImod + +;passes Callsprintf directly into the PrintSettings function wraper +PrintFloatSettingsINImod: +lis r27, CallsprintfINImod@hi +ori r27, r27, CallsprintfINImod@l +b PrintSettingsINImod + +;passes PrintAMVP into the PrintSettings function wraper +PrintAMVPSettingsINImod: +lis r27, PrintAMVPINImod@hi +ori r27, r27, PrintAMVPINImod@l +b PrintSettingsINImod + ;takes in a pointer to a string(r22), and prints it PrintSettingNameINImod: lwzu r29, 4(r22) @@ -350,12 +111,6 @@ or r30, r11, r11 mtlr r29 blr -;passes PrintOnOff into the PrintSettings function wraper -PrintOnOffSettingsINImod: -lis r27, PrintOnOffINImod@hi -ori r27, r27, PrintOnOffINImod@l -b PrintSettingsINImod - ;takes in r23 and prints either on or off PrintOnOffINImod: lwzu r26, 4(r23) @@ -366,12 +121,6 @@ _whileloopPrintOnOffINImod: bne+ _whileloopPrintOnOffINImod blr -;passes PrintStringValue into the PrintSettings function wraper -PrintStringValueSettingsINImod: -lis r27, PrintStringValueINImod@hi -ori r27, r27, PrintStringValueINImod@l -b PrintSettingsINImod - ;takes in a string pointer(r18), and hijacks PrintSettingName to print it PrintStringValueINImod: mflr r28 @@ -384,31 +133,18 @@ or r22, r19, r19 mtlr r28 blr -;passes Callsprintf directly into the PrintSettings function wraper -PrintFloatSettingsINImod: -lis r27, CallsprintfINImod@hi -ori r27, r27, CallsprintfINImod@l -b PrintSettingsINImod - -;passes PrintAMVP into the PrintSettings function wraper -PrintAMVPSettingsINImod: -lis r27, PrintAMVPINImod@hi -ori r27, r27, PrintAMVPINImod@l -b PrintSettingsINImod - ;takes in a floating point(r24), and its precision(r21) ;calls sprintf() 3 times to print 3 floats sperated by a comma PrintAMVPINImod: mflr r28 -lis r19, 0x202C -ori r19, r19, 0x2000 +li r19, 0x2C bl CallsprintfINImod -stw r19, 0(r30) -addi r30, r30, 3 +stb r19, 0(r30) +addi r30, r30, 1 addi r21, r21, -1 bl CallsprintfINImod -stw r19, 0(r30) -addi r30, r30, 3 +stb r19, 0(r30) +addi r30, r30, 1 addi r21, r21, -1 bl CallsprintfINImod mtlr r28 @@ -417,14 +153,17 @@ blr ; r22 == 0x23f09100 ; registers that do not need to be restored: ; r25 r24 r28 r10 -_EditINIforinimod: +EditINIforinimod: ;back up registers r0-r31 lis r10, ini_register_backup@ha stmw r0, ini_register_backup@l(r10) ;back up link register -mflr r24 +mflr r25 lis r10, ini_linkregister_backup@ha -stw r24, ini_linkregister_backup@l(r10) +stw r25, ini_linkregister_backup@l(r10) +;load the function pointer for the C function sprintf() into r25 +lis r25, sprintfFunctionPointer@hi +ori r25, r25, sprintfFunctionPointer@l ;deletes the lib.ini file in ram so we can over write it with our own bl DeleteINI @@ -498,11 +237,8 @@ bl PrintAMVPSettingsINImod ;print last 2 float settings settings li r20, 2 bl PrintFloatSettingsINImod -;print extra new line character -;li r26, 0x0D0A -sth r26, 1(r30) -_ExitEditINImod: +ExitEditINImod: ;restore registers r0-r31 & LR lis r10, ini_linkregister_backup@ha lwz r25, ini_linkregister_backup@l(r10) @@ -515,58 +251,29 @@ addi r25,r1,0x38 blr - -_SprintfFunctionAddress_V101E_ini: -;load the function pointer for the C function sprintf() into r25 -lis r25, 0x03B1 -ori r25, r25, 0x8118 -b _EditINIforinimod - -_SprintfFunctionAddress_V102U_ini: -;load the function pointer for the C function sprintf() into r25 -lis r25, 0x03B1 -ori r25, r25, 0x8098 -b _EditINIforinimod - -_SprintfFunctionAddress_V102J_ini: -;load the function pointer for the C function sprintf() into r25 -lis r25, 0x03B1 -ori r25, r25, 0x34B0 -b _EditINIforinimod - -_SprintfFunctionAddress_V100U_ini: -;load the function pointer for the C function sprintf() into r25 -lis r25, 0x03B1 -ori r25, r25, 0x7F18 -b _EditINIforinimod - -_SprintfFunctionAddress_V100J_ini: -;load the function pointer for the C function sprintf() into r25 -lis r25, 0x03B0 -ori r25, r25, 0xDEB0 -b _EditINIforinimod - [XCX_libini_V101E] moduleMatches = 0xF882D5CF, 0x218F6E07 ; 1.0.1E, 1.0.0E +;pointer for the C function sprintf() +sprintfFunctionPointer = 0x03B18118 ;patches the address with a branch link to the mod -0x02FF94C8 = bla _SprintfFunctionAddress_V101E_ini +0x02FF94C8 = bla EditINIforinimod [XCX_libini_V102U] moduleMatches = 0x30B6E091 ; 1.0.2U -;patches the address with a branch link to the mod -0x02FF9468 = bla _SprintfFunctionAddress_V102U_ini +sprintfFunctionPointer = 0x03B18098 +0x02FF9468 = bla EditINIforinimod [XCX_libini_V102J] moduleMatches = 0x7672271D ; 1.0.2J -;patches the address with a branch link to the mod -0x02FF4990 = bla _SprintfFunctionAddress_V102J_ini +sprintfFunctionPointer = 0x03B134B0 +0x02FF4990 = bla EditINIforinimod [XCX_libini_V100U] moduleMatches = 0xAB97DE6B, 0x676EB33E ; 1.0.1U, 1.0.0U -;patches the address with a branch link to the mod -0x02FF92F0 = bla _SprintfFunctionAddress_V100U_ini +sprintfFunctionPointer = 0x03B17F18 +0x02FF92F0 = bla EditINIforinimod [XCX_libini_V100J] moduleMatches = 0x785CA8A9 ; 1.0.0J -;patches the address with a branch link to the mod -0x02FEF588 = bla _SprintfFunctionAddress_V100J_ini +sprintfFunctionPointer = 0x03B0DEB0 +0x02FEF588 = bla EditINIforinimod diff --git a/src/XenobladeChroniclesX/Enhancements/libini/patch_inidata.asm b/src/XenobladeChroniclesX/Enhancements/libini/patch_inidata.asm new file mode 100644 index 00000000..2840e958 --- /dev/null +++ b/src/XenobladeChroniclesX/Enhancements/libini/patch_inidata.asm @@ -0,0 +1,271 @@ +[XCX_libini_Data] +moduleMatches = 0xF882D5CF, 0x30B6E091, 0x7672271D, 0x218F6E07, 0xAB97DE6B, 0x676EB33E, 0x785CA8A9 ; 1.0.1E, 1.0.2U, 1.0.2J, 1.0.0E, 1.0.1U, 1.0.0U, 1.0.0J +.origin = codecave + +;This file allocates all the data from the rules.txt into ram +;this file also creates lookup tables to make the data easier to use +;the ini.asm file then contains code that will use this data + +;string values for luttex1 and cube setting +value_luttex1: +.uint $luttex1_s1, $luttex1_s2, 0 ;if a larger string is needed, add $luttex1_s3, $luttex1_s4, etc. to before the 0 +value_cube: +.uint $cube_s1, 0 ;if a larger string is needed, add $cube_s2, $cube_s3, etc. to before the 0 + +;list of strings that are in the lib.ini file +;this mod will be reprinting them +str_tonemap: +.string "tonemap=" +str_ssao: +.string "ssao=" +str_bloom: +.string "bloom=" +str_godray: +.string "godray=" +str_AntiAliasing: +.string "AntiAliasing=" +str_ColReduction: +.string "ColReduction=" +str_dof: +.string "dof=" +str_lensFlare: +.string "lensFlare=" + +str_lut: +.string "lut=" +str_luttex1: +.string "luttex1=" + +str_cube: +.string "cube=" + +str_tonemax: +.string "tonemax=" +str_tonemin: +.string "tonemin=" +str_tonemul: +.string "tonemul=" +str_toneLastmul: +.string "toneLastmul=" +str_toneBlmmax: +.string "toneBlmmax=" +str_toneBlmmin: +.string "toneBlmmin=" +str_toneBlmmul: +.string "toneBlmmul=" +str_toneBlmLastmul: +.string "toneBlmLastmul=" + +str_godray_inival: +.string "godray_inival=" +str_godray_decay: +.string "godray_decay=" +str_godray_scale: +.string "godray_scale=" + +str_blm_border_sub: +.string "blm_border_sub=" +str_blm_border_mul: +.string "blm_border_mul=" +str_blm_border_sub2: +.string "blm_border_sub2=" +str_blm_border_mul2: +.string "blm_border_mul2=" +str_blm_border_max: +.string "blm_border_max=" +str_blm_tex_mul: +.string "blm_tex_mul=" +str_blm_blurscale1: +.string "blm_blurscale1=" +str_blm_blurscale2: +.string "blm_blurscale2=" +str_blm_blurscale3: +.string "blm_blurscale3=" +str_blm_blurRange1: +.string "blm_blurRange1=" +str_blm_blurRange2: +.string "blm_blurRange2=" +str_blm_blurRange3: +.string "blm_blurRange3=" +str_blm_scale1: +.string "blm_scale1=" +str_blm_scale2: +.string "blm_scale2=" +str_blm_scale3: +.string "blm_scale3=" + +str_lens_max: +.string "lens_max=" +str_lens_rot: +.string "lens_rot=" +str_lens_sub: +.string "lens_sub=" +str_lens_mul: +.string "lens_mul=" +str_lens_weight: +.string "lens_weight=" +str_lens_decay: +.string "lens_decay=" +str_lens_str: +.string "lens_str=" +str_lens_paMax: +.string "lens_paMax=" +str_lens_UVDecay: +.string "lens_UVDecay=" + +str_AA_Sharpness: +.string "AA_Sharpness=" +str_AA_Range: +.string "AA_Range=" +str_AA_Threshold: +.string "AA_Threshold=" +str_AA_ThresholdMin: +.string "AA_ThresholdMin=" + +str_red_sclX: +.string "red_sclX=" +str_red_sclY: +.string "red_sclY=" + +str_red_Auto: +.string "red_Auto=" +str_red_AtMaxX: +.string "red_AtMaxX=" +str_red_AtMaxY: +.string "red_AtMaxY=" +str_red_AtMinX: +.string "red_AtMinX=" +str_red_AtMinY: +.string "red_AtMinY=" +str_red_AtRate: +.string "red_AtRate=" + +str_ao_Lengs: +.string "ao_Lengs=" +str_ao_LengsRatio: +.string "ao_LengsRatio=" +str_ao_range: +.string "ao_range=" +str_ao_rangeRatio: +.string "ao_rangeRatio=" +str_ao_sub: +.string "ao_sub=" +str_ao_subRatio: +.string "ao_subRatio=" +str_ao_Mul: +.string "ao_Mul=" +str_ao_blurRange: +.string "ao_blurRange=" +str_ao_blurScale: +.string "ao_blurScale=" + +str_blur: +.string "blur=" +str_blurStr: +.string "blurStr=" +str_blurSub: +.string "blurSub=" + +str_shadowStr: +.string "shadowStr=" +str_shadowHalf: +.string "shadowHalf=" + +str_simShwStr: +.string "simShwStr=" +str_simShwIn: +.string "simShwIn=" +str_simShwMin: +.string "simShwMin=" + +str_sRGBMode: +.string "sRGBMode=" +str_gamma: +.string "gamma=" + +str_ao_av_CenterWeight: +.string "ao_av_CenterWeight=" +str_ao_av_MaxDistance: +.string "ao_av_MaxDistance=" +str_ao_av_MaxRadius: +.string "ao_av_MaxRadius=" +str_ao_av_FadeOutStart: +.string "ao_av_FadeOutStart=" +str_ao_av_FadeOutDistance: +.string "ao_av_FadeOutDistance=" +str_ao_av_BlurFallOff: +.string "ao_av_BlurFallOff=" +str_ao_av_BlurScale: +.string "ao_av_BlurScale=" +str_ao_av_Shwstr: +.string "ao_av_Shwstr=" + +str_cam_near: +.string "cam_near=" +str_cam_far: +.string "cam_far=" + +str_avmp01: +.string "avmp01=" +str_avmp02: +.string "avmp02=" +str_avmp03: +.string "avmp03=" +str_avmp04: +.string "avmp04=" +str_avmp05: +.string "avmp05=" +str_avmp06: +.string "avmp06=" +str_avmp07: +.string "avmp07=" +str_avmp08: +.string "avmp08=" +str_avmp09: +.string "avmp09=" +str_avmp10: +.string "avmp10=" +str_avmp11: +.string "avmp11=" +str_avmp12: +.string "avmp12=" +str_avmp13: +.string "avmp13=" +str_avmp14: +.string "avmp14=" +str_avmp15: +.string "avmp15=" +str_avmp16: +.string "avmp16=" + +str_cloud_h_min: +.string "cloud_h_min=" +str_cloud_h_max: +.string "cloud_h_max=" + +;array of pointers to the list of strings above +;will be used to print the associated strings into memory +lookuptable_settingname_INImod: +.uint str_tonemap, str_ssao, str_bloom, str_godray, str_AntiAliasing, str_ColReduction, str_dof, str_lensFlare, str_lut, str_luttex1, str_cube, str_tonemax, str_tonemin, str_tonemul, str_toneLastmul, str_toneBlmmax, str_toneBlmmin, str_toneBlmmul, str_toneBlmLastmul, str_godray_inival, str_godray_decay, str_godray_scale, str_blm_border_sub, str_blm_border_mul, str_blm_border_sub2, str_blm_border_mul2, str_blm_border_max, str_blm_tex_mul, str_blm_blurscale1, str_blm_blurscale2, str_blm_blurscale3, str_blm_blurRange1, str_blm_blurRange2, str_blm_blurRange3, str_blm_scale1, str_blm_scale2, str_blm_scale3, str_lens_max, str_lens_rot, str_lens_sub, str_lens_mul, str_lens_weight, str_lens_decay, str_lens_str, str_lens_paMax, str_lens_UVDecay, str_AA_Sharpness, str_AA_Range, str_AA_Threshold, str_AA_ThresholdMin, str_red_sclX, str_red_sclY, str_red_Auto, str_red_AtMaxX, str_red_AtMaxY, str_red_AtMinX, str_red_AtMinY, str_red_AtRate, str_ao_Lengs, str_ao_LengsRatio, str_ao_range, str_ao_rangeRatio, str_ao_sub, str_ao_subRatio, str_ao_Mul, str_ao_blurRange, str_ao_blurScale, str_blur, str_blurStr, str_blurSub, str_shadowStr, str_shadowHalf, str_simShwStr, str_simShwIn, str_simShwMin, str_sRGBMode, str_gamma, str_ao_av_CenterWeight, str_ao_av_MaxDistance, str_ao_av_MaxRadius, str_ao_av_FadeOutStart, str_ao_av_FadeOutDistance, str_ao_av_BlurFallOff, str_ao_av_BlurScale, str_ao_av_Shwstr, str_cam_near, str_cam_far, str_avmp01, str_avmp02, str_avmp03, str_avmp04, str_avmp05, str_avmp06, str_avmp07, str_avmp08, str_avmp09, str_avmp10, str_avmp11, str_avmp12, str_avmp13, str_avmp14, str_avmp15, str_avmp16, str_cloud_h_min, str_cloud_h_max + +;array of short strings that either contain "on" or "off" +;will be used to print the associated setting +lookuptable_onoff_INImod: +.uint $tonemap, $ssao, $bloom, $godray, $AntiAliasing, $ColReduction, $dof, $lensFlare, $lut, $red_Auto, $blur, $shadowHalf, $sRGBMode + +;array of string pointers used to print the luttex1 and cube setting values +lookuptable_stringvalue_INImod: +.uint value_luttex1, value_cube + +;array of floats used to print the float for the associated string +lookuptable_float_INImod: +.float $tonemax, $tonemin, $tonemul, $toneLastmul, $toneBlmmax, $toneBlmmin, $toneBlmmul, $toneBlmLastmul, $godray_inival, $godray_decay, $godray_scale, $blm_border_sub, $blm_border_mul, $blm_border_sub2, $blm_border_mul2, $blm_border_max, $blm_tex_mul, $blm_blurscale1, $blm_blurscale2, $blm_blurscale3, $blm_blurRange1, $blm_blurRange2, $blm_blurRange3, $blm_scale1, $blm_scale2, $blm_scale3, $lens_max, $lens_rot, $lens_sub, $lens_mul, $lens_weight, $lens_decay, $lens_str, $lens_paMax, $lens_UVDecay, $AA_Sharpness, $AA_Range, $AA_Threshold, $AA_ThresholdMin, $red_sclX, $red_sclY, $red_AtMaxX, $red_AtMaxY, $red_AtMinX, $red_AtMinY, $red_AtRate, $ao_Lengs, $ao_LengsRatio, $ao_range, $ao_rangeRatio, $ao_sub, $ao_subRatio, $ao_Mul, $ao_blurRange, $ao_blurScale, $blurStr, $blurSub, $shadowStr, $simShwStr, $simShwIn, $simShwMin, $gamma, $ao_av_CenterWeight, $ao_av_MaxDistance, $ao_av_MaxRadius, $ao_av_FadeOutStart, $ao_av_FadeOutDistance, $ao_av_BlurFallOff, $ao_av_BlurScale, $ao_av_Shwstr, $cam_near, $cam_far, $avmp0101, $avmp0102, $avmp0103, $avmp0201, $avmp0202, $avmp0203, $avmp0301, $avmp0302, $avmp0303, $avmp0401, $avmp0402, $avmp0403, $avmp0501, $avmp0502, $avmp0503, $avmp0601, $avmp0602, $avmp0603, $avmp0701, $avmp0702, $avmp0703, $avmp0801, $avmp0802, $avmp0803, $avmp0901, $avmp0902, $avmp0903, $avmp1001, $avmp1002, $avmp1003, $avmp1101, $avmp1102, $avmp1103, $avmp1201, $avmp1202, $avmp1203, $avmp1301, $avmp1302, $avmp1303, $avmp1401, $avmp1402, $avmp1403, $avmp1501, $avmp1502, $avmp1503, $avmp1601, $avmp1602, $avmp1603, $cloud_h_min, $cloud_h_max + +;array of intigers used to set the number of decimal places printed for the associated float +lookuptable_float_precision_INImod: +.byte $tonemax_DecimalPlaces, $tonemin_DecimalPlaces, $tonemul_DecimalPlaces, $toneLastmul_DecimalPlaces, $toneBlmmax_DecimalPlaces, $toneBlmmin_DecimalPlaces, $toneBlmmul_DecimalPlaces, $toneBlmLastmul_DecimalPlaces, $godray_inival_DecimalPlaces, $godray_decay_DecimalPlaces, $godray_scale_DecimalPlaces, $blm_border_sub_DecimalPlaces, $blm_border_mul_DecimalPlaces, $blm_border_sub2_DecimalPlaces, $blm_border_mul2_DecimalPlaces, $blm_border_max_DecimalPlaces, $blm_tex_mul_DecimalPlaces, $blm_blurscale1_DecimalPlaces, $blm_blurscale2_DecimalPlaces, $blm_blurscale3_DecimalPlaces, $blm_blurRange1_DecimalPlaces, $blm_blurRange2_DecimalPlaces, $blm_blurRange3_DecimalPlaces, $blm_scale1_DecimalPlaces, $blm_scale2_DecimalPlaces, $blm_scale3_DecimalPlaces, $lens_max_DecimalPlaces, $lens_rot_DecimalPlaces, $lens_sub_DecimalPlaces, $lens_mul_DecimalPlaces, $lens_weight_DecimalPlaces, $lens_decay_DecimalPlaces, $lens_str_DecimalPlaces, $lens_paMax_DecimalPlaces, $lens_UVDecay_DecimalPlaces, $AA_Sharpness_DecimalPlaces, $AA_Range_DecimalPlaces, $AA_Threshold_DecimalPlaces, $AA_ThresholdMin_DecimalPlaces, $red_sclX_DecimalPlaces, $red_sclY_DecimalPlaces, $red_AtMaxX_DecimalPlaces, $red_AtMaxY_DecimalPlaces, $red_AtMinX_DecimalPlaces, $red_AtMinY_DecimalPlaces, $red_AtRate_DecimalPlaces, $ao_Lengs_DecimalPlaces, $ao_LengsRatio_DecimalPlaces, $ao_range_DecimalPlaces, $ao_rangeRatio_DecimalPlaces, $ao_sub_DecimalPlaces, $ao_subRatio_DecimalPlaces, $ao_Mul_DecimalPlaces, $ao_blurRange_DecimalPlaces, $ao_blurScale_DecimalPlaces, $blurStr_DecimalPlaces, $blurSub_DecimalPlaces, $shadowStr_DecimalPlaces, $simShwStr_DecimalPlaces, $simShwIn_DecimalPlaces, $simShwMin_DecimalPlaces, $gamma_DecimalPlaces, $ao_av_CenterWeight_DecimalPlaces, $ao_av_MaxDistance_DecimalPlaces, $ao_av_MaxRadius_DecimalPlaces, $ao_av_FadeOutStart_DecimalPlaces, $ao_av_FadeOutDistance_DecimalPlaces, $ao_av_BlurFallOff_DecimalPlaces, $ao_av_BlurScale_DecimalPlaces, $ao_av_Shwstr_DecimalPlaces, $cam_near_DecimalPlaces, $cam_far_DecimalPlaces, $avmp01_DecimalPlaces, $avmp02_DecimalPlaces, $avmp03_DecimalPlaces, $avmp04_DecimalPlaces, $avmp05_DecimalPlaces, $avmp06_DecimalPlaces, $avmp07_DecimalPlaces, $avmp08_DecimalPlaces, $avmp09_DecimalPlaces, $avmp10_DecimalPlaces, $avmp11_DecimalPlaces, $avmp12_DecimalPlaces, $avmp13_DecimalPlaces, $avmp14_DecimalPlaces, $avmp15_DecimalPlaces, $avmp16_DecimalPlaces, $cloud_h_min_DecimalPlaces, $cloud_h_max_DecimalPlaces + +;format string that the C function sprintf() needs +;the * will be replaced with a number that sets the number of decimal places +str_floating_precision_INImod: +.string "%.*f" diff --git a/src/XenobladeChroniclesX/Enhancements/libini/readme.md b/src/XenobladeChroniclesX/Enhancements/libini/readme.md new file mode 100644 index 00000000..92f9d549 --- /dev/null +++ b/src/XenobladeChroniclesX/Enhancements/libini/readme.md @@ -0,0 +1,151 @@ +------ +### XCX lib.ini MOD +------ +### What is this for? +This mod finds the ram copy of the lib.ini file thats located in monolib.cpk. It then will edit any and all options that the user wishes to edit. The mod is ran after the lib.ini is loaded into memory but before the game reads it. + +The lib.ini file contains various settings mostly related to graphical settings such as AntiAliasing and the current RGB mode. + +The lib.ini file is read once at boot and never again so you will need to restart the game to see changes. + +Some proven to work settings are Bloom, AntiAliasing, sRGBMode, cloud_h_max, cloud_h_min, etc. + +Some settings however are proven to not work. + +Below is what an unmodified lib.ini file looks like: + +------ + +``` +tonemap=on +ssao=on +bloom=on +godray=on +AntiAliasing=on +ColReduction=off +dof=off +lensFlare=on + +lut=on +luttex1=lutba + +cube=cube + +tonemax=2.5 +tonemin=1.0 +tonemul=1.0 +toneLastmul=1.00 +toneBlmmax=1.3 +toneBlmmin=1.0 +toneBlmmul=1.0 +toneBlmLastmul=0.8 + +godray_inival=0.95 +godray_decay=0.99 +godray_scale=1.235 + +blm_border_sub=0.20 +blm_border_mul=0.45 +blm_border_sub2=3.0 +blm_border_mul2=1.5 +blm_border_max=3.5 +blm_tex_mul=3.0 +blm_blurscale1=1.0 +blm_blurscale2=0.7 +blm_blurscale3=1.5 +blm_blurRange1=0.9 +blm_blurRange2=0.8 +blm_blurRange3=0.8 +blm_scale1=0.2 +blm_scale2=0.1 +blm_scale3=0.1 + +lens_max=1 +lens_rot=0 +lens_sub=1.5 +lens_mul=3.5 +lens_weight=0.1 +lens_decay=1.0 +lens_str=1.5 +lens_paMax=4.0 +lens_UVDecay=0.290 + +AA_Sharpness=8.0 +AA_Range=0.5 +AA_Threshold=0.17 +AA_ThresholdMin=0.05 + +red_sclX=0.96 +red_sclY=1.0 + +red_Auto=on +red_AtMaxX=0.96 +red_AtMaxY=1.0 +red_AtMinX=0.6 +red_AtMinY=0.86 +red_AtRate=100.0 + +ao_Lengs=0.1 +ao_LengsRatio=1.98 +ao_range=5.7 +ao_rangeRatio=1.000 +ao_sub=0.02 +ao_subRatio=0.150 +ao_Mul=2.0 +ao_blurRange=0.720 +ao_blurScale=0.75 + + +blur=off +blurStr=0.2 +blurSub=0.05 + +shadowStr=1.0 +shadowHalf=off + +simShwStr=1.6 +simShwIn=0.7 +simShwMin=0.15 + +sRGBMode=on +gamma=6 + +ao_av_CenterWeight=1.090 +ao_av_MaxDistance=0.15 +ao_av_MaxRadius=0.2 +ao_av_FadeOutStart=70000.0 +ao_av_FadeOutDistance=10000.0 +ao_av_BlurFallOff=0.050 +ao_av_BlurScale=1.6 +ao_av_Shwstr=0.5 + +cam_near=0.1 +cam_far=80000.0 + + +avmp01 = 0.5 , 0.5 , 0.5 +avmp02 = 0.5 , 0.5 , 0.5 +avmp03 = 0.5 , 0.5 , 0.5 +avmp04 = 0.5 , 0.5 , 0.5 +avmp05 = 0.5 , 0.5 , 0.5 +avmp06 = 0.5 , 0.5 , 0.5 +avmp07 = 0.5 , 0.5 , 0.5 +avmp08 = 0.5 , 0.5 , 0.5 +avmp09 = 0.5 , 0.5 , 0.5 +avmp10 = 0.5 , 0.5 , 0.5 +avmp11 = 0.5 , 0.5 , 0.5 +avmp12 = 0.5 , 0.5 , 0.5 +avmp13 = 0.5 , 0.5 , 0.5 +avmp14 = 0.5 , 0.5 , 0.5 +avmp15 = 0.5 , 0.5 , 0.5 +avmp16 = 0.5 , 0.5 , 0.5 + +cloud_h_min=1000.0 +cloud_h_max=1100.0 + + +``` + +------ + +#Have fun playing with all the settings!