diff --git a/Sources/NXVenom/atmosphere/kips/loader.kip b/Sources/NXVenom/atmosphere/kips/loader.kip index f5039882..5963515b 100755 Binary files a/Sources/NXVenom/atmosphere/kips/loader.kip and b/Sources/NXVenom/atmosphere/kips/loader.kip differ diff --git a/Sources/NXVenom/config/sys-clk/config.ini b/Sources/NXVenom/config/sys-clk/config.ini index 7f5d4a2f..277b28dc 100644 --- a/Sources/NXVenom/config/sys-clk/config.ini +++ b/Sources/NXVenom/config/sys-clk/config.ini @@ -1,7 +1,7 @@ [values] temp_log_interval_ms = 0 csv_write_interval_ms = 0 -allow_unsafe_freq = 0 +allow_unsafe_freq = 1 uncapped_clocks = 1 override_boost_mode = 1 auto_cpu_boost = 1 diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_erista.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_erista.json index aafc9981..93e049a0 100644 --- a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_erista.json +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_erista.json @@ -8,11 +8,17 @@ "state": "filler" }, { - "name": "Volt Limit", + "name": "Volt Min", "offset": "16", "length": "4", "extent": " mV" }, + { + "name": "Volt Max", + "offset": "20", + "length": "4", + "extent": " mV" + }, { "name": "Boost Clock", "offset": "12", @@ -33,14 +39,14 @@ }, { "name": "Volt Offset", - "offset": "28", + "offset": "40", "length": "1", "prefix": "-", "extent": " mV" }, { "name": "Volt Min", - "offset": "32", + "offset": "44", "length": "4" }, { @@ -57,29 +63,29 @@ }, { "name": "Clock Max", - "offset": "52", + "offset": "68", "length": "4", "extent": " MHz" }, { "name": "EMC Vdd2", - "offset": "44", + "offset": "60", "length": "4", "extent": " mV" }, { "name": "EMC DVB Shift", - "offset": "60", + "offset": "76", "length": "1" }, { "name": "DRAM Timing", - "offset": "40", + "offset": "56", "length": "1" }, { "name": "Timings", - "offset": "64,68,72,76,80,84,88", + "offset": "80,84,88,92,96,100,104", "length": "1" } ] \ No newline at end of file diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_mariko.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_mariko.json index fd34bd64..85a82631 100644 --- a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_mariko.json +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_mariko.json @@ -12,9 +12,21 @@ "offset": "12", "length": "1" }, + { + "name": "Volt Min", + "offset": "24", + "length": "4", + "extent": " mV" + }, + { + "name": "High Min Volt", + "offset": "28", + "length": "4", + "extent": " mV" + }, { "name": "Volt Max", - "offset": "20", + "offset": "32", "length": "4", "extent": " mV" }, @@ -38,19 +50,25 @@ }, { "name": "Undervolt Level", - "offset": "24", + "offset": "36", "length": "1" }, { "name": "Volt Offset", - "offset": "28", + "offset": "40", "length": "1", "prefix": "-", "extent": " mV" }, { "name": "Volt Min", - "offset": "36", + "offset": "48", + "length": "4", + "extent": " mV" + }, + { + "name": "Volt Max", + "offset": "52", "length": "4", "extent": " mV" }, @@ -68,35 +86,35 @@ }, { "name": "Clock Max", - "offset": "56", + "offset": "72", "length": "4", "extent": " MHz" }, { "name": "EMC Vdd2", - "offset": "44", + "offset": "60", "length": "4", "extent": " mV" }, { "name": "EMC Vddq", - "offset": "48", + "offset": "64", "length": "3", "extent": " mV" }, { "name": "EMC DVB Shift", - "offset": "60", + "offset": "76", "length": "1" }, { "name": "DRAM Timing", - "offset": "40", + "offset": "56", "length": "1" }, { "name": "Timings", - "offset": "64,68,72,76,80,84,88", + "offset": "80,84,88,92,96,100,104", "length": "1" } ] \ No newline at end of file diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_mariko2.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_mariko2.json index a8e1a8c9..f4d849b4 100644 --- a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_mariko2.json +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Backup/json/curconf_mariko2.json @@ -9,61 +9,61 @@ }, { "name": "76.8 - 614.4 MHz", - "offset": "92", + "offset": "108", "length": "4", "extent": " mV" }, { "name": "691.2 MHz", - "offset": "124", + "offset": "140", "length": "4", "extent": " mV" }, { "name": "768.0 MHz", - "offset": "128", + "offset": "144", "length": "4", "extent": " mV" }, { "name": "844.8 MHz", - "offset": "132", + "offset": "148", "length": "4", "extent": " mV" }, { "name": "921.6 MHz", - "offset": "136", + "offset": "152", "length": "4", "extent": " mV" }, { "name": "998.4 MHz", - "offset": "140", + "offset": "156", "length": "4", "extent": " mV" }, { "name": "1075.2 MHz", - "offset": "144", + "offset": "160", "length": "4", "extent": " mV" }, { "name": "1152.0 MHz", - "offset": "148", + "offset": "164", "length": "4", "extent": " mV" }, { "name": "1228.8 MHz", - "offset": "152", + "offset": "168", "length": "4", "extent": " mV" }, { "name": "1267.2 MHz", - "offset": "156", + "offset": "172", "length": "4", "extent": " mV" } diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/config.ini b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/config.ini index d061cbc9..6081ceab 100644 --- a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/config.ini +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/config.ini @@ -4,18 +4,39 @@ json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCp hex-by-cust-offset-dec /atmosphere/kips/loader.kip 12 {json_mark_cur_kip(*,dec)} back +[*Volt Min] +; Mariko +catch_errors +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuMinVolt.json' name 24 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 24 {json_mark_cur_kip(*,dec)} +back + +[*Volt Min] +; Erista +catch_errors +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/CPU/json/eristaCpuMinVolt.json' name 16 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 16 {json_mark_cur_kip(*,dec)} +back + +[*High Min Volt] +; Mariko +catch_errors +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuHighMinVolt.json' name 28 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 28 {json_mark_cur_kip(*,dec)} +back + [*Volt Max] ; Mariko catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuMaxVolt.json' name 20 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 20 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuMaxVolt.json' name 32 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 32 {json_mark_cur_kip(*,dec)} back [*Volt Max] ; Erista catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/CPU/json/eristaCpuMaxVolt.json' name 16 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 16 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/CPU/json/eristaCpuMaxVolt.json' name 20 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 20 {json_mark_cur_kip(*,dec)} back [*Boost Clock] diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/json/eristaCpuMinVolt.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/json/eristaCpuMinVolt.json new file mode 100644 index 00000000..fe80789a --- /dev/null +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/json/eristaCpuMinVolt.json @@ -0,0 +1,242 @@ +[ + { + "name": "Don't adjust", + "dec": "0" + }, + { + "name": "610 mV", + "dec": "610" + }, + { + "name": "615 mV", + "dec": "615" + }, + { + "name": "620 mV", + "dec": "620" + }, + { + "name": "625 mV", + "dec": "625" + }, + { + "name": "630 mV", + "dec": "630" + }, + { + "name": "635 mV", + "dec": "635" + }, + { + "name": "640 mV", + "dec": "640" + }, + { + "name": "645 mV", + "dec": "645" + }, + { + "name": "650 mV", + "dec": "650" + }, + { + "name": "655 mV", + "dec": "655" + }, + { + "name": "660 mV", + "dec": "660" + }, + { + "name": "665 mV", + "dec": "665" + }, + { + "name": "670 mV", + "dec": "670" + }, + { + "name": "675 mV", + "dec": "675" + }, + { + "name": "680 mV", + "dec": "680" + }, + { + "name": "685 mV", + "dec": "685" + }, + { + "name": "690 mV", + "dec": "690" + }, + { + "name": "695 mV", + "dec": "695" + }, + { + "name": "700 mV", + "dec": "700" + }, + { + "name": "705 mV", + "dec": "705" + }, + { + "name": "710 mV", + "dec": "710" + }, + { + "name": "715 mV", + "dec": "715" + }, + { + "name": "720 mV", + "dec": "720" + }, + { + "name": "725 mV", + "dec": "725" + }, + { + "name": "730 mV", + "dec": "730" + }, + { + "name": "735 mV", + "dec": "735" + }, + { + "name": "740 mV", + "dec": "740" + }, + { + "name": "745 mV", + "dec": "745" + }, + { + "name": "750 mV", + "dec": "750" + }, + { + "name": "755 mV", + "dec": "755" + }, + { + "name": "760 mV", + "dec": "760" + }, + { + "name": "765 mV", + "dec": "765" + }, + { + "name": "770 mV", + "dec": "770" + }, + { + "name": "775 mV", + "dec": "775" + }, + { + "name": "780 mV", + "dec": "780" + }, + { + "name": "785 mV", + "dec": "785" + }, + { + "name": "790 mV", + "dec": "790" + }, + { + "name": "795 mV", + "dec": "795" + }, + { + "name": "800 mV", + "dec": "800" + }, + { + "name": "805 mV", + "dec": "805" + }, + { + "name": "810 mV", + "dec": "810" + }, + { + "name": "815 mV", + "dec": "815" + }, + { + "name": "820 mV", + "dec": "820" + }, + { + "name": "825 mV - Default", + "dec": "825" + }, + { + "name": "830 mV", + "dec": "830" + }, + { + "name": "835 mV", + "dec": "835" + }, + { + "name": "840 mV", + "dec": "840" + }, + { + "name": "845 mV", + "dec": "845" + }, + { + "name": "850 mV", + "dec": "850" + }, + { + "name": "855 mV", + "dec": "855" + }, + { + "name": "860 mV", + "dec": "860" + }, + { + "name": "865 mV", + "dec": "865" + }, + { + "name": "870 mV", + "dec": "870" + }, + { + "name": "875 mV", + "dec": "875" + }, + { + "name": "880 mV", + "dec": "880" + }, + { + "name": "885 mV", + "dec": "885" + }, + { + "name": "890 mV", + "dec": "890" + }, + { + "name": "895 mV", + "dec": "895" + }, + { + "name": "900 mV", + "dec": "900" + } +] \ No newline at end of file diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuHighMinVolt.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuHighMinVolt.json new file mode 100644 index 00000000..f7155903 --- /dev/null +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuHighMinVolt.json @@ -0,0 +1,170 @@ +[ + { + "name": "Don't adjust", + "dec": "0" + }, + { + "name": "700 mV", + "dec": "700" + }, + { + "name": "705 mV", + "dec": "705" + }, + { + "name": "710 mV", + "dec": "710" + }, + { + "name": "715 mV", + "dec": "715" + }, + { + "name": "720 mV", + "dec": "720" + }, + { + "name": "725 mV", + "dec": "725" + }, + { + "name": "730 mV", + "dec": "730" + }, + { + "name": "735 mV", + "dec": "735" + }, + { + "name": "740 mV", + "dec": "740" + }, + { + "name": "745 mV", + "dec": "745" + }, + { + "name": "750 mV", + "dec": "750" + }, + { + "name": "755 mV", + "dec": "755" + }, + { + "name": "760 mV", + "dec": "760" + }, + { + "name": "765 mV", + "dec": "765" + }, + { + "name": "770 mV", + "dec": "770" + }, + { + "name": "775 mV", + "dec": "775" + }, + { + "name": "780 mV", + "dec": "780" + }, + { + "name": "785 mV", + "dec": "785" + }, + { + "name": "790 mV", + "dec": "790" + }, + { + "name": "795 mV", + "dec": "795" + }, + { + "name": "800 mV", + "dec": "800" + }, + { + "name": "805 mV", + "dec": "805" + }, + { + "name": "810 mV", + "dec": "810" + }, + { + "name": "815 mV", + "dec": "815" + }, + { + "name": "820 mV", + "dec": "820" + }, + { + "name": "825 mV", + "dec": "825" + }, + { + "name": "830 mV", + "dec": "830" + }, + { + "name": "835 mV", + "dec": "835" + }, + { + "name": "840 mV", + "dec": "840" + }, + { + "name": "845 mV", + "dec": "845" + }, + { + "name": "850 mV - Default", + "dec": "850" + }, + { + "name": "855 mV", + "dec": "855" + }, + { + "name": "860 mV", + "dec": "860" + }, + { + "name": "865 mV", + "dec": "865" + }, + { + "name": "870 mV", + "dec": "870" + }, + { + "name": "875 mV", + "dec": "875" + }, + { + "name": "880 mV", + "dec": "880" + }, + { + "name": "885 mV", + "dec": "885" + }, + { + "name": "890 mV", + "dec": "890" + }, + { + "name": "895 mV", + "dec": "895" + }, + { + "name": "900 mV", + "dec": "900" + } +] \ No newline at end of file diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuMinVolt.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuMinVolt.json new file mode 100644 index 00000000..1028c6c3 --- /dev/null +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/CPU/json/marikoCpuMinVolt.json @@ -0,0 +1,130 @@ +[ + { + "name": "Don't adjust", + "dec": "0" + }, + { + "name": "500 mV", + "dec": "500" + }, + { + "name": "505 mV", + "dec": "505" + }, + { + "name": "510 mV", + "dec": "510" + }, + { + "name": "515 mV", + "dec": "515" + }, + { + "name": "520 mV", + "dec": "520" + }, + { + "name": "525 mV", + "dec": "525" + }, + { + "name": "530 mV", + "dec": "530" + }, + { + "name": "535 mV", + "dec": "535" + }, + { + "name": "540 mV", + "dec": "540" + }, + { + "name": "545 mV", + "dec": "545" + }, + { + "name": "550 mV", + "dec": "550" + }, + { + "name": "555 mV", + "dec": "555" + }, + { + "name": "560 mV", + "dec": "560" + }, + { + "name": "565 mV", + "dec": "565" + }, + { + "name": "570 mV", + "dec": "570" + }, + { + "name": "575 mV", + "dec": "575" + }, + { + "name": "580 mV", + "dec": "580" + }, + { + "name": "585 mV", + "dec": "585" + }, + { + "name": "590 mV", + "dec": "590" + }, + { + "name": "595 mV", + "dec": "595" + }, + { + "name": "600 mV", + "dec": "600" + }, + { + "name": "605 mV", + "dec": "605" + }, + { + "name": "610 mV", + "dec": "610" + }, + { + "name": "615 mV", + "dec": "615" + }, + { + "name": "620 mV - Default", + "dec": "620" + }, + { + "name": "625 mV", + "dec": "625" + }, + { + "name": "630 mV", + "dec": "630" + }, + { + "name": "635 mV", + "dec": "635" + }, + { + "name": "640 mV", + "dec": "640" + }, + { + "name": "645 mV", + "dec": "645" + }, + { + "name": "650 mV", + "dec": "650" + } +] \ No newline at end of file diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/config.ini b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/config.ini index 71075abf..0354a139 100644 --- a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/config.ini +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/config.ini @@ -1,95 +1,102 @@ [*Undervolt Level] ; Mariko catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuUV.json' name 24 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 24 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuUV.json' name 36 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 36 {json_mark_cur_kip(*,dec)} back [*Volt Offset] catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/commonGpuVoltOffset.json' name 28 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 28 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/commonGpuVoltOffset.json' name 40 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 40 {json_mark_cur_kip(*,dec)} back [*Volt Min] ; Mariko catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVmin.json' name 36 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 36 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVmin.json' name 48 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 48 {json_mark_cur_kip(*,dec)} back [*Volt Min] ; Erista catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/eristaGpuVmin.json' name 32 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 32 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/eristaGpuVmin.json' name 44 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 44 {json_mark_cur_kip(*,dec)} +back + +[*Volt Max] +; Mariko +catch_errors +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuMaxVolt.json' name 52 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 52 {json_mark_cur_kip(*,dec)} back -- Custom Volt Table ; Mariko [*76 - 614 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 92 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 92 {json_mark_cur_kip(*,dec)} -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 96 {json_mark_cur_kip(*,dec)} -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 100 {json_mark_cur_kip(*,dec)} -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 104 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 108 hex-by-cust-offset-dec /atmosphere/kips/loader.kip 108 {json_mark_cur_kip(*,dec)} hex-by-cust-offset-dec /atmosphere/kips/loader.kip 112 {json_mark_cur_kip(*,dec)} hex-by-cust-offset-dec /atmosphere/kips/loader.kip 116 {json_mark_cur_kip(*,dec)} hex-by-cust-offset-dec /atmosphere/kips/loader.kip 120 {json_mark_cur_kip(*,dec)} +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 124 {json_mark_cur_kip(*,dec)} +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 128 {json_mark_cur_kip(*,dec)} +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 132 {json_mark_cur_kip(*,dec)} +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 136 {json_mark_cur_kip(*,dec)} back [*691 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 124 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 124 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 140 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 140 {json_mark_cur_kip(*,dec)} back [*768 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 128 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 128 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 144 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 144 {json_mark_cur_kip(*,dec)} back [*844 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 132 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 132 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 148 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 148 {json_mark_cur_kip(*,dec)} back [*921 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 136 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 136 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 152 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 152 {json_mark_cur_kip(*,dec)} back [*998 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 140 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 140 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 156 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 156 {json_mark_cur_kip(*,dec)} back [*1075 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 144 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 144 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 160 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 160 {json_mark_cur_kip(*,dec)} back [*1152 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 148 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 148 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 164 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 164 {json_mark_cur_kip(*,dec)} back [*1228 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 152 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 152 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 168 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 168 {json_mark_cur_kip(*,dec)} back [*1267 MHz] ; Mariko -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 156 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 156 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVoltTable.json' name 172 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 172 {json_mark_cur_kip(*,dec)} back diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/eristaGpuVmin.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/eristaGpuVmin.json index f8849e44..a09c0e71 100644 --- a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/eristaGpuVmin.json +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/eristaGpuVmin.json @@ -1,4 +1,8 @@ [ + { + "name": "Don't adjust", + "dec": "0" + }, { "name": "720 mV", "dec": "720" diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuMaxVolt.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuMaxVolt.json new file mode 100644 index 00000000..f24f1443 --- /dev/null +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuMaxVolt.json @@ -0,0 +1,206 @@ +[ + { + "name": "800 mV - Default", + "dec": "800" + }, + { + "name": "805 mV", + "dec": "805" + }, + { + "name": "810 mV", + "dec": "810" + }, + { + "name": "815 mV", + "dec": "815" + }, + { + "name": "820 mV", + "dec": "820" + }, + { + "name": "825 mV", + "dec": "825" + }, + { + "name": "830 mV", + "dec": "830" + }, + { + "name": "835 mV", + "dec": "835" + }, + { + "name": "840 mV", + "dec": "840" + }, + { + "name": "845 mV", + "dec": "845" + }, + { + "name": "850 mV", + "dec": "850" + }, + { + "name": "855 mV", + "dec": "855" + }, + { + "name": "860 mV", + "dec": "860" + }, + { + "name": "865 mV", + "dec": "865" + }, + { + "name": "870 mV", + "dec": "870" + }, + { + "name": "875 mV", + "dec": "875" + }, + { + "name": "880 mV", + "dec": "880" + }, + { + "name": "885 mV", + "dec": "885" + }, + { + "name": "890 mV", + "dec": "890" + }, + { + "name": "895 mV", + "dec": "895" + }, + { + "name": "900 mV", + "dec": "900" + }, + { + "name": "905 mV", + "dec": "905" + }, + { + "name": "910 mV", + "dec": "910" + }, + { + "name": "915 mV", + "dec": "915" + }, + { + "name": "920 mV", + "dec": "920" + }, + { + "name": "925 mV", + "dec": "925" + }, + { + "name": "930 mV", + "dec": "930" + }, + { + "name": "935 mV", + "dec": "935" + }, + { + "name": "940 mV", + "dec": "940" + }, + { + "name": "945 mV", + "dec": "945" + }, + { + "name": "950 mV", + "dec": "950" + }, + { + "name": "955 mV", + "dec": "955" + }, + { + "name": "960 mV", + "dec": "960" + }, + { + "name": "965 mV", + "dec": "965" + }, + { + "name": "970 mV", + "dec": "970" + }, + { + "name": "975 mV", + "dec": "975" + }, + { + "name": "980 mV", + "dec": "980" + }, + { + "name": "985 mV", + "dec": "985" + }, + { + "name": "990 mV", + "dec": "990" + }, + { + "name": "995 mV", + "dec": "995" + }, + { + "name": "1000 mV", + "dec": "1000" + }, + { + "name": "1005 mV", + "dec": "1005" + }, + { + "name": "1010 mV", + "dec": "1010" + }, + { + "name": "1015 mV", + "dec": "1015" + }, + { + "name": "1020 mV", + "dec": "1020" + }, + { + "name": "1025 mV", + "dec": "1025" + }, + { + "name": "1030 mV", + "dec": "1030" + }, + { + "name": "1035 mV", + "dec": "1035" + }, + { + "name": "1040 mV", + "dec": "1040" + }, + { + "name": "1045 mV", + "dec": "1045" + }, + { + "name": "1050 mV - System Default", + "dec": "1050" + } +] \ No newline at end of file diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVmin.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVmin.json index ac0dd3c2..cbc77593 100644 --- a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVmin.json +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/GPU/json/marikoGpuVmin.json @@ -32,7 +32,7 @@ "dec": "585" }, { - "name": "590 mV", + "name": "590 mV - Default", "dec": "590" }, { @@ -48,7 +48,7 @@ "dec": "605" }, { - "name": "610 mV - Default", + "name": "610 mV - System Default", "dec": "610" }, { diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/RAM/config.ini b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/RAM/config.ini index 8d8ce434..59bbcf65 100644 --- a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/RAM/config.ini +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/RAM/config.ini @@ -1,91 +1,91 @@ [*Max Clock MHz] ; Mariko catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcMaxClock.json' name 56 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 56 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcMaxClock.json' name 72 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 72 {json_mark_cur_kip(*,dec)} back [*Max Clock MHz] ; Erista catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/eristaEmcMaxClock.json' name 52 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 52 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/eristaEmcMaxClock.json' name 68 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 68 {json_mark_cur_kip(*,dec)} back [*EMC Vdd2] ; Mariko catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcMemVolt.json' name 44 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 44 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcMemVolt.json' name 60 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 60 {json_mark_cur_kip(*,dec)} back [*EMC Vdd2] ; Erista catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/eristaEmcMemVolt.json' name 44 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 44 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/eristaEmcMemVolt.json' name 60 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 60 {json_mark_cur_kip(*,dec)} back [*EMC Vddq] ; Mariko catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcVddqVolt.json' name 48 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 48 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcVddqVolt.json' name 64 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 64 {json_mark_cur_kip(*,dec)} back [*EMC DVB Shift] catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/commonEmcDvbShift.json' name 60 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 60 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/commonEmcDvbShift.json' name 76 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 76 {json_mark_cur_kip(*,dec)} back -- Advanced settings [*DRAM Timing] catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/mtcConf.json' name 40 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 40 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/mtcConf.json' name 56 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 56 {json_mark_cur_kip(*,dec)} back [*T1 Primary Preset] catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetOne.json' name 64 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 64 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetOne.json' name 80 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 80 {json_mark_cur_kip(*,dec)} back [*T2 Secondary Preset] catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetTwo.json' name 68 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 68 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetTwo.json' name 84 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 84 {json_mark_cur_kip(*,dec)} back [*T3 Secondary Preset] catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetThree.json' name 72 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 72 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetThree.json' name 88 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 88 {json_mark_cur_kip(*,dec)} back [*T4 Secondary Preset] catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetFour.json' name 76 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 76 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetFour.json' name 92 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 92 {json_mark_cur_kip(*,dec)} back [*T5 Secondary Preset] catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetFive.json' name 80 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 80 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetFive.json' name 96 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 96 {json_mark_cur_kip(*,dec)} back [*T6 Tertiary Preset] catch_errors -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetSix.json' name 84 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 84 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetSix.json' name 100 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 100 {json_mark_cur_kip(*,dec)} back [*T7 Latency Decrement] -json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetSeven.json' name 88 -hex-by-cust-offset-dec /atmosphere/kips/loader.kip 88 {json_mark_cur_kip(*,dec)} +json_mark_cur_kip '/switch/.packages/OC-Suite Wizard/Configure/RAM/json/ramTimingPresetSeven.json' name 104 +hex-by-cust-offset-dec /atmosphere/kips/loader.kip 104 {json_mark_cur_kip(*,dec)} back ; [*tRAS Decrement] diff --git a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcMemVolt.json b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcMemVolt.json index f189ec55..0c9394b9 100644 --- a/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcMemVolt.json +++ b/Sources/NXVenom/switch/.packages/OC-Suite Wizard/Configure/RAM/json/marikoEmcMemVolt.json @@ -62,13 +62,5 @@ { "name": "1225 uV", "dec": "1225000" - }, - { - "name": "1237 uV", - "dec": "1237500" - }, - { - "name": "1250 uV", - "dec": "1250000" } ] \ No newline at end of file diff --git a/Sources/Tools/Web Configurator/loader.kip b/Sources/Tools/Web Configurator/loader.kip index d911730e..28331669 100755 Binary files a/Sources/Tools/Web Configurator/loader.kip and b/Sources/Tools/Web Configurator/loader.kip differ diff --git a/Sources/Tools/Web Configurator/main.js b/Sources/Tools/Web Configurator/main.js index e8c50f95..517a14bc 100755 --- a/Sources/Tools/Web Configurator/main.js +++ b/Sources/Tools/Web Configurator/main.js @@ -1 +1,731 @@ -var __awaiter=this&&this.__awaiter||function(e,t,i,a){return new(i||(i=Promise))((function(n,r){function s(e){try{o(a.next(e))}catch(e){r(e)}}function l(e){try{o(a.throw(e))}catch(e){r(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,l)}o((a=a.apply(e,t||[])).next())}))};const CUST_REV_ADV=12;var CustPlatform;!function(e){e[e.Undefined=0]="Undefined",e[e.Erista=1]="Erista",e[e.Mariko=2]="Mariko",e[e.All=3]="All"}(CustPlatform||(CustPlatform={}));class CustEntry{constructor(e,t,i,a,n,r,s=[0,1e6],l=1,o=!0){this.id=e,this.name=t,this.platform=i,this.size=a,this.desc=n,this.defval=r,this.step=l,this.zeroable=o,this.min=s[0],this.max=s[1]}validate(){let e=new ErrorToolTip(this.id).clear();return Number.isNaN(this.value)||void 0===this.value?(e.setMsg("Invalid value: Not a number").show(),!1):!(!this.zeroable||0!=this.value)||(this.valuethis.max?(e.setMsg(`Expected range: [${this.min}, ${this.max}], got ${this.value}.`).show(),!1):this.value%this.step==0||(e.setMsg(`${this.value} % ${this.step} ≠ 0`).show(),!1))}getInputElement(){return document.getElementById(this.id)}updateValueFromElement(){var e;this.value=Number(null===(e=this.getInputElement())||void 0===e?void 0:e.value)}isAvailableFor(e){return e===CustPlatform.Undefined||this.platform===e||this.platform===CustPlatform.All}createElement(){let e=this.getInputElement();if(!e){let t=document.createElement("div");t.classList.add("grid","cust-element"),e=document.createElement("input"),e.min=String(this.zeroable?0:this.min),e.max=String(this.max),e.id=this.id,e.type="number",e.step=String(this.step);let i=document.createElement("label");i.setAttribute("for",this.id),i.innerHTML=this.name,i.appendChild(e),t.appendChild(i);let a=document.createElement("blockquote");a.innerHTML="",a.setAttribute("for",this.id),t.appendChild(a),document.getElementById("config-list-basic").appendChild(t),new ErrorToolTip(this.id).addChangeListener()}e.value=String(this.value)}setElementValue(){this.getInputElement().value=String(this.value)}setElementDefaultValue(){this.getInputElement().value=String(this.defval)}removeElement(){let e=this.getInputElement();e&&e.parentElement.parentElement.remove()}showElement(){let e=this.getInputElement();e&&e.parentElement.parentElement.style.removeProperty("display")}hideElement(){let e=this.getInputElement();e&&e.parentElement.parentElement.style.setProperty("display","none")}}class AdvEntry extends CustEntry{createElement(){let e=this.getInputElement();if(!e){let t=document.createElement("div");t.classList.add("grid","cust-element"),e=document.createElement("input"),e.min=String(this.zeroable?0:this.min),e.max=String(this.max),e.id=this.id,e.type="number",e.step=String(this.step);let i=document.createElement("label");i.setAttribute("for",this.id),i.innerHTML=this.name,i.appendChild(e),t.appendChild(i);let a=document.createElement("blockquote");a.innerHTML="",a.setAttribute("for",this.id),t.appendChild(a),document.getElementById("config-list-advanced").appendChild(t),new ErrorToolTip(this.id).addChangeListener()}e.value=String(this.value)}}class GpuEntry extends CustEntry{constructor(e,t,i=CustPlatform.Mariko,a=4,n=["range: 550 ≤ x ≤ 800"],r=610,s=[550,800],l=5,o=!1){super(e,t,i,a,n,r,s,l,o),this.id=e,this.name=t,this.platform=i,this.size=a,this.desc=n,this.defval=r,this.step=l,this.zeroable=o}createElement(){let e=this.getInputElement();if(!e){let t=document.createElement("div");t.classList.add("grid","cust-element"),e=document.createElement("input"),e.min=String(this.zeroable?0:this.min),e.max=String(this.max),e.id=this.id,e.type="number",e.step=String(this.step);let i=document.createElement("label");i.setAttribute("for",this.id),i.innerHTML=this.name,i.appendChild(e),t.appendChild(i);let a=document.createElement("blockquote");a.innerHTML="",a.setAttribute("for",this.id),t.appendChild(a),document.getElementById("config-list-gpu").appendChild(t),new ErrorToolTip(this.id).addChangeListener()}e.value=String(this.value)}}var CustTable=[new CustEntry("commonCpuBoostClock","Boost Clock in kHz",CustPlatform.All,4,["System default: 1785000","Boost clock will be applied when applications request Boost Mode via performance configuration."],1785e3,[102e4,3e6],1,!1),new CustEntry("marikoCpuUV","Enable Mariko CPU Undervolt",CustPlatform.Mariko,4,["Reduce CPU power draw","0 : Default Table","1 : Undervolt Level 1 (SLT - CPU speedo < 1650)","2 : Undervolt Level 1 (SLT - CPU speedo >= 1650)","3 : Undervolt Level 2 (OCT - OCS custom undervolt)","4 : Undervolt Level 3 (HiOCT - OCS custom undervolt)"],0,[0,4],1),new CustEntry("eristaCpuMaxVolt","Erista CPU Max Voltage in mV",CustPlatform.Erista,4,["Acceptable range: 1227 ≤ x ≤ 1300","L4T Default: 1257"],1257,[1227,1300],1),new CustEntry("marikoCpuMaxVolt","Mariko CPU Max Voltage in mV",CustPlatform.Mariko,4,["System default: 1120","Acceptable range: 1120 ≤ x ≤ 1300","Changing this value affects cpu voltage calculation"],1235,[1120,1300],5),new CustEntry("marikoGpuUV","Enable Mariko GPU Undervolt",CustPlatform.Mariko,4,["Reduce GPU power draw","Your GPU might not withstand undervolt, and can hang your console, or crash games","Undervolting too much will drop GPU performance even if it seems stable","GPU voltages are dynamic and will change with temperature and gpu speedo","0 : Default Table","1 : Undervolt Level 1 (SLT: Aggressive)","2 : Undervolt Level 2 (HiOPT: Drastic)","3 : Custom static GPU Voltage Table (Use Gpu Configuation below)"],0,[0,3],1),new CustEntry("commonGpuVoltOffset","GPU Volt Offset",CustPlatform.All,4,["Negative Voltage offset value for gpu dynamic voltage calculation","For example, value of 10 will decrease 10mV gpu volt from all frequencies","Default gpu vmin: Erista - 810mV / Mariko - 610mV","Acceptable range: 0 ~ 100"],0,[0,100],1),new CustEntry("eristaGpuMinVolt","Erista GPU Vmin",CustPlatform.Erista,4,["GPU Vmin for Erista","Default gpu vmin: 810mV","Regulator step: 6.25mV","With 810mV vmin, 812.mV will be used because of 6.25mV regulator step","Acceptable range: 725 ~ 810"],810,[725,810],5),new CustEntry("marikoGpuMinVolt","Mariko GPU Vmin",CustPlatform.Mariko,4,["GPU Vmin for Mariko","High EMC Clocks will require gpu minimum voltage to be raised","Default gpu vmin: 610mV","Regulator step: 5mV","slt and hiopt uses 590mV as minimum voltage","Acceptable range: 550 ~ 800"],610,[550,800],5),new CustEntry("mtcConf","DRAM Timing",CustPlatform.All,4,["0: AUTO_ADJ_ALL: Auto adjust mtc table with LPDDR4 3733 Mbps specs, 8Gb density. Change timing with Advanced Config (Default)","1: CUSTOM_ADJ_ALL: Adjust only non-zero preset timings in Advanced Config","2: NO_ADJ_ALL: Use 1600 mtc table wihout adjusting (Timing becomes tighter if you raise dram clock)."],0,[0,2],1),new CustEntry("commonEmcMemVolt","EMC Vdd2 Voltage in uV",CustPlatform.All,4,["Acceptable range: 1050000 ≤ x ≤ 1250000, and it should be divided evenly by 12500.","Erista Default: 1125000","Mariko Default: 1100000","Official lpddr4(x) range: 1060mV~1175mV (1100mV nominal)","OCS need high voltage unlike l4t because of not scaling mtc table well. However it is recommended to stay within official limits","Not enabled by default"],0,[105e4,125e4],12500),new CustEntry("marikoEmcVddqVolt","EMC Vddq (Mariko Only) Voltage in uV",CustPlatform.Mariko,4,["Acceptable range: 550000 ≤ x ≤ 650000","Value should be divided evenly by 5000","Default: 600000","Official lpddr4(x) range: 570mV~650mV (600mV nominal)","Not enabled by default."],0,[55e4,65e4],5e3),new CustEntry("eristaEmcMaxClock","Erista RAM Max Clock in kHz",CustPlatform.Erista,4,["Values should be ≥ 1600000, and divided evenly by 3200.","Actual dram clock might be different from this value.","Recommended Clocks: 1862400, 2131200 (JEDEC)","WARNING: RAM overclock could be UNSTABLE if timing parameters are not suitable for your DRAM"],1862400,[16e5,2131200],3200),new CustEntry("marikoEmcMaxClock","Mariko RAM Max Clock in kHz",CustPlatform.Mariko,4,["Values should be ≥ 1600000, and accepts any integer.","Actual dram clock is exactly same as this value.","Spread Spectrum is enabled for frequencies in range of (2366000, 2500000] to mitigate EMI with wifi.","Recommended Clocks: 1866000, 2133000, 2400000 (JEDEC)","Example Clocks: 1866000, 1966000, 2133000, 2233000, 2333000, 2533000","WARNING: RAM overclock could be UNSTABLE if timing parameters are not suitable for your DRAM."],1966e3,[16e5,2566e3],1),new CustEntry("commonEmcDvbShift","EMC DVB Table Shift",CustPlatform.All,4,["SoC voltage automatically gets raised with higher dram clock","Each shift number raises 25mV more, up to max SoC voltage","Helps with stability at higher memory clock","Acceptable range : 0~4"],0,[0,4],1)],AdvTable=[new AdvEntry("ramTimingPresetOne","Primary RAM Timing Preset",CustPlatform.Mariko,4,["WARNING: Unstable timings can corrupt your nand","Select Timing Preset for both AUTO_ADJ and CUSTOM_ADJ","Values are : tRCD - tRP - tRAS (tRC = tRP + tRAS)","0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: 12 - 12 - 28)","1 : 18 - 18 - 42 (Default timing)","2 : 17 - 17 - 39","3 : 16 - 16 - 36","4 : 15 - 15 - 34","5 : 14 - 14 - 32","6 : 13 - 13 - 30"],1,[0,6],1),new AdvEntry("ramTimingPresetTwo","Secondary RAM Timing Preset",CustPlatform.Mariko,4,["WARNING: Unstable timings can corrupt your nand","Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ","Values are : tRRD - tFAW","0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: 6.6 - 26.6) (CUST_ADJ only)","1 : 10 - 40 (Default timing) (3733 specs)","2 : 7.5 - 30 (4266 specs)","3 : 6 - 24","4 : 4 - 16","5 : 3 - 12"],1,[0,5],1),new AdvEntry("ramTimingPresetThree","Secondary RAM Timing Preset",CustPlatform.Mariko,4,["WARNING: Unstable timings can corrupt your nand","Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ","Values are : tWR - tRTP","0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: ?? - 5) (CUST_ADJ only)","1 : 18 - 7.5 (Default timing)","2 : 15 - 7.5","3 : 15 - 6","4 : 12 - 6","5 : 12 - 4","6 : 8 - 4"],1,[0,6],1),new AdvEntry("ramTimingPresetFour","Secondary RAM Timing Preset",CustPlatform.Mariko,4,["WARNING: Unstable timings can corrupt your nand","Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ","Values are : tRFC","0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: 93.3) (CUST_ADJ only)","1 : 140 (Default timing)","2 : 120","3 : 100","4 : 80","5 : 70","6 : 60"],1,[0,6],1),new AdvEntry("ramTimingPresetFive","Secondary RAM Timing Preset",CustPlatform.Mariko,4,["WARNING: Unstable timings can corrupt your nand","Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ","Values are : tWTR","0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: ??) (CUST_ADJ only)","1 : 10 (Default timing)","2 : 8","3 : 6","4 : 4","5 : 2","6 : 1"],1,[0,6],1),new AdvEntry("ramTimingPresetSix","Tertiary RAM Timing Preset",CustPlatform.Mariko,4,["WARNING: Unstable timings can corrupt your nand","Tertiary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ","Values are : tREFI","NOT RECOMMENDED FOR ERISTA","0 : Do Not Adjust","1 : 1x REFI (Default timing)","2 : 1.5x REFI","3 : 2x REFI","4 : 3x REFI","5 : 4x REFI","6 : MAX REFI"],1,[0,6],1),new AdvEntry("ramTimingPresetSeven","Latency Decrement",CustPlatform.Mariko,4,["WARNING: Unstable timings can corrupt your nand","Latency decrement for both AUTO_ADJ and CUSTOM_ADJ","This preset decreases Write/Read related delays. Values are Write - Read","0 : 0 - 0, Do Not Adjust for CUST_ADJ","1 : '-2' - '-4'","2 : '-4' - '-8'","3 : '-6' - '-12'","4 : '-8' - '-16'","5 : '-10' - '-20'","6 : '-12' - '-24'"],0,[0,6],1)],GpuTable=[new GpuEntry("0","76.8"),new GpuEntry("1","153.6"),new GpuEntry("2","230.4"),new GpuEntry("3","307.2"),new GpuEntry("4","384.0"),new GpuEntry("5","460.8"),new GpuEntry("6","537.6"),new GpuEntry("7","614.4"),new GpuEntry("8","691.2"),new GpuEntry("9","768.0"),new GpuEntry("10","844.8"),new GpuEntry("11","921.6"),new GpuEntry("12","998.4"),new GpuEntry("13","1075.2"),new GpuEntry("14","1152.0"),new GpuEntry("15","1228.8"),new GpuEntry("16","1267.2")];class ErrorToolTip{constructor(e,t){this.id=e,this.msg=t,this.id=e,this.element=document.getElementById(e),t&&this.setMsg(t)}setMsg(e){return this.msg=e,this}show(){var e,t,i,a,n,r;return null===(e=this.element)||void 0===e||e.setAttribute("aria-invalid","true"),this.msg&&(null===(t=this.element)||void 0===t||t.setAttribute("title",this.msg),null===(a=null===(i=this.element)||void 0===i?void 0:i.parentElement)||void 0===a||a.setAttribute("data-tooltip",this.msg),null===(r=null===(n=this.element)||void 0===n?void 0:n.parentElement)||void 0===r||r.setAttribute("data-placement","top")),this}clear(){var e,t,i,a,n,r;return null===(e=this.element)||void 0===e||e.removeAttribute("aria-invalid"),null===(t=this.element)||void 0===t||t.removeAttribute("title"),null===(a=null===(i=this.element)||void 0===i?void 0:i.parentElement)||void 0===a||a.removeAttribute("data-tooltip"),null===(r=null===(n=this.element)||void 0===n?void 0:n.parentElement)||void 0===r||r.removeAttribute("data-placement"),this}addChangeListener(){var e;null===(e=this.element)||void 0===e||e.addEventListener("change",(e=>{let t=CustTable.filter((e=>e.id===this.id))[0];t.value=Number(this.element.value),t.validate()}))}}class CustStorage{constructor(){this.storage={},this.key="last_saved"}updateFromTable(){let e=e=>{var t;if(e.updateValueFromElement(),!e.validate())throw null===(t=e.getInputElement())||void 0===t||t.focus(),new Error(`Invalid ${e.name}`)};CustTable.forEach(e),AdvTable.forEach(e),GpuTable.forEach(e),this.storage={};let t=Object.fromEntries(CustTable.map((e=>[e.id,e.value])));Object.keys(t).forEach((e=>this.storage[e]=t[e])),t=Object.fromEntries(AdvTable.map((e=>[e.id,e.value]))),Object.keys(t).forEach((e=>this.storage[e]=t[e]))}setTable(){let e=Object.keys(this.storage);e.forEach((e=>CustTable.filter((t=>t.id==e))[0].value=this.storage[e])),e.forEach((e=>AdvTable.filter((t=>t.id==e))[0].value=this.storage[e])),CustTable.filter((t=>!e.includes(t.id))).forEach((e=>e.value=e.defval)),AdvTable.filter((t=>!e.includes(t.id))).forEach((e=>e.value=e.defval)),CustTable.forEach((e=>{var t;if(!e.validate())throw null===(t=e.getInputElement())||void 0===t||t.focus(),new Error(`Invalid ${e.name}`);e.setElementValue()})),AdvTable.forEach((e=>{var t;if(!e.validate())throw null===(t=e.getInputElement())||void 0===t||t.focus(),new Error(`Invalid ${e.name}`);e.setElementValue()})),GpuTable.forEach((e=>{var t;if(!e.validate())throw null===(t=e.getInputElement())||void 0===t||t.focus(),new Error(`Invalid ${e.name}`);e.setElementValue()}))}save(){localStorage.setItem(this.key,JSON.stringify(this.storage))}load(){let e=localStorage.getItem(this.key);if(!e)return null;let t=JSON.parse(e),i=CustTable.map((e=>e.id)),a=Object.keys(t).filter((e=>!i.includes(e)));return a.length&&console.log(`Ignored: ${a}`),Object.keys(t).filter((e=>i.includes(e))).forEach((e=>this.storage[e]=t[e])),i=AdvTable.map((e=>e.id)),a=Object.keys(t).filter((e=>!i.includes(e))),a.length&&console.log(`Ignored: ${a}`),Object.keys(t).filter((e=>i.includes(e))).forEach((e=>this.storage[e]=t[e])),this.storage}}class Cust{constructor(){this.storage=new CustStorage,this.magic=1414747459,this.magicLen=4,this.mapper={2:{get:e=>this.view.getUint16(e,!0),set:(e,t)=>this.view.setUint16(e,t,!0)},4:{get:e=>this.view.getUint32(e,!0),set:(e,t)=>this.view.setUint32(e,t,!0)}}}findMagicOffset(){this.view=new DataView(this.buffer);for(let e=0;e{var t,i;if(!e.offset)throw null===(t=e.getInputElement())||void 0===t||t.focus(),new Error(`Failed to get offset for ${e.name}`);let a=this.mapper[e.size];if(!a)throw null===(i=e.getInputElement())||void 0===i||i.focus(),new Error(`Unknown size at ${e.name}`);a.set(e.offset,e.value)};CustTable.forEach(e),AdvTable.forEach(e),GpuTable.forEach(e),this.storage.save();let t=document.createElement("a");t.href=window.URL.createObjectURL(new Blob([this.buffer],{type:"application/octet-stream"})),t.download="loader.kip",t.click(),this.toggleLoadLastSavedBtn(!0)}removeHTMLForm(){CustTable.forEach((e=>e.removeElement()))}toggleLoadLastSavedBtn(e){let t=document.getElementById("load_saved");e?(t.addEventListener("click",(()=>{this.storage.load()&&this.storage.setTable()})),t.style.removeProperty("display"),t.removeAttribute("disabled")):t.style.setProperty("display","none")}createHTMLForm(){var e,t;CustTable.forEach((e=>e.createElement()));let i=document.createElement("p");i.innerHTML="Advanced configuration",null===(e=document.getElementById("config-list-advanced"))||void 0===e||e.appendChild(i);let a=document.createElement("p");a.innerHTML="Gpu Volt configuration",null===(t=document.getElementById("config-list-gpu"))||void 0===t||t.appendChild(a),AdvTable.forEach((e=>e.createElement())),GpuTable.forEach((e=>e.createElement()));let n=document.getElementById("load_default");n.removeAttribute("disabled"),n.addEventListener("click",(()=>{CustTable.forEach((e=>e.setElementDefaultValue()))})),this.toggleLoadLastSavedBtn(null!==this.storage.load());let r=document.getElementById("save");r.removeAttribute("disabled"),r.addEventListener("click",(()=>{try{this.save()}catch(e){console.error(e),alert(e)}}))}initCustTabs(){const e=Array.from(document.querySelectorAll('nav[role="tablist"] > button'));e.forEach((t=>{t.removeAttribute("disabled");let i=Number(t.getAttribute("data-platform"));t.addEventListener("click",(a=>{const n=["outline"];t.classList.remove(...n),e.filter((e=>e!=t)).forEach((e=>e.classList.add(...n))),CustTable.forEach((e=>{e.isAvailableFor(i)?e.showElement():e.hideElement()}))}))}))}parse(){let e=this.beginOffset+this.magicLen;if(this.rev=this.mapper[4].get(e),12!=this.rev)throw new Error(`Unsupported custRev, expected: 12, got ${this.rev}`);e+=4,document.getElementById("cust_rev").innerHTML=`Cust v${this.rev} is loaded.`;let t=t=>{var i;t.offset=e;let a=this.mapper[t.size];if(!a)throw null===(i=t.getInputElement())||void 0===i||i.focus(),new Error(`Unknown size at ${t}`);t.value=a.get(e),e+=t.size,t.validate()};CustTable.forEach(t),AdvTable.forEach(t),GpuTable.forEach(t)}load(e){try{this.buffer=e,this.findMagicOffset(),this.removeHTMLForm(),this.parse(),this.initCustTabs(),this.createHTMLForm()}catch(e){console.error(e),alert(e)}}}class ReleaseAsset{constructor(e){this.downloadUrl=e.browser_download_url,this.updatedAt=e.updated_at}}class ReleaseInfo{constructor(){this.ocLatestApi="https://api.github.com/repos/hanai3Bi/Switch-OC-Suite/releases/latest"}load(){return __awaiter(this,void 0,void 0,(function*(){try{this.parseOcResponse(yield this.responseFromApi(this.ocLatestApi).catch())}catch(e){console.error(e),alert(e)}}))}responseFromApi(e){return __awaiter(this,void 0,void 0,(function*(){const t=yield fetch(e,{method:"GET",headers:{Accept:"application/json"}});if(t.ok)return yield t.json();throw new Error(`Failed to connect to "${e}": ${t.status}`)}))}parseOcResponse(e){this.ocVer=e.tag_name,this.loaderKipAsset=new ReleaseAsset(e.assets.filter((e=>e.name.endsWith("loader.kip")))[0]),this.sdOutZipAsset=new ReleaseAsset(e.assets.filter((e=>e.name.endsWith("SdOut.zip")))[0]),this.sysclkOCAsset=new ReleaseAsset(e.assets.filter((e=>e.name.endsWith("sys-clk-oc.zip")))[0])}}class DownloadSection{constructor(){this.element=document.getElementById("download_btn_grid")}load(){return __awaiter(this,void 0,void 0,(function*(){for(;!this.isVisible();)yield new Promise((e=>setTimeout(e,1e3)));const e=new ReleaseInfo;yield e.load(),this.update("loader_kip_btn",`loader.kip ${e.ocVer}
${e.loaderKipAsset.updatedAt}`,e.loaderKipAsset.downloadUrl),this.update("sdout_zip_btn",`SdOut.zip ${e.ocVer}
${e.sdOutZipAsset.updatedAt}`,e.sdOutZipAsset.downloadUrl),this.update("ams_btn",`sys-clk-oc ${e.ocVer}
${e.sysclkOCAsset.updatedAt}`,e.sysclkOCAsset.downloadUrl)}))}isVisible(){let e=this.element.getBoundingClientRect();return e.top>0&&e.left>0&&e.bottom-e.height<(window.innerHeight||document.documentElement.clientHeight)&&e.right-e.width<(window.innerWidth||document.documentElement.clientWidth)}update(e,t,i){let a=document.getElementById(e);a.innerHTML=t,a.removeAttribute("aria-busy"),a.setAttribute("href",i)}}const fileInput=document.getElementById("file");fileInput.addEventListener("change",(e=>{var t=new Cust;if(!e.target||!e.target.files)return;let i=new FileReader;i.readAsArrayBuffer(e.target.files[0]),i.onloadend=e=>{e.target.readyState==FileReader.DONE&&t.load(e.target.result)}})),addEventListener("DOMContentLoaded",(e=>__awaiter(this,void 0,void 0,(function*(){yield(new DownloadSection).load()})))); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +/* Config: Cust */ +const CUST_REV_ADV = 14; +var CustPlatform; +(function (CustPlatform) { + CustPlatform[CustPlatform["Undefined"] = 0] = "Undefined"; + CustPlatform[CustPlatform["Erista"] = 1] = "Erista"; + CustPlatform[CustPlatform["Mariko"] = 2] = "Mariko"; + CustPlatform[CustPlatform["All"] = 3] = "All"; +})(CustPlatform || (CustPlatform = {})); +; +class CustEntry { + constructor(id, name, platform, size, desc, defval, minmax = [0, 1000000], step = 1, zeroable = true) { + this.id = id; + this.name = name; + this.platform = platform; + this.size = size; + this.desc = desc; + this.defval = defval; + this.step = step; + this.zeroable = zeroable; + this.min = minmax[0]; + this.max = minmax[1]; + } + ; + validate() { + let tip = new ErrorToolTip(this.id).clear(); + if (Number.isNaN(this.value) || this.value === undefined) { + tip.setMsg(`Invalid value: Not a number`).show(); + return false; + } + if (this.zeroable && this.value == 0) + return true; + if (this.value < this.min || this.value > this.max) { + tip.setMsg(`Expected range: [${this.min}, ${this.max}], got ${this.value}.`).show(); + return false; + } + if (this.value % this.step != 0) { + tip.setMsg(`${this.value} % ${this.step} ≠ 0`).show(); + return false; + } + return true; + } + ; + getInputElement() { + return document.getElementById(this.id); + } + updateValueFromElement() { + var _a; + this.value = Number((_a = this.getInputElement()) === null || _a === void 0 ? void 0 : _a.value); + } + isAvailableFor(platform) { + return platform === CustPlatform.Undefined || this.platform === platform || this.platform === CustPlatform.All; + } + createElement() { + let input = this.getInputElement(); + if (!input) { + let grid = document.createElement("div"); + grid.classList.add("grid", "cust-element"); + // Label and input + input = document.createElement("input"); + input.min = String(this.zeroable ? 0 : this.min); + input.max = String(this.max); + input.id = this.id; + input.type = "number"; + input.step = String(this.step); + let label = document.createElement("label"); + label.setAttribute("for", this.id); + label.innerHTML = this.name; + label.appendChild(input); + grid.appendChild(label); + // Description in blockquote style + let desc = document.createElement("blockquote"); + desc.innerHTML = ""; + desc.setAttribute("for", this.id); + grid.appendChild(desc); + document.getElementById("config-list-basic").appendChild(grid); + new ErrorToolTip(this.id).addChangeListener(); + } + input.value = String(this.value); + } + setElementValue() { + this.getInputElement().value = String(this.value); + } + setElementDefaultValue() { + this.getInputElement().value = String(this.defval); + } + removeElement() { + let input = this.getInputElement(); + if (input) { + input.parentElement.parentElement.remove(); + } + } + showElement() { + let input = this.getInputElement(); + if (input) { + input.parentElement.parentElement.style.removeProperty("display"); + } + } + hideElement() { + let input = this.getInputElement(); + if (input) { + input.parentElement.parentElement.style.setProperty("display", "none"); + } + } +} +class AdvEntry extends CustEntry { + createElement() { + let input = this.getInputElement(); + if (!input) { + let grid = document.createElement("div"); + grid.classList.add("grid", "cust-element"); + // Label and input + input = document.createElement("input"); + input.min = String(this.zeroable ? 0 : this.min); + input.max = String(this.max); + input.id = this.id; + input.type = "number"; + input.step = String(this.step); + let label = document.createElement("label"); + label.setAttribute("for", this.id); + label.innerHTML = this.name; + label.appendChild(input); + grid.appendChild(label); + // Description in blockquote style + let desc = document.createElement("blockquote"); + desc.innerHTML = ""; + desc.setAttribute("for", this.id); + grid.appendChild(desc); + document.getElementById("config-list-advanced").appendChild(grid); + new ErrorToolTip(this.id).addChangeListener(); + } + input.value = String(this.value); + } +} +class GpuEntry extends CustEntry { + constructor(id, name, platform = CustPlatform.Mariko, size = 4, desc = ["range: 550 ≤ x ≤ 800"], defval = 610, minmax = [550, 800], step = 5, zeroable = false) { + super(id, name, platform, size, desc, defval, minmax, step, zeroable); + this.id = id; + this.name = name; + this.platform = platform; + this.size = size; + this.desc = desc; + this.defval = defval; + this.step = step; + this.zeroable = zeroable; + } + ; + createElement() { + let input = this.getInputElement(); + if (!input) { + let grid = document.createElement("div"); + grid.classList.add("grid", "cust-element"); + // Label and input + input = document.createElement("input"); + input.min = String(this.zeroable ? 0 : this.min); + input.max = String(this.max); + input.id = this.id; + input.type = "number"; + input.step = String(this.step); + let label = document.createElement("label"); + label.setAttribute("for", this.id); + label.innerHTML = this.name; + label.appendChild(input); + grid.appendChild(label); + // Description in blockquote style + let desc = document.createElement("blockquote"); + desc.innerHTML = ""; + desc.setAttribute("for", this.id); + grid.appendChild(desc); + document.getElementById("config-list-gpu").appendChild(grid); + new ErrorToolTip(this.id).addChangeListener(); + } + input.value = String(this.value); + } +} +var CustTable = [ + new CustEntry("commonCpuBoostClock", "Boost Clock in kHz", CustPlatform.All, 4, ["System default: 1785000", + "Boost clock will be applied when applications request Boost Mode via performance configuration."], 1785000, [1020000, 3000000], 1, false), + new CustEntry("marikoCpuUV", "Enable Mariko CPU Undervolt", CustPlatform.Mariko, 4, ["Reduce CPU power draw", + "0 : Default Table", + "1 : Undervolt Level 1 (SLT - CPU speedo < 1650)", + "2 : Undervolt Level 1 (SLT - CPU speedo >= 1650)", + "3 : Undervolt Level 2 (OCT - OCS custom undervolt)", + "4 : Undervolt Level 3 (HiOCT - OCS custom undervolt)",], 0, [0, 4], 1), + new CustEntry("eristaCpuMinVolt", "Erista CPU Min Voltage in mV", CustPlatform.Erista, 4, ["Acceptable range: 0 < x ≤ 1227", + "System Default: 825"], 825, [0, 1227], 1), + new CustEntry("eristaCpuMaxVolt", "Erista CPU Max Voltage in mV", CustPlatform.Erista, 4, ["Acceptable range: 1227 ≤ x ≤ 1300", + "System Default: 1227, L4T OC: 1257"], 1257, [1227, 1300], 1), + new CustEntry("marikoCpuMinVolt", "Mariko CPU Min Voltage in mV", CustPlatform.Mariko, 4, ["Acceptable range: 0 < x ≤ 1120", + "System Default: 620"], 620, [0, 1120], 5), + new CustEntry("marikoCpuHighMinVolt", "Mariko CPU High Min Voltage in mV", CustPlatform.Mariko, 4, ["Acceptable range: 0 < x ≤ 1120", + "System Default: 850"], 850, [0, 1120], 5), + new CustEntry("marikoCpuMaxVolt", "Mariko CPU Max Voltage in mV", CustPlatform.Mariko, 4, ["Acceptable range: 1120 ≤ x ≤ 1300", + "System default: 1120, L4T OC: 1235", + "Changing this value affects cpu voltage calculation"], 1235, [1120, 1300], 5), + new CustEntry("marikoGpuUV", "Enable Mariko GPU Undervolt", CustPlatform.Mariko, 4, ["Reduce GPU power draw", + "Your GPU might not withstand undervolt, and can hang your console, or crash games", + "Undervolting too much will drop GPU performance even if it seems stable", + "GPU voltages are dynamic and will change with temperature and gpu speedo", + "0 : Default Table", + "1 : Undervolt Level 1 (SLT: Aggressive)", + "2 : Undervolt Level 2 (HiOPT: Drastic)", + "3 : Custom static GPU Voltage Table (Use Gpu Configuation below)"], 0, [0, 3], 1), + new CustEntry("commonGpuVoltOffset", "GPU Volt Offset", CustPlatform.All, 4, ["Negative Voltage offset value for gpu dynamic voltage calculation", + "For example, value of 10 will decrease 10mV gpu volt from all frequencies", + "Default gpu vmin: Erista - 810mV / Mariko - 610mV", + "Acceptable range: 0 ~ 100"], 0, [0, 100], 1), + new CustEntry("eristaGpuMinVolt", "Erista GPU Vmin", CustPlatform.Erista, 4, ["GPU Vmin for Erista", + "Default gpu vmin: 810mV", + "Regulator step: 6.25mV", + "With 810mV vmin, 812.mV will be used because of 6.25mV regulator step", + "Acceptable range: 0 ~ 1000"], 810, [0, 1132], 1), + new CustEntry("marikoGpuMinVolt", "Mariko GPU Vmin", CustPlatform.Mariko, 4, ["GPU Vmin for Mariko", + "High EMC Clocks will require gpu minimum voltage to be raised", + "Default gpu vmin: 610mV", + "Regulator step: 5mV", + "slt and hiopt uses 590mV as minimum voltage", + "Acceptable range: 0 ~ 800"], 610, [0, 800], 5), + new CustEntry("marikoGpuMaxVolt", "Mariko GPU Vmax", CustPlatform.Mariko, 4, ["GPU Vmax for Mariko", + "System Default: 1050, L4T: 800", + "Not recommended to adjust value", + "GPU Frequency having higher than vmax in any temp range will be automatically removed", + "Which means GPU max freq will be adjusted depending on your speedo", + "Acceptable range: 800 ~ 1050"], 800, [800, 1050], 5), + new CustEntry("mtcConf", "DRAM Timing", CustPlatform.All, 4, ["0: AUTO_ADJ_ALL: Auto adjust mtc table with LPDDR4 3733 Mbps specs, 8Gb density. Change timing with Advanced Config (Default)", + "1: CUSTOM_ADJ_ALL: Adjust only non-zero preset timings in Advanced Config", + "2: NO_ADJ_ALL: Use 1600 mtc table wihout adjusting (Timing becomes tighter if you raise dram clock)."], 0, [0, 2], 1), + new CustEntry("commonEmcMemVolt", "EMC Vdd2 Voltage in uV", CustPlatform.All, 4, ["Acceptable range: 1050000 ≤ x ≤ 1212500, and it should be divided evenly by 12500.", + "Erista Default: 1125000", + "Mariko Default: 1100000", + "Official lpddr4(x) range: 1060mV~1175mV (1100mV nominal)", + "OCS need high voltage unlike l4t because of not scaling mtc table well. However it is recommended to stay within official limits", + "Not enabled by default"], 0, [1050000, 1212500], 12500), + new CustEntry("marikoEmcVddqVolt", "EMC Vddq (Mariko Only) Voltage in uV", CustPlatform.Mariko, 4, ["Acceptable range: 550000 ≤ x ≤ 650000", + "Value should be divided evenly by 5000", + "Default: 600000", + "Official lpddr4(x) range: 570mV~650mV (600mV nominal)", + "Not enabled by default."], 0, [550000, 650000], 5000), + new CustEntry("eristaEmcMaxClock", "Erista RAM Max Clock in kHz", CustPlatform.Erista, 4, ["Values should be ≥ 1600000, and divided evenly by 3200.", + "Actual dram clock might be different from this value.", + "Recommended Clocks: 1862400, 2131200 (JEDEC)", + "WARNING: RAM overclock could be UNSTABLE if timing parameters are not suitable for your DRAM"], 1862400, [1600000, 2131200], 3200), + new CustEntry("marikoEmcMaxClock", "Mariko RAM Max Clock in kHz", CustPlatform.Mariko, 4, ["Values should be ≥ 1600000, and accepts any integer.", + "Actual dram clock is exactly same as this value.", + "Spread Spectrum is enabled for frequencies in range of (2366000, 2500000] to mitigate EMI with wifi.", + "Recommended Clocks: 1866000, 2133000, 2400000 (JEDEC)", + "Example Clocks: 1866000, 1966000, 2133000, 2233000, 2333000, 2533000", + "WARNING: RAM overclock could be UNSTABLE if timing parameters are not suitable for your DRAM."], 1966000, [1600000, 2566000], 1), + new CustEntry("commonEmcDvbShift", "EMC DVB Table Shift", CustPlatform.All, 4, ["SoC voltage automatically gets raised with higher dram clock", + "Each shift number raises 25mV more, up to max SoC voltage", + "Helps with stability at higher memory clock", + "Acceptable range : 0~4"], 0, [0, 4], 1), +]; +var AdvTable = [ + new AdvEntry("ramTimingPresetOne", "Primary RAM Timing Preset", CustPlatform.Mariko, 4, ["WARNING: Unstable timings can corrupt your nand", + "Select Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tRCD - tRP - tRAS (tRC = tRP + tRAS)", + "0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: 12 - 12 - 28)", + "1 : 18 - 18 - 42 (Default timing)", + "2 : 17 - 17 - 39", + "3 : 16 - 16 - 36", + "4 : 15 - 15 - 34", + "5 : 14 - 14 - 32", + "6 : 13 - 13 - 30"], 1, [0, 6], 1), + new AdvEntry("ramTimingPresetTwo", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, ["WARNING: Unstable timings can corrupt your nand", + "Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tRRD - tFAW", + "0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: 6.6 - 26.6) (CUST_ADJ only)", + "1 : 10 - 40 (Default timing) (3733 specs)", + "2 : 7.5 - 30 (4266 specs)", + "3 : 6 - 24", + "4 : 4 - 16", + "5 : 3 - 12",], 1, [0, 5], 1), + new AdvEntry("ramTimingPresetThree", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, ["WARNING: Unstable timings can corrupt your nand", + "Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tWR - tRTP", + "0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: ?? - 5) (CUST_ADJ only)", + "1 : 18 - 7.5 (Default timing)", + "2 : 15 - 7.5", + "3 : 15 - 6", + "4 : 12 - 6", + "5 : 12 - 4", + "6 : 8 - 4",], 1, [0, 6], 1), + new AdvEntry("ramTimingPresetFour", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, ["WARNING: Unstable timings can corrupt your nand", + "Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tRFC", + "0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: 93.3) (CUST_ADJ only)", + "1 : 140 (Default timing)", + "2 : 120", + "3 : 100", + "4 : 80", + "5 : 70", + "6 : 60",], 1, [0, 6], 1), + new AdvEntry("ramTimingPresetFive", "Secondary RAM Timing Preset", CustPlatform.Mariko, 4, ["WARNING: Unstable timings can corrupt your nand", + "Secondary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tWTR", + "0 : Do Not Adjust (with CUST_ADJ at 2400Mhz, timing becomes: ??) (CUST_ADJ only)", + "1 : 10 (Default timing)", + "2 : 8", + "3 : 6", + "4 : 4", + "5 : 2", + "6 : 1",], 1, [0, 6], 1), + new AdvEntry("ramTimingPresetSix", "Tertiary RAM Timing Preset", CustPlatform.Mariko, 4, ["WARNING: Unstable timings can corrupt your nand", + "Tertiary Timing Preset for both AUTO_ADJ and CUSTOM_ADJ", + "Values are : tREFI", + "NOT RECOMMENDED FOR ERISTA", + "0 : Do Not Adjust", + "1 : 1x REFI (Default timing)", + "2 : 1.5x REFI", + "3 : 2x REFI", + "4 : 3x REFI", + "5 : 4x REFI", + "6 : MAX REFI",], 1, [0, 6], 1), + new AdvEntry("ramTimingPresetSeven", "Latency Decrement", CustPlatform.Mariko, 4, ["WARNING: Unstable timings can corrupt your nand", + "Latency decrement for both AUTO_ADJ and CUSTOM_ADJ", + "This preset decreases Write/Read related delays. Values are Write - Read", + "0 : 0 - 0, Do Not Adjust for CUST_ADJ", + "1 : '-2' - '-4'", + "2 : '-4' - '-8'", + "3 : '-6' - '-12'", + "4 : '-8' - '-16'", + "5 : '-10' - '-20'", + "6 : '-12' - '-24'",], 0, [0, 6], 1) +]; +var GpuTable = [ + new GpuEntry("0", "76.8"), + new GpuEntry("1", "153.6"), + new GpuEntry("2", "230.4"), + new GpuEntry("3", "307.2"), + new GpuEntry("4", "384.0"), + new GpuEntry("5", "460.8"), + new GpuEntry("6", "537.6"), + new GpuEntry("7", "614.4"), + new GpuEntry("8", "691.2"), + new GpuEntry("9", "768.0"), + new GpuEntry("10", "844.8"), + new GpuEntry("11", "921.6"), + new GpuEntry("12", "998.4"), + new GpuEntry("13", "1075.2"), + new GpuEntry("14", "1152.0"), + new GpuEntry("15", "1228.8"), + new GpuEntry("16", "1267.2"), +]; +class ErrorToolTip { + constructor(id, msg) { + this.id = id; + this.msg = msg; + this.id = id; + this.element = document.getElementById(id); + if (msg) { + this.setMsg(msg); + } + } + ; + setMsg(msg) { + this.msg = msg; + return this; + } + show() { + var _a, _b, _c, _d, _e, _f; + (_a = this.element) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", "true"); + if (this.msg) { + (_b = this.element) === null || _b === void 0 ? void 0 : _b.setAttribute("title", this.msg); + (_d = (_c = this.element) === null || _c === void 0 ? void 0 : _c.parentElement) === null || _d === void 0 ? void 0 : _d.setAttribute("data-tooltip", this.msg); + (_f = (_e = this.element) === null || _e === void 0 ? void 0 : _e.parentElement) === null || _f === void 0 ? void 0 : _f.setAttribute("data-placement", "top"); + } + return this; + } + ; + clear() { + var _a, _b, _c, _d, _e, _f; + (_a = this.element) === null || _a === void 0 ? void 0 : _a.removeAttribute("aria-invalid"); + (_b = this.element) === null || _b === void 0 ? void 0 : _b.removeAttribute("title"); + (_d = (_c = this.element) === null || _c === void 0 ? void 0 : _c.parentElement) === null || _d === void 0 ? void 0 : _d.removeAttribute("data-tooltip"); + (_f = (_e = this.element) === null || _e === void 0 ? void 0 : _e.parentElement) === null || _f === void 0 ? void 0 : _f.removeAttribute("data-placement"); + return this; + } + addChangeListener() { + var _a; + (_a = this.element) === null || _a === void 0 ? void 0 : _a.addEventListener('change', (_evt) => { + let obj = CustTable.filter((obj) => { return obj.id === this.id; })[0]; + obj.value = Number(this.element.value); + obj.validate(); + }); + } +} +; +class CustStorage { + constructor() { + this.storage = {}; + this.key = "last_saved"; + } + updateFromTable() { + let update = (i => { + var _a; + i.updateValueFromElement(); + if (!i.validate()) { + (_a = i.getInputElement()) === null || _a === void 0 ? void 0 : _a.focus(); + throw new Error(`Invalid ${i.name}`); + } + }); + CustTable.forEach(update); + AdvTable.forEach(update); + GpuTable.forEach(update); + this.storage = {}; + let kv = Object.fromEntries(CustTable.map((i) => [i.id, i.value])); + Object.keys(kv) + .forEach(k => this.storage[k] = kv[k]); + kv = Object.fromEntries(AdvTable.map((i) => [i.id, i.value])); + Object.keys(kv) + .forEach(k => this.storage[k] = kv[k]); + } + setTable() { + let keys = Object.keys(this.storage); + keys.forEach(k => CustTable.filter(i => i.id == k)[0].value = this.storage[k]); + keys.forEach(k => AdvTable.filter(i => i.id == k)[0].value = this.storage[k]); + // Set default for missing values + CustTable.filter(i => !keys.includes(i.id)) + .forEach(i => i.value = i.defval); + AdvTable.filter(i => !keys.includes(i.id)) + .forEach(i => i.value = i.defval); + CustTable.forEach(i => { + var _a; + if (!i.validate()) { + (_a = i.getInputElement()) === null || _a === void 0 ? void 0 : _a.focus(); + throw new Error(`Invalid ${i.name}`); + } + i.setElementValue(); + }); + AdvTable.forEach(i => { + var _a; + if (!i.validate()) { + (_a = i.getInputElement()) === null || _a === void 0 ? void 0 : _a.focus(); + throw new Error(`Invalid ${i.name}`); + } + i.setElementValue(); + }); + GpuTable.forEach(i => { + var _a; + if (!i.validate()) { + (_a = i.getInputElement()) === null || _a === void 0 ? void 0 : _a.focus(); + throw new Error(`Invalid ${i.name}`); + } + i.setElementValue(); + }); + } + save() { + localStorage.setItem(this.key, JSON.stringify(this.storage)); + } + load() { + let s = localStorage.getItem(this.key); + if (!s) { + return null; + } + let dict = JSON.parse(s); + let keys = CustTable.map(i => i.id); + let ignoredKeys = Object.keys(dict).filter(k => !keys.includes(k)); + if (ignoredKeys.length) { + console.log(`Ignored: ${ignoredKeys}`); + } + Object.keys(dict) + .filter(k => keys.includes(k)) + .forEach(k => this.storage[k] = dict[k]); + keys = AdvTable.map(i => i.id); + ignoredKeys = Object.keys(dict).filter(k => !keys.includes(k)); + if (ignoredKeys.length) { + console.log(`Ignored: ${ignoredKeys}`); + } + Object.keys(dict) + .filter(k => keys.includes(k)) + .forEach(k => this.storage[k] = dict[k]); + return this.storage; + } +} +class Cust { + constructor() { + this.storage = new CustStorage(); + this.magic = 0x54535543; // "CUST" + this.magicLen = 4; + this.mapper = { + 2: { + get: (offset) => this.view.getUint16(offset, true), + set: (offset, value) => this.view.setUint16(offset, value, true), + }, + 4: { + get: (offset) => this.view.getUint32(offset, true), + set: (offset, value) => this.view.setUint32(offset, value, true) + }, + }; + } + findMagicOffset() { + this.view = new DataView(this.buffer); + for (let offset = 0; offset < this.view.byteLength; offset += this.magicLen) { + if (this.mapper[this.magicLen].get(offset) == this.magic) { + this.beginOffset = offset; + return; + } + } + throw new Error("Invalid loader.kip file"); + } + save() { + this.storage.updateFromTable(); + let saveValue = (i => { + var _a, _b; + if (!i.offset) { + (_a = i.getInputElement()) === null || _a === void 0 ? void 0 : _a.focus(); + throw new Error(`Failed to get offset for ${i.name}`); + } + let mapper = this.mapper[i.size]; + if (!mapper) { + (_b = i.getInputElement()) === null || _b === void 0 ? void 0 : _b.focus(); + throw new Error(`Unknown size at ${i.name}`); + } + mapper.set(i.offset, i.value); + }); + CustTable.forEach(saveValue); + AdvTable.forEach(saveValue); + GpuTable.forEach(saveValue); + this.storage.save(); + let a = document.createElement("a"); + a.href = window.URL.createObjectURL(new Blob([this.buffer], { type: "application/octet-stream" })); + a.download = "loader.kip"; + a.click(); + this.toggleLoadLastSavedBtn(true); + } + removeHTMLForm() { + CustTable.forEach(i => i.removeElement()); + } + toggleLoadLastSavedBtn(enable) { + let last_btn = document.getElementById("load_saved"); + if (enable) { + last_btn.addEventListener('click', () => { + if (this.storage.load()) { + this.storage.setTable(); + } + }); + last_btn.style.removeProperty("display"); + last_btn.removeAttribute("disabled"); + } + else { + last_btn.style.setProperty("display", "none"); + } + } + createHTMLForm() { + var _a, _b; + CustTable.forEach(i => i.createElement()); + let advanced = document.createElement("p"); + advanced.innerHTML = "Advanced configuration"; + (_a = document.getElementById("config-list-advanced")) === null || _a === void 0 ? void 0 : _a.appendChild(advanced); + let gpu = document.createElement("p"); + gpu.innerHTML = "Gpu Volt configuration"; + (_b = document.getElementById("config-list-gpu")) === null || _b === void 0 ? void 0 : _b.appendChild(gpu); + AdvTable.forEach(i => i.createElement()); + GpuTable.forEach(i => i.createElement()); + let default_btn = document.getElementById("load_default"); + default_btn.removeAttribute("disabled"); + default_btn.addEventListener('click', () => { + CustTable.forEach(i => i.setElementDefaultValue()); + }); + this.toggleLoadLastSavedBtn(this.storage.load() !== null); + let save_btn = document.getElementById("save"); + save_btn.removeAttribute("disabled"); + save_btn.addEventListener('click', () => { + try { + this.save(); + } + catch (e) { + console.error(e); + alert(e); + } + }); + } + initCustTabs() { + const custTabs = Array.from(document.querySelectorAll(`nav[role="tablist"] > button`)); + custTabs.forEach(tab => { + tab.removeAttribute("disabled"); + let platform = Number(tab.getAttribute("data-platform")); + tab.addEventListener('click', (_evt) => { + // Set other tabs to unfocused state + const unfocusedClasses = ["outline"]; + tab.classList.remove(...unfocusedClasses); + let otherTabs = custTabs.filter(j => j != tab); + otherTabs.forEach(k => k.classList.add(...unfocusedClasses)); + CustTable.forEach(e => { + e.isAvailableFor(platform) ? e.showElement() : e.hideElement(); + }); + }); + }); + } + parse() { + let offset = this.beginOffset + this.magicLen; + let revLen = 4; + this.rev = this.mapper[revLen].get(offset); + if (this.rev != CUST_REV_ADV) { + throw new Error(`Unsupported custRev, expected: ${CUST_REV_ADV}, got ${this.rev}`); + } + offset += revLen; + document.getElementById("cust_rev").innerHTML = `Cust v${this.rev} is loaded.`; + let loadValue = (i => { + var _a; + i.offset = offset; + let mapper = this.mapper[i.size]; + if (!mapper) { + (_a = i.getInputElement()) === null || _a === void 0 ? void 0 : _a.focus(); + throw new Error(`Unknown size at ${i}`); + } + i.value = mapper.get(offset); + offset += i.size; + i.validate(); + }); + CustTable.forEach(loadValue); + AdvTable.forEach(loadValue); + GpuTable.forEach(loadValue); + } + load(buffer) { + try { + this.buffer = buffer; + this.findMagicOffset(); + this.removeHTMLForm(); + this.parse(); + this.initCustTabs(); + this.createHTMLForm(); + } + catch (e) { + console.error(e); + alert(e); + } + } +} +/* GitHub Release fetch */ +class ReleaseAsset { + constructor(obj) { + this.downloadUrl = obj.browser_download_url; + this.updatedAt = obj.updated_at; + } + ; +} +; +class ReleaseInfo { + constructor() { + this.ocLatestApi = "https://api.github.com/repos/hanai3Bi/Switch-OC-Suite/releases/latest"; + } + load() { + return __awaiter(this, void 0, void 0, function* () { + try { + this.parseOcResponse(yield this.responseFromApi(this.ocLatestApi).catch()); + } + catch (e) { + console.error(e); + alert(e); + } + }); + } + ; + responseFromApi(apiUrl) { + return __awaiter(this, void 0, void 0, function* () { + const response = yield fetch(apiUrl, { method: 'GET', headers: { Accept: 'application/json' } }); + if (response.ok) { + return yield response.json(); + } + throw new Error(`Failed to connect to "${apiUrl}": ${response.status}`); + }); + } + ; + parseOcResponse(response) { + this.ocVer = response.tag_name; + this.loaderKipAsset = new ReleaseAsset(response.assets.filter(a => a.name.endsWith("loader.kip"))[0]); + this.sdOutZipAsset = new ReleaseAsset(response.assets.filter(a => a.name.endsWith("SdOut.zip"))[0]); + this.sysclkOCAsset = new ReleaseAsset(response.assets.filter(a => a.name.endsWith("sys-clk-oc.zip"))[0]); + } + ; +} +; +class DownloadSection { + constructor() { + this.element = document.getElementById("download_btn_grid"); + } + load() { + return __awaiter(this, void 0, void 0, function* () { + while (!this.isVisible()) { + yield new Promise(r => setTimeout(r, 1000)); + } + const info = new ReleaseInfo(); + yield info.load(); + this.update("loader_kip_btn", `loader.kip ${info.ocVer}
${info.loaderKipAsset.updatedAt}`, info.loaderKipAsset.downloadUrl); + this.update("sdout_zip_btn", `SdOut.zip ${info.ocVer}
${info.sdOutZipAsset.updatedAt}`, info.sdOutZipAsset.downloadUrl); + this.update("ams_btn", `sys-clk-oc ${info.ocVer}
${info.sysclkOCAsset.updatedAt}`, info.sysclkOCAsset.downloadUrl); + }); + } + isVisible() { + let rect = this.element.getBoundingClientRect(); + return (rect.top > 0 && + rect.left > 0 && + rect.bottom - rect.height < (window.innerHeight || document.documentElement.clientHeight) && + rect.right - rect.width < (window.innerWidth || document.documentElement.clientWidth)); + } + update(id, name, url) { + let element = document.getElementById(id); + element.innerHTML = name; + element.removeAttribute("aria-busy"); + element.setAttribute("href", url); + } +} +const fileInput = document.getElementById("file"); +fileInput.addEventListener('change', (event) => { + var cust = new Cust(); + // User canceled or non files selected + if (!event.target || !event.target.files) { + return; + } + let reader = new FileReader(); + reader.readAsArrayBuffer(event.target.files[0]); + reader.onloadend = (progEvent) => { + if (progEvent.target.readyState == FileReader.DONE) { + cust.load(progEvent.target.result); + } + }; +}); +addEventListener('DOMContentLoaded', (_evt) => __awaiter(this, void 0, void 0, function* () { + yield new DownloadSection().load(); +}));