Hi everyone,
I’m currently deep into building a Commodore PLUS 4 replica. To keep the simulation speed at a playable level, I’ve moved away from building basic gates (OR, NOT, XOR, etc.) out of NAND sub-circuits. Instead, I’ve implemented them as native C# components within the DLS source code.
I have a large existing project folder where all the logic is already wired using sub-circuits (the standard .json format where a “Gate” is a collection of NANDs). My new native C# gates, while functionally identical, are seen as different entities by the simulator.
I’m looking for a way to “transpile” or convert my existing project JSON so that:
-
References to the old NAND-based sub-circuits are replaced with my new native C# components.
-
All existing wiring (connections) remains intact.
The way DLS saves sub-circuits vs. native components seems to differ in terms of componentName and how pins are indexed.
Doing replacement manually in the editor for a real CPU-scale project is impossible.
Has anyone developed a script or a tool to Batch-Replace components in DLS project files? Or perhaps someone has found a way to “alias” a sub-circuit so the engine treats it as a native script during the simulation update loop?
I’m currently considering writing a Python script to parse and edit the JSON directly, but I’m worried about breaking the internal GUIDs or pin mapping. Any insights or similar experiences would be greatly appreciated!
Best regards, Pietrek
