diff --git a/src/app/components/IECPage.tsx b/src/app/components/IECPage.tsx index 69008b3..c99cd61 100644 --- a/src/app/components/IECPage.tsx +++ b/src/app/components/IECPage.tsx @@ -24,6 +24,18 @@ export default function IECPage({ config, setConfig }: IECPageProps) { const iec = config.iec || {}; + const boolDirEntries = Object.entries(iec.directory || {}).filter(([, v]) => v === 0 || v === 1); + const isCompatMode = boolDirEntries.length > 0 && boolDirEntries.every(([, v]) => v === 0); + + const setAllDirBools = (val: 0 | 1) => { + const newConfig = JSON.parse(JSON.stringify(config)); + const dir = newConfig.iec?.directory ?? {}; + for (const k of Object.keys(dir)) { + if (dir[k] === 0 || dir[k] === 1) dir[k] = val; + } + setConfig(newConfig); + }; + return (

IEC Settings

@@ -172,30 +184,39 @@ export default function IECPage({ config, setConfig }: IECPageProps) {

Directory Enhancements

+ {/* CBM Directory Compatibility Mode */} +
+
+
CBM Directory Compatibility
+
Disables all directory enhancements
+
+ +
+ {Object.entries(iec.directory || {}).map(([key, value]) => ( -
+
- {typeof value === 'number' ? ( + {value === 0 || value === 1 ? ( ) : ( updateSetting(['iec', 'directory', key], parseInt(e.target.value))} - className="w-24 px-3 py-1 border border-neutral-300 rounded-lg text-right" + className="w-24 px-3 py-1 border border-neutral-300 rounded-lg text-right disabled:cursor-not-allowed" /> )}
diff --git a/src/imports/config.json b/src/imports/config.json index 1314663..cec571a 100644 --- a/src/imports/config.json +++ b/src/imports/config.json @@ -95,11 +95,11 @@ "nfo_header": 1, "hidden_dirs": 1, "hidden_files": 1, + "long_filenames": 1, "extension_colon": 1, "date_time": 1, "load_address": 1, "sys_address": 1, - "entry_length": 16, "footer_bytes": 1 }, "fastloaders": {