(pages): cleanup

This commit is contained in:
hanabbi committed 2023-05-26 12:46:41 +09:00
1 parent 35a68a7a16
commit 99cc11c5a2
4 files changed
+12 -22

No files matched your search

+1 -1
View File
@@ -1 +1 @@
var __awaiter=this&&this.__awaiter||function(e,t,i,a){return new(i||(i=Promise))((function(s,l){function r(e){try{o(a.next(e))}catch(e){l(e)}}function n(e){try{o(a.throw(e))}catch(e){l(e)}}function o(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,n)}o((a=a.apply(e,t||[])).next())}))};const CUST_REV_UV=5,CUST_REV=4;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,s,l,r=[0,1e6],n=1,o=!0){this.id=e,this.name=t,this.platform=i,this.size=a,this.desc=s,this.defval=l,this.step=n,this.zeroable=o,this.min=r[0],this.max=r[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.value<this.min||this.value>this.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="<ul>"+this.desc.map((e=>`<li>${e}</li>`)).join("")+"</ul>",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="<ul>"+this.desc.map((e=>`<li>${e}</li>`)).join("")+"</ul>",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)}}var CustTable=[new CustEntry("mtcConf","DRAM Timing",CustPlatform.Mariko,4,["<b>0</b>: AUTO_ADJ_MARIKO_SAFE: Auto adjust timings for LPDDR4 ≤3733 Mbps specs, 8Gb density. (Default)","<b>1</b>: AUTO_ADJ_MARIKO_4266: Auto adjust timings for LPDDR4X 4266 Mbps specs, 8Gb density.","<b>2</b>: NO_ADJ_ALL: No timing adjustment for both Erista and Mariko. Might achieve better performance on Mariko but lower maximum frequency is expected."],0,[0,2],1),new CustEntry("commonCpuBoostClock","Boost Clock in kHz",CustPlatform.All,4,["System default: 1785000","Boost clock will be applied when applications request higher CPU frequency for quicker loading.","This will be set regardless of whether sys-clk is enabled."],1785e3,[102e4,3e6],1,!1),new CustEntry("commonEmcMemVolt","EMC Vddq (Erista Only) & RAM Vdd2 Voltage in uV",CustPlatform.All,4,["Acceptable range: 1100000 ≤ x ≤ 1250000, and it should be divided evenly by 12500.","Erista Default (HOS): 1125000 (bootloader: 1100000)","Mariko Default: 1100000 (It will not work without sys-clk-OC)","Not enabled by default"],0,[11e5,125e4],12500),new CustEntry("eristaCpuMaxVolt","Erista CPU Max Voltage in mV",CustPlatform.Erista,4,["Acceptable range: 1100 ≤ x ≤ 1300","L4T Default: 1235"],1235,[1100,1300],1),new CustEntry("eristaEmcMaxClock","Erista RAM Max Clock in kHz",CustPlatform.Erista,4,["Values should be ≥ 1600000, and divided evenly by 3200.","<b>WARNING:</b> RAM overclock could be UNSTABLE if timing parameters are not suitable for your DRAM"],1862400,[16e5,24e5],3200),new CustEntry("marikoCpuMaxVolt","Mariko CPU Max Voltage in mV",CustPlatform.Mariko,4,["System default: 1120","Acceptable range: 1100 ≤ x ≤ 1300"],1235,[1100,1300],5),new CustEntry("marikoEmcMaxLine truncated
var __awaiter=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(a,l){function r(e){try{o(s.next(e))}catch(e){l(e)}}function n(e){try{o(s.throw(e))}catch(e){l(e)}}function o(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,n)}o((s=s.apply(e,t||[])).next())}))};const CUST_REV=4,CUST_REV_ADV=5;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,s,a,l,r=[0,1e6],n=1,o=!0){this.id=e,this.name=t,this.platform=i,this.size=s,this.desc=a,this.defval=l,this.step=n,this.zeroable=o,this.min=r[0],this.max=r[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.value<this.min||this.value>this.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 s=document.createElement("blockquote");s.innerHTML="<ul>"+this.desc.map((e=>`<li>${e}</li>`)).join("")+"</ul>",s.setAttribute("for",this.id),t.appendChild(s),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 s=document.createElement("blockquote");s.innerHTML="<ul>"+this.desc.map((e=>`<li>${e}</li>`)).join("")+"</ul>",s.setAttribute("for",this.id),t.appendChild(s),document.getElementById("config-list-advanced").appendChild(t),new ErrorToolTip(this.id).addChangeListener()}e.value=String(this.value)}}var CustTable=[new CustEntry("mtcConf","DRAM Timing",CustPlatform.Mariko,4,["<b>0</b>: AUTO_ADJ_MARIKO_SAFE: Auto adjust timings for LPDDR4 ≤3733 Mbps specs, 8Gb density. (Default)","<b>1</b>: AUTO_ADJ_MARIKO_4266: Auto adjust timings for LPDDR4X 4266 Mbps specs, 8Gb density.","<b>2</b>: NO_ADJ_ALL: No timing adjustment for both Erista and Mariko. Might achieve better performance on Mariko but lower maximum frequency is expected."],0,[0,2],1),new CustEntry("commonCpuBoostClock","Boost Clock in kHz",CustPlatform.All,4,["System default: 1785000","Boost clock will be applied when applications request higher CPU frequency for quicker loading.","This will be set regardless of whether sys-clk is enabled."],1785e3,[102e4,3e6],1,!1),new CustEntry("commonEmcMemVolt","EMC Vddq (Erista Only) & RAM Vdd2 Voltage in uV",CustPlatform.All,4,["Acceptable range: 1100000 ≤ x ≤ 1250000, and it should be divided evenly by 12500.","Erista Default (HOS): 1125000 (bootloader: 1100000)","Mariko Default: 1100000 (It will not work without sys-clk-OC)","Not enabled by default"],0,[11e5,125e4],12500),new CustEntry("eristaCpuMaxVolt","Erista CPU Max Voltage in mV",CustPlatform.Erista,4,["Acceptable range: 1100 ≤ x ≤ 1300","L4T Default: 1235"],1235,[1100,1300],1),new CustEntry("eristaEmcMaxClock","Erista RAM Max Clock in kHz",CustPlatform.Erista,4,["Values should be ≥ 1600000, and divided evenly by 3200.","<b>WARNING:</b> RAM overclock could be UNSTABLE if timing parameters are not suitable for your DRAM"],1862400,[16e5,24e5],3200),new CustEntry("marikoCpuMaxVolt","Mariko CPU Max Voltage in mV",CustPlatform.Mariko,4,["System default: 1120","Acceptable range: 1100 ≤ x ≤ 1300"],1235,[1100,1300],5),new CustEntry("marikoEmcMaLine truncated
-1
View File
@@ -1 +0,0 @@
<!doctype html><html lang=en><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Switch OC Suite | Overclocking suite for Horizon OS (HOS) running on Atmosphere CFW. Licensed under GPL v2.</title><meta name=description content="Overclocking suite for Horizon OS (HOS) running on Atmosphere CFW. Licensed under GPL v2."><link rel=stylesheet href=https://unpkg.com/@picocss/pico@latest/css/pico.min.css><style>#nav-list{display:none}#nav-popup{display:unset}@media (min-width:768px){#nav-list{display:unset}#nav-popup{display:none}}details[open]>summary:not([role]):not(:focus){color:unset}div.hero>nav.container-fluid{position:fixed;top:0;z-index:99;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}div.hero>header{padding-top:6rem}button[role=tab]{border-radius:0;border-left-width:calc(var(--border-width)/ 2);border-right-width:calc(var(--border-width)/ 2)}button[role=tab]:first-child{border-top-left-radius:var(--border-radius);border-bottom-left-radius:var(--border-radius);border-left-width:var(--border-width)}button[role=tab]:last-child{border-top-right-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius);border-right-width:var(--border-width)}button[role=tab]:not(.outline){pointer-events:none;cursor:default}div.cust-element{margin:1.5rem 0 1.5rem 0}div.cust-element>blockquote,div.cust-element>blockquote>ul{margin:0;font-size:calc(var(--font-size) * .8);color:var(--muted-color)}div#download_btn_grid>a{margin:.5rem 0}</style><div class=hero><nav class=container-fluid><ul><li><a href=#head class=contrast><b>Switch OC Suite</b></a></ul><ul id=nav-popup><li><details role=list dir=rtl><summary aria-haspopup=group role=link class=contrast>Jump to</summary><ul role=group><li><a href=#readme>README</a><li><a href=#download>Download</a><li><a href=#config>Configurator</a><li><a href=https://github.com/KazushiMe/Switch-OC-Suite target=_blank>GitHub repository</a></ul></details></ul><ul id=nav-list><li><a href=#readme>README</a><li><a href=#download>Download</a><li><a href=#config>Config</a><li><a href=https://github.com/KazushiMe/Switch-OC-Suite target=_blank>GitHub</a></ul></nav><header class=container><hgroup><h1>Switch OC Suite</h1><h2>Overclocking suite for Horizon OS (HOS) running on Atmosphere CFW. Licensed under GPL v2.</h2></hgroup></header></div><section aria-label=README id=readme><div class=container><article><header><hgroup><h2>README</h2><h3>🚨DISCLAIMER: THIS IS PROVIDED AS IS. USE AT YOUR OWN RISK!🚨</h3></hgroup><ul><li>Overclocking in general will shorten the lifespan of some hardware components. <strong>YOU ARE RESPONSIBLE for any problem or potential damage</strong> if unsafe frequencies are ENABLED in sys-clk-OC. Issues like asking for bypassing limit will BE IGNORED OR CLOSED WITHOUT REPLY.<li>Due to HorizonOS design, instabilities from unsafe RAM clocks may cause filesystem corruption. <strong>Always make backup before enabling DRAM OC.</strong></ul></header><h3>Features</h3><details open><summary>For Erista variant (HAC-001)</summary><ul><li>CPU Overclock (Safe: 1785 MHz)<ul><li>Unsafe<ul><li>Due to the limit of board power draw or power IC<li>Unlockable frequencies up to 2091 MHz<li>See <a href=https://github.com/KazushiMe/Switch-OC-Suite/blob/master/Source/sys-clk-OC/README.md target=_blank>README for sys-clk-OC</a></ul></ul><li>DRAM Overclock (Safe: 1862.4 MHz)</ul></details><details open><summary>For Mariko variant (HAC-001-01, HDH-001, HEG-001)</summary><ul><li>CPU / GPU Overclock (Safe: 1963 / 998 MHz)<ul><li>Unsafe<ul><li>Due to the limit of board power draw or power IC<li>Unlockable frequencies up to 2397 / 1305 MHz or 2295 / 1267 MHz<li>See <a href=https://github.com/KazushiMe/Switch-OC-Suite/blob/master/Source/sys-clk-OC/README.md target=_blank>README for sys-clk-OC</a></ul></ul><li>DRAM Overclock (Safe: 1996.8 MHz)</ul></details><details open><summary>Modded sys-clk and ReverseNX-RT</summary><ul><li>Auto CPU Boost<ul><li>For faster game loading<li>Enable CPU Boost (1785 MHz) when CPU Core#3 (System Core) is stressed (mainly I/O operations).<li>Effective only when charger is connected or governor is enabled.<li>This feature is considered unsafe on Erista, especially when combined with high GPU frequency or with governor enabled.</ul><li>CPU &amp; GPU frequency governor (Experimental)<ul><li>Adjust frequency based on load. Might decrease power draw but can introduce stutters. Can be turned off for specific titles.</ul><li>Set charging current (100 mA - 2000 mA) and charging limit (20% - 100%)<ul><li>Long-term use of charge limit may render the battery gauge inaccurate. Performing full cycles could help recalibration, or try <a href=https://github.com/CTCaer/battery_desync_fix_nx>battery_desync_fix_nx</a>.</ul><li>Global Profile<ul><li>Designated a dummy title id <code>0xA111111111111111</code>.<li>Priority: "Temp overrides" &gt; "Application profile" &gt; "Global profile" &gt; "System default".</ul><li>Sync ReversLine truncated
-1
View File
@@ -1 +0,0 @@
var __awaiter=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(a,l){function n(e){try{o(s.next(e))}catch(e){l(e)}}function r(e){try{o(s.throw(e))}catch(e){l(e)}}function o(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,r)}o((s=s.apply(e,t||[])).next())}))};const CUST_REV=4;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,s,a,l,n=[0,1e6],r=1,o=!0){this.id=e,this.name=t,this.platform=i,this.size=s,this.desc=a,this.defval=l,this.step=r,this.zeroable=o,this.min=n[0],this.max=n[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.value<this.min||this.value>this.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 s=document.createElement("blockquote");s.innerHTML="<ul>"+this.desc.map((e=>`<li>${e}</li>`)).join("")+"</ul>",s.setAttribute("for",this.id),t.appendChild(s),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")}}var CustTable=[new CustEntry("mtcConf","DRAM Timing",CustPlatform.Mariko,2,["<b>0</b>: AUTO_ADJ_MARIKO_SAFE: Auto adjust timings for LPDDR4 ≤3733 Mbps specs, 8Gb density. (Default)","<b>1</b>: AUTO_ADJ_MARIKO_4266: Auto adjust timings for LPDDR4X 4266 Mbps specs, 8Gb density.","<b>2</b>: NO_ADJ_ALL: No timing adjustment for both Erista and Mariko. Might achieve better performance on Mariko but lower maximum frequency is expected."],0,[0,2],1),new CustEntry("commonCpuBoostClock","Boost Clock in kHz",CustPlatform.All,4,["System default: 1785000","Boost clock will be applied when applications request higher CPU frequency for quicker loading.","This will be set regardless of whether sys-clk is enabled."],1785e3,[102e4,3e6],1,!1),new CustEntry("commonEmcMemVolt","EMC Vddq (Erista Only) & RAM Vdd2 Voltage in uV",CustPlatform.All,4,["Acceptable range: 1100000 ≤ x ≤ 1250000, and it should be divided evenly by 12500.","Erista Default (HOS): 1125000 (bootloader: 1100000)","Mariko Default: 1100000 (It will not work without sys-clk-OC)","Not enabled by default"],0,[11e5,125e4],12500),new CustEntry("eristaCpuMaxVolt","Erista CPU Max Voltage in mV",CustPlatform.Erista,4,["Acceptable range: 1100 ≤ x ≤ 1300","L4T Default: 1235"],1235,[1100,1300],1),new CustEntry("eristaEmcMaxClock","Erista RAM Max Clock in kHz",CustPlatform.Erista,4,["Values should be ≥ 1600000, and divided evenly by 3200.","<b>WARNING:</b> RAM overclock could be UNSTABLE if timing parameters are not suitable for your DRAM"],1862400,[16e5,24e5],3200),new CustEntry("marikoCpuMaxVolt","Mariko CPU Max Voltage in mV",CustPlatform.Mariko,4,["System default: 1120","Acceptable range: 1100 ≤ x ≤ 1300"],1235,[1100,1300],5),new CustEntry("marikoEmcMaxClock","Mariko RAM Max Clock in kHz",CustPlatform.Mariko,4,["Values should be ≥ 1600000, and divided evenly by 3200.","<b>WARNING:</b> RAM overclock could be UNSTABLE if timing parameters are not suitable for your DRAM."],1996800,[16e5,24e5],3200),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","Not enabled by default.","This will not work without sys-clk-OC."],0,[55e4,65e4],5e3)];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,s,a,l;return null===(e=this.elementLine truncated
+11 -19
View File
@@ -1,6 +1,6 @@
/* Config: Cust */
const CUST_REV_UV = 5;
const CUST_REV = 4;
const CUST_REV_ADV = 5;
enum CustPlatform {
Undefined = 0,
@@ -430,7 +430,7 @@ class Cust {
save() {
this.storage.updateFromTable();
var lambda = (i => {
let lambda = (i => {
if (!i.offset) {
i.getInputElement()?.focus();
throw new Error(`Failed to get offset for ${i.name}`);
@@ -443,7 +443,7 @@ class Cust {
mapper.set(i.offset, i.value!);
});
CustTable.forEach(lambda);
if (this.rev == CUST_REV_UV) {
if (this.rev == CUST_REV_ADV) {
AdvTable.forEach(lambda);
}
@@ -528,13 +528,13 @@ class Cust {
let offset = this.beginOffset + this.magicLen;
let revLen = 4;
this.rev = this.mapper[revLen].get(offset);
if (this.rev != CUST_REV && this.rev != CUST_REV_UV) {
throw new Error(`Unsupported custRev, expected: ${CUST_REV} or ${CUST_REV_UV}, got ${this.rev}`);
if (this.rev != CUST_REV && this.rev != CUST_REV_ADV) {
throw new Error(`Unsupported custRev, expected: ${CUST_REV} or ${CUST_REV_ADV}, got ${this.rev}`);
}
offset += revLen;
document.getElementById("cust_rev")!.innerHTML = `Cust v${CUST_REV} is loaded.`;
document.getElementById("cust_rev")!.innerHTML = `Cust v${this.rev} is loaded.`;
CustTable.forEach(i => {
let lambda = (i => {
i.offset = offset;
let mapper = this.mapper[i.size];
if (!mapper) {
@@ -545,18 +545,10 @@ class Cust {
offset += i.size;
i.validate();
});
if (this.rev == CUST_REV_UV) {
AdvTable.forEach(i => {
i.offset = offset;
let mapper = this.mapper[i.size];
if (!mapper) {
i.getInputElement()?.focus();
throw new Error(`Unknown size at ${i}`);
}
i.value = mapper.get(offset);
offset += i.size;
i.validate();
});
CustTable.forEach(lambda);
if (this.rev == CUST_REV_ADV) {
AdvTable.forEach(lambda);
}
}