From 3da4d8afc35cfbdc5115e3ab6d3a37be138fb8d1 Mon Sep 17 00:00:00 2001 From: Jaime Idolpx Date: Tue, 9 Jun 2026 05:22:49 -0400 Subject: [PATCH] feat(IECPage, config): add VDrive mode toggle and update ROM settings in config --- src/app/components/IECPage.tsx | 78 ++++++++++++++++++++++++++++++++++ src/imports/config.json | 16 +++---- 2 files changed, 86 insertions(+), 8 deletions(-) diff --git a/src/app/components/IECPage.tsx b/src/app/components/IECPage.tsx index c610ec3..ab19375 100644 --- a/src/app/components/IECPage.tsx +++ b/src/app/components/IECPage.tsx @@ -9,6 +9,7 @@ interface IECPageProps { export default function IECPage({ config, setConfig }: IECPageProps) { const [showMediaBrowser, setShowMediaBrowser] = useState(false); + const [driveRomBrowsingKey, setDriveRomBrowsingKey] = useState(null); const updateSetting = (path: string[], value: any) => { const newConfig = JSON.parse(JSON.stringify(config)); let current = newConfig; @@ -60,6 +61,22 @@ export default function IECPage({ config, setConfig }: IECPageProps) { +
+ + +
+
@@ -91,6 +108,67 @@ export default function IECPage({ config, setConfig }: IECPageProps) { )}
+

Drive ROM

+ +
+
+ + +
+ {(['default', 'd64', 'd71', 'd81'] as const).map((key) => ( +
+ +
+ updateSetting(['iec', 'drive_rom', key], e.target.value)} + className="flex-1 px-3 py-2 border border-neutral-300 rounded-lg" + /> + +
+
+ ))} +
+ + {driveRomBrowsingKey && ( + { + updateSetting(['iec', 'drive_rom', driveRomBrowsingKey], path); + setDriveRomBrowsingKey(null); + }} + onClose={() => setDriveRomBrowsingKey(null)} + /> + )} +

Directory Settings

diff --git a/src/imports/config.json b/src/imports/config.json index 8b17262..2b9a176 100644 --- a/src/imports/config.json +++ b/src/imports/config.json @@ -80,7 +80,15 @@ "iec": { "enabled": 1, "vic20_mode": 0, + "vdrive": 0, "boot_disk": "/autoboot[.PRG|.D64|.D81|etc]", + "rom": { + "enabled": 1, + "default": "dos1541|dos1541.jd|dos1541ii|dos1541ii.jd|dos1571|dos1571.jd|dos1581|dos1581.jd", + "d64": "dos1541|dos1541.jd|dos1541ii|dos1541ii.jd", + "d71": "dos1571|dos1571.jd", + "d81": "dos1581|dos1581.jd" + }, "directory": { "force_0801": 1, "nfo_header": 1, @@ -137,14 +145,6 @@ } }, "drive": { - "vdrive": 0, - "rom": { - "auto": 1, - "default": "dos1541|dos1541.jd|dos1541ii|dos1541ii.jd|dos1571|dos1571.jd|dos1581|dos1581.jd", - "d64": "dos1541|dos1541.jd|dos1541ii|dos1541ii.jd", - "d71": "dos1571|dos1571.jd", - "d81": "dos1581|dos1581.jd" - }, "8": { "enabled": 1, "url": "/sd",