From e72273e57fbfcb32629aa81c56f4c31c400709c9 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Thu, 17 Apr 2025 00:01:12 +0300 Subject: [PATCH 001/124] added HEX display mode to ROM and pins --- .../Description/Types/SubTypes/PinDescription.cs | 3 ++- Assets/Scripts/Game/Elements/DevPinInstance.cs | 8 ++++++++ Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs | 3 ++- Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs | 12 ++++++++++-- Assets/Scripts/Graphics/World/DevSceneDrawer.cs | 16 +++++++++++++++- 5 files changed, 37 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs index 8f8c4cbf..766e7e33 100644 --- a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs @@ -44,6 +44,7 @@ public enum PinValueDisplayMode { Off, UnsignedDecimal, - SignedDecimal + SignedDecimal, + HEX, } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/DevPinInstance.cs b/Assets/Scripts/Game/Elements/DevPinInstance.cs index a0f2fd8d..b8b55292 100644 --- a/Assets/Scripts/Game/Elements/DevPinInstance.cs +++ b/Assets/Scripts/Game/Elements/DevPinInstance.cs @@ -98,6 +98,14 @@ public int GetStateDecimalDisplayValue() return displayValue; } + public string GetStateHexadecimalDisplayValue() + { + uint rawValue = Pin.State.GetRawBits(); + string displayValue = rawValue.ToString($"X"); + + return displayValue; + } + Bounds2D CreateBoundingBox(float pad) { diff --git a/Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs b/Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs index 9cadb381..2420d259 100644 --- a/Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs @@ -25,7 +25,8 @@ public static class PinEditMenu { "Off", "Unsigned", - "Signed" + "Signed", + "HEX", }; public static void OnMenuOpened() diff --git a/Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs b/Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs index 8a316482..60c6b712 100644 --- a/Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs @@ -27,7 +27,8 @@ public static class RomEditMenu { "Unsigned Decimal", "Signed Decimal", - "Binary" + "Binary", + "HEX" }; static DataDisplayMode[] allDisplayModes; @@ -203,6 +204,7 @@ static bool ValidateInputString(string text) if (dataDisplayMode == DataDisplayMode.Binary && c is not ('0' or '1')) return false; if (c == '-') continue; // allow negative sign (even in unsigned field as we'll do automatic conversion) + if (dataDisplayMode == DataDisplayMode.HEX && Uri.IsHexDigit(c)) continue; if (!char.IsDigit(c)) return false; } @@ -217,6 +219,7 @@ static string UIntToDisplayString(uint raw, DataDisplayMode displayFormat, int b DataDisplayMode.Binary => Convert.ToString(raw, 2).PadLeft(bitCount, '0'), DataDisplayMode.DecimalSigned => Maths.TwosComplement(raw, bitCount) + "", DataDisplayMode.DecimalUnsigned => raw + "", + DataDisplayMode.HEX => raw.ToString("X").PadLeft(bitCount / 4, '0'), _ => throw new NotImplementedException("Unsupported display format: " + displayFormat) }; } @@ -250,6 +253,10 @@ static uint DisplayStringToUInt(string displayString, DataDisplayMode stringForm case DataDisplayMode.DecimalUnsigned: uintVal = uint.Parse(displayString); break; + case DataDisplayMode.HEX: + int value = Convert.ToInt32(displayString, 16); + uintVal = (uint)value; + break; default: throw new NotImplementedException("Unsupported display format: " + stringFormat); } @@ -367,7 +374,8 @@ enum DataDisplayMode { DecimalUnsigned, DecimalSigned, - Binary + Binary, + HEX } } } \ No newline at end of file diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 7c7981fe..4f50fb83 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -215,8 +215,22 @@ public static void DrawSubChipLabel(SubChipInstance chip) public static void DrawPinDecValue(DevPinInstance pin) { if (pin.pinValueDisplayMode == PinValueDisplayMode.Off) return; + + int charCount; + + if (pin.pinValueDisplayMode != PinValueDisplayMode.HEX) + { + charCount = StringHelper.CreateIntegerStringNonAlloc(pin.decimalDisplayCharBuffer, pin.GetStateDecimalDisplayValue()); + } + + else + { + char[] chars = pin.GetStateHexadecimalDisplayValue().ToCharArray(); + for (int i = 0; i < chars.Length; i++) + pin.decimalDisplayCharBuffer[i] = chars[i]; - int charCount = StringHelper.CreateIntegerStringNonAlloc(pin.decimalDisplayCharBuffer, pin.GetStateDecimalDisplayValue()); + charCount = chars.Length; + } FontType font = FontBold; Bounds2D parentBounds = pin.BoundingBox; From 10bcad0e5b18eaa9896127660238ef1d6a8aee26 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Thu, 17 Apr 2025 20:01:33 +0300 Subject: [PATCH 002/124] Added notes instance --- .DS_Store | Bin 0 -> 6148 bytes Assets/Scripts/Game/Elements/NoteInstance.cs | 71 ++++++++++++++++++ .../Game/Elements/NoteInstance.cs.meta | 2 + .../Interaction/ChipInteractionController.cs | 2 + .../Scripts/Game/Project/DevChipInstance.cs | 13 +++- Assets/Scripts/Game/Project/Project.cs | 14 ++++ .../Scripts/Graphics/UI/Menus/BottomBarUI.cs | 14 +++- .../Scripts/Graphics/UI/Menus/ContextMenu.cs | 15 +++- .../Scripts/Graphics/World/DevSceneDrawer.cs | 31 +++++++- 9 files changed, 156 insertions(+), 6 deletions(-) create mode 100644 .DS_Store create mode 100644 Assets/Scripts/Game/Elements/NoteInstance.cs create mode 100644 Assets/Scripts/Game/Elements/NoteInstance.cs.meta diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..405934cd8de24ec074ab334a986456a8070aea37 GIT binary patch literal 6148 zcmeHK%}T>S5Z-O8-BN@e6nb3nTCi%>7B8XJ7cfN+Dm5WNgE3p0)E-J9XMG``#OHBl zcLSF8;7P>Jz~-BspWU4gvOkP5-k%1Cj5Qcz0vaMmWsRVDt*c~%5xE{?z&w^Q&!45^ zH3R)c6RusbAq!awEC05BKUO~YKKyYUrCGcE$xG$R)^=4?MP1yxPip37UN%kp-sBd0 zL#1NB&^`Y;3TLCn?uAM+FG|9RPKbgKLhf#&Bv7-ynkGT2b6w*QHBlQin)CV5Nv|c3 z+ucP=&UA^iFz|+a^PLdj>Q7rL0PHm)tw}lM16Bgrb>wcV&I1i;QksJE!~iky&lup9fjj6!QTA+IDG$$D3GD$I3dZHAfPlVq34jjnBTelz ceu+B7ITmw+I11WzIv`yHG$HgM27ZBoFFSBdZU6uP literal 0 HcmV?d00001 diff --git a/Assets/Scripts/Game/Elements/NoteInstance.cs b/Assets/Scripts/Game/Elements/NoteInstance.cs new file mode 100644 index 00000000..236bc15c --- /dev/null +++ b/Assets/Scripts/Game/Elements/NoteInstance.cs @@ -0,0 +1,71 @@ +using System; +using DLS.Graphics; +using Seb.Helpers; +using Seb.Types; +using UnityEngine; +using static DLS.Graphics.DrawSettings; + +namespace DLS.Game +{ + public class NoteInstance : IMoveable + { + // Position of the note in the simulation + public Vector2 Position { get; set; } + + // Position when the move operation started + public Vector2 MoveStartPosition { get; set; } + + // Reference point for straight-line movement + public Vector2 StraightLineReferencePoint { get; set; } + + // Indicates if a reference point for straight-line movement exists + public bool HasReferencePointForStraightLineMovement { get; set; } + + // Indicates if the note is currently selected + public bool IsSelected { get; set; } + + // Indicates if the current position is valid for movement + public bool IsValidMovePos { get; set; } + + // Snap point for grid alignment (can be overridden if needed) + public virtual Vector2 SnapPoint => Position; + + // Bounding box for selection + + // Bounding box for the note + public Bounds2D BoundingBox => Bounds2D.CreateFromCentreAndSize(Position + new Vector2(Width / 2, Height / 2), new Vector2(Width, Height)); + public virtual Bounds2D SelectionBoundingBox => Bounds2D.CreateFromCentreAndSize(Position + new Vector2(Width / 2, Height / 2), new Vector2(Width + DrawSettings.ChipOutlineWidth + DrawSettings.SelectionBoundsPadding, Height + DrawSettings.ChipOutlineWidth + DrawSettings.SelectionBoundsPadding)); + + // Unique identifier for the note + public int ID { get; private set; } + + // Text content of the note + public string Text { get; set; } + + // Dimensions of the note + public float Width { get; set; } + public float Height { get; set; } + + // Constructor + public NoteInstance(int id, Vector2 position, string text, float width = 100, float height = 50) + { + ID = id; + Position = position; + Text = text; + Width = width; + Height = height; + IsSelected = false; + IsValidMovePos = true; + } + + // Determines if the note should be included in a selection box + public bool ShouldBeIncludedInSelectionBox(Vector2 selectionCentre, Vector2 selectionSize) + { + var halfSelectionSize = selectionSize / 2; + var halfNoteSize = new Vector2(Width, Height) / 2; + + return Math.Abs(Position.x - selectionCentre.x) <= (halfSelectionSize.x + halfNoteSize.x) && + Math.Abs(Position.y - selectionCentre.y) <= (halfSelectionSize.y + halfNoteSize.y); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/NoteInstance.cs.meta b/Assets/Scripts/Game/Elements/NoteInstance.cs.meta new file mode 100644 index 00000000..3c7713f4 --- /dev/null +++ b/Assets/Scripts/Game/Elements/NoteInstance.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 638b89b0327cd46ff903e71b095bc4dd \ No newline at end of file diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index 868f29a9..a2696bc6 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -315,6 +315,7 @@ public void Select(IMoveable element, bool addToCurrentSelection = true) { element.IsSelected = false; SelectedElements.Remove(element); + Debug.Log($"Deselected element: {element.GetType().Name}, ID: {element.ID}"); } } else @@ -327,6 +328,7 @@ public void Select(IMoveable element, bool addToCurrentSelection = true) SelectedElements.Add(element); element.IsSelected = true; element.IsValidMovePos = true; + Debug.Log($"Selected element: {element.GetType().Name}, ID: {element.ID}"); } } diff --git a/Assets/Scripts/Game/Project/DevChipInstance.cs b/Assets/Scripts/Game/Project/DevChipInstance.cs index e5c36a3c..6c255fd3 100644 --- a/Assets/Scripts/Game/Project/DevChipInstance.cs +++ b/Assets/Scripts/Game/Project/DevChipInstance.cs @@ -16,6 +16,7 @@ public class DevChipInstance public SimChip SimChip; bool hasSimChip; public readonly List Wires = new(); + private List Notes = new(); bool elementsModifiedSinceLastArrayUpdate; DevPinInstance[] inputPins_cached = Array.Empty(); @@ -217,6 +218,17 @@ public void AddWire(WireInstance wire, bool isLoading) } } + public void AddNote(NoteInstance note, bool isLoading) + { + AddElement(note); + Notes.Add(note); + } + + public NoteInstance[] GetNotes() + { + return Notes.ToArray(); + } + void AddElement(IMoveable element) { Elements.Add(element); @@ -229,7 +241,6 @@ void RemoveElement(IMoveable element) elementsModifiedSinceLastArrayUpdate = true; } - public void DeleteDevPin(DevPinInstance devPin) { DeleteWiresAttachedToPin(devPin.Pin); diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index 51e0dfe8..1a397c48 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -177,6 +177,7 @@ public void CreateBlankDevChip() SetNewActiveDevChip(devChip); } + public void LoadDevChipOrCreateNewIfDoesntExist(string chipName) { if (chipLibrary.TryGetChipDescription(chipName, out ChipDescription description)) @@ -312,6 +313,19 @@ void SearchRecursive(ChipDescription desc) } } + public NoteInstance CreateBlankNote(Vector2 position, string text, float width = 2f, float height = 2f) + { + // Generate a unique ID for the note + // Create a new NoteInstance + NoteInstance newNote = new NoteInstance(IDGenerator.GenerateNewElementID(editModeChip), position, text, width, height); + + // Add the note to the list + editModeChip.AddNote(newNote, true); + + // Return the created note + return newNote; + } + // Must be called prior to library being updated with the change // If deleting, new description can be left null void UpdateAndSaveAffectedChips(ChipDescription root_desc, ChipDescription root_descNew, bool willDelete) diff --git a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs index c6af99dd..3943c755 100644 --- a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs +++ b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs @@ -19,9 +19,10 @@ public static class BottomBarUI const int NewChipButtonIndex = 0; const int SaveChipButtonIndex = 1; const int FindChipButtonIndex = 2; - const int LibraryButtonIndex = 3; - const int OptionsButtonIndex = 4; - const int QuitButtonIndex = 5; + const int NewNoteButtonIndex = 3; + const int LibraryButtonIndex = 4; + const int OptionsButtonIndex = 5; + const int QuitButtonIndex = 6; const string c = ""; @@ -30,6 +31,7 @@ public static class BottomBarUI $"NEW CHIP {c}Ctrl+N", $"SAVE CHIP {c}Ctrl+S", $"FIND CHIP {c}Ctrl+F", + $"NEW NOTE {c}Ctrl+O", $"LIBRARY {c}Ctrl+L", $"PREFS {c}Ctrl+P", $"QUIT {c}Ctrl+Q" @@ -110,6 +112,7 @@ void ButtonPressed(int i) if (i == NewChipButtonIndex) CreateNewChip(); else if (i == SaveChipButtonIndex) OpenSaveMenu(); else if (i == FindChipButtonIndex) OpenSearchMenu(); + else if (i == NewNoteButtonIndex) CreateNewNote(); else if (i == LibraryButtonIndex) OpenLibraryMenu(); else if (i == OptionsButtonIndex) OpenPreferencesMenu(); else if (i == QuitButtonIndex) ExitToMainMenu(); @@ -361,6 +364,11 @@ static void ConfirmNewChip(bool confirm) } } + static void CreateNewNote() + { + Project.ActiveProject.CreateBlankNote(Vector2.zero, "Text"); + } + static void HandleKeyboardShortcuts() { if (MenuButtonsAndShortcutsEnabled) diff --git a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs index 1001dce2..d4c50a51 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs @@ -89,6 +89,12 @@ public static class ContextMenu new(Format("DELETE"), Delete, CanDelete) }; + static readonly MenuEntry[] entries_note = + { + new(Format("EDIT"), EditWire, CanEditWire), + new(Format("DELETE"), Delete, CanDelete) + }; + static readonly MenuEntry[] entries_bottomBarChip = { openChipEntry, @@ -148,8 +154,9 @@ static void HandleOpenMenuInput() bool openDevPinContextMenu = (hoverElement is PinInstance pin && pin.parent is DevPinInstance) || hoverElement is DevPinInstance; bool openWireContextMenu = hoverElement is WireInstance; bool openSubchipOutputPinContextMenu = hoverElement is PinInstance pin2 && pin2.parent is SubChipInstance && pin2.IsSourcePin && !pin2.IsBusPin; + bool openNoteContextMenu = hoverElement is NoteInstance; - if (openSubChipContextMenu || openDevPinContextMenu || openWireContextMenu || openSubchipOutputPinContextMenu) + if (openSubChipContextMenu || openDevPinContextMenu || openWireContextMenu || openSubchipOutputPinContextMenu || openNoteContextMenu) { interactionContextName = string.Empty; interactionContext = hoverElement; @@ -200,6 +207,12 @@ static void HandleOpenMenuInput() headerName = CreatePinHeaderName(pinContext.Name); activeContextMenuEntries = entries_subChipOutput; } + else if (openNoteContextMenu) + { + NoteInstance note = (NoteInstance)interactionContext; + headerName = "NOTE"; + activeContextMenuEntries = entries_note; + } SetContextMenuOpen(headerName); } diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 4f50fb83..7d047d7e 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -53,6 +53,11 @@ public static void DrawActiveScene() { Draw.Quad(controller.SelectionBoxCentre, controller.SelectionBoxSize, ActiveTheme.SelectionBoxCol); } + + // foreach (var note in Project.ActiveProject.editModeChip.GetNotes()) + // { + // DrawNote(note); + // } } static void DrawWires() @@ -145,6 +150,9 @@ static void DrawMoveableElements(bool drawSelectedOnly) DrawSubChip(subchip, sim); break; } + case NoteInstance note: + DrawNote(note); + break; } } @@ -197,6 +205,27 @@ public static void DrawPinLabel(PinInstance pin) Draw.Text(font, text, FontSizePinLabel, centre, Anchor.TextFirstLineCentre, Color.white); } + public static void DrawNote(NoteInstance note) + { + Vector2 centre = note.Position + new Vector2(note.Width / 2, note.Height / 2); + Vector2 size = new Vector2(note.Width, note.Height); + Color col = new Color(0.6f, 0.2f, 0.16f, 0.17f); + // Highlight if selected + // Color backgroundColor = note.IsSelected ? ActiveTheme.NoteSelectedBackgroundCol : ActiveTheme.NoteBackgroundCol; + + Draw.Quad(centre, size + Vector2.one * ChipOutlineWidth, GetChipOutlineCol(col)); + Draw.Quad(centre, size, col); + + // Draw.Quad(centre, size, backgroundColor); + Draw.Text(FontBold, note.Text, FontSizePinLabel, centre, Anchor.TextCentre, Color.white); + + if (InputHelper.MouseInsideBounds_World(centre, size)) + { + InteractionState.NotifyElementUnderMouse(note); + } + + } + public static void DrawSubChipLabel(SubChipInstance chip) { string text = chip.Label; @@ -222,7 +251,7 @@ public static void DrawPinDecValue(DevPinInstance pin) { charCount = StringHelper.CreateIntegerStringNonAlloc(pin.decimalDisplayCharBuffer, pin.GetStateDecimalDisplayValue()); } - + else { char[] chars = pin.GetStateHexadecimalDisplayValue().ToCharArray(); From 17628904fc7db13e74af0c5a9541a21d9165db97 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Thu, 17 Apr 2025 20:19:05 +0300 Subject: [PATCH 003/124] Removed HEX display --- .../Description/Types/SubTypes/PinDescription.cs | 3 +-- Assets/Scripts/Game/Elements/DevPinInstance.cs | 9 --------- Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs | 3 +-- Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs | 12 ++---------- Assets/Scripts/Graphics/World/DevSceneDrawer.cs | 16 +--------------- 5 files changed, 5 insertions(+), 38 deletions(-) diff --git a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs index 766e7e33..8f8c4cbf 100644 --- a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs @@ -44,7 +44,6 @@ public enum PinValueDisplayMode { Off, UnsignedDecimal, - SignedDecimal, - HEX, + SignedDecimal } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/DevPinInstance.cs b/Assets/Scripts/Game/Elements/DevPinInstance.cs index b8b55292..e71ff55c 100644 --- a/Assets/Scripts/Game/Elements/DevPinInstance.cs +++ b/Assets/Scripts/Game/Elements/DevPinInstance.cs @@ -98,15 +98,6 @@ public int GetStateDecimalDisplayValue() return displayValue; } - public string GetStateHexadecimalDisplayValue() - { - uint rawValue = Pin.State.GetRawBits(); - string displayValue = rawValue.ToString($"X"); - - return displayValue; - } - - Bounds2D CreateBoundingBox(float pad) { float x1 = HandlePosition.x - faceDir.x * DevPinHandleWidth / 2; diff --git a/Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs b/Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs index 2420d259..9cadb381 100644 --- a/Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/PinEditMenu.cs @@ -25,8 +25,7 @@ public static class PinEditMenu { "Off", "Unsigned", - "Signed", - "HEX", + "Signed" }; public static void OnMenuOpened() diff --git a/Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs b/Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs index 60c6b712..8a316482 100644 --- a/Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/RomEditMenu.cs @@ -27,8 +27,7 @@ public static class RomEditMenu { "Unsigned Decimal", "Signed Decimal", - "Binary", - "HEX" + "Binary" }; static DataDisplayMode[] allDisplayModes; @@ -204,7 +203,6 @@ static bool ValidateInputString(string text) if (dataDisplayMode == DataDisplayMode.Binary && c is not ('0' or '1')) return false; if (c == '-') continue; // allow negative sign (even in unsigned field as we'll do automatic conversion) - if (dataDisplayMode == DataDisplayMode.HEX && Uri.IsHexDigit(c)) continue; if (!char.IsDigit(c)) return false; } @@ -219,7 +217,6 @@ static string UIntToDisplayString(uint raw, DataDisplayMode displayFormat, int b DataDisplayMode.Binary => Convert.ToString(raw, 2).PadLeft(bitCount, '0'), DataDisplayMode.DecimalSigned => Maths.TwosComplement(raw, bitCount) + "", DataDisplayMode.DecimalUnsigned => raw + "", - DataDisplayMode.HEX => raw.ToString("X").PadLeft(bitCount / 4, '0'), _ => throw new NotImplementedException("Unsupported display format: " + displayFormat) }; } @@ -253,10 +250,6 @@ static uint DisplayStringToUInt(string displayString, DataDisplayMode stringForm case DataDisplayMode.DecimalUnsigned: uintVal = uint.Parse(displayString); break; - case DataDisplayMode.HEX: - int value = Convert.ToInt32(displayString, 16); - uintVal = (uint)value; - break; default: throw new NotImplementedException("Unsupported display format: " + stringFormat); } @@ -374,8 +367,7 @@ enum DataDisplayMode { DecimalUnsigned, DecimalSigned, - Binary, - HEX + Binary } } } \ No newline at end of file diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index e274bcbc..73ceb8aa 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -250,21 +250,7 @@ public static void DrawPinDecValue(DevPinInstance pin) { if (pin.pinValueDisplayMode == PinValueDisplayMode.Off) return; - int charCount; - - if (pin.pinValueDisplayMode != PinValueDisplayMode.HEX) - { - charCount = StringHelper.CreateIntegerStringNonAlloc(pin.decimalDisplayCharBuffer, pin.GetStateDecimalDisplayValue()); - } - - else - { - char[] chars = pin.GetStateHexadecimalDisplayValue().ToCharArray(); - for (int i = 0; i < chars.Length; i++) - pin.decimalDisplayCharBuffer[i] = chars[i]; - - charCount = chars.Length; - } + int charCount = StringHelper.CreateIntegerStringNonAlloc(pin.decimalDisplayCharBuffer, pin.GetStateDecimalDisplayValue()); FontType font = FontBold; Bounds2D parentBounds = pin.BoundingBox; From 65866eed48ce84dc8a6a893583c90fbe3b553813 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Thu, 17 Apr 2025 22:48:08 +0300 Subject: [PATCH 004/124] Added note text poppup --- .../Scripts/Graphics/UI/Menus/ContextMenu.cs | 7 +- .../Scripts/Graphics/UI/Menus/NoteTextMenu.cs | 77 +++++++++++++++++++ .../Graphics/UI/Menus/NoteTextMenu.cs.meta | 2 + Assets/Scripts/Graphics/UI/UIDrawer.cs | 5 +- 4 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs create mode 100644 Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs.meta diff --git a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs index d4c50a51..c4c681d5 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs @@ -91,7 +91,7 @@ public static class ContextMenu static readonly MenuEntry[] entries_note = { - new(Format("EDIT"), EditWire, CanEditWire), + new(Format("EDIT"), OpenNoteTextPopup, CanEditCurrentChip), new(Format("DELETE"), Delete, CanDelete) }; @@ -359,6 +359,11 @@ static void OpenChipLabelPopup() UIDrawer.SetActiveMenu(UIDrawer.MenuType.ChipLabelPopup); } + static void OpenNoteTextPopup() + { + UIDrawer.SetActiveMenu(UIDrawer.MenuType.NoteTextPopup); + } + public static void EditWire() { Project.ActiveProject.controller.EnterWireEditMode((WireInstance)interactionContext); diff --git a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs new file mode 100644 index 00000000..602bbd72 --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs @@ -0,0 +1,77 @@ +using DLS.Game; +using Seb.Types; +using Seb.Vis; +using Seb.Vis.UI; +using UnityEngine; + +namespace DLS.Graphics +{ + public static class NoteTextMenu + { + const string MaxLabelLength = "MY LONG LABEL TEXT"; + static NoteInstance note; + static readonly UIHandle ID_NameField = new("NoteTextMenu_NameField"); + + static readonly string[] CancelConfirmButtonNames = + { + "CANCEL", "CONFIRM" + }; + + static readonly bool[] ButtonGroupInteractStates = { true, true }; + + public static void OnMenuOpened() + { + note = (NoteInstance)ContextMenu.interactionContext; + + InputFieldState inputFieldState = UI.GetInputFieldState(ID_NameField); + inputFieldState.SetText(note.Text); + inputFieldState.SelectAll(); + } + + public static void DrawMenu() + { + UI.DrawFullscreenPanel(DrawSettings.ActiveUITheme.MenuBackgroundOverlayCol); + float spacing = 0.8f; + + DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; + InputFieldTheme inputTheme = DrawSettings.ActiveUITheme.ChipNameInputField; + Draw.ID panelID = UI.ReservePanel(); + + using (UI.BeginBoundsScope(true)) + { + Vector2 unpaddedSize = Draw.CalculateTextBoundsSize(MaxLabelLength, inputTheme.fontSize, inputTheme.font); + const float padX = 2.25f; + Vector2 inputFieldSize = unpaddedSize + new Vector2(padX, 2.25f); + Vector2 pos = UI.Centre + Vector2.up * 5; + + // Draw input field + InputFieldState inputFieldState = UI.InputField(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, ValidateNameInput, true); + Bounds2D inputFieldBounds = UI.PrevBounds; + string newName = inputFieldState.text; + + // Draw cancel/confirm buttons + Vector2 buttonsTopLeft = UI.PrevBounds.BottomLeft + Vector2.down * spacing; + int buttonIndex = UI.HorizontalButtonGroup(CancelConfirmButtonNames, ButtonGroupInteractStates, theme.ButtonTheme, buttonsTopLeft, inputFieldBounds.Width, DrawSettings.DefaultButtonSpacing, 0, Anchor.TopLeft); + + MenuHelper.DrawReservedMenuPanel(panelID, UI.GetCurrentBoundsScope()); + + // Keyboard shortcuts and UI input + if (KeyboardShortcuts.CancelShortcutTriggered || buttonIndex == 0) Cancel(); + else if (KeyboardShortcuts.ConfirmShortcutTriggered || buttonIndex == 1) Confirm(newName); + } + } + + static void Confirm(string newName) + { + note.Text = newName; + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + + static void Cancel() + { + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + + static bool ValidateNameInput(string name) => name.Length <= MaxLabelLength.Length; + } +} \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs.meta b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs.meta new file mode 100644 index 00000000..56cdef6a --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 2b32928726c1a4f50aee89e2e60ac14a \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/UIDrawer.cs b/Assets/Scripts/Graphics/UI/UIDrawer.cs index e13c4893..d53cc1f3 100644 --- a/Assets/Scripts/Graphics/UI/UIDrawer.cs +++ b/Assets/Scripts/Graphics/UI/UIDrawer.cs @@ -19,7 +19,8 @@ public enum MenuType RomEdit, UnsavedChanges, Search, - ChipLabelPopup + ChipLabelPopup, + NoteTextPopup } static MenuType activeMenuOld; @@ -66,6 +67,7 @@ static void DrawProjectMenus(Project project) else if (menuToDraw == MenuType.UnsavedChanges) UnsavedChangesPopup.DrawMenu(); else if (menuToDraw == MenuType.Search) SearchPopup.DrawMenu(); else if (menuToDraw == MenuType.ChipLabelPopup) ChipLabelMenu.DrawMenu(); + else if (menuToDraw == MenuType.NoteTextPopup) NoteTextMenu.DrawMenu(); else { bool showSimPausedBanner = project.simPaused; @@ -95,6 +97,7 @@ static void NotifyIfActiveMenuChanged() else if (ActiveMenu == MenuType.RomEdit) RomEditMenu.OnMenuOpened(); else if (ActiveMenu == MenuType.Search) SearchPopup.OnMenuOpened(); else if (ActiveMenu == MenuType.ChipLabelPopup) ChipLabelMenu.OnMenuOpened(); + else if (ActiveMenu == MenuType.NoteTextPopup) NoteTextMenu.OnMenuOpened(); if (InInputBlockingMenu() && Project.ActiveProject != null && Project.ActiveProject.controller != null) { From 3accc6cf3f0f0f858d565c2ed2f8017dbde9b09c Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 13:31:35 +0300 Subject: [PATCH 005/124] Added textArea --- .../Types/SubTypes/NoteDescription.cs | 22 ++ .../Scripts/Graphics/UI/Menus/NoteTextMenu.cs | 8 +- Assets/Scripts/Seb/SebVis/UI/UI.cs | 220 ++++++++++++++++++ Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 37 +++ 4 files changed, 283 insertions(+), 4 deletions(-) create mode 100644 Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs diff --git a/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs b/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs new file mode 100644 index 00000000..fbf5a60f --- /dev/null +++ b/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs @@ -0,0 +1,22 @@ +using UnityEngine; + +namespace DLS.Description +{ + public class NoteDescription + { + public string Name; + public Vector2 Size; + public Color Colour; + public string Content; // Text content of the note + public Vector2 Position; + + public NoteDescription(string name, Vector2 size, Color colour, string content, Vector2 position) + { + Name = name; + Size = size; + Colour = colour; + Content = content; + Position = position; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs index 602bbd72..5a9825a8 100644 --- a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs @@ -8,7 +8,7 @@ namespace DLS.Graphics { public static class NoteTextMenu { - const string MaxLabelLength = "MY LONG LABEL TEXT"; + const string MaxLabelLength = "MY REAL LONG LABEL TEXT"; static NoteInstance note; static readonly UIHandle ID_NameField = new("NoteTextMenu_NameField"); @@ -41,11 +41,11 @@ public static void DrawMenu() { Vector2 unpaddedSize = Draw.CalculateTextBoundsSize(MaxLabelLength, inputTheme.fontSize, inputTheme.font); const float padX = 2.25f; - Vector2 inputFieldSize = unpaddedSize + new Vector2(padX, 2.25f); + Vector2 inputFieldSize = unpaddedSize + new Vector2(padX, 26f); Vector2 pos = UI.Centre + Vector2.up * 5; // Draw input field - InputFieldState inputFieldState = UI.InputField(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, ValidateNameInput, true); + InputFieldState inputFieldState = UI.TextArea(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, null, true); Bounds2D inputFieldBounds = UI.PrevBounds; string newName = inputFieldState.text; @@ -57,7 +57,7 @@ public static void DrawMenu() // Keyboard shortcuts and UI input if (KeyboardShortcuts.CancelShortcutTriggered || buttonIndex == 0) Cancel(); - else if (KeyboardShortcuts.ConfirmShortcutTriggered || buttonIndex == 1) Confirm(newName); + else if (buttonIndex == 1) Confirm(newName); } } diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index 47fedf91..a576478b 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -536,6 +536,226 @@ int CharIndexBeforeMouse(float textLeft) } } + public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vector2 pos, Vector2 size, string defaultText, Anchor anchor, float textPad, Func validation = null, bool forceFocus = false) + { + InputFieldState state = GetInputFieldState(id); + + Vector2 centre = CalculateCentre(pos, size, anchor); + (Vector2 centre, Vector2 size) ss = UIToScreenSpace(centre, size); + + if (IsRendering) + { + Vector2 textTopLeft_ss = ss.centre - new Vector2(ss.size.x / 2 - textPad * scale, -ss.size.y / 2 + textPad * 2 * scale); + Draw.Quad(ss.centre, ss.size, theme.bgCol); + + // Focus input + bool mouseInBounds = InputHelper.MouseInBounds_ScreenSpace(ss.centre, ss.size); + + if (InputHelper.IsMouseDownThisFrame(MouseButton.Left)) + { + state.SetFocus(mouseInBounds); + state.isMouseDownInBounds = mouseInBounds; + + // Set caret pos based on mouse position + if (mouseInBounds) state.SetCursorIndex(CharIndexBeforeMouse(textTopLeft_ss.x), InputHelper.ShiftIsHeld); + } + + // Hold-drag left mouse to select + if (state.focused && InputHelper.IsMouseHeld(MouseButton.Left) && state.isMouseDownInBounds) + { + state.SetCursorIndex(CharIndexBeforeMouse(textTopLeft_ss.x), true); + } + + if (forceFocus && !state.focused) + { + state.SetFocus(true); + } + + // Draw focus outline and update text + if (state.focused) + { + const float outlineWidth = 0.05f; + Draw.QuadOutline(ss.centre, ss.size, outlineWidth * scale, theme.focusBorderCol); + foreach (char c in InputHelper.InputStringThisFrame) + { + bool invalidChar = char.IsControl(c) || char.IsSurrogate(c) || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.Format || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.PrivateUse; + if (invalidChar) continue; + state.TryInsertText(c + "", validation); + } + + // Paste from clipboard + if (InputHelper.CtrlIsHeld && InputHelper.IsKeyDownThisFrame(KeyCode.V)) + { + state.TryInsertText(InputHelper.GetClipboardContents(), validation); + } + + if (state.text.Length > 0) + { + // Backspace / delete + if (CanTrigger(ref state.backspaceTrigger, KeyCode.Backspace)) + { + int charDeleteCount = InputHelper.CtrlIsHeld ? state.text.Length : 1; // delete all if ctrl is held + for (int i = 0; i < charDeleteCount; i++) + { + state.Delete(true, validation); + } + } + else if (CanTrigger(ref state.deleteTrigger, KeyCode.Delete)) + { + state.Delete(false, validation); + } + if (InputHelper.IsKeyDownThisFrame(KeyCode.Return)) + { + state.NewLine(); + } + + // Arrow keys + bool select = InputHelper.ShiftIsHeld; + bool leftArrow = CanTrigger(ref state.arrowKeyTrigger, KeyCode.LeftArrow); + bool rightArrow = CanTrigger(ref state.arrowKeyTrigger, KeyCode.RightArrow); + bool jumpToPrevWordStart = InputHelper.CtrlIsHeld && leftArrow; + bool jumpToNextWordEnd = InputHelper.CtrlIsHeld && rightArrow; + bool jumpToStart = InputHelper.IsKeyDownThisFrame(KeyCode.UpArrow) || InputHelper.IsKeyDownThisFrame(KeyCode.PageUp) || InputHelper.IsKeyDownThisFrame(KeyCode.Home) || (jumpToPrevWordStart && InputHelper.AltIsHeld); + bool jumpToEnd = InputHelper.IsKeyDownThisFrame(KeyCode.DownArrow) || InputHelper.IsKeyDownThisFrame(KeyCode.PageDown) || InputHelper.IsKeyDownThisFrame(KeyCode.End) || (jumpToNextWordEnd && InputHelper.AltIsHeld); + + if (jumpToStart) state.SetCursorIndex(0, select); + else if (jumpToEnd) state.SetCursorIndex(state.text.Length, select); + else if (jumpToNextWordEnd) state.SetCursorIndex(state.NextWordEndIndex(), select); + else if (jumpToPrevWordStart) state.SetCursorIndex(state.PrevWordIndex(), select); + else if (leftArrow) state.DecrementCursor(select); + else if (rightArrow) state.IncrementCursor(select); + + bool copyTriggered = InputHelper.CtrlIsHeld && InputHelper.IsKeyDownThisFrame(KeyCode.C); + bool cutTriggered = InputHelper.CtrlIsHeld && InputHelper.IsKeyDownThisFrame(KeyCode.X); + + // Copy selected text (or all text if nothing selected) + if (copyTriggered || cutTriggered) + { + string copyText = state.text; + if (state.isSelecting) copyText = state.text.AsSpan(state.SelectionMinIndex, state.SelectionMaxIndex - state.SelectionMinIndex).ToString(); + InputHelper.CopyToClipboard(copyText); + + if (cutTriggered) + { + if (state.isSelecting) state.Delete(true, validation); + else state.ClearText(); + } + } + + // Select all + if (InputHelper.CtrlIsHeld && InputHelper.IsKeyDownThisFrame(KeyCode.A)) state.SelectAll(); + } + } + + // Draw text + using (CreateMaskScope(centre, size)) + { + state.WrapText(23); + float fontSize_ss = theme.fontSize * scale; + bool showDefaultText = string.IsNullOrEmpty(state.text) || !Application.isPlaying; + string displayString = showDefaultText ? defaultText : state.text; + + Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; + Draw.Text(theme.font, displayString, fontSize_ss, textTopLeft_ss, Anchor.TextCentreLeft, textCol); + + if (Application.isPlaying) + { + Vector2 boundsSizeUpToCaret = Draw.CalculateTextBoundsSize(displayString.AsSpan(0, state.cursorBeforeCharIndex), theme.fontSize, theme.font); + + // Draw selection box + if (state.isSelecting) + { + Vector2 boundsSizeUpToSelect = Draw.CalculateTextBoundsSize(displayString.AsSpan(0, state.selectionStartIndex), theme.fontSize, theme.font); + Color col = new(0.2f, 0.6f, 1, 0.5f); + float startX = textTopLeft_ss.x + boundsSizeUpToCaret.x * scale; + float endX = textTopLeft_ss.x + boundsSizeUpToSelect.x * scale; + if (startX > endX) + { + (startX, endX) = (endX, startX); + } + + Vector2 c = new((endX + startX) / 2, textTopLeft_ss.y); + Vector2 s = new(endX - startX, theme.fontSize * 1.2f * scale); + Draw.Quad(c, s, col); + } + + // Draw caret + const float blinkDuration = 0.5f; + if (state.focused && (int)((Time.time - state.lastInputTime) / blinkDuration) % 2 == 0) + { + Vector2 caretTextBoundsTest = Draw.CalculateTextBoundsSize("Mj", theme.fontSize, theme.font); + Vector2 caretOffset = GetCaretOffset(displayString, state.cursorBeforeCharIndex, theme.fontSize, theme.font); + Vector2 caretPos_ss = textTopLeft_ss + caretOffset * scale; + Vector2 caretSize = new(0.125f * theme.fontSize, caretTextBoundsTest.y * 1.2f); + Draw.Quad(caretPos_ss, caretSize * scale, theme.textCol); + } + } + } + } + + OnFinishedDrawingUIElement(centre, size); + return state; + + static bool CanTrigger(ref InputFieldState.TriggerState triggerState, KeyCode key) + { + if (InputHelper.IsKeyDownThisFrame(key)) triggerState.lastManualTime = Time.time; + + if (InputHelper.IsKeyDownThisFrame(key) || (InputHelper.IsKeyHeld(key) && CanAutoTrigger(triggerState))) + { + triggerState.lastAutoTiggerTime = Time.time; + return true; + } + + return false; + } + + static bool CanAutoTrigger(InputFieldState.TriggerState triggerState) + { + const float autoTriggerStartDelay = 0.5f; + const float autoTriggerRepeatDelay = 0.04f; + bool initialDelayOver = Time.time - triggerState.lastManualTime > autoTriggerStartDelay; + bool canRepeat = Time.time - triggerState.lastAutoTiggerTime > autoTriggerRepeatDelay; + return initialDelayOver && canRepeat; + } + + int CharIndexBeforeMouse(float textLeft) + { + // (note: currently assumes monospaced) + float textBoundsWidth = Draw.CalculateTextBoundsSize(state.text, theme.fontSize, theme.font).x; + float textRight = textLeft + textBoundsWidth * scale; + float t = Mathf.InverseLerp(textLeft, textRight, InputHelper.MousePos.x); + return Mathf.RoundToInt(t * state.text.Length); + } + + Vector2 GetCaretOffset(string text, int cursorIndex, float fontSize, FontType font) + { + // Ensure cursorIndex is within bounds + cursorIndex = Mathf.Clamp(cursorIndex, 0, text.Length); + + ReadOnlySpan span = text.AsSpan(); + int lineIndex = 0, charStart = 0; + + for (int i = 0; i < cursorIndex && i < text.Length; i++) + { + if (text[i] == '\n') + { + lineIndex++; + charStart = i + 1; + } + } + + int charInLine = cursorIndex - charStart; + int lineEnd = text.IndexOf('\n', charStart); + if (lineEnd == -1) lineEnd = text.Length; + + var lineSpan = span.Slice(charStart, Math.Min(charInLine, lineEnd - charStart)); + float x = Draw.CalculateTextBoundsSize(lineSpan, fontSize, font).x; + float y = -lineIndex * fontSize * 1.3f; + + return new Vector2(x, y); + } + } + // Reserve spot in the drawing order for a panel. Returns an ID which can be used // to modify its properties (position, size, colour etc) at a later point. public static Draw.ID ReservePanel() => Draw.ReserveQuad(); diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index 14c378f5..2631abba 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -140,6 +140,43 @@ public void Delete(bool deleteLeft, Func validation = null) UpdateLastInputTime(); } + public void NewLine() + { + if (isSelecting) Delete(true); + TryInsertText("\n"); + } + + public void WrapText(int maxCharsPerLine) + { + if (maxCharsPerLine <= 0 || string.IsNullOrEmpty(text)) + return; + + string[] lines = text.Split('\n'); + string wrappedText = ""; + + foreach (string line in lines) + { + string unwrappedLine = line.Replace("\n", ""); // Remove any newlines inside the line itself + string lineWithWrap = ""; + + for (int i = 0; i < unwrappedLine.Length; i++) + { + if (i > 0 && i % maxCharsPerLine == 0) + lineWithWrap += "\n"; + + lineWithWrap += unwrappedLine[i]; + } + + if (wrappedText.Length > 0) + wrappedText += "\n"; + + wrappedText += lineWithWrap; + } + + text = wrappedText; + SetCursorIndex(text.Length); // move cursor to the end + } + public void SelectAll() { SetCursorIndex(0); From 1e1c30996abb84e178b45fb6ae81278e22217361 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 14:36:20 +0300 Subject: [PATCH 006/124] Added different colors to notes --- .../Types/SubTypes/NoteDescription.cs | 23 +++++++++++++----- Assets/Scripts/Game/Elements/NoteInstance.cs | 24 ++++++++++--------- Assets/Scripts/Game/Project/Project.cs | 11 +++++++-- Assets/Scripts/Graphics/DrawSettings.cs | 14 +++++++++++ .../Scripts/Graphics/UI/Menus/BottomBarUI.cs | 2 +- .../Scripts/Graphics/UI/Menus/ContextMenu.cs | 18 +++++++++++--- .../Scripts/Graphics/World/DevSceneDrawer.cs | 17 +++++-------- .../Scripts/SaveSystem/DescriptionCreator.cs | 9 +++++++ 8 files changed, 84 insertions(+), 34 deletions(-) diff --git a/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs b/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs index fbf5a60f..4f5eac1c 100644 --- a/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs @@ -4,19 +4,30 @@ namespace DLS.Description { public class NoteDescription { - public string Name; public Vector2 Size; - public Color Colour; - public string Content; // Text content of the note + public NoteColour Colour; + public string Text; // Text content of the note public Vector2 Position; + public int ID; - public NoteDescription(string name, Vector2 size, Color colour, string content, Vector2 position) + public NoteDescription(int id, Vector2 size, NoteColour colour, string text, Vector2 position) { - Name = name; + ID = id; Size = size; Colour = colour; - Content = content; + Text = text; Position = position; } } + + public enum NoteColour + { + Red, + Yellow, + Green, + Blue, + Violet, + Pink, + White + } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/NoteInstance.cs b/Assets/Scripts/Game/Elements/NoteInstance.cs index 236bc15c..fe96705e 100644 --- a/Assets/Scripts/Game/Elements/NoteInstance.cs +++ b/Assets/Scripts/Game/Elements/NoteInstance.cs @@ -4,11 +4,13 @@ using Seb.Types; using UnityEngine; using static DLS.Graphics.DrawSettings; +using DLS.Description; namespace DLS.Game { public class NoteInstance : IMoveable { + public readonly NoteDescription Description; // Position of the note in the simulation public Vector2 Position { get; set; } @@ -33,8 +35,8 @@ public class NoteInstance : IMoveable // Bounding box for selection // Bounding box for the note - public Bounds2D BoundingBox => Bounds2D.CreateFromCentreAndSize(Position + new Vector2(Width / 2, Height / 2), new Vector2(Width, Height)); - public virtual Bounds2D SelectionBoundingBox => Bounds2D.CreateFromCentreAndSize(Position + new Vector2(Width / 2, Height / 2), new Vector2(Width + DrawSettings.ChipOutlineWidth + DrawSettings.SelectionBoundsPadding, Height + DrawSettings.ChipOutlineWidth + DrawSettings.SelectionBoundsPadding)); + public Bounds2D BoundingBox => Bounds2D.CreateFromCentreAndSize(Position + Size / 2, Size); + public virtual Bounds2D SelectionBoundingBox => Bounds2D.CreateFromCentreAndSize(Position + Size / 2, Size + new Vector2(DrawSettings.ChipOutlineWidth + DrawSettings.SelectionBoundsPadding, DrawSettings.ChipOutlineWidth + DrawSettings.SelectionBoundsPadding)); // Unique identifier for the note public int ID { get; private set; } @@ -43,17 +45,17 @@ public class NoteInstance : IMoveable public string Text { get; set; } // Dimensions of the note - public float Width { get; set; } - public float Height { get; set; } + public Vector2 Size { get; set; } + public NoteColour Colour; // Constructor - public NoteInstance(int id, Vector2 position, string text, float width = 100, float height = 50) + public NoteInstance(NoteDescription desc) { - ID = id; - Position = position; - Text = text; - Width = width; - Height = height; + Description = desc; + ID = desc.ID; + Position = desc.Position; + Text = desc.Text; + Size = desc.Size; IsSelected = false; IsValidMovePos = true; } @@ -62,7 +64,7 @@ public NoteInstance(int id, Vector2 position, string text, float width = 100, fl public bool ShouldBeIncludedInSelectionBox(Vector2 selectionCentre, Vector2 selectionSize) { var halfSelectionSize = selectionSize / 2; - var halfNoteSize = new Vector2(Width, Height) / 2; + var halfNoteSize = Size / 2; return Math.Abs(Position.x - selectionCentre.x) <= (halfSelectionSize.x + halfNoteSize.x) && Math.Abs(Position.y - selectionCentre.y) <= (halfSelectionSize.y + halfNoteSize.y); diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index 1a397c48..40d89821 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -313,11 +313,18 @@ void SearchRecursive(ChipDescription desc) } } - public NoteInstance CreateBlankNote(Vector2 position, string text, float width = 2f, float height = 2f) + public NoteInstance CreateBlankNote(Vector2 position, string text, Vector2 size) { // Generate a unique ID for the note // Create a new NoteInstance - NoteInstance newNote = new NoteInstance(IDGenerator.GenerateNewElementID(editModeChip), position, text, width, height); + NoteInstance newNote = new NoteInstance( + new NoteDescription( + IDGenerator.GenerateNewElementID(editModeChip), + size, + NoteColour.Yellow, + text, + position + )); // Add the note to the list editModeChip.AddNote(newNote, true); diff --git a/Assets/Scripts/Graphics/DrawSettings.cs b/Assets/Scripts/Graphics/DrawSettings.cs index 7e66767a..13d24c47 100644 --- a/Assets/Scripts/Graphics/DrawSettings.cs +++ b/Assets/Scripts/Graphics/DrawSettings.cs @@ -77,6 +77,18 @@ static ThemeDLS CreateTheme() new(whiteHigh, whiteHigh, whiteHigh) }; + Color[] note = + { + new Color(0.4f, 0.3f, 0.3f), + new Color(0.45f, 0.34f, 0.14f), + new Color(0.3f, 0.4f, 0.3f), + new Color(0.3f, 0.34f, 0.5f), + new Color(0.39f, 0.28f, 0.38f), + new Color(0.45f, 0.2f, 0.45f), + new Color(0.6f, 0.6f, 0.6f) + }; + + Color[] stateHover = stateLow.Select(c => Brighten(c, 0.1f)).ToArray(); return new ThemeDLS @@ -87,6 +99,7 @@ static ThemeDLS CreateTheme() SelectionBoxOtherIsInvaldCol = MakeCol255(243, 150, 75, 80), StateLowCol = stateLow, StateHighCol = stateHigh, + NoteCol = note, StateHoverCol = stateHover, StateDisconnectedCol = Color.black, DevPinHandle = MakeCol(0.31f), @@ -241,6 +254,7 @@ public class ThemeDLS public Color[] StateHighCol; public Color[] StateHoverCol; public Color[] StateLowCol; + public Color[] NoteCol; public Color[] DisplayLEDCols; // Disconnected, Off, On } diff --git a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs index 3943c755..39e20448 100644 --- a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs +++ b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs @@ -366,7 +366,7 @@ static void ConfirmNewChip(bool confirm) static void CreateNewNote() { - Project.ActiveProject.CreateBlankNote(Vector2.zero, "Text"); + Project.ActiveProject.CreateBlankNote(Vector2.zero, "Text", new Vector2(2f, 2f)); } static void HandleKeyboardShortcuts() diff --git a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs index c4c681d5..8b0eebe7 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs @@ -27,6 +27,10 @@ public static class ContextMenu new MenuEntry(Format(Enum.GetName(typeof(PinColour), col)), () => SetCol(col), CanSetCol) ).ToArray(); + static readonly MenuEntry[] noteColEntries = ((NoteColour[])Enum.GetValues(typeof(NoteColour))).Select(col => + new MenuEntry(Format(Enum.GetName(typeof(NoteColour), col)), () => SetCol(col), CanSetNoteCol) + ).ToArray(); + static readonly MenuEntry deleteEntry = new(Format("DELETE"), Delete, CanDelete); static readonly MenuEntry openChipEntry = new(Format("OPEN"), OpenChip, CanOpenChip); @@ -89,11 +93,12 @@ public static class ContextMenu new(Format("DELETE"), Delete, CanDelete) }; - static readonly MenuEntry[] entries_note = + static readonly MenuEntry[] entries_note = new[] { new(Format("EDIT"), OpenNoteTextPopup, CanEditCurrentChip), - new(Format("DELETE"), Delete, CanDelete) - }; + new(Format("DELETE"), Delete, CanDelete), + dividerMenuEntry + }.Concat(noteColEntries).ToArray(); static readonly MenuEntry[] entries_bottomBarChip = { @@ -342,6 +347,7 @@ void DrawHeader() static bool CanFlipBus() => Project.ActiveProject.CanEditViewedChip; static bool CanSetCol() => Project.ActiveProject.CanEditViewedChip && ((PinInstance)interactionContext).IsSourcePin && UIDrawer.ActiveMenu != UIDrawer.MenuType.ChipCustomization; + static bool CanSetNoteCol() => Project.ActiveProject.CanEditViewedChip && UIDrawer.ActiveMenu != UIDrawer.MenuType.ChipCustomization; static void FlipBus() { @@ -354,6 +360,12 @@ static void SetCol(PinColour col) pin.Colour = col; } + static void SetCol(NoteColour col) + { + NoteInstance note = (NoteInstance)interactionContext; + note.Colour = col; + } + static void OpenChipLabelPopup() { UIDrawer.SetActiveMenu(UIDrawer.MenuType.ChipLabelPopup); diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 73ceb8aa..da427e3c 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -53,11 +53,6 @@ public static void DrawActiveScene() { Draw.Quad(controller.SelectionBoxCentre, controller.SelectionBoxSize, ActiveTheme.SelectionBoxCol); } - - // foreach (var note in Project.ActiveProject.editModeChip.GetNotes()) - // { - // DrawNote(note); - // } } static void DrawWires() @@ -212,19 +207,19 @@ public static void DrawPinLabel(PinInstance pin) public static void DrawNote(NoteInstance note) { - Vector2 centre = note.Position + new Vector2(note.Width / 2, note.Height / 2); - Vector2 size = new Vector2(note.Width, note.Height); - Color col = new Color(0.6f, 0.2f, 0.16f, 0.17f); + Vector2 centre = note.Position + note.Size / 2; + int colIndex = (int)note.Colour; + Color col = ActiveTheme.NoteCol[colIndex]; // Highlight if selected // Color backgroundColor = note.IsSelected ? ActiveTheme.NoteSelectedBackgroundCol : ActiveTheme.NoteBackgroundCol; - Draw.Quad(centre, size + Vector2.one * ChipOutlineWidth, GetChipOutlineCol(col)); - Draw.Quad(centre, size, col); + Draw.Quad(centre, note.Size + Vector2.one * ChipOutlineWidth, GetChipOutlineCol(col)); + Draw.Quad(centre, note.Size, col); // Draw.Quad(centre, size, backgroundColor); Draw.Text(FontBold, note.Text, FontSizePinLabel, centre, Anchor.TextCentre, Color.white); - if (InputHelper.MouseInsideBounds_World(centre, size)) + if (InputHelper.MouseInsideBounds_World(centre, note.Size)) { InteractionState.NotifyElementUnderMouse(note); } diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index b562b406..45bd0cd9 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -155,6 +155,15 @@ public static PinDescription CreatePinDescription(DevPinInstance devPin) => devPin.pinValueDisplayMode ); + public static NoteDescription CreateNoteDescription(NoteInstance note) => + new( + note.ID, + note.Size, + note.Colour, + note.Text, + note.Position + ); + static Color RandomInitialChipColour() { Random rng = new(); From 2ce22e3bc9679dfaed571c92c151e249c6ad6714 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 16:15:33 +0300 Subject: [PATCH 007/124] Added note resize --- .../Types/SubTypes/NoteDescription.cs | 3 +-- Assets/Scripts/Game/Elements/NoteInstance.cs | 18 ++++++++++++++++++ Assets/Scripts/Game/Project/Project.cs | 3 +-- Assets/Scripts/Graphics/DrawSettings.cs | 1 + .../Scripts/Graphics/UI/Menus/BottomBarUI.cs | 2 +- .../Scripts/Graphics/UI/Menus/NoteTextMenu.cs | 1 + .../Scripts/Graphics/World/DevSceneDrawer.cs | 5 ++++- .../Scripts/SaveSystem/DescriptionCreator.cs | 1 - 8 files changed, 27 insertions(+), 7 deletions(-) diff --git a/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs b/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs index 4f5eac1c..3ed628a8 100644 --- a/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs @@ -10,10 +10,9 @@ public class NoteDescription public Vector2 Position; public int ID; - public NoteDescription(int id, Vector2 size, NoteColour colour, string text, Vector2 position) + public NoteDescription(int id, NoteColour colour, string text, Vector2 position) { ID = id; - Size = size; Colour = colour; Text = text; Position = position; diff --git a/Assets/Scripts/Game/Elements/NoteInstance.cs b/Assets/Scripts/Game/Elements/NoteInstance.cs index fe96705e..f800b2e5 100644 --- a/Assets/Scripts/Game/Elements/NoteInstance.cs +++ b/Assets/Scripts/Game/Elements/NoteInstance.cs @@ -2,10 +2,12 @@ using DLS.Graphics; using Seb.Helpers; using Seb.Types; +using Seb.Vis; using UnityEngine; using static DLS.Graphics.DrawSettings; using DLS.Description; + namespace DLS.Game { public class NoteInstance : IMoveable @@ -58,6 +60,7 @@ public NoteInstance(NoteDescription desc) Size = desc.Size; IsSelected = false; IsValidMovePos = true; + Resize(); } // Determines if the note should be included in a selection box @@ -69,5 +72,20 @@ public bool ShouldBeIncludedInSelectionBox(Vector2 selectionCentre, Vector2 sele return Math.Abs(Position.x - selectionCentre.x) <= (halfSelectionSize.x + halfNoteSize.x) && Math.Abs(Position.y - selectionCentre.y) <= (halfSelectionSize.y + halfNoteSize.y); } + + public void Resize() + { + Vector2 minSize = new Vector2(2f, 2f); + Size = minSize; + Vector2 textSize = Draw.CalculateTextBoundsSize(Text, FontSizeNoteText, DrawSettings.ActiveUITheme.FontBold); + if (textSize.x > minSize.x) + { + Size = new Vector2(textSize.x + 1f, Size.y); + } + if (textSize.y + 0.4f > minSize.y) + { + Size = new Vector2(Size.x, textSize.y + 1f); + } + } } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index 40d89821..93d20719 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -313,14 +313,13 @@ void SearchRecursive(ChipDescription desc) } } - public NoteInstance CreateBlankNote(Vector2 position, string text, Vector2 size) + public NoteInstance CreateBlankNote(Vector2 position, string text) { // Generate a unique ID for the note // Create a new NoteInstance NoteInstance newNote = new NoteInstance( new NoteDescription( IDGenerator.GenerateNewElementID(editModeChip), - size, NoteColour.Yellow, text, position diff --git a/Assets/Scripts/Graphics/DrawSettings.cs b/Assets/Scripts/Graphics/DrawSettings.cs index 13d24c47..189ff710 100644 --- a/Assets/Scripts/Graphics/DrawSettings.cs +++ b/Assets/Scripts/Graphics/DrawSettings.cs @@ -20,6 +20,7 @@ public static class DrawSettings public const float FontSizeChipName = 0.25f; public const float FontSizePinLabel = 0.2f; + public const float FontSizeNoteText = 0.2f; public const float SubChipPinInset = 0.015f; public const float SelectionBoundsPadding = 0.08f; diff --git a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs index 39e20448..3943c755 100644 --- a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs +++ b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs @@ -366,7 +366,7 @@ static void ConfirmNewChip(bool confirm) static void CreateNewNote() { - Project.ActiveProject.CreateBlankNote(Vector2.zero, "Text", new Vector2(2f, 2f)); + Project.ActiveProject.CreateBlankNote(Vector2.zero, "Text"); } static void HandleKeyboardShortcuts() diff --git a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs index 5a9825a8..15ee4c62 100644 --- a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs @@ -64,6 +64,7 @@ public static void DrawMenu() static void Confirm(string newName) { note.Text = newName; + note.Resize(); UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); } diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index da427e3c..f55b953a 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -215,9 +215,12 @@ public static void DrawNote(NoteInstance note) Draw.Quad(centre, note.Size + Vector2.one * ChipOutlineWidth, GetChipOutlineCol(col)); Draw.Quad(centre, note.Size, col); + Draw.Quad(centre + new Vector2(0, note.Size.y / 2 - 0.1f), new Vector2(note.Size.x, 0.2f), GetChipOutlineCol(col)); + Draw.Text(FontBold, "NOTE", 0.15f, centre + new Vector2(-note.Size.x / 2 + 0.2f, note.Size.y / 2 - 0.1f), Anchor.TextCentre, col); + // Draw.Quad(centre, size, backgroundColor); - Draw.Text(FontBold, note.Text, FontSizePinLabel, centre, Anchor.TextCentre, Color.white); + Draw.Text(FontBold, note.Text, FontSizeNoteText, centre, Anchor.TextCentre, Color.white); if (InputHelper.MouseInsideBounds_World(centre, note.Size)) { diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index 45bd0cd9..0bc53ec1 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -158,7 +158,6 @@ public static PinDescription CreatePinDescription(DevPinInstance devPin) => public static NoteDescription CreateNoteDescription(NoteInstance note) => new( note.ID, - note.Size, note.Colour, note.Text, note.Position From 23541ecb0c460896f2eeb0b4f253e905ad6ad05f Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 17:02:08 +0300 Subject: [PATCH 008/124] Small fixes --- Assets/Scripts/Game/Elements/NoteInstance.cs | 2 +- Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Game/Elements/NoteInstance.cs b/Assets/Scripts/Game/Elements/NoteInstance.cs index f800b2e5..f031d048 100644 --- a/Assets/Scripts/Game/Elements/NoteInstance.cs +++ b/Assets/Scripts/Game/Elements/NoteInstance.cs @@ -82,7 +82,7 @@ public void Resize() { Size = new Vector2(textSize.x + 1f, Size.y); } - if (textSize.y + 0.4f > minSize.y) + if (textSize.y + 1f > minSize.y) { Size = new Vector2(Size.x, textSize.y + 1f); } diff --git a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs index b14a5756..c9c3dcfc 100644 --- a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs +++ b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs @@ -23,6 +23,7 @@ public static class BottomBarUI $"NEW CHIP {shortcutTextCol}Ctrl+N", $"SAVE CHIP {shortcutTextCol}Ctrl+S", $"FIND CHIP {shortcutTextCol}Ctrl+F", + $"NEW NOTE {shortcutTextCol}Ctrl+O", $"LIBRARY {shortcutTextCol}Ctrl+L", $"PREFS {shortcutTextCol}Ctrl+P", $"QUIT {shortcutTextCol}Ctrl+Q" From eea66678d427b17816b19d41fc17c4052eda288b Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 17:43:22 +0300 Subject: [PATCH 009/124] Added note saving --- .../Description/Types/ChipDescription.cs | 1 + .../Scripts/Game/Project/DevChipInstance.cs | 18 ++++++---- .../Scripts/SaveSystem/DescriptionCreator.cs | 5 ++- TestData/Projects/MainTest/Chips/AMFsdf.json | 33 +++++++++++++++++++ 4 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 TestData/Projects/MainTest/Chips/AMFsdf.json diff --git a/Assets/Scripts/Description/Types/ChipDescription.cs b/Assets/Scripts/Description/Types/ChipDescription.cs index 1c83b081..46bef5a4 100644 --- a/Assets/Scripts/Description/Types/ChipDescription.cs +++ b/Assets/Scripts/Description/Types/ChipDescription.cs @@ -20,6 +20,7 @@ public class ChipDescription public SubChipDescription[] SubChips; public WireDescription[] Wires; public DisplayDescription[] Displays; + public NoteDescription[] Notes; // ---- Convenience Functions ---- public bool HasDisplay() => Displays != null && Displays.Length > 0; diff --git a/Assets/Scripts/Game/Project/DevChipInstance.cs b/Assets/Scripts/Game/Project/DevChipInstance.cs index 5df4f2bd..5f8f1c23 100644 --- a/Assets/Scripts/Game/Project/DevChipInstance.cs +++ b/Assets/Scripts/Game/Project/DevChipInstance.cs @@ -16,7 +16,6 @@ public class DevChipInstance public SimChip SimChip; bool hasSimChip; public readonly List Wires = new(); - private List Notes = new(); bool elementsModifiedSinceLastArrayUpdate; DevPinInstance[] inputPins_cached = Array.Empty(); @@ -58,6 +57,7 @@ public static (DevChipInstance devChip, bool anyElementFailedToLoad) LoadFromDes description.InputPins ??= Array.Empty(); description.OutputPins ??= Array.Empty(); description.Wires ??= Array.Empty(); + description.Notes ??= Array.Empty(); bool anyElementFailedToLoad = false; @@ -85,6 +85,14 @@ public static (DevChipInstance devChip, bool anyElementFailedToLoad) LoadFromDes instance.AddNewDevPin(new DevPinInstance(pinDescription, false), true); } + // Load notes + for (int i = 0; i < description.Notes.Length; i++) + { + NoteDescription noteDescription = description.Notes[i]; + NoteInstance note = new(noteDescription); + instance.AddNote(note, true); + } + // ---- Load wires ---- // Wires can fail to load if associated pin was deleted from subchip. This means that wire indices stored in the save data might not line up with our loaded wires list. // So, keep track here of the wires with correct indices (with failed entries just being left as null) @@ -220,13 +228,8 @@ public void AddWire(WireInstance wire, bool isLoading) public void AddNote(NoteInstance note, bool isLoading) { + Debug.Log("Adding note: " + note.Text); AddElement(note); - Notes.Add(note); - } - - public NoteInstance[] GetNotes() - { - return Notes.ToArray(); } void AddElement(IMoveable element) @@ -464,6 +467,7 @@ public void NotifyConnectedWiresPointsInserted(WireInstance wire, int insertInde } public IEnumerable GetSubchips() => Elements.OfType(); + public IEnumerable GetNotes() => Elements.OfType(); public IEnumerable GetOutputPins() { diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index 0bc53ec1..03bf7c8d 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -20,12 +20,14 @@ public static ChipDescription CreateChipDescription(DevChipInstance chip) string name = hasSavedDesc ? descOld.Name : string.Empty; DisplayDescription[] displays = hasSavedDesc ? descOld.Displays : null; - // Create pin and subchip descriptions + // Create pin, subchip and notes descriptions PinDescription[] inputPins = OrderPins(chip.GetInputPins()).Select(CreatePinDescription).ToArray(); PinDescription[] outputPins = OrderPins(chip.GetOutputPins()).Select(CreatePinDescription).ToArray(); SubChipDescription[] subchips = chip.GetSubchips().Select(CreateSubChipDescription).ToArray(); Vector2 minChipsSize = SubChipInstance.CalculateMinChipSize(inputPins, outputPins, name); size = Vector2.Max(minChipsSize, size); + NoteDescription[] notes = chip.GetNotes().Select(CreateNoteDescription).ToArray(); + Debug.Log($"Found {notes.Length} notes"); UpdateWireIndicesForDescriptionCreation(chip); @@ -41,6 +43,7 @@ public static ChipDescription CreateChipDescription(DevChipInstance chip) InputPins = inputPins, OutputPins = outputPins, Wires = chip.Wires.Select(CreateWireDescription).ToArray(), + Notes = notes, Displays = displays, ChipType = ChipType.Custom }; diff --git a/TestData/Projects/MainTest/Chips/AMFsdf.json b/TestData/Projects/MainTest/Chips/AMFsdf.json new file mode 100644 index 00000000..97484b2f --- /dev/null +++ b/TestData/Projects/MainTest/Chips/AMFsdf.json @@ -0,0 +1,33 @@ +{ + "Name": "AMFsdf", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.025, + "y": 0.375 + }, + "Colour": { + "r": 0.739096463, + "g": 0.53381747, + "b": 0.150521308, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"SDFS", + "ID":1021676828, + "Label":"", + "Position":{ + "x":-2.02778, + "y":-1.61806 + }, + "OutputPinColourInfo":[], + "InternalData":null + } + ], + "Wires":[], + "Displays": null, + "Notes": null +} \ No newline at end of file From 474f6c6c0118bc14f3142b57ffb17a29b7060900 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 19:24:12 +0300 Subject: [PATCH 010/124] Fixed note delete function --- .../Game/Interaction/ChipInteractionController.cs | 2 +- Assets/Scripts/Game/Project/DevChipInstance.cs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index 03d672ec..6a4f2ee4 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -67,6 +67,7 @@ public void Delete(IMoveable element, bool clearSelection = true) { if (!HasControl) return; if (element is SubChipInstance subChip) ActiveDevChip.DeleteSubChip(subChip); + if (element is NoteInstance noteInstance) ActiveDevChip.DeleteNote(noteInstance); if (element is DevPinInstance devPin) ActiveDevChip.DeleteDevPin(devPin); if (clearSelection) SelectedElements.Clear(); } @@ -921,7 +922,6 @@ public IMoveable StartPlacing(ChipDescription chipDescription, Vector2 position, return elementToPlace; } - public void CancelEverything() { CancelMovingSelectedItems(); diff --git a/Assets/Scripts/Game/Project/DevChipInstance.cs b/Assets/Scripts/Game/Project/DevChipInstance.cs index 5f8f1c23..6e08257d 100644 --- a/Assets/Scripts/Game/Project/DevChipInstance.cs +++ b/Assets/Scripts/Game/Project/DevChipInstance.cs @@ -343,6 +343,15 @@ public void DeleteSubChip(SubChipInstance subChip) } } + public void DeleteNote(NoteInstance note) + { + // Ensure subchip exists before deleting + // (required for buses, where one end of bus is deleted automatically when other end is deleted; but user may select both ends for deletion) + if (!Elements.Contains(note)) return; + + RemoveElement(note); + } + // Delete subchip with given id (if it exists) public void TryDeleteSubChipByID(int id) { From ebcb8874073ffd7b13eddee7c69763d5c4da27b3 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 20:45:17 +0300 Subject: [PATCH 011/124] Some improvements --- .../Interaction/ChipInteractionController.cs | 44 +++++++++++++++++++ .../Scripts/Game/Project/DevChipInstance.cs | 1 - Assets/Scripts/Game/Project/Project.cs | 12 ++--- .../Scripts/Graphics/UI/Menus/NoteTextMenu.cs | 4 +- .../Scripts/SaveSystem/DescriptionCreator.cs | 8 ++++ Assets/Scripts/Seb/SebVis/UI/UI.cs | 8 ++-- Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 36 +++++++++++++++ 7 files changed, 98 insertions(+), 15 deletions(-) diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index 6a4f2ee4..0d066bf6 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -558,6 +558,7 @@ void FinishPlacingNewElements() { if (elementToPlace is SubChipInstance subchip) ActiveDevChip.AddNewSubChip(subchip, false); else if (elementToPlace is DevPinInstance devPin) ActiveDevChip.AddNewDevPin(devPin, false); + else if (elementToPlace is NoteInstance note) ActiveDevChip.AddNote(note, false); } foreach (WireInstance wire in DuplicatedWires) @@ -922,6 +923,49 @@ public IMoveable StartPlacing(ChipDescription chipDescription, Vector2 position, return elementToPlace; } + public void StartPlacingNote(NoteDescription noteDescription) + { + StartPlacingNote(noteDescription, InputHelper.MousePosWorld, false); + } + + public IMoveable StartPlacingNote(NoteDescription noteDescription, Vector2 position, bool isDuplicating) + { + newElementsAreDuplicatedElements = isDuplicating; + + if (!isPlacingNewElements) + { + CancelEverything(); + isPlacingNewElements = true; + hasExittedMultiModeSincePlacementStart = false; + StartMovingSelectedItems(); + } + + IMoveable elementToPlace; + int instanceID = IDGenerator.GenerateNewElementID(ActiveDevChip); + + NoteDescription noteDesc = DescriptionCreator.CreateNoteDescriptionForPlacing(instanceID, noteDescription.Colour, noteDescription.Text, position); + elementToPlace = new NoteInstance(noteDesc); + + // If placing multiple elements simultaneously, place the new element below the previous one + // (unless is duplicating elements, in which case their relative positions should be preserved) + if (SelectedElements.Count > 0 && !isDuplicating) + { + float spacing = (elementToPlace.SelectionBoundingBox.Size.y + SelectedElements[^1].SelectionBoundingBox.Size.y) / 2; + elementToPlace.MoveStartPosition = SelectedElements[^1].MoveStartPosition + Vector2.down * spacing; + elementToPlace.HasReferencePointForStraightLineMovement = false; + } + else + { + moveElementMouseStartPos = InputHelper.MousePosWorld + elementToPlace.SelectionBoundingBox.Size / 2;; + elementToPlace.MoveStartPosition = position; + elementToPlace.StraightLineReferencePoint = position; + elementToPlace.HasReferencePointForStraightLineMovement = isDuplicating; + } + + Select(elementToPlace); + return elementToPlace; + } + public void CancelEverything() { CancelMovingSelectedItems(); diff --git a/Assets/Scripts/Game/Project/DevChipInstance.cs b/Assets/Scripts/Game/Project/DevChipInstance.cs index 6e08257d..5f66812d 100644 --- a/Assets/Scripts/Game/Project/DevChipInstance.cs +++ b/Assets/Scripts/Game/Project/DevChipInstance.cs @@ -228,7 +228,6 @@ public void AddWire(WireInstance wire, bool isLoading) public void AddNote(NoteInstance note, bool isLoading) { - Debug.Log("Adding note: " + note.Text); AddElement(note); } diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index 3ae8f7ae..9be11e4a 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -314,23 +314,19 @@ void SearchRecursive(ChipDescription desc) } } - public NoteInstance CreateBlankNote(Vector2 position, string text) + public void CreateBlankNote(Vector2 position, string text) { // Generate a unique ID for the note // Create a new NoteInstance - NoteInstance newNote = new NoteInstance( - new NoteDescription( + NoteDescription noteDesc = new NoteDescription( IDGenerator.GenerateNewElementID(editModeChip), NoteColour.Yellow, text, position - )); + ); // Add the note to the list - editModeChip.AddNote(newNote, true); - - // Return the created note - return newNote; + controller.StartPlacingNote(noteDesc); } // Must be called prior to library being updated with the change diff --git a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs index 15ee4c62..fdd2cc9c 100644 --- a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs @@ -45,7 +45,7 @@ public static void DrawMenu() Vector2 pos = UI.Centre + Vector2.up * 5; // Draw input field - InputFieldState inputFieldState = UI.TextArea(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, null, true); + InputFieldState inputFieldState = UI.TextArea(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, MaxLabelLength, 7, null, true); Bounds2D inputFieldBounds = UI.PrevBounds; string newName = inputFieldState.text; @@ -72,7 +72,5 @@ static void Cancel() { UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); } - - static bool ValidateNameInput(string name) => name.Length <= MaxLabelLength.Length; } } \ No newline at end of file diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index 03bf7c8d..fa22b494 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -165,6 +165,14 @@ public static NoteDescription CreateNoteDescription(NoteInstance note) => note.Text, note.Position ); + + public static NoteDescription CreateNoteDescriptionForPlacing(int id, NoteColour colour, string text, Vector2 pos) => + new( + id, + colour, + text, + pos + ); static Color RandomInitialChipColour() { diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index 6126c3df..b93e4342 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -536,7 +536,7 @@ int CharIndexBeforeMouse(float textLeft) } } - public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vector2 pos, Vector2 size, string defaultText, Anchor anchor, float textPad, Func validation = null, bool forceFocus = false) + public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vector2 pos, Vector2 size, string defaultText, Anchor anchor, float textPad, string lineLength, int maxLines, Func validation = null, bool forceFocus = false) { InputFieldState state = GetInputFieldState(id); @@ -574,10 +574,12 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto // Draw focus outline and update text if (state.focused) { + state.EnforceTextLimit(lineLength.Length, maxLines); const float outlineWidth = 0.05f; Draw.QuadOutline(ss.centre, ss.size, outlineWidth * scale, theme.focusBorderCol); foreach (char c in InputHelper.InputStringThisFrame) { + if (maxLines <= state.CountLines()) continue; bool invalidChar = char.IsControl(c) || char.IsSurrogate(c) || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.Format || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.PrivateUse; if (invalidChar) continue; state.TryInsertText(c + "", validation); @@ -604,7 +606,7 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto { state.Delete(false, validation); } - if (InputHelper.IsKeyDownThisFrame(KeyCode.Return)) + if (InputHelper.IsKeyDownThisFrame(KeyCode.Return) && state.CountLines() < maxLines - 1) { state.NewLine(); } @@ -650,7 +652,7 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto // Draw text using (CreateMaskScope(centre, size)) { - state.WrapText(23); + state.WrapText(lineLength.Length); float fontSize_ss = theme.fontSize * scale; bool showDefaultText = string.IsNullOrEmpty(state.text) || !Application.isPlaying; string displayString = showDefaultText ? defaultText : state.text; diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index 0e746f2d..b8cdd447 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -1,6 +1,8 @@ using System; using Seb.Helpers; using UnityEngine; +using System.Linq; +using System.Collections.Generic; namespace Seb.Vis.UI { @@ -151,6 +153,11 @@ public void NewLine() TryInsertText("\n"); } + public int CountLines() + { + return text.Count(c => c == '\n'); + } + public void WrapText(int maxCharsPerLine) { if (maxCharsPerLine <= 0 || string.IsNullOrEmpty(text)) @@ -182,6 +189,35 @@ public void WrapText(int maxCharsPerLine) SetCursorIndex(text.Length); // move cursor to the end } + public void EnforceTextLimit(int lineLength, int maxLines) + { + // Split the text into lines + string[] lines = text.Split('\n'); + List limitedLines = new(); + + foreach (string line in lines) + { + // Wrap the line if it exceeds the lineLength + for (int i = 0; i < line.Length; i += lineLength) + { + if (limitedLines.Count >= maxLines) + break; + + string wrappedLine = line.Substring(i, Math.Min(lineLength, line.Length - i)); + limitedLines.Add(wrappedLine); + } + + if (limitedLines.Count >= maxLines) + break; + } + + // Join the limited lines back into a single string + text = string.Join("\n", limitedLines); + + // Adjust the cursor position if it exceeds the new text length + cursorBeforeCharIndex = Mathf.Clamp(cursorBeforeCharIndex, 0, text.Length); + } + public void SelectAll() { SetCursorIndex(0); From 0613849126393f0e6f98d23cbc443e3ff6ee9734 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 23:08:38 +0300 Subject: [PATCH 012/124] Some fixes --- Assets/Scripts/Game/Elements/NoteInstance.cs | 1 + .../Interaction/ChipInteractionController.cs | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Game/Elements/NoteInstance.cs b/Assets/Scripts/Game/Elements/NoteInstance.cs index f031d048..117966e1 100644 --- a/Assets/Scripts/Game/Elements/NoteInstance.cs +++ b/Assets/Scripts/Game/Elements/NoteInstance.cs @@ -58,6 +58,7 @@ public NoteInstance(NoteDescription desc) Position = desc.Position; Text = desc.Text; Size = desc.Size; + Colour = desc.Colour; IsSelected = false; IsValidMovePos = true; Resize(); diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index 0d066bf6..9b5a6109 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -276,10 +276,27 @@ void DuplicateSelectedElements() foreach (IMoveable element in elementsToDuplicate) { ChipDescription desc; + if (element is SubChipInstance subchip) { desc = subchip.Description; } + else if (element is NoteInstance note) + { + // Create a new NoteDescription for the duplicated note + NoteDescription noteDesc = new NoteDescription( + IDGenerator.GenerateNewElementID(ActiveDevChip), + note.Colour, + note.Text, + note.Position + ); + + // Create a new NoteInstance and add it to the duplicated elements + IMoveable duplicatedNote = StartPlacingNote(noteDesc, note.Position, true); + duplicatedElements.Add(duplicatedNote); + duplicatedElementIDFromOriginalID.Add(note.ID, duplicatedNote.ID); + continue; + } else { DevPinInstance devpin = (DevPinInstance)element; @@ -292,7 +309,6 @@ void DuplicateSelectedElements() else desc.OutputPins[0] = pinDesc; } - IMoveable duplicatedElement = StartPlacing(desc, element.Position, true); duplicatedElement.StraightLineReferencePoint = element.Position; duplicatedElements.Add(duplicatedElement); From e91281a8b155a2494dadca127b8136cc2382cf80 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 23:13:36 +0300 Subject: [PATCH 013/124] Note color is random on creation --- Assets/Scripts/Game/Project/Project.cs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index 9be11e4a..bd6d23bd 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -316,16 +316,20 @@ void SearchRecursive(ChipDescription desc) public void CreateBlankNote(Vector2 position, string text) { - // Generate a unique ID for the note - // Create a new NoteInstance + // Get all possible values of the NoteColour enum + Array colours = Enum.GetValues(typeof(NoteColour)); + + // Select a random color + NoteColour randomColour = (NoteColour)colours.GetValue(UnityEngine.Random.Range(0, colours.Length)); + + // Create the note with the random color NoteDescription noteDesc = new NoteDescription( - IDGenerator.GenerateNewElementID(editModeChip), - NoteColour.Yellow, - text, - position - ); + IDGenerator.GenerateNewElementID(editModeChip), + randomColour, + text, + position + ); - // Add the note to the list controller.StartPlacingNote(noteDesc); } From 1fef3f155c676f7cf6b228a19503cecf4fd4dc75 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 23:25:59 +0300 Subject: [PATCH 014/124] Added shortcut --- Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs | 1 + Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs index 8d47cffb..c3984b92 100644 --- a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs +++ b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs @@ -12,6 +12,7 @@ public static class KeyboardShortcuts public static bool MainMenu_QuitShortcutTriggered => CtrlShortcutTriggered(KeyCode.Q); // ---- Bottom Bar Menu shorcuts ---- + public static bool NewNoteShortcutTriggered => CtrlShortcutTriggered(KeyCode.M); public static bool SaveShortcutTriggered => CtrlShortcutTriggered(KeyCode.S); public static bool LibraryShortcutTriggered => CtrlShortcutTriggered(KeyCode.L); public static bool PreferencesShortcutTriggered => CtrlShortcutTriggered(KeyCode.P); diff --git a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs index c9c3dcfc..390247ee 100644 --- a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs +++ b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs @@ -23,7 +23,7 @@ public static class BottomBarUI $"NEW CHIP {shortcutTextCol}Ctrl+N", $"SAVE CHIP {shortcutTextCol}Ctrl+S", $"FIND CHIP {shortcutTextCol}Ctrl+F", - $"NEW NOTE {shortcutTextCol}Ctrl+O", + $"NEW NOTE {shortcutTextCol}Ctrl+M", $"LIBRARY {shortcutTextCol}Ctrl+L", $"PREFS {shortcutTextCol}Ctrl+P", $"QUIT {shortcutTextCol}Ctrl+Q" @@ -420,6 +420,7 @@ static void HandleKeyboardShortcuts() { if (KeyboardShortcuts.CreateNewChipShortcutTriggered) CreateNewChip(); if (KeyboardShortcuts.SaveShortcutTriggered) OpenSaveMenu(); + if (KeyboardShortcuts.NewNoteShortcutTriggered) CreateNewNote(); if (KeyboardShortcuts.LibraryShortcutTriggered) OpenLibraryMenu(); } From 0fb48964abd91b9d2e24111d9bfed33c21b13d75 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 23:28:39 +0300 Subject: [PATCH 015/124] Removed temp debugging --- Assets/Scripts/Game/Interaction/ChipInteractionController.cs | 2 -- Assets/Scripts/SaveSystem/DescriptionCreator.cs | 1 - 2 files changed, 3 deletions(-) diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index 9b5a6109..caba5665 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -398,7 +398,6 @@ public void Select(IMoveable element, bool addToCurrentSelection = true) { element.IsSelected = false; SelectedElements.Remove(element); - Debug.Log($"Deselected element: {element.GetType().Name}, ID: {element.ID}"); } } else @@ -411,7 +410,6 @@ public void Select(IMoveable element, bool addToCurrentSelection = true) SelectedElements.Add(element); element.IsSelected = true; element.IsValidMovePos = true; - Debug.Log($"Selected element: {element.GetType().Name}, ID: {element.ID}"); } } diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index fa22b494..1befd5bf 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -27,7 +27,6 @@ public static ChipDescription CreateChipDescription(DevChipInstance chip) Vector2 minChipsSize = SubChipInstance.CalculateMinChipSize(inputPins, outputPins, name); size = Vector2.Max(minChipsSize, size); NoteDescription[] notes = chip.GetNotes().Select(CreateNoteDescription).ToArray(); - Debug.Log($"Found {notes.Length} notes"); UpdateWireIndicesForDescriptionCreation(chip); From 90394c4c1ae154844bc55503ed6ab20984a4ab78 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Fri, 18 Apr 2025 23:48:47 +0300 Subject: [PATCH 016/124] Fixed bug with textarea --- Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index b8cdd447..3f7f4bae 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -209,6 +209,12 @@ public void EnforceTextLimit(int lineLength, int maxLines) if (limitedLines.Count >= maxLines) break; + + // Preserve manual newlines + if (line.Length == 0 && limitedLines.Count < maxLines) + { + limitedLines.Add(string.Empty); + } } // Join the limited lines back into a single string From 328bb8a5eb1ef77f04d403677e5b9fe9f1e77fd7 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Sat, 19 Apr 2025 00:27:09 +0300 Subject: [PATCH 017/124] Smol fix --- Assets/Scripts/Graphics/World/DevSceneDrawer.cs | 4 ++-- Assets/Scripts/Seb/SebVis/UI/UI.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index d82e8749..59100f9e 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -210,7 +210,7 @@ public static void DrawNote(NoteInstance note) Vector2 centre = note.Position + note.Size / 2; int colIndex = (int)note.Colour; Color col = ActiveTheme.NoteCol[colIndex]; - // Highlight if selected + Color textCol = note.Colour == NoteColour.White ? Color.black : Color.white; // Color backgroundColor = note.IsSelected ? ActiveTheme.NoteSelectedBackgroundCol : ActiveTheme.NoteBackgroundCol; Draw.Quad(centre, note.Size + Vector2.one * ChipOutlineWidth, GetChipOutlineCol(col)); @@ -220,7 +220,7 @@ public static void DrawNote(NoteInstance note) // Draw.Quad(centre, size, backgroundColor); - Draw.Text(FontBold, note.Text, FontSizeNoteText, centre, Anchor.TextCentre, Color.white); + Draw.Text(FontBold, note.Text, FontSizeNoteText, centre, Anchor.TextCentre, textCol); if (InputHelper.MouseInsideBounds_World(centre, note.Size)) { diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index b93e4342..8b11d3c1 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -583,6 +583,7 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto bool invalidChar = char.IsControl(c) || char.IsSurrogate(c) || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.Format || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.PrivateUse; if (invalidChar) continue; state.TryInsertText(c + "", validation); + state.WrapText(lineLength.Length); } // Paste from clipboard @@ -652,7 +653,6 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto // Draw text using (CreateMaskScope(centre, size)) { - state.WrapText(lineLength.Length); float fontSize_ss = theme.fontSize * scale; bool showDefaultText = string.IsNullOrEmpty(state.text) || !Application.isPlaying; string displayString = showDefaultText ? defaultText : state.text; From f2b0a62e5562c928a6985c3565eae2a84e877568 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Sun, 20 Apr 2025 02:48:28 +0300 Subject: [PATCH 018/124] big textarea improvements --- .../Scripts/Graphics/UI/Menus/NoteTextMenu.cs | 4 +- Assets/Scripts/Seb/SebVis/UI/UI.cs | 227 +++++++--- Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 422 ++++++++++++++---- .../Deleted Projects/MainTest/Chips/AND.json | 149 +++++++ 4 files changed, 659 insertions(+), 143 deletions(-) create mode 100644 TestData/Deleted Projects/MainTest/Chips/AND.json diff --git a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs index fdd2cc9c..ccf7253a 100644 --- a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs @@ -45,9 +45,9 @@ public static void DrawMenu() Vector2 pos = UI.Centre + Vector2.up * 5; // Draw input field - InputFieldState inputFieldState = UI.TextArea(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, MaxLabelLength, 7, null, true); + TextAreaState inputFieldState = UI.TextArea(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, MaxLabelLength, 7, null, true); Bounds2D inputFieldBounds = UI.PrevBounds; - string newName = inputFieldState.text; + string newName = string.Join("", inputFieldState.lines); // Draw cancel/confirm buttons Vector2 buttonsTopLeft = UI.PrevBounds.BottomLeft + Vector2.down * spacing; diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index 8b11d3c1..5c399c5f 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -26,6 +26,7 @@ public static class UI // -- State lookups -- static readonly Dictionary inputFieldStates = new(); + static readonly Dictionary textAreaStates = new(); static readonly Dictionary buttonStates = new(); static readonly Dictionary colPickerStates = new(); static readonly Dictionary scrollbarStates = new(); @@ -536,9 +537,10 @@ int CharIndexBeforeMouse(float textLeft) } } - public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vector2 pos, Vector2 size, string defaultText, Anchor anchor, float textPad, string lineLength, int maxLines, Func validation = null, bool forceFocus = false) + public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 pos, Vector2 size, string defaultText, Anchor anchor, float textPad, string lineLength, int maxLines, Func validation = null, bool forceFocus = false) { - InputFieldState state = GetInputFieldState(id); + TextAreaState state = GetTextAreaState(id); + state.maxCharsPerLine = lineLength.Length; Vector2 centre = CalculateCentre(pos, size, anchor); (Vector2 centre, Vector2 size) ss = UIToScreenSpace(centre, size); @@ -557,13 +559,19 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto state.isMouseDownInBounds = mouseInBounds; // Set caret pos based on mouse position - if (mouseInBounds) state.SetCursorIndex(CharIndexBeforeMouse(textTopLeft_ss.x), InputHelper.ShiftIsHeld); + if (mouseInBounds) + { + + Vector2Int newCaretPos = CharIndexBeforeMouse(textTopLeft_ss.x, textTopLeft_ss.y); + state.SetCursorIndex(newCaretPos.x, newCaretPos.y, InputHelper.ShiftIsHeld); + } } // Hold-drag left mouse to select if (state.focused && InputHelper.IsMouseHeld(MouseButton.Left) && state.isMouseDownInBounds) { - state.SetCursorIndex(CharIndexBeforeMouse(textTopLeft_ss.x), true); + Vector2Int newCaretPos = CharIndexBeforeMouse(textTopLeft_ss.x, textTopLeft_ss.y); + state.SetCursorIndex(newCaretPos.x, newCaretPos.y, true); } if (forceFocus && !state.focused) @@ -574,16 +582,15 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto // Draw focus outline and update text if (state.focused) { - state.EnforceTextLimit(lineLength.Length, maxLines); + // state.EnforceTextLimit(lineLength.Length, maxLines); const float outlineWidth = 0.05f; Draw.QuadOutline(ss.centre, ss.size, outlineWidth * scale, theme.focusBorderCol); foreach (char c in InputHelper.InputStringThisFrame) { - if (maxLines <= state.CountLines()) continue; + // if (maxLines <= state.CountLines()) continue; bool invalidChar = char.IsControl(c) || char.IsSurrogate(c) || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.Format || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.PrivateUse; if (invalidChar) continue; state.TryInsertText(c + "", validation); - state.WrapText(lineLength.Length); } // Paste from clipboard @@ -592,12 +599,12 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto state.TryInsertText(InputHelper.GetClipboardContents(), validation); } - if (state.text.Length > 0) + if (state.lines.Count > 0) { // Backspace / delete if (CanTrigger(ref state.backspaceTrigger, KeyCode.Backspace)) { - int charDeleteCount = InputHelper.CtrlIsHeld ? state.text.Length : 1; // delete all if ctrl is held + int charDeleteCount = InputHelper.CtrlIsHeld ? state.lines[state.cursorLineIndex].Length : 1; // delete all if ctrl is held for (int i = 0; i < charDeleteCount; i++) { state.Delete(true, validation); @@ -607,7 +614,7 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto { state.Delete(false, validation); } - if (InputHelper.IsKeyDownThisFrame(KeyCode.Return) && state.CountLines() < maxLines - 1) + if (InputHelper.IsKeyDownThisFrame(KeyCode.Return) && state.lines.Count < maxLines - 1) { state.NewLine(); } @@ -616,17 +623,17 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto bool select = InputHelper.ShiftIsHeld; bool leftArrow = CanTrigger(ref state.arrowKeyTrigger, KeyCode.LeftArrow); bool rightArrow = CanTrigger(ref state.arrowKeyTrigger, KeyCode.RightArrow); + bool upArrow = CanTrigger(ref state.arrowKeyTrigger, KeyCode.UpArrow); + bool downArrow = CanTrigger(ref state.arrowKeyTrigger, KeyCode.DownArrow); bool jumpToPrevWordStart = InputHelper.CtrlIsHeld && leftArrow; bool jumpToNextWordEnd = InputHelper.CtrlIsHeld && rightArrow; - bool jumpToStart = InputHelper.IsKeyDownThisFrame(KeyCode.UpArrow) || InputHelper.IsKeyDownThisFrame(KeyCode.PageUp) || InputHelper.IsKeyDownThisFrame(KeyCode.Home) || (jumpToPrevWordStart && InputHelper.AltIsHeld); - bool jumpToEnd = InputHelper.IsKeyDownThisFrame(KeyCode.DownArrow) || InputHelper.IsKeyDownThisFrame(KeyCode.PageDown) || InputHelper.IsKeyDownThisFrame(KeyCode.End) || (jumpToNextWordEnd && InputHelper.AltIsHeld); - if (jumpToStart) state.SetCursorIndex(0, select); - else if (jumpToEnd) state.SetCursorIndex(state.text.Length, select); - else if (jumpToNextWordEnd) state.SetCursorIndex(state.NextWordEndIndex(), select); - else if (jumpToPrevWordStart) state.SetCursorIndex(state.PrevWordIndex(), select); + if (jumpToNextWordEnd) state.SetCursorIndex(state.NextWordEndIndex(), state.cursorLineIndex, select); + else if (jumpToPrevWordStart) state.SetCursorIndex(state.PrevWordIndex(), state.cursorLineIndex, select); else if (leftArrow) state.DecrementCursor(select); else if (rightArrow) state.IncrementCursor(select); + else if (upArrow) state.DecrementLine(select); + else if (downArrow) state.IncrementLine(select); bool copyTriggered = InputHelper.CtrlIsHeld && InputHelper.IsKeyDownThisFrame(KeyCode.C); bool cutTriggered = InputHelper.CtrlIsHeld && InputHelper.IsKeyDownThisFrame(KeyCode.X); @@ -634,14 +641,52 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto // Copy selected text (or all text if nothing selected) if (copyTriggered || cutTriggered) { - string copyText = state.text; - if (state.isSelecting) copyText = state.text.AsSpan(state.SelectionMinIndex, state.SelectionMaxIndex - state.SelectionMinIndex).ToString(); + string copyText; + + if (state.isSelecting) + { + int startLine = Mathf.Min(state.cursorLineIndex, state.selectionStartIndex / state.maxCharsPerLine); + int endLine = Mathf.Max(state.cursorLineIndex, state.selectionStartIndex / state.maxCharsPerLine); + + int startChar = Mathf.Min(state.cursorBeforeCharIndex, state.selectionStartIndex % state.maxCharsPerLine); + int endChar = Mathf.Max(state.cursorBeforeCharIndex, state.selectionStartIndex % state.maxCharsPerLine); + + if (startLine == endLine) + { + // Single-line selection + copyText = state.lines[startLine].Substring(startChar, endChar - startChar); + } + else + { + // Multi-line selection + StringBuilder sb = new(); + sb.AppendLine(state.lines[startLine].Substring(startChar)); + for (int i = startLine + 1; i < endLine; i++) + { + sb.AppendLine(state.lines[i]); + } + sb.Append(state.lines[endLine].Substring(0, endChar)); + copyText = sb.ToString(); + } + } + else + { + // No selection, copy the entire text + copyText = string.Join("\n", state.lines); + } + InputHelper.CopyToClipboard(copyText); if (cutTriggered) { - if (state.isSelecting) state.Delete(true, validation); - else state.ClearText(); + if (state.isSelecting) + { + state.Delete(true, validation); + } + else + { + state.ClearText(); + } } } @@ -654,31 +699,78 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto using (CreateMaskScope(centre, size)) { float fontSize_ss = theme.fontSize * scale; - bool showDefaultText = string.IsNullOrEmpty(state.text) || !Application.isPlaying; - string displayString = showDefaultText ? defaultText : state.text; + bool showDefaultText = (state.lines.Count == 0 || (state.lines.Count == 1 && string.IsNullOrEmpty(state.lines[0]))) || !Application.isPlaying; + string[] lines = showDefaultText ? new[] { "Enter something..." } : state.lines.ToArray(); Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; - Draw.Text(theme.font, displayString, fontSize_ss, textTopLeft_ss, Anchor.TextCentreLeft, textCol); + for (int i = 0; i < lines.Length; i++) + { + Vector2 textPos_ss = textTopLeft_ss + new Vector2(0, -i * theme.fontSize * scale); + Draw.Text(theme.font, lines[i], fontSize_ss, textPos_ss, Anchor.TextCentreLeft, textCol); + } if (Application.isPlaying) { - Vector2 boundsSizeUpToCaret = Draw.CalculateTextBoundsSize(displayString.AsSpan(0, state.cursorBeforeCharIndex), theme.fontSize, theme.font); + Vector2 boundsSizeUpToCaret = Vector2.zero; + for (int i = 0; i <= state.cursorLineIndex; i++) + { + if (state.lines.Count == 0) + { + state.lines.Add(string.Empty); // Ensure there is at least one line + } + + i = Mathf.Clamp(i, 0, state.lines.Count - 1); // Clamp lineIndex to valid range + string line = state.lines[i]; // Safely access the line + if (i < state.cursorLineIndex) + { + // Add the size of the entire line for lines before the caret's line + boundsSizeUpToCaret.y -= theme.fontSize * 1.3f * scale; // Move down by line height + } + else + { + // Calculate the size up to the caret's position in the current line + boundsSizeUpToCaret.x = Draw.CalculateTextBoundsSize(line.AsSpan(0, state.cursorBeforeCharIndex), theme.fontSize, theme.font).x; + } + } // Draw selection box if (state.isSelecting) { - Vector2 boundsSizeUpToSelect = Draw.CalculateTextBoundsSize(displayString.AsSpan(0, state.selectionStartIndex), theme.fontSize, theme.font); - Color col = new(0.2f, 0.6f, 1, 0.5f); - float startX = textTopLeft_ss.x + boundsSizeUpToCaret.x * scale; - float endX = textTopLeft_ss.x + boundsSizeUpToSelect.x * scale; - if (startX > endX) + Debug.Log($"Drawing selection: selectionStartIndex={state.selectionStartIndex}, cursorBeforeCharIndex={state.cursorBeforeCharIndex}"); + + int startLine = Mathf.Min(state.cursorLineIndex, state.selectionStartIndex / state.maxCharsPerLine); + int endLine = Mathf.Max(state.cursorLineIndex, state.selectionStartIndex / state.maxCharsPerLine); + + int startChar = Mathf.Min(state.cursorBeforeCharIndex, state.selectionStartIndex % state.maxCharsPerLine); + int endChar = Mathf.Max(state.cursorBeforeCharIndex, state.selectionStartIndex % state.maxCharsPerLine); + + for (int lineIndex = startLine; lineIndex <= endLine; lineIndex++) { - (startX, endX) = (endX, startX); - } + string line = state.lines[lineIndex]; + int lineStartIndex = 0; + int lineEndIndex = line.Length; - Vector2 c = new((endX + startX) / 2, textTopLeft_ss.y); - Vector2 s = new(endX - startX, theme.fontSize * 1.2f * scale); - Draw.Quad(c, s, col); + // Determine the selection range for this line + int selectionStartInLine = (lineIndex == startLine) ? startChar : lineStartIndex; + int selectionEndInLine = (lineIndex == endLine) ? endChar : lineEndIndex; + + Vector2 boundsSizeUpToStart = Draw.CalculateTextBoundsSize(line.AsSpan(0, selectionStartInLine), theme.fontSize, theme.font); + Vector2 boundsSizeUpToEnd = Draw.CalculateTextBoundsSize(line.AsSpan(0, selectionEndInLine), theme.fontSize, theme.font); + + float startX = textTopLeft_ss.x + boundsSizeUpToStart.x * scale; + float endX = textTopLeft_ss.x + boundsSizeUpToEnd.x * scale; + + if (startX > endX) + { + (startX, endX) = (endX, startX); + } + + Vector2 c = new((endX + startX) / 2, textTopLeft_ss.y - lineIndex * theme.fontSize * scale); + Vector2 s = new(endX - startX, theme.fontSize * 1.2f * scale); + + Debug.Log($"Drawing selection box for line {lineIndex}: startX={startX}, endX={endX}, center={c}, size={s}"); + Draw.Quad(c, s, new Color(0.2f, 0.6f, 1, 0.5f)); + } } // Draw caret @@ -686,7 +778,7 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto if (state.focused && (int)((Time.time - state.lastInputTime) / blinkDuration) % 2 == 0) { Vector2 caretTextBoundsTest = Draw.CalculateTextBoundsSize("Mj", theme.fontSize, theme.font); - Vector2 caretOffset = GetCaretOffset(displayString, state.cursorBeforeCharIndex, theme.fontSize, theme.font); + Vector2 caretOffset = GetCaretOffset(theme.fontSize, theme.font); Vector2 caretPos_ss = textTopLeft_ss + caretOffset * scale; Vector2 caretSize = new(0.125f * theme.fontSize, caretTextBoundsTest.y * 1.2f); Draw.Quad(caretPos_ss, caretSize * scale, theme.textCol); @@ -698,7 +790,7 @@ public static InputFieldState TextArea(UIHandle id, InputFieldTheme theme, Vecto OnFinishedDrawingUIElement(centre, size); return state; - static bool CanTrigger(ref InputFieldState.TriggerState triggerState, KeyCode key) + static bool CanTrigger(ref TextAreaState.TriggerState triggerState, KeyCode key) { if (InputHelper.IsKeyDownThisFrame(key)) triggerState.lastManualTime = Time.time; @@ -711,7 +803,7 @@ static bool CanTrigger(ref InputFieldState.TriggerState triggerState, KeyCode ke return false; } - static bool CanAutoTrigger(InputFieldState.TriggerState triggerState) + static bool CanAutoTrigger(TextAreaState.TriggerState triggerState) { const float autoTriggerStartDelay = 0.5f; const float autoTriggerRepeatDelay = 0.04f; @@ -720,41 +812,46 @@ static bool CanAutoTrigger(InputFieldState.TriggerState triggerState) return initialDelayOver && canRepeat; } - int CharIndexBeforeMouse(float textLeft) + Vector2Int CharIndexBeforeMouse(float textLeft, float textTop) { - // (note: currently assumes monospaced) - float textBoundsWidth = Draw.CalculateTextBoundsSize(state.text, theme.fontSize, theme.font).x; - float textRight = textLeft + textBoundsWidth * scale; - float t = Mathf.InverseLerp(textLeft, textRight, InputHelper.MousePos.x); - return Mathf.RoundToInt(t * state.text.Length); + Vector2 mousePos = InputHelper.MousePos; + + // Calculate the line index based on the vertical mouse position + float lineHeight = theme.fontSize * scale; // Line height with scaling + float adjustedTextTop = textTop + lineHeight / 3; // Adjust for the center of the first line + int lineIndex = Mathf.FloorToInt((adjustedTextTop - mousePos.y) / lineHeight); + lineIndex = Mathf.Clamp(lineIndex, 0, state.lines.Count - 1); // Clamp to valid line range + + // Get the line of text at the calculated line index + string line = state.lines[lineIndex]; + float lineWidth = Draw.CalculateTextBoundsSize(line.AsSpan(), theme.fontSize, theme.font).x; + float lineLeft = textLeft; + float lineRight = lineLeft + lineWidth * scale; + + // Calculate the character index within the line based on the clamped mouse position + float t = Mathf.InverseLerp(lineLeft, lineRight, mousePos.x); + int charIndexInLine = Mathf.RoundToInt(t * line.Length); + charIndexInLine = Mathf.Clamp(charIndexInLine, 0, line.Length); + + return new Vector2Int(charIndexInLine, lineIndex); } - Vector2 GetCaretOffset(string text, int cursorIndex, float fontSize, FontType font) + Vector2 GetCaretOffset(float fontSize, FontType font) { - // Ensure cursorIndex is within bounds - cursorIndex = Mathf.Clamp(cursorIndex, 0, text.Length); - - ReadOnlySpan span = text.AsSpan(); - int lineIndex = 0, charStart = 0; + // Ensure cursor index is within bounds for the current line + int cursorIndex = Mathf.Clamp(state.cursorBeforeCharIndex, 0, state.lines[state.cursorLineIndex].Length); - for (int i = 0; i < cursorIndex && i < text.Length; i++) - { - if (text[i] == '\n') - { - lineIndex++; - charStart = i + 1; - } - } + // Get the current line of text + string line = state.lines[state.cursorLineIndex]; - int charInLine = cursorIndex - charStart; - int lineEnd = text.IndexOf('\n', charStart); - if (lineEnd == -1) lineEnd = text.Length; + // Calculate the width of the text up to the caret position + ReadOnlySpan span = line.AsSpan(0, cursorIndex); + float x = Draw.CalculateTextBoundsSize(span, fontSize, font).x; - var lineSpan = span.Slice(charStart, Math.Min(charInLine, lineEnd - charStart)); - float x = Draw.CalculateTextBoundsSize(lineSpan, fontSize, font).x; - float y = -lineIndex * fontSize * 1.3f; + // Calculate the vertical offset based on the line index + float y = state.cursorLineIndex * fontSize; - return new Vector2(x, y); + return new Vector2(x, -y); } } @@ -1340,6 +1437,7 @@ static ReadOnlySpan GetNextLine(ref ReadOnlySpan text, int maxLineLe public static ColourPickerState GetColourPickerState(UIHandle id) => GetOrCreateState(id, colPickerStates); public static InputFieldState GetInputFieldState(UIHandle id) => GetOrCreateState(id, inputFieldStates); + public static TextAreaState GetTextAreaState(UIHandle id) => GetOrCreateState(id, textAreaStates); public static ButtonState GetButtonState(UIHandle id) => GetOrCreateState(id, buttonStates); @@ -1350,6 +1448,7 @@ static ReadOnlySpan GetNextLine(ref ReadOnlySpan text, int maxLineLe public static void ResetAllStates() { inputFieldStates.Clear(); + textAreaStates.Clear(); colPickerStates.Clear(); buttonStates.Clear(); scrollbarStates.Clear(); diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index 3f7f4bae..37bcbb7f 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -147,83 +147,6 @@ public void Delete(bool deleteLeft, Func validation = null) UpdateLastInputTime(); } - public void NewLine() - { - if (isSelecting) Delete(true); - TryInsertText("\n"); - } - - public int CountLines() - { - return text.Count(c => c == '\n'); - } - - public void WrapText(int maxCharsPerLine) - { - if (maxCharsPerLine <= 0 || string.IsNullOrEmpty(text)) - return; - - string[] lines = text.Split('\n'); - string wrappedText = ""; - - foreach (string line in lines) - { - string unwrappedLine = line.Replace("\n", ""); // Remove any newlines inside the line itself - string lineWithWrap = ""; - - for (int i = 0; i < unwrappedLine.Length; i++) - { - if (i > 0 && i % maxCharsPerLine == 0) - lineWithWrap += "\n"; - - lineWithWrap += unwrappedLine[i]; - } - - if (wrappedText.Length > 0) - wrappedText += "\n"; - - wrappedText += lineWithWrap; - } - - text = wrappedText; - SetCursorIndex(text.Length); // move cursor to the end - } - - public void EnforceTextLimit(int lineLength, int maxLines) - { - // Split the text into lines - string[] lines = text.Split('\n'); - List limitedLines = new(); - - foreach (string line in lines) - { - // Wrap the line if it exceeds the lineLength - for (int i = 0; i < line.Length; i += lineLength) - { - if (limitedLines.Count >= maxLines) - break; - - string wrappedLine = line.Substring(i, Math.Min(lineLength, line.Length - i)); - limitedLines.Add(wrappedLine); - } - - if (limitedLines.Count >= maxLines) - break; - - // Preserve manual newlines - if (line.Length == 0 && limitedLines.Count < maxLines) - { - limitedLines.Add(string.Empty); - } - } - - // Join the limited lines back into a single string - text = string.Join("\n", limitedLines); - - // Adjust the cursor position if it exceeds the new text length - cursorBeforeCharIndex = Mathf.Clamp(cursorBeforeCharIndex, 0, text.Length); - } - public void SelectAll() { SetCursorIndex(0); @@ -324,4 +247,349 @@ public struct TriggerState public float lastAutoTiggerTime; } } + + public class TextAreaState + { + public TriggerState arrowKeyTrigger; + public TriggerState backspaceTrigger; + public int cursorBeforeCharIndex; + public int cursorLineIndex; + public TriggerState deleteTrigger; + public bool isMouseDownInBounds; + public bool isSelecting; + public float lastInputTime; + public int selectionStartIndex; + public List lines { get; private set; } = new(); + public bool focused { get; private set; } + public int maxCharsPerLine = 0; + + public int SelectionMinIndex => Mathf.Min(selectionStartIndex, cursorBeforeCharIndex); + public int SelectionMaxIndex => Mathf.Max(selectionStartIndex, cursorBeforeCharIndex); + + public void ClearText() + { + lines.Clear(); + lines.Add(string.Empty); + cursorBeforeCharIndex = 0; + cursorLineIndex = 0; + isSelecting = false; + } + + public void SetFocus(bool newFocusState) + { + if (newFocusState != focused) + { + focused = newFocusState; + lastInputTime = Time.time; + + if (!newFocusState) + { + isSelecting = false; + } + } + } + + public void Delete(bool deleteLeft, Func validation = null) + { + if (lines.Count == 0) return; + + string currentLine = lines[cursorLineIndex]; + + if (isSelecting) + { + isSelecting = false; + DeleteSelection(validation); + } + else + { + if (deleteLeft && cursorBeforeCharIndex > 0) + { + // Delete a character to the left of the cursor + string newLine = currentLine.Remove(cursorBeforeCharIndex - 1, 1); + if (validation == null || validation(newLine)) + { + lines[cursorLineIndex] = newLine; + DecrementCursor(); + } + } + else if (!deleteLeft && cursorBeforeCharIndex < currentLine.Length) + { + // Delete a character to the right of the cursor + string newLine = currentLine.Remove(cursorBeforeCharIndex, 1); + if (validation == null || validation(newLine)) + { + lines[cursorLineIndex] = newLine; + } + } + else if (deleteLeft && cursorBeforeCharIndex == 0 && cursorLineIndex > 0) + { + // Merge with the previous line + string previousLine = lines[cursorLineIndex - 1]; + lines[cursorLineIndex - 1] = previousLine + currentLine; + lines.RemoveAt(cursorLineIndex); + cursorLineIndex--; + cursorBeforeCharIndex = previousLine.Length; + } + else if (!deleteLeft && cursorBeforeCharIndex == currentLine.Length && cursorLineIndex < lines.Count - 1) + { + // Merge with the next line + string nextLine = lines[cursorLineIndex + 1]; + lines[cursorLineIndex] += nextLine; + lines.RemoveAt(cursorLineIndex + 1); + } + } + + // Ensure the current line is valid and handle edge cases + if (lines.Count == 0) + { + lines.Add(string.Empty); + cursorLineIndex = 0; + cursorBeforeCharIndex = 0; + } + else if (cursorLineIndex >= lines.Count) + { + cursorLineIndex = lines.Count - 1; + cursorBeforeCharIndex = lines[cursorLineIndex].Length; + } + else if (cursorBeforeCharIndex > lines[cursorLineIndex].Length) + { + cursorBeforeCharIndex = lines[cursorLineIndex].Length; + } + + UpdateLastInputTime(); + } + + private void DeleteSelection(Func validation = null) + { + int startLine = Mathf.Min(cursorLineIndex, selectionStartIndex / maxCharsPerLine); + int endLine = Mathf.Max(cursorLineIndex, selectionStartIndex / maxCharsPerLine); + + int startChar = Mathf.Min(cursorBeforeCharIndex, selectionStartIndex % maxCharsPerLine); + int endChar = Mathf.Max(cursorBeforeCharIndex, selectionStartIndex % maxCharsPerLine); + + if (startLine == endLine) + { + string line = lines[startLine]; + string newLine = line.Remove(startChar, endChar - startChar); + if (validation == null || validation(newLine)) + { + lines[startLine] = newLine; + cursorBeforeCharIndex = startChar; + } + } + else + { + string startLineText = lines[startLine].Substring(0, startChar); + string endLineText = lines[endLine].Substring(endChar); + lines[startLine] = startLineText + endLineText; + + for (int i = endLine; i > startLine; i--) + { + lines.RemoveAt(i); + } + + cursorLineIndex = startLine; + cursorBeforeCharIndex = startChar; + } + } + + public void NewLine() + { + string currentLine = lines[cursorLineIndex]; + string newLine = currentLine.Substring(cursorBeforeCharIndex); // Text after the caret + lines[cursorLineIndex] = currentLine.Substring(0, cursorBeforeCharIndex) + "\n"; // Text before the caret with \n + + // Insert the new line into the list + lines.Insert(cursorLineIndex + 1, newLine); + + // Move the caret to the start of the new line + cursorLineIndex++; + cursorBeforeCharIndex = 0; + + UpdateLastInputTime(); + } + + public void SelectAll() + { + cursorLineIndex = 0; + cursorBeforeCharIndex = 0; + selectionStartIndex = lines.Sum(line => line.Length + 1) - 1; // Account for line breaks + isSelecting = true; + } + + public void SetCursorIndex(int charIndex, int lineIndex, bool select = false) + { + if (select && !isSelecting) + { + isSelecting = true; + selectionStartIndex = cursorBeforeCharIndex + cursorLineIndex * maxCharsPerLine; + } + + cursorLineIndex = Mathf.Clamp(lineIndex, 0, lines.Count - 1); + cursorBeforeCharIndex = Mathf.Clamp(charIndex, 0, lines[cursorLineIndex].Length); + + UpdateLastInputTime(); + + if (cursorBeforeCharIndex == selectionStartIndex || !select) + { + isSelecting = false; + } + } + + public void UpdateLastInputTime() + { + lastInputTime = Time.time; + } + + public void SetText(List newLines, bool focus = true) + { + lines = newLines ?? new List { string.Empty }; + cursorLineIndex = 0; + cursorBeforeCharIndex = 0; + SetFocus(focus); + } + + public void TryInsertText(string textToAdd, Func validation = null) + { + if (isSelecting) Delete(true); + + string currentLine = lines[cursorLineIndex]; + string newLine = currentLine.Insert(cursorBeforeCharIndex, textToAdd); + + if (validation == null || validation(newLine)) + { + lines[cursorLineIndex] = newLine; + cursorBeforeCharIndex += textToAdd.Length; + + // Handle wrapping if maxCharsPerLine is set + if (maxCharsPerLine > 0) + { + while (lines[cursorLineIndex].Length > maxCharsPerLine) + { + string currentText = lines[cursorLineIndex]; + int wrapIndex = FindWrapIndex(currentText); + + // Split the line at the wrap index + string overflowText = currentText.Substring(wrapIndex); + lines[cursorLineIndex] = currentText.Substring(0, wrapIndex); + + // Add overflow text to the next line + if (cursorLineIndex + 1 < lines.Count) + { + lines[cursorLineIndex + 1] = overflowText + lines[cursorLineIndex + 1]; + } + else + { + lines.Add(overflowText); + } + + // Adjust cursor position + cursorLineIndex++; + cursorBeforeCharIndex = overflowText.Length; + } + } + } + } + + private int FindWrapIndex(string text) + { + if (text.Length <= maxCharsPerLine) return text.Length; + + // Look for the last whitespace within the maxCharsPerLine limit + for (int i = maxCharsPerLine; i > 0; i--) + { + if (char.IsWhiteSpace(text[i])) + { + return i + 1; // Include the space in the wrap + } + } + + // If no whitespace is found, split at maxCharsPerLine + return maxCharsPerLine; + } + + public void IncrementCursor(bool select = false) + { + if (cursorBeforeCharIndex < lines[cursorLineIndex].Length) + { + SetCursorIndex(cursorBeforeCharIndex + 1, cursorLineIndex, select); + } + else if (cursorLineIndex < lines.Count - 1) + { + SetCursorIndex(0, cursorLineIndex + 1, select); + } + } + + public void DecrementCursor(bool select = false) + { + if (cursorBeforeCharIndex > 0) + { + SetCursorIndex(cursorBeforeCharIndex - 1, cursorLineIndex, select); + } + else if (cursorLineIndex > 0) + { + SetCursorIndex(lines[cursorLineIndex - 1].Length, cursorLineIndex - 1, select); + } + } + + public void IncrementLine(bool select = false) + { + if (cursorLineIndex == lines.Count) + { + SetCursorIndex(lines[cursorLineIndex].Length, cursorLineIndex, select); + } + else if (cursorLineIndex < lines.Count - 1) + { + if (lines[cursorLineIndex + 1].Length < cursorBeforeCharIndex) + { + cursorBeforeCharIndex = lines[cursorLineIndex + 1].Length; + } + SetCursorIndex(cursorBeforeCharIndex, cursorLineIndex + 1, select); + } + } + + public void DecrementLine(bool select = false) + { + if (cursorLineIndex == 0) + { + SetCursorIndex(0, cursorLineIndex, select); + } + else if (cursorLineIndex > 0) + { + if (lines[cursorLineIndex - 1].Length < cursorBeforeCharIndex) + { + cursorBeforeCharIndex = lines[cursorLineIndex - 1].Length; + } + SetCursorIndex(cursorBeforeCharIndex, cursorLineIndex - 1, select); + } + } + + public int NextWordEndIndex() + { + string currentLine = lines[cursorLineIndex]; + for (int i = cursorBeforeCharIndex; i < currentLine.Length; i++) + { + if (char.IsWhiteSpace(currentLine[i])) return i; + } + + return currentLine.Length; + } + + public int PrevWordIndex() + { + string currentLine = lines[cursorLineIndex]; + for (int i = cursorBeforeCharIndex - 1; i >= 0; i--) + { + if (char.IsWhiteSpace(currentLine[i])) return i + 1; + } + + return 0; + } + + public struct TriggerState + { + public float lastManualTime; + public float lastAutoTiggerTime; + } + } } \ No newline at end of file diff --git a/TestData/Deleted Projects/MainTest/Chips/AND.json b/TestData/Deleted Projects/MainTest/Chips/AND.json new file mode 100644 index 00000000..9f343dfc --- /dev/null +++ b/TestData/Deleted Projects/MainTest/Chips/AND.json @@ -0,0 +1,149 @@ +{ + "Name": "AND", + "NameLocation": 0, + "Size": { + "x": 0.7, + "y": 0.5 + }, + "Colour": { + "r": 0.2440358, + "g": 0.57116735, + "b": 0.6800216, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":436332053, + "Position":{ + "x":-7.46774, + "y":1.25806 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":123456040, + "Position":{ + "x":-7.32258, + "y":-0.64516 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":1580367471, + "Position":{ + "x":5.43548, + "y":0.08065 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NAND", + "ID":910879205, + "Label":null, + "Position":{ + "x":-2.58065, + "y":0.08065 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1120748047, + "Label":null, + "Position":{ + "x":0.41935, + "y":-0.03226 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":436332053 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":910879205 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":123456040 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":910879205 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":910879205 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1120748047 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":910879205 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1120748047 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1120748047 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1580367471 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file From f30ef0acebc782919f2346c8d9d1cbfd3391a6e9 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Mon, 21 Apr 2025 01:58:53 +0300 Subject: [PATCH 019/124] selection not loosing focus bug fix --- .../Types/SubTypes/NoteDescription.cs.meta | 2 ++ .../Scripts/Graphics/UI/Menus/NoteTextMenu.cs | 2 +- Assets/Scripts/Seb/SebVis/UI/UI.cs | 22 +++++++++------ Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 28 +++++++++++++++++-- 4 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs.meta diff --git a/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs.meta b/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs.meta new file mode 100644 index 00000000..7d75a264 --- /dev/null +++ b/Assets/Scripts/Description/Types/SubTypes/NoteDescription.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: e671a94ba3f6d401286fb933621efb6d \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs index ccf7253a..a4639fc0 100644 --- a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs @@ -45,7 +45,7 @@ public static void DrawMenu() Vector2 pos = UI.Centre + Vector2.up * 5; // Draw input field - TextAreaState inputFieldState = UI.TextArea(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, MaxLabelLength, 7, null, true); + TextAreaState inputFieldState = UI.TextArea(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, MaxLabelLength, 9, null, true); Bounds2D inputFieldBounds = UI.PrevBounds; string newName = string.Join("", inputFieldState.lines); diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index 5c399c5f..6dcc7d3a 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -561,7 +561,6 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 // Set caret pos based on mouse position if (mouseInBounds) { - Vector2Int newCaretPos = CharIndexBeforeMouse(textTopLeft_ss.x, textTopLeft_ss.y); state.SetCursorIndex(newCaretPos.x, newCaretPos.y, InputHelper.ShiftIsHeld); } @@ -596,7 +595,8 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 // Paste from clipboard if (InputHelper.CtrlIsHeld && InputHelper.IsKeyDownThisFrame(KeyCode.V)) { - state.TryInsertText(InputHelper.GetClipboardContents(), validation); + string sanitizedText = InputHelper.GetClipboardContents().Replace("\n", ""); + state.TryInsertText(sanitizedText, validation); } if (state.lines.Count > 0) @@ -701,7 +701,6 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 float fontSize_ss = theme.fontSize * scale; bool showDefaultText = (state.lines.Count == 0 || (state.lines.Count == 1 && string.IsNullOrEmpty(state.lines[0]))) || !Application.isPlaying; string[] lines = showDefaultText ? new[] { "Enter something..." } : state.lines.ToArray(); - Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; for (int i = 0; i < lines.Length; i++) { @@ -733,14 +732,13 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 } } - // Draw selection box if (state.isSelecting) { - Debug.Log($"Drawing selection: selectionStartIndex={state.selectionStartIndex}, cursorBeforeCharIndex={state.cursorBeforeCharIndex}"); - + // Calculate start and end line indices int startLine = Mathf.Min(state.cursorLineIndex, state.selectionStartIndex / state.maxCharsPerLine); int endLine = Mathf.Max(state.cursorLineIndex, state.selectionStartIndex / state.maxCharsPerLine); + // Calculate start and end character indices int startChar = Mathf.Min(state.cursorBeforeCharIndex, state.selectionStartIndex % state.maxCharsPerLine); int endChar = Mathf.Max(state.cursorBeforeCharIndex, state.selectionStartIndex % state.maxCharsPerLine); @@ -751,9 +749,16 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 int lineEndIndex = line.Length; // Determine the selection range for this line - int selectionStartInLine = (lineIndex == startLine) ? startChar : lineStartIndex; - int selectionEndInLine = (lineIndex == endLine) ? endChar : lineEndIndex; + int selectionStartInLine = (lineIndex == startLine) ? Mathf.Clamp(startChar, lineStartIndex, lineEndIndex) : lineStartIndex; + int selectionEndInLine = (lineIndex == endLine) ? Mathf.Clamp(endChar, lineStartIndex, lineEndIndex) : lineEndIndex; + + // Ensure selectionStartInLine is less than or equal to selectionEndInLine + if (selectionStartInLine > selectionEndInLine) + { + (selectionStartInLine, selectionEndInLine) = (selectionEndInLine, selectionStartInLine); + } + // Draw the selection box for the current line Vector2 boundsSizeUpToStart = Draw.CalculateTextBoundsSize(line.AsSpan(0, selectionStartInLine), theme.fontSize, theme.font); Vector2 boundsSizeUpToEnd = Draw.CalculateTextBoundsSize(line.AsSpan(0, selectionEndInLine), theme.fontSize, theme.font); @@ -768,7 +773,6 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 Vector2 c = new((endX + startX) / 2, textTopLeft_ss.y - lineIndex * theme.fontSize * scale); Vector2 s = new(endX - startX, theme.fontSize * 1.2f * scale); - Debug.Log($"Drawing selection box for line {lineIndex}: startX={startX}, endX={endX}, center={c}, size={s}"); Draw.Quad(c, s, new Color(0.2f, 0.6f, 1, 0.5f)); } } diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index 37bcbb7f..bec46c49 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -284,7 +284,9 @@ public void SetFocus(bool newFocusState) if (!newFocusState) { + // Reset selection and caret position when focus is lost isSelecting = false; + // selectionStartIndex = cursorBeforeCharIndex; // Reset selection start } } } @@ -325,6 +327,13 @@ public void Delete(bool deleteLeft, Func validation = null) { // Merge with the previous line string previousLine = lines[cursorLineIndex - 1]; + + // Remove the trailing \n from the previous line if it exists + if (previousLine.EndsWith("\n")) + { + previousLine = previousLine.Substring(0, previousLine.Length - 1); + } + lines[cursorLineIndex - 1] = previousLine + currentLine; lines.RemoveAt(cursorLineIndex); cursorLineIndex--; @@ -367,6 +376,10 @@ private void DeleteSelection(Func validation = null) int startChar = Mathf.Min(cursorBeforeCharIndex, selectionStartIndex % maxCharsPerLine); int endChar = Mathf.Max(cursorBeforeCharIndex, selectionStartIndex % maxCharsPerLine); + // Clamp startChar and endChar to the valid range of the string + startChar = Mathf.Clamp(startChar, 0, lines[startLine].Length); + endChar = Mathf.Clamp(endChar, 0, lines[endLine].Length); + if (startLine == endLine) { string line = lines[startLine]; @@ -395,11 +408,17 @@ private void DeleteSelection(Func validation = null) public void NewLine() { + // Clear selection before creating a new line + if (isSelecting) + { + DeleteSelection(); + } + string currentLine = lines[cursorLineIndex]; string newLine = currentLine.Substring(cursorBeforeCharIndex); // Text after the caret - lines[cursorLineIndex] = currentLine.Substring(0, cursorBeforeCharIndex) + "\n"; // Text before the caret with \n + lines[cursorLineIndex] = currentLine.Substring(0, cursorBeforeCharIndex) + "\n"; // Text before the caret - // Insert the new line into the list + // Insert the new line into the list with a newline character lines.Insert(cursorLineIndex + 1, newLine); // Move the caret to the start of the new line @@ -428,9 +447,12 @@ public void SetCursorIndex(int charIndex, int lineIndex, bool select = false) cursorLineIndex = Mathf.Clamp(lineIndex, 0, lines.Count - 1); cursorBeforeCharIndex = Mathf.Clamp(charIndex, 0, lines[cursorLineIndex].Length); + UpdateLastInputTime(); - if (cursorBeforeCharIndex == selectionStartIndex || !select) + int globalIndex = maxCharsPerLine * cursorLineIndex + cursorBeforeCharIndex; + + if (globalIndex == selectionStartIndex || !select) { isSelecting = false; } From 370cbab45faaf815ad4e13a7c2bb5b1868397257 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Tue, 22 Apr 2025 00:35:41 +0300 Subject: [PATCH 020/124] fixed really anoying bug with selecting --- Assets/Scripts/Seb/SebVis/UI/UI.cs | 52 +++++++++++++++++++----------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index 6dcc7d3a..a06a16bd 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -734,29 +734,43 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 if (state.isSelecting) { - // Calculate start and end line indices - int startLine = Mathf.Min(state.cursorLineIndex, state.selectionStartIndex / state.maxCharsPerLine); - int endLine = Mathf.Max(state.cursorLineIndex, state.selectionStartIndex / state.maxCharsPerLine); + // Calculate global start and end indices dynamically + int startGlobalIndex = 0; + int endGlobalIndex = 0; - // Calculate start and end character indices - int startChar = Mathf.Min(state.cursorBeforeCharIndex, state.selectionStartIndex % state.maxCharsPerLine); - int endChar = Mathf.Max(state.cursorBeforeCharIndex, state.selectionStartIndex % state.maxCharsPerLine); + // Calculate the global index for the cursor and selection start + for (int i = 0; i < state.lines.Count; i++) + { + if (i < state.cursorLineIndex) + { + startGlobalIndex += state.lines[i].Length; + } + if (i < state.selectionStartIndex / state.maxCharsPerLine) + { + endGlobalIndex += state.lines[i].Length; + } + } - for (int lineIndex = startLine; lineIndex <= endLine; lineIndex++) + startGlobalIndex += state.cursorBeforeCharIndex; + endGlobalIndex += state.selectionStartIndex % state.maxCharsPerLine; + + // Ensure startGlobalIndex is less than or equal to endGlobalIndex + if (startGlobalIndex > endGlobalIndex) { - string line = state.lines[lineIndex]; - int lineStartIndex = 0; - int lineEndIndex = line.Length; + (startGlobalIndex, endGlobalIndex) = (endGlobalIndex, startGlobalIndex); + } - // Determine the selection range for this line - int selectionStartInLine = (lineIndex == startLine) ? Mathf.Clamp(startChar, lineStartIndex, lineEndIndex) : lineStartIndex; - int selectionEndInLine = (lineIndex == endLine) ? Mathf.Clamp(endChar, lineStartIndex, lineEndIndex) : lineEndIndex; + int currentGlobalIndex = 0; - // Ensure selectionStartInLine is less than or equal to selectionEndInLine - if (selectionStartInLine > selectionEndInLine) - { - (selectionStartInLine, selectionEndInLine) = (selectionEndInLine, selectionStartInLine); - } + for (int lineIndex = 0; lineIndex < state.lines.Count; lineIndex++) + { + string line = state.lines[lineIndex]; + int lineStartIndex = currentGlobalIndex; + int lineEndIndex = lineStartIndex + line.Length; + + // Determine the selection range for this line using global indices + int selectionStartInLine = Mathf.Clamp(startGlobalIndex - lineStartIndex, 0, line.Length); + int selectionEndInLine = Mathf.Clamp(endGlobalIndex - lineStartIndex, 0, line.Length); // Draw the selection box for the current line Vector2 boundsSizeUpToStart = Draw.CalculateTextBoundsSize(line.AsSpan(0, selectionStartInLine), theme.fontSize, theme.font); @@ -774,6 +788,8 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 Vector2 s = new(endX - startX, theme.fontSize * 1.2f * scale); Draw.Quad(c, s, new Color(0.2f, 0.6f, 1, 0.5f)); + + currentGlobalIndex += line.Length; } } From f0de6a78560f9f18dd8b2aa88b904209511d7116 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Tue, 22 Apr 2025 01:18:42 +0300 Subject: [PATCH 021/124] fixed newline bug --- Assets/Scripts/Seb/SebVis/UI/UI.cs | 2 ++ Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index a06a16bd..ca75920d 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -701,6 +701,8 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 float fontSize_ss = theme.fontSize * scale; bool showDefaultText = (state.lines.Count == 0 || (state.lines.Count == 1 && string.IsNullOrEmpty(state.lines[0]))) || !Application.isPlaying; string[] lines = showDefaultText ? new[] { "Enter something..." } : state.lines.ToArray(); + + Debug.Log($"Lines: {string.Join(", ", lines).Replace("\n", "\\n")}"); Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; for (int i = 0; i < lines.Length; i++) { diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index bec46c49..0bc1ff03 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -447,7 +447,6 @@ public void SetCursorIndex(int charIndex, int lineIndex, bool select = false) cursorLineIndex = Mathf.Clamp(lineIndex, 0, lines.Count - 1); cursorBeforeCharIndex = Mathf.Clamp(charIndex, 0, lines[cursorLineIndex].Length); - UpdateLastInputTime(); int globalIndex = maxCharsPerLine * cursorLineIndex + cursorBeforeCharIndex; @@ -476,6 +475,21 @@ public void TryInsertText(string textToAdd, Func validation = null if (isSelecting) Delete(true); string currentLine = lines[cursorLineIndex]; + + // Check if the current line contains a newline character + if (currentLine.Contains("\n")) + { + // Find the index of the newline character + int newlineIndex = currentLine.IndexOf('\n'); + + // If the cursor is positioned after the newline, move it before the newline + if (cursorBeforeCharIndex > newlineIndex) + { + cursorBeforeCharIndex = newlineIndex; + } + } + + // Insert the text at the current cursor position string newLine = currentLine.Insert(cursorBeforeCharIndex, textToAdd); if (validation == null || validation(newLine)) From 3a008dcf34c1dc8471a5de76ddccea0d1e4082cf Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Tue, 22 Apr 2025 21:22:57 +0300 Subject: [PATCH 022/124] Added limitation --- .../Scripts/Graphics/UI/Menus/NoteTextMenu.cs | 4 +- Assets/Scripts/Seb/SebVis/UI/UI.cs | 11 ++-- Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 63 ++++++++++++++----- 3 files changed, 56 insertions(+), 22 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs index a4639fc0..fbdd71a0 100644 --- a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs @@ -41,11 +41,11 @@ public static void DrawMenu() { Vector2 unpaddedSize = Draw.CalculateTextBoundsSize(MaxLabelLength, inputTheme.fontSize, inputTheme.font); const float padX = 2.25f; - Vector2 inputFieldSize = unpaddedSize + new Vector2(padX, 26f); + Vector2 inputFieldSize = unpaddedSize + new Vector2(padX, 28f); Vector2 pos = UI.Centre + Vector2.up * 5; // Draw input field - TextAreaState inputFieldState = UI.TextArea(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, MaxLabelLength, 9, null, true); + TextAreaState inputFieldState = UI.TextArea(ID_NameField, inputTheme, pos, inputFieldSize, note.Text, Anchor.Centre, padX / 2, MaxLabelLength, 8, null, true); Bounds2D inputFieldBounds = UI.PrevBounds; string newName = string.Join("", inputFieldState.lines); diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index ca75920d..206cdbc3 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -541,6 +541,7 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 { TextAreaState state = GetTextAreaState(id); state.maxCharsPerLine = lineLength.Length; + state.maxLines = maxLines; Vector2 centre = CalculateCentre(pos, size, anchor); (Vector2 centre, Vector2 size) ss = UIToScreenSpace(centre, size); @@ -614,7 +615,7 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 { state.Delete(false, validation); } - if (InputHelper.IsKeyDownThisFrame(KeyCode.Return) && state.lines.Count < maxLines - 1) + if (InputHelper.IsKeyDownThisFrame(KeyCode.Return) && state.lines.Count < maxLines) { state.NewLine(); } @@ -706,7 +707,7 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; for (int i = 0; i < lines.Length; i++) { - Vector2 textPos_ss = textTopLeft_ss + new Vector2(0, -i * theme.fontSize * scale); + Vector2 textPos_ss = textTopLeft_ss + new Vector2(0, -i * theme.fontSize * 1.2f * scale); Draw.Text(theme.font, lines[i], fontSize_ss, textPos_ss, Anchor.TextCentreLeft, textCol); } @@ -725,7 +726,7 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 if (i < state.cursorLineIndex) { // Add the size of the entire line for lines before the caret's line - boundsSizeUpToCaret.y -= theme.fontSize * 1.3f * scale; // Move down by line height + boundsSizeUpToCaret.y -= theme.fontSize * 1.2f * scale; // Move down by line height } else { @@ -786,7 +787,7 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 (startX, endX) = (endX, startX); } - Vector2 c = new((endX + startX) / 2, textTopLeft_ss.y - lineIndex * theme.fontSize * scale); + Vector2 c = new((endX + startX) / 2, textTopLeft_ss.y - lineIndex * theme.fontSize * 1.2f * scale); Vector2 s = new(endX - startX, theme.fontSize * 1.2f * scale); Draw.Quad(c, s, new Color(0.2f, 0.6f, 1, 0.5f)); @@ -871,7 +872,7 @@ Vector2 GetCaretOffset(float fontSize, FontType font) float x = Draw.CalculateTextBoundsSize(span, fontSize, font).x; // Calculate the vertical offset based on the line index - float y = state.cursorLineIndex * fontSize; + float y = state.cursorLineIndex * 1.2f * fontSize; return new Vector2(x, -y); } diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index 0bc1ff03..a4c23c64 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -262,6 +262,7 @@ public class TextAreaState public List lines { get; private set; } = new(); public bool focused { get; private set; } public int maxCharsPerLine = 0; + public int maxLines = 0; public int SelectionMinIndex => Mathf.Min(selectionStartIndex, cursorBeforeCharIndex); public int SelectionMaxIndex => Mathf.Max(selectionStartIndex, cursorBeforeCharIndex); @@ -415,10 +416,25 @@ public void NewLine() } string currentLine = lines[cursorLineIndex]; - string newLine = currentLine.Substring(cursorBeforeCharIndex); // Text after the caret - lines[cursorLineIndex] = currentLine.Substring(0, cursorBeforeCharIndex) + "\n"; // Text before the caret - // Insert the new line into the list with a newline character + // Check if the current line already ends with a newline character + bool endsWithNewline = currentLine.Contains("\n"); + + // Text after the caret + string newLine = currentLine.Substring(cursorBeforeCharIndex); + + // Text before the caret + if (endsWithNewline) + { + lines[cursorLineIndex] = currentLine.Substring(0, cursorBeforeCharIndex); // Keep the existing \n + newLine = newLine + "\n"; // Remove the \n from the new line + } + else + { + lines[cursorLineIndex] = currentLine.Substring(0, cursorBeforeCharIndex) + "\n"; // Add a new \n + } + + // Insert the new line into the list lines.Insert(cursorLineIndex + 1, newLine); // Move the caret to the start of the new line @@ -432,7 +448,9 @@ public void SelectAll() { cursorLineIndex = 0; cursorBeforeCharIndex = 0; - selectionStartIndex = lines.Sum(line => line.Length + 1) - 1; // Account for line breaks + selectionStartIndex = 0; + cursorLineIndex = lines.Count - 1; + cursorBeforeCharIndex = lines[cursorLineIndex].Length; isSelecting = true; } @@ -472,24 +490,27 @@ public void SetText(List newLines, bool focus = true) public void TryInsertText(string textToAdd, Func validation = null) { - if (isSelecting) Delete(true); + if (isSelecting) + { + Delete(true); + } string currentLine = lines[cursorLineIndex]; - // Check if the current line contains a newline character - if (currentLine.Contains("\n")) + // Prevent adding text if maxLines is reached and the cursor is on the last line + if (lines.Count == maxLines && cursorLineIndex == lines.Count - 1) { - // Find the index of the newline character - int newlineIndex = currentLine.IndexOf('\n'); - - // If the cursor is positioned after the newline, move it before the newline - if (cursorBeforeCharIndex > newlineIndex) + // Limit the number of characters in the last line + if (currentLine.Length >= maxCharsPerLine) { - cursorBeforeCharIndex = newlineIndex; + return; // Do nothing if the last line is already full } + + // Truncate the text to fit within the maxCharsPerLine limit + int remainingChars = maxCharsPerLine - currentLine.Length; + textToAdd = textToAdd.Substring(0, Mathf.Min(textToAdd.Length, remainingChars)); } - // Insert the text at the current cursor position string newLine = currentLine.Insert(cursorBeforeCharIndex, textToAdd); if (validation == null || validation(newLine)) @@ -514,14 +535,26 @@ public void TryInsertText(string textToAdd, Func validation = null { lines[cursorLineIndex + 1] = overflowText + lines[cursorLineIndex + 1]; } - else + else if (lines.Count < maxLines) { lines.Add(overflowText); } + else + { + // Truncate overflow text if maxLines is reached + lines[cursorLineIndex] += overflowText.Substring(0, Mathf.Min(overflowText.Length, maxCharsPerLine - lines[cursorLineIndex].Length)); + break; + } // Adjust cursor position cursorLineIndex++; cursorBeforeCharIndex = overflowText.Length; + + // Stop wrapping if maxLines is reached + if (lines.Count >= maxLines) + { + break; + } } } } From 627ca20d2420879b8d03b02721869e14c8367084 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat <48175036+UkrainianBanderasCat@users.noreply.github.com> Date: Tue, 22 Apr 2025 21:30:37 +0300 Subject: [PATCH 023/124] Delete TestData directory --- TestData/AppSettings.json | 6 - .../Deleted Projects/MainTest/Chips/AND.json | 149 -- .../MainTest/Chips/7-SEGMENT DRIVER.json | 814 -------- TestData/Projects/MainTest/Chips/ADDER-4.json | 436 ---- TestData/Projects/MainTest/Chips/ADDER-8.json | 277 --- TestData/Projects/MainTest/Chips/ADDER.json | 302 --- TestData/Projects/MainTest/Chips/ALU-8.json | 1076 ---------- TestData/Projects/MainTest/Chips/ALU.json | 383 ---- TestData/Projects/MainTest/Chips/AMFsdf.json | 33 - .../Projects/MainTest/Chips/AND(8,1).json | 531 ----- TestData/Projects/MainTest/Chips/AND-3.json | 160 -- TestData/Projects/MainTest/Chips/AND-8.json | 556 ------ TestData/Projects/MainTest/Chips/AND.json | 149 -- TestData/Projects/MainTest/Chips/BUF-8.json | 531 ----- .../Projects/MainTest/Chips/BUS BUFFER.json | 319 --- .../Projects/MainTest/Chips/CONTROL UNIT.json | 975 --------- TestData/Projects/MainTest/Chips/D-LATCH.json | 266 --- TestData/Projects/MainTest/Chips/DABBLE.json | 519 ----- .../Projects/MainTest/Chips/DECIMAL-4.json | 302 --- .../Projects/MainTest/Chips/DECIMAL-8.json | 447 ----- .../Projects/MainTest/Chips/DECODE-3.json | 756 ------- .../Projects/MainTest/Chips/DECODER-2.json | 352 ---- TestData/Projects/MainTest/Chips/DISP-7.json | 768 ------- .../MainTest/Chips/DOUBLE DABBLE.json | 825 -------- .../Projects/MainTest/Chips/EQUALS-8.json | 706 ------- TestData/Projects/MainTest/Chips/FLAGS.json | 135 -- .../Projects/MainTest/Chips/FLIP-FLOP.json | 174 -- TestData/Projects/MainTest/Chips/KeyTest.json | 32 - TestData/Projects/MainTest/Chips/LSB.json | 85 - .../Projects/MainTest/Chips/LSHIFT-8.json | 194 -- TestData/Projects/MainTest/Chips/MEM-1.json | 249 --- TestData/Projects/MainTest/Chips/MEM-16.json | 1656 ---------------- TestData/Projects/MainTest/Chips/MEM-256.json | 1766 ----------------- TestData/Projects/MainTest/Chips/MUX-8.json | 224 --- TestData/Projects/MainTest/Chips/NOR.json | 227 --- TestData/Projects/MainTest/Chips/NOT-8.json | 408 ---- TestData/Projects/MainTest/Chips/NOT.json | 99 - TestData/Projects/MainTest/Chips/OR-8.json | 556 ------ TestData/Projects/MainTest/Chips/OR.json | 160 -- TestData/Projects/MainTest/Chips/PC.json | 391 ---- .../Chips/RAM-256\303\2278 (async).json" | 679 ------- .../Projects/MainTest/Chips/RAM-sync.json | 366 ---- TestData/Projects/MainTest/Chips/REG-8.json | 327 --- .../Projects/MainTest/Chips/REGISTER-1.json | 263 --- .../Projects/MainTest/Chips/REGISTER-4.json | 420 ---- .../Projects/MainTest/Chips/REGISTER-8.json | 688 ------- TestData/Projects/MainTest/Chips/TOGGLE.json | 199 -- TestData/Projects/MainTest/Chips/WIP2.json | 1548 --------------- TestData/Projects/MainTest/Chips/XNOR.json | 135 -- TestData/Projects/MainTest/Chips/XOR.json | 188 -- TestData/Projects/MainTest/Chips/demo.json | 529 ----- TestData/Projects/MainTest/Chips/test.json | 162 -- .../Projects/MainTest/ProjectDescription.json | 138 -- 53 files changed, 23636 deletions(-) delete mode 100644 TestData/AppSettings.json delete mode 100644 TestData/Deleted Projects/MainTest/Chips/AND.json delete mode 100644 TestData/Projects/MainTest/Chips/7-SEGMENT DRIVER.json delete mode 100644 TestData/Projects/MainTest/Chips/ADDER-4.json delete mode 100644 TestData/Projects/MainTest/Chips/ADDER-8.json delete mode 100644 TestData/Projects/MainTest/Chips/ADDER.json delete mode 100644 TestData/Projects/MainTest/Chips/ALU-8.json delete mode 100644 TestData/Projects/MainTest/Chips/ALU.json delete mode 100644 TestData/Projects/MainTest/Chips/AMFsdf.json delete mode 100644 TestData/Projects/MainTest/Chips/AND(8,1).json delete mode 100644 TestData/Projects/MainTest/Chips/AND-3.json delete mode 100644 TestData/Projects/MainTest/Chips/AND-8.json delete mode 100644 TestData/Projects/MainTest/Chips/AND.json delete mode 100644 TestData/Projects/MainTest/Chips/BUF-8.json delete mode 100644 TestData/Projects/MainTest/Chips/BUS BUFFER.json delete mode 100644 TestData/Projects/MainTest/Chips/CONTROL UNIT.json delete mode 100644 TestData/Projects/MainTest/Chips/D-LATCH.json delete mode 100644 TestData/Projects/MainTest/Chips/DABBLE.json delete mode 100644 TestData/Projects/MainTest/Chips/DECIMAL-4.json delete mode 100644 TestData/Projects/MainTest/Chips/DECIMAL-8.json delete mode 100644 TestData/Projects/MainTest/Chips/DECODE-3.json delete mode 100644 TestData/Projects/MainTest/Chips/DECODER-2.json delete mode 100644 TestData/Projects/MainTest/Chips/DISP-7.json delete mode 100644 TestData/Projects/MainTest/Chips/DOUBLE DABBLE.json delete mode 100644 TestData/Projects/MainTest/Chips/EQUALS-8.json delete mode 100644 TestData/Projects/MainTest/Chips/FLAGS.json delete mode 100644 TestData/Projects/MainTest/Chips/FLIP-FLOP.json delete mode 100644 TestData/Projects/MainTest/Chips/KeyTest.json delete mode 100644 TestData/Projects/MainTest/Chips/LSB.json delete mode 100644 TestData/Projects/MainTest/Chips/LSHIFT-8.json delete mode 100644 TestData/Projects/MainTest/Chips/MEM-1.json delete mode 100644 TestData/Projects/MainTest/Chips/MEM-16.json delete mode 100644 TestData/Projects/MainTest/Chips/MEM-256.json delete mode 100644 TestData/Projects/MainTest/Chips/MUX-8.json delete mode 100644 TestData/Projects/MainTest/Chips/NOR.json delete mode 100644 TestData/Projects/MainTest/Chips/NOT-8.json delete mode 100644 TestData/Projects/MainTest/Chips/NOT.json delete mode 100644 TestData/Projects/MainTest/Chips/OR-8.json delete mode 100644 TestData/Projects/MainTest/Chips/OR.json delete mode 100644 TestData/Projects/MainTest/Chips/PC.json delete mode 100644 "TestData/Projects/MainTest/Chips/RAM-256\303\2278 (async).json" delete mode 100644 TestData/Projects/MainTest/Chips/RAM-sync.json delete mode 100644 TestData/Projects/MainTest/Chips/REG-8.json delete mode 100644 TestData/Projects/MainTest/Chips/REGISTER-1.json delete mode 100644 TestData/Projects/MainTest/Chips/REGISTER-4.json delete mode 100644 TestData/Projects/MainTest/Chips/REGISTER-8.json delete mode 100644 TestData/Projects/MainTest/Chips/TOGGLE.json delete mode 100644 TestData/Projects/MainTest/Chips/WIP2.json delete mode 100644 TestData/Projects/MainTest/Chips/XNOR.json delete mode 100644 TestData/Projects/MainTest/Chips/XOR.json delete mode 100644 TestData/Projects/MainTest/Chips/demo.json delete mode 100644 TestData/Projects/MainTest/Chips/test.json delete mode 100644 TestData/Projects/MainTest/ProjectDescription.json diff --git a/TestData/AppSettings.json b/TestData/AppSettings.json deleted file mode 100644 index 75e0b057..00000000 --- a/TestData/AppSettings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "ResolutionX": 1280, - "ResolutionY": 720, - "fullscreenMode": 1, - "VSyncEnabled": true -} \ No newline at end of file diff --git a/TestData/Deleted Projects/MainTest/Chips/AND.json b/TestData/Deleted Projects/MainTest/Chips/AND.json deleted file mode 100644 index 9f343dfc..00000000 --- a/TestData/Deleted Projects/MainTest/Chips/AND.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "Name": "AND", - "NameLocation": 0, - "Size": { - "x": 0.7, - "y": 0.5 - }, - "Colour": { - "r": 0.2440358, - "g": 0.57116735, - "b": 0.6800216, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":436332053, - "Position":{ - "x":-7.46774, - "y":1.25806 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":123456040, - "Position":{ - "x":-7.32258, - "y":-0.64516 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":1580367471, - "Position":{ - "x":5.43548, - "y":0.08065 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NAND", - "ID":910879205, - "Label":null, - "Position":{ - "x":-2.58065, - "y":0.08065 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1120748047, - "Label":null, - "Position":{ - "x":0.41935, - "y":-0.03226 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":436332053 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":910879205 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":123456040 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":910879205 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":910879205 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1120748047 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":910879205 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1120748047 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1120748047 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1580367471 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/7-SEGMENT DRIVER.json b/TestData/Projects/MainTest/Chips/7-SEGMENT DRIVER.json deleted file mode 100644 index 16595c77..00000000 --- a/TestData/Projects/MainTest/Chips/7-SEGMENT DRIVER.json +++ /dev/null @@ -1,814 +0,0 @@ -{ - "Name": "7-SEGMENT DRIVER", - "NameLocation": 0, - "Size": { - "x": 1.7, - "y": 1.75 - }, - "Colour": { - "r": 0.356291771, - "g": 0.155408725, - "b": 0.155408725, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":282827618, - "Position":{ - "x":-4.125, - "y":1.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":1252376139, - "Position":{ - "x":-4.125, - "y":1.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":149630521, - "Position":{ - "x":-4.125, - "y":0.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":617512258, - "Position":{ - "x":-4.125, - "y":0.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"A", - "ID":1625764615, - "Position":{ - "x":7.25, - "y":1.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"B", - "ID":876832376, - "Position":{ - "x":7.25, - "y":1.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"C", - "ID":2063837745, - "Position":{ - "x":7.25, - "y":0.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"D", - "ID":795836234, - "Position":{ - "x":7.25, - "y":0.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"E", - "ID":1275013740, - "Position":{ - "x":7.25, - "y":-0.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"F", - "ID":1041680072, - "Position":{ - "x":7.25, - "y":-1.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"G", - "ID":1553234055, - "Position":{ - "x":7.25, - "y":-1.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NOT", - "ID":1930948696, - "Label":null, - "Position":{ - "x":-1.765, - "y":-1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":753401946, - "Label":null, - "Position":{ - "x":0.0, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"OR", - "ID":948454002, - "Label":null, - "Position":{ - "x":3.11, - "y":2.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1135099145, - "Label":null, - "Position":{ - "x":4.735, - "y":0.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":1198819388, - "Label":null, - "Position":{ - "x":-1.765, - "y":2.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":877685943, - "Label":null, - "Position":{ - "x":1.61, - "y":1.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1860419561, - "Label":null, - "Position":{ - "x":1.61, - "y":0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1760275203, - "Label":null, - "Position":{ - "x":4.735, - "y":0.75 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1609264561, - "Label":null, - "Position":{ - "x":4.625, - "y":1.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1338291281, - "Label":null, - "Position":{ - "x":4.735, - "y":-0.75 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":619943523, - "Label":null, - "Position":{ - "x":4.735, - "y":-1.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1248357854, - "Label":null, - "Position":{ - "x":4.735, - "y":-2.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"OR", - "ID":161748073, - "Label":null, - "Position":{ - "x":-0.14, - "y":-2.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1431667775, - "Label":null, - "Position":{ - "x":3.11, - "y":-2.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":1854753101, - "Label":null, - "Position":{ - "x":-0.14, - "y":-2.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1930948696 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":753401946 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":1198819388 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":948454002 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1252376139 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1860419561 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1860419561 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1760275203 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":877685943 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1609264561 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":1854753101 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1431667775 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1431667775 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1248357854 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":753401946 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1338291281 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1135099145 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":795836234 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":948454002 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1625764615 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.0,"y":2.125},{"x":6.0,"y":1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1609264561 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":876832376 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.75,"y":1.5},{"x":5.75,"y":1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1760275203 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2063837745 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":0.75},{"x":5.5,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1338291281 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1275013740 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":-0.75},{"x":5.5,"y":-0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":619943523 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1041680072 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.75,"y":-1.5},{"x":5.75,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1248357854 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1553234055 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.0,"y":-2.25},{"x":6.0,"y":-1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":877685943 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":948454002 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":2.5,"y":1.625},{"x":2.5,"y":2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":877685943 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1431667775 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":2.5,"y":1.625},{"x":2.5,"y":-2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":877685943 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1338291281 - }, - "ConnectionType":1, - "ConnectedWireIndex":16, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":2.5,"y":-0.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":948454002 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1135099145 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":3.75,"y":2.125},{"x":3.75,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1431667775 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1135099145 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":3.75,"y":-2.125},{"x":3.75,"y":-0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1431667775 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":619943523 - }, - "ConnectionType":1, - "ConnectedWireIndex":19, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":3.75,"y":-1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1860419561 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":619943523 - }, - "ConnectionType":1, - "ConnectedWireIndex":3, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":3.60986,"y":0.875},{"x":3.60986,"y":-1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":753401946 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":877685943 - }, - "ConnectionType":1, - "ConnectedWireIndex":7, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.875,"y":-0.875},{"x":0.875,"y":1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":161748073 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1248357854 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.75,"y":-2.875},{"x":3.75,"y":-2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":1198819388 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":161748073 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.0,"y":2.25},{"x":-1.0,"y":-3.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":1198819388 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":1854753101 - }, - "ConnectionType":1, - "ConnectedWireIndex":24, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.0,"y":-2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1930948696 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1860419561 - }, - "ConnectionType":1, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.875,"y":-1.0},{"x":-0.875,"y":0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1252376139 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1609264561 - }, - "ConnectionType":1, - "ConnectedWireIndex":2, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.0,"y":1.0},{"x":1.0,"y":1.25},{"x":2.125,"y":1.25},{"x":2.125,"y":1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1252376139 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":161748073 - }, - "ConnectionType":1, - "ConnectedWireIndex":2, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.75,"y":1.0},{"x":-0.75,"y":-2.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1252376139 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":1854753101 - }, - "ConnectionType":1, - "ConnectedWireIndex":28, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.75,"y":-2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1252376139 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":753401946 - }, - "ConnectionType":1, - "ConnectedWireIndex":28, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.75,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":149630521 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":1198819388 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.5,"y":0.5},{"x":-2.5,"y":2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":149630521 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1930948696 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.5,"y":0.5},{"x":-2.5,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":617512258 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1760275203 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.0625,"y":0.0},{"x":3.0625,"y":0.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":617512258 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":877685943 - }, - "ConnectionType":1, - "ConnectedWireIndex":33, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.75,"y":0.0},{"x":0.75,"y":1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":282827618 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":1198819388 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.625,"y":1.5},{"x":-2.625,"y":2.375},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ADDER-4.json b/TestData/Projects/MainTest/Chips/ADDER-4.json deleted file mode 100644 index 16b61c06..00000000 --- a/TestData/Projects/MainTest/Chips/ADDER-4.json +++ /dev/null @@ -1,436 +0,0 @@ -{ - "Name": "ADDER-4", - "NameLocation": 0, - "Size": { - "x": 1.89, - "y": 0.98 - }, - "Colour": { - "r": 0.6511687, - "g": 0.327637434, - "b": 0.6576214, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN-4", - "ID":1102331041, - "Position":{ - "x":-11.33533, - "y":-1.23446 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"IN-4", - "ID":21685109, - "Position":{ - "x":-11.70779, - "y":2.12458 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"CARRY", - "ID":601345531, - "Position":{ - "x":-11.27197, - "y":-3.01144 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"CARRY", - "ID":1319151723, - "Position":{ - "x":8.28409, - "y":1.75839 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OUT-4", - "ID":146298398, - "Position":{ - "x":8.22843, - "y":0.84004 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":1 - } - ], - "SubChips":[ - { - "Name":"ADDER", - "ID":542778503, - "Label":null, - "Position":{ - "x":-1.04069, - "y":2.24322 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"ADDER", - "ID":1363793689, - "Label":null, - "Position":{ - "x":-2.74802, - "y":0.97055 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"ADDER", - "ID":2095960444, - "Label":null, - "Position":{ - "x":-4.28297, - "y":-0.34479 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"ADDER", - "ID":1925515444, - "Label":null, - "Position":{ - "x":-5.66835, - "y":-1.74222 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"4-1BIT", - "ID":2048651980, - "Label":null, - "Position":{ - "x":-8.32584, - "y":2.18687 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"4-1BIT", - "ID":54656751, - "Label":null, - "Position":{ - "x":-8.30472, - "y":-1.25558 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"1-4BIT", - "ID":1331395293, - "Label":null, - "Position":{ - "x":4.55344, - "y":0.80683 - }, - "OutputPinColourInfo":null, - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1102331041 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":54656751 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-10.56883,"y":-1.23446},{"x":-8.99805,"y":-1.25558}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":54656751 - }, - "TargetPinAddress":{ - "PinID":1488754317, - "PinOwnerID":1925515444 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.61139,"y":-1.61558},{"x":-6.29668,"y":-1.74222}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":2048651980 - }, - "TargetPinAddress":{ - "PinID":1807442703, - "PinOwnerID":1925515444 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.63251,"y":1.82687},{"x":-6.29668,"y":-1.42222}] - }, - { - "SourcePinAddress":{ - "PinID":1109549932, - "PinOwnerID":1925515444 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":1331395293 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.04002,"y":-1.42222},{"x":3.86011,"y":0.44683}] - }, - { - "SourcePinAddress":{ - "PinID":2093446574, - "PinOwnerID":1925515444 - }, - "TargetPinAddress":{ - "PinID":1514297445, - "PinOwnerID":2095960444 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.04002,"y":-2.06222},{"x":-4.9113,"y":-0.66479}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":54656751 - }, - "TargetPinAddress":{ - "PinID":1488754317, - "PinOwnerID":2095960444 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.61139,"y":-1.37558},{"x":-4.9113,"y":-0.34479}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":2048651980 - }, - "TargetPinAddress":{ - "PinID":1807442703, - "PinOwnerID":2095960444 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.63251,"y":2.06687},{"x":-4.9113,"y":-0.02479}] - }, - { - "SourcePinAddress":{ - "PinID":2093446574, - "PinOwnerID":2095960444 - }, - "TargetPinAddress":{ - "PinID":1514297445, - "PinOwnerID":1363793689 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-3.65464,"y":-0.66479},{"x":-3.37635,"y":0.65055}] - }, - { - "SourcePinAddress":{ - "PinID":1109549932, - "PinOwnerID":2095960444 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":1331395293 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-3.65464,"y":-0.02479},{"x":3.86011,"y":0.68683}] - }, - { - "SourcePinAddress":{ - "PinID":1109549932, - "PinOwnerID":1363793689 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1331395293 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.11969,"y":1.29055},{"x":3.86011,"y":0.92683}] - }, - { - "SourcePinAddress":{ - "PinID":1109549932, - "PinOwnerID":542778503 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1331395293 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-0.41236,"y":2.56322},{"x":3.86011,"y":1.16683}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":54656751 - }, - "TargetPinAddress":{ - "PinID":1488754317, - "PinOwnerID":1363793689 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.61139,"y":-1.13558},{"x":-3.37635,"y":0.97055}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":2048651980 - }, - "TargetPinAddress":{ - "PinID":1807442703, - "PinOwnerID":1363793689 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.63251,"y":2.30687},{"x":-3.37635,"y":1.29055}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":54656751 - }, - "TargetPinAddress":{ - "PinID":1488754317, - "PinOwnerID":542778503 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.61139,"y":-0.89558},{"x":-1.66902,"y":2.24322}] - }, - { - "SourcePinAddress":{ - "PinID":2093446574, - "PinOwnerID":1363793689 - }, - "TargetPinAddress":{ - "PinID":1514297445, - "PinOwnerID":542778503 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.11969,"y":0.65055},{"x":-1.66902,"y":1.92322}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":2048651980 - }, - "TargetPinAddress":{ - "PinID":1807442703, - "PinOwnerID":542778503 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.63251,"y":2.54687},{"x":-1.66902,"y":2.56322}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1331395293 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":146298398 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":5.24677,"y":0.80683},{"x":7.46193,"y":0.84004}] - }, - { - "SourcePinAddress":{ - "PinID":2093446574, - "PinOwnerID":542778503 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1319151723 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-0.41236,"y":1.92322},{"x":7.52009,"y":1.75839}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":21685109 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2048651980 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-10.94129,"y":2.12458},{"x":-9.01917,"y":2.18687}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":601345531 - }, - "TargetPinAddress":{ - "PinID":1514297445, - "PinOwnerID":1925515444 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-10.50797,"y":-3.01144},{"x":-6.29668,"y":-2.06222}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ADDER-8.json b/TestData/Projects/MainTest/Chips/ADDER-8.json deleted file mode 100644 index f9ead461..00000000 --- a/TestData/Projects/MainTest/Chips/ADDER-8.json +++ /dev/null @@ -1,277 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.208691791, - "g": 0.472802222, - "b": 0.263934553, - "a": 1 - }, - "Displays":[], - "InputPins":[ - { - "Name":"IN-8", - "ID":1729060963, - "Position":{ - "x":-6.78458, - "y":1.70539 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"IN-8", - "ID":751222821, - "Position":{ - "x":-6.77402, - "y":0.11088 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"CARRY", - "ID":833981293, - "Position":{ - "x":-6.67196, - "y":-1.87831 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "ADDER-8", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT-8", - "ID":749386852, - "Position":{ - "x":8.97043, - "y":0.49102 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - } - ], - "Size": { - "x": 1.44, - "y": 1.38 - }, - "SubChips":[ - { - "Name":"ADDER-4", - "ID":305140686, - "Label":null, - "Position":{ - "x":0.37383, - "y":-0.6228 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1319151723},{"PinColour":0,"PinID":146298398}], - "InternalData":null - }, - { - "Name":"8-4BIT", - "ID":1221915178, - "Label":null, - "Position":{ - "x":-3.82788, - "y":1.71595 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"8-4BIT", - "ID":1849231948, - "Label":null, - "Position":{ - "x":-3.93347, - "y":0.10032 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"4-8BIT", - "ID":536193666, - "Label":null, - "Position":{ - "x":5.82, - "y":0.445 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"ADDER-4", - "ID":776611734, - "Label":"", - "Position":{ - "x":3.21594, - "y":1.44721 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1319151723},{"PinColour":0,"PinID":146298398}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1729060963 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1221915178 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":751222821 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1849231948 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1849231948 - }, - "TargetPinAddress":{ - "PinID":21685109, - "PinOwnerID":305140686 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1221915178 - }, - "TargetPinAddress":{ - "PinID":1102331041, - "PinOwnerID":305140686 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":536193666 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":749386852 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":146298398, - "PinOwnerID":305140686 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":536193666 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":833981293 - }, - "TargetPinAddress":{ - "PinID":601345531, - "PinOwnerID":305140686 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1221915178 - }, - "TargetPinAddress":{ - "PinID":1102331041, - "PinOwnerID":776611734 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1849231948 - }, - "TargetPinAddress":{ - "PinID":21685109, - "PinOwnerID":776611734 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":146298398, - "PinOwnerID":776611734 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":536193666 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1319151723, - "PinOwnerID":305140686 - }, - "TargetPinAddress":{ - "PinID":601345531, - "PinOwnerID":776611734 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ADDER.json b/TestData/Projects/MainTest/Chips/ADDER.json deleted file mode 100644 index c9159b1b..00000000 --- a/TestData/Projects/MainTest/Chips/ADDER.json +++ /dev/null @@ -1,302 +0,0 @@ -{ - "Name": "ADDER", - "NameLocation": 0, - "Size": { - "x": 1.14, - "y": 0.88 - }, - "Colour": { - "r": 0.37956363, - "g": 0.7938405, - "b": 0.106996849, - "a": 1 - }, - "InputPins":[ - { - "Name":"A", - "ID":1807442703, - "Position":{ - "x":-7.83871, - "y":0.33871 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"B", - "ID":1488754317, - "Position":{ - "x":-7.83871, - "y":-0.16129 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"CARRY", - "ID":1514297445, - "Position":{ - "x":-7.83871, - "y":-0.66129 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"SUM", - "ID":1109549932, - "Position":{ - "x":7.46774, - "y":0.24194 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"CARRY", - "ID":2093446574, - "Position":{ - "x":7.46774, - "y":-0.25806 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"XOR", - "ID":2030673966, - "Label":null, - "Position":{ - "x":-2.64516, - "y":2.74194 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"XOR", - "ID":1565222035, - "Label":null, - "Position":{ - "x":0.5, - "y":2.30613 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND", - "ID":1883614759, - "Label":null, - "Position":{ - "x":-3.08064, - "y":-1.93548 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND", - "ID":1164280754, - "Label":null, - "Position":{ - "x":-1.0, - "y":0.66097 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"OR", - "ID":1898954727, - "Label":null, - "Position":{ - "x":2.16129, - "y":-0.87097 - }, - "OutputPinColourInfo":null, - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1807442703 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":2030673966 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.07471,"y":0.33871},{"x":-2.90349,"y":2.90194}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1488754317 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":2030673966 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.07471,"y":-0.16129},{"x":-2.90349,"y":2.58194}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":2030673966 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":1565222035 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.38683,"y":2.74194},{"x":0.24167,"y":2.46613}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1514297445 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":1565222035 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.07471,"y":-0.66129},{"x":0.24167,"y":2.14613}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":2030673966 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1164280754 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.38683,"y":2.74194},{"x":-1.45333,"y":0.82097}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1514297445 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1164280754 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.07471,"y":-0.66129},{"x":-1.45333,"y":0.50097}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1164280754 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1898954727 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-0.54667,"y":0.66097},{"x":1.90296,"y":-0.71097}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":1565222035 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1109549932 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.75833,"y":2.30613},{"x":6.70374,"y":0.24194}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1898954727 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2093446574 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":2.41962,"y":-0.87097},{"x":6.70374,"y":-0.25806}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1883614759 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1898954727 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.62731,"y":-1.93548},{"x":1.90296,"y":-1.03097}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1807442703 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1883614759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.07471,"y":0.33871},{"x":-3.53398,"y":-1.77548}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1488754317 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1883614759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-7.07471,"y":-0.16129},{"x":-3.53398,"y":-2.09548}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ALU-8.json b/TestData/Projects/MainTest/Chips/ALU-8.json deleted file mode 100644 index 7a48b2ed..00000000 --- a/TestData/Projects/MainTest/Chips/ALU-8.json +++ /dev/null @@ -1,1076 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.364388466, - "g": 0.661146164, - "b": 0.09356893, - "a": 1 - }, - "Displays":[], - "InputPins":[ - { - "Name":"IN-8", - "ID":1327939519, - "Position":{ - "x":-7.13983, - "y":0.73219 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":2 - }, - { - "Name":"IN-8", - "ID":297829662, - "Position":{ - "x":-6.94087, - "y":-0.89107 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":2 - }, - { - "Name":"OP 2", - "ID":441446737, - "Position":{ - "x":-6.17506, - "y":-4.02652 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OP 1", - "ID":1047676952, - "Position":{ - "x":-6.2717, - "y":-4.82089 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OP 0", - "ID":967634411, - "Position":{ - "x":-6.25442, - "y":-5.5296 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OUTPUT", - "ID":1427344851, - "Position":{ - "x":-6.24714, - "y":-7.036 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "ALU-8", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT-8", - "ID":1627170817, - "Position":{ - "x":12.15107, - "y":0.1688 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":2 - }, - { - "Name":"ZERO", - "ID":333324187, - "Position":{ - "x":16.30136, - "y":-2.59547 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.13875, - "y": 2.66 - }, - "SubChips":[ - { - "Name":"ADDER-8", - "ID":210509603, - "Label":null, - "Position":{ - "x":1.06422, - "y":0.86066 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":749386852}], - "InternalData":null - }, - { - "Name":"BUF-8", - "ID":750183646, - "Label":null, - "Position":{ - "x":8.91298, - "y":0.09473 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - }, - { - "Name":"MUX-8", - "ID":2144426446, - "Label":null, - "Position":{ - "x":-1.13757, - "y":-0.25926 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1454394007}], - "InternalData":null - }, - { - "Name":"NOT-8", - "ID":653394963, - "Label":null, - "Position":{ - "x":-2.94709, - "y":-0.90476 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1110230845, - "Label":null, - "Position":{ - "x":11.54812, - "y":-2.14092 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":908121143, - "Label":null, - "Position":{ - "x":11.57409, - "y":-3.3617 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":2122404623, - "Label":null, - "Position":{ - "x":12.3663, - "y":-2.6604 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":269828490, - "Label":null, - "Position":{ - "x":10.48318, - "y":-1.11495 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1087573095, - "Label":null, - "Position":{ - "x":10.56111, - "y":-2.2578 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":547399141, - "Label":null, - "Position":{ - "x":10.61305, - "y":-3.30975 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1687291062, - "Label":null, - "Position":{ - "x":10.56993, - "y":-4.28461 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":254341203, - "Label":null, - "Position":{ - "x":13.63903, - "y":-2.62144 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"AND-8", - "ID":1205822799, - "Label":null, - "Position":{ - "x":1.13087, - "y":2.45763 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], - "InternalData":null - }, - { - "Name":"OR-8", - "ID":1405759006, - "Label":null, - "Position":{ - "x":1.11216, - "y":4.05083 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], - "InternalData":null - }, - { - "Name":"LSHIFT-8", - "ID":808664680, - "Label":null, - "Position":{ - "x":1.19729, - "y":5.57412 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], - "InternalData":null - }, - { - "Name":"DECODE-3", - "ID":1966580722, - "Label":null, - "Position":{ - "x":-3.23646, - "y":-3.99524 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":548795871},{"PinColour":0,"PinID":419649701},{"PinColour":0,"PinID":2005481858},{"PinColour":0,"PinID":263290457},{"PinColour":0,"PinID":1713538532},{"PinColour":0,"PinID":1298532213},{"PinColour":0,"PinID":376244540},{"PinColour":0,"PinID":1524048856}], - "InternalData":null - }, - { - "Name":"OR", - "ID":39935939, - "Label":null, - "Position":{ - "x":2.55163, - "y":-1.3228 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"BUF-8", - "ID":395509802, - "Label":null, - "Position":{ - "x":4.20147, - "y":5.40327 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - }, - { - "Name":"BUF-8", - "ID":1018612812, - "Label":null, - "Position":{ - "x":4.33976, - "y":3.77841 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - }, - { - "Name":"BUF-8", - "ID":947471480, - "Label":null, - "Position":{ - "x":4.35704, - "y":2.18813 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - }, - { - "Name":"BUF-8", - "ID":1797610677, - "Label":null, - "Position":{ - "x":4.13233, - "y":0.71884 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - }, - { - "Name":"BUS-8", - "ID":1609842756, - "Label":null, - "Position":{ - "x":6.23773, - "y":7.04196 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], - "InternalData":[145739087] - }, - { - "Name":"BUS-TERMINUS-8", - "ID":145739087, - "Label":null, - "Position":{ - "x":7.5307, - "y":-1.2863 - }, - "OutputPinColourInfo":[], - "InternalData":[1609842756] - }, - { - "Name":"8-1BIT", - "ID":66370649, - "Label":"", - "Position":{ - "x":8.21079, - "y":-2.93836 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":750183646 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1627170817 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2004659665, - "PinOwnerID":653394963 - }, - "TargetPinAddress":{ - "PinID":1796221764, - "PinOwnerID":2144426446 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1454394007, - "PinOwnerID":2144426446 - }, - "TargetPinAddress":{ - "PinID":751222821, - "PinOwnerID":210509603 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":908121143 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":2122404623 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1110230845 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":2122404623 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":269828490 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1110230845 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1087573095 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1110230845 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":547399141 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":908121143 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1687291062 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":908121143 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":2122404623 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":254341203 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":254341203 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":333324187 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":967634411 - }, - "TargetPinAddress":{ - "PinID":2056213031, - "PinOwnerID":1966580722 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1047676952 - }, - "TargetPinAddress":{ - "PinID":596982594, - "PinOwnerID":1966580722 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":441446737 - }, - "TargetPinAddress":{ - "PinID":1280552766, - "PinOwnerID":1966580722 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1327939519 - }, - "TargetPinAddress":{ - "PinID":1888645677, - "PinOwnerID":808664680 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-5.28838,"y":0.73219},{"x":-5.28838,"y":5.64527},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1327939519 - }, - "TargetPinAddress":{ - "PinID":1888645677, - "PinOwnerID":1405759006 - }, - "ConnectionType":1, - "ConnectedWireIndex":14, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-5.28838,"y":4.29698},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1327939519 - }, - "TargetPinAddress":{ - "PinID":1888645677, - "PinOwnerID":1205822799 - }, - "ConnectionType":1, - "ConnectedWireIndex":14, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-5.28838,"y":2.67213},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":297829662 - }, - "TargetPinAddress":{ - "PinID":1888645677, - "PinOwnerID":653394963 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":297829662 - }, - "TargetPinAddress":{ - "PinID":955458786, - "PinOwnerID":1405759006 - }, - "ConnectionType":1, - "ConnectedWireIndex":17, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.70105,"y":-0.89774},{"x":-4.70105,"y":3.74384},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":297829662 - }, - "TargetPinAddress":{ - "PinID":955458786, - "PinOwnerID":1205822799 - }, - "ConnectionType":1, - "ConnectedWireIndex":18, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.70105,"y":2.17263},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2004659665, - "PinOwnerID":808664680 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":395509802 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2004659665, - "PinOwnerID":1405759006 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":1018612812 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2004659665, - "PinOwnerID":1205822799 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":947471480 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":749386852, - "PinOwnerID":210509603 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":1797610677 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":39935939 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":1797610677 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1609842756 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":145739087 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.92224,"y":7.07999},{"x":6.61802,"y":-1.36236},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1609842756 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":750183646 - }, - "ConnectionType":1, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":6.68056,"y":0.37322},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":395509802 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1609842756 - }, - "ConnectionType":2, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.0,"y":0.0},{"x":6.85848,"y":5.31053}] - }, - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":1018612812 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1609842756 - }, - "ConnectionType":2, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.0,"y":0.0},{"x":6.79887,"y":3.65638}] - }, - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":947471480 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1609842756 - }, - "ConnectionType":2, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.0,"y":0.0},{"x":6.74542,"y":2.17313}] - }, - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":1797610677 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1609842756 - }, - "ConnectionType":2, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.0,"y":0.0},{"x":6.69542,"y":0.78552}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1327939519 - }, - "TargetPinAddress":{ - "PinID":1729060963, - "PinOwnerID":210509603 - }, - "ConnectionType":1, - "ConnectedWireIndex":14, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-5.28838,"y":1.35669},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":297829662 - }, - "TargetPinAddress":{ - "PinID":480667918, - "PinOwnerID":2144426446 - }, - "ConnectionType":1, - "ConnectedWireIndex":18, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.70105,"y":0.32468},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1427344851 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":750183646 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.46577,"y":-7.036},{"x":4.46577,"y":0.08487},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1524048856, - "PinOwnerID":1966580722 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":39935939 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.59575,"y":-5.11524},{"x":1.59575,"y":-1.47525},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":376244540, - "PinOwnerID":1966580722 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":39935939 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.33082,"y":-4.79524},{"x":1.33082,"y":-1.18089},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":376244540, - "PinOwnerID":1966580722 - }, - "TargetPinAddress":{ - "PinID":833981293, - "PinOwnerID":210509603 - }, - "ConnectionType":1, - "ConnectedWireIndex":35, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.03961,"y":-4.7921},{"x":-2.03961,"y":-1.04842},{"x":-0.12627,"y":-1.04842},{"x":-0.12627,"y":0.33507},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":376244540, - "PinOwnerID":1966580722 - }, - "TargetPinAddress":{ - "PinID":1880005784, - "PinOwnerID":2144426446 - }, - "ConnectionType":1, - "ConnectedWireIndex":36, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.84828,"y":-1.04842},{"x":-1.84828,"y":-0.81294},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1298532213, - "PinOwnerID":1966580722 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":947471480 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.09533,"y":-4.47524},{"x":1.09533,"y":-0.87181},{"x":2.87622,"y":-0.87181},{"x":2.87622,"y":1.9099},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1713538532, - "PinOwnerID":1966580722 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":1018612812 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.83041,"y":-4.15524},{"x":0.83041,"y":-0.4597},{"x":2.49355,"y":-0.4597},{"x":2.49355,"y":3.47002},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":263290457, - "PinOwnerID":1966580722 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":395509802 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.5802,"y":-3.83524},{"x":0.5802,"y":-0.10647},{"x":2.24334,"y":-0.10647},{"x":2.24334,"y":5.089},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1609842756 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":66370649 - }, - "ConnectionType":1, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":6.63959,"y":-0.76367},{"x":5.63429,"y":-0.86014},{"x":5.57353,"y":-2.91405},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":66370649 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":269828490 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":66370649 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":269828490 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":66370649 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1087573095 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":66370649 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1087573095 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":66370649 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":547399141 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":66370649 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":547399141 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":66370649 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1687291062 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":66370649 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1687291062 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ALU.json b/TestData/Projects/MainTest/Chips/ALU.json deleted file mode 100644 index 6caba37d..00000000 --- a/TestData/Projects/MainTest/Chips/ALU.json +++ /dev/null @@ -1,383 +0,0 @@ -{ - "Name": "ALU", - "NameLocation": 0, - "Size": { - "x": 1.13875, - "y": 1.0 - }, - "Colour": { - "r": 0.253999025, - "g": 0.522814035, - "b": 0.291864455, - "a": 1 - }, - "InputPins":[ - { - "Name":"A", - "ID":320227374, - "Position":{ - "x":-12.54107, - "y":2.37772 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"B", - "ID":1514224661, - "Position":{ - "x":-12.45704, - "y":0.1089 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"SUBTRACT", - "ID":2015026118, - "Position":{ - "x":-13.87825, - "y":-3.23053 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT-4", - "ID":683281904, - "Position":{ - "x":1.89023, - "y":-0.09559 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":1 - } - ], - "SubChips":[ - { - "Name":"ADDER-4", - "ID":855181434, - "Label":"", - "Position":{ - "x":-2.11552, - "y":1.45849 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1319151723},{"PinColour":0,"PinID":146298398}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":1346654530, - "Label":"", - "Position":{ - "x":-7.9433, - "y":-0.5377 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":60757665, - "Label":"", - "Position":{ - "x":-7.9433, - "y":-1.59607 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":913414415, - "Label":"", - "Position":{ - "x":-7.9433, - "y":-2.68124 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":1934334688, - "Label":"", - "Position":{ - "x":-7.87631, - "y":-3.67264 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"4-1BIT", - "ID":1825881766, - "Label":"", - "Position":{ - "x":-10.328, - "y":0.09197 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4}], - "InternalData":null - }, - { - "Name":"1-4BIT", - "ID":793825698, - "Label":"", - "Position":{ - "x":-4.86195, - "y":0.56087 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":320227374 - }, - "TargetPinAddress":{ - "PinID":1102331041, - "PinOwnerID":855181434 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1514224661 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1825881766 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1825881766 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":1346654530 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1825881766 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":60757665 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":1825881766 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":913414415 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1825881766 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":1934334688 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2015026118 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":1934334688 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2015026118 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":1346654530 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-8.80112,"y":-3.76965},{"x":-8.81412,"y":-0.5109},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2015026118 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":60757665 - }, - "ConnectionType":1, - "ConnectedWireIndex":7, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-8.81011,"y":-1.51557},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2015026118 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":913414415 - }, - "ConnectionType":1, - "ConnectedWireIndex":7, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-8.80471,"y":-2.86877},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":1346654530 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":793825698 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":60757665 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":793825698 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":913414415 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":793825698 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":1934334688 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":793825698 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":793825698 - }, - "TargetPinAddress":{ - "PinID":21685109, - "PinOwnerID":855181434 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":146298398, - "PinOwnerID":855181434 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":683281904 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2015026118 - }, - "TargetPinAddress":{ - "PinID":601345531, - "PinOwnerID":855181434 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-9.30733,"y":-3.70637},{"x":-9.32321,"y":-4.40948},{"x":-4.21888,"y":-4.43628},{"x":-3.52223,"y":0.86901},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AMFsdf.json b/TestData/Projects/MainTest/Chips/AMFsdf.json deleted file mode 100644 index 97484b2f..00000000 --- a/TestData/Projects/MainTest/Chips/AMFsdf.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "Name": "AMFsdf", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 1.025, - "y": 0.375 - }, - "Colour": { - "r": 0.739096463, - "g": 0.53381747, - "b": 0.150521308, - "a": 1 - }, - "InputPins":[], - "OutputPins":[], - "SubChips":[ - { - "Name":"SDFS", - "ID":1021676828, - "Label":"", - "Position":{ - "x":-2.02778, - "y":-1.61806 - }, - "OutputPinColourInfo":[], - "InternalData":null - } - ], - "Wires":[], - "Displays": null, - "Notes": null -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AND(8,1).json b/TestData/Projects/MainTest/Chips/AND(8,1).json deleted file mode 100644 index 8befc5a3..00000000 --- a/TestData/Projects/MainTest/Chips/AND(8,1).json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.136593089, - "g": 0.3923463, - "b": 0.439328521, - "a": 1 - }, - "Displays":[], - "InputPins":[ - { - "Name":"IN-8", - "ID":1888645677, - "Position":{ - "x":-8.15344, - "y":0.4709 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":1465123542, - "Position":{ - "x":-7.63492, - "y":-2.65079 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "AND(8,1)", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT-8", - "ID":2004659665, - "Position":{ - "x":7.21164, - "y":-0.42857 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.59, - "y": 0.81 - }, - "SubChips":[ - { - "Name":"AND", - "ID":1470138075, - "Label":null, - "Position":{ - "x":-0.53439, - "y":2.03704 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":193892730, - "Label":null, - "Position":{ - "x":-0.53439, - "y":1.32704 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1489292450, - "Label":null, - "Position":{ - "x":-0.53439, - "y":0.61704 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1216737037, - "Label":null, - "Position":{ - "x":-0.53439, - "y":-0.09296 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1112718096, - "Label":null, - "Position":{ - "x":-0.53439, - "y":-0.80296 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":236554209, - "Label":null, - "Position":{ - "x":-0.53439, - "y":-1.51296 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":642953999, - "Label":null, - "Position":{ - "x":-0.53439, - "y":-2.22296 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":849942283, - "Label":null, - "Position":{ - "x":-0.53439, - "y":-2.93296 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"1-8BIT", - "ID":2089889814, - "Label":"", - "Position":{ - "x":2.26479, - "y":-0.3948 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":979628192, - "Label":"", - "Position":{ - "x":-5.08946, - "y":0.45803 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1465123542 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":849942283 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1465123542 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1470138075 - }, - "ConnectionType":1, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.73787,"y":-3.00063},{"x":-1.55026,"y":1.86772},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1465123542 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":193892730 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.57721,"y":1.1683},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1465123542 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1489292450 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.60366,"y":0.48191},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1465123542 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1216737037 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.62936,"y":-0.18499},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1465123542 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1112718096 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.65547,"y":-0.86245},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1465123542 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":236554209 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.67506,"y":-1.37087},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1465123542 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":642953999 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.70028,"y":-2.02515},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":2089889814 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2004659665 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1470138075 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2089889814 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":193892730 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":2089889814 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1489292450 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":2089889814 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1216737037 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":2089889814 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1112718096 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":2089889814 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":236554209 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":2089889814 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":642953999 - }, - "TargetPinAddress":{ - "PinID":6, - "PinOwnerID":2089889814 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":849942283 - }, - "TargetPinAddress":{ - "PinID":7, - "PinOwnerID":2089889814 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1888645677 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":979628192 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":979628192 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1470138075 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":979628192 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":193892730 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":979628192 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1489292450 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":979628192 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1216737037 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":979628192 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1112718096 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":979628192 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":236554209 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":979628192 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":642953999 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":979628192 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":849942283 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AND-3.json b/TestData/Projects/MainTest/Chips/AND-3.json deleted file mode 100644 index c0f07f98..00000000 --- a/TestData/Projects/MainTest/Chips/AND-3.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "Name": "AND-3", - "NameLocation": 0, - "Size": { - "x": 1.14, - "y": 0.88 - }, - "Colour": { - "r": 0.122747, - "g": 0.026175959, - "b": 0.36796695, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":467491006, - "Position":{ - "x":-5.34238, - "y":0.9268 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":1468640844, - "Position":{ - "x":-5.31877, - "y":0.14758 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":1821303806, - "Position":{ - "x":-5.30697, - "y":-1.02125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":979024900, - "Position":{ - "x":6.16883, - "y":0.01771 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"AND", - "ID":1835869044, - "Label":null, - "Position":{ - "x":0.06493, - "y":0.84416 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND", - "ID":185473484, - "Label":null, - "Position":{ - "x":1.2928, - "y":-0.43093 - }, - "OutputPinColourInfo":null, - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":467491006 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1835869044 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-4.57838,"y":0.9268},{"x":-0.3884,"y":1.00416}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1468640844 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1835869044 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-4.55477,"y":0.14758},{"x":-0.3884,"y":0.68416}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1835869044 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":185473484 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.51827,"y":0.84416},{"x":0.83946,"y":-0.27093}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1821303806 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":185473484 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-4.54297,"y":-1.02125},{"x":0.83946,"y":-0.59093}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":185473484 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":979024900 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.74613,"y":-0.43093},{"x":5.40483,"y":0.01771}] - } - ], - "Displays": null, - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AND-8.json b/TestData/Projects/MainTest/Chips/AND-8.json deleted file mode 100644 index 50ed4a62..00000000 --- a/TestData/Projects/MainTest/Chips/AND-8.json +++ /dev/null @@ -1,556 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.581735969, - "g": 0.8893554, - "b": 0.9458656, - "a": 1 - }, - "Displays": null, - "InputPins":[ - { - "Name":"IN-8", - "ID":1888645677, - "Position":{ - "x":-8.25, - "y":0.4375 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN-8", - "ID":955458786, - "Position":{ - "x":-8.25, - "y":-2.625 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "AND-8", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT-8", - "ID":2004659665, - "Position":{ - "x":6.0, - "y":-0.4375 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.14, - "y": 1.06 - }, - "SubChips":[ - { - "Name":"AND", - "ID":1470138075, - "Label":null, - "Position":{ - "x":-0.64, - "y":1.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":193892730, - "Label":null, - "Position":{ - "x":-0.64, - "y":0.5625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1489292450, - "Label":null, - "Position":{ - "x":-0.64, - "y":-0.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1216737037, - "Label":null, - "Position":{ - "x":-0.64, - "y":-0.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1112718096, - "Label":null, - "Position":{ - "x":-0.64, - "y":-1.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":236554209, - "Label":null, - "Position":{ - "x":-0.64, - "y":-2.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":642953999, - "Label":null, - "Position":{ - "x":-0.64, - "y":-2.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":849942283, - "Label":null, - "Position":{ - "x":-0.64, - "y":-3.5625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":565348294, - "Label":"", - "Position":{ - "x":-4.9275, - "y":-2.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":160348200, - "Label":"", - "Position":{ - "x":-4.9275, - "y":0.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"1-8BIT", - "ID":1298006079, - "Label":"", - "Position":{ - "x":3.1975, - "y":-0.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":955458786 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":565348294 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.91959,"y":-2.65079},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":565348294 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":849942283 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":565348294 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":642953999 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":565348294 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":236554209 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":565348294 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1112718096 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":565348294 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1216737037 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":565348294 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1489292450 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":565348294 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":193892730 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":565348294 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1470138075 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1888645677 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":160348200 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":160348200 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1470138075 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":160348200 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":193892730 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":160348200 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1489292450 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":160348200 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1216737037 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":160348200 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1112718096 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":160348200 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":236554209 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":160348200 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":642953999 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":160348200 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":849942283 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1298006079 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2004659665 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1470138075 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1298006079 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":193892730 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1298006079 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1489292450 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":1298006079 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1216737037 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":1298006079 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1112718096 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":1298006079 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":236554209 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":1298006079 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":642953999 - }, - "TargetPinAddress":{ - "PinID":6, - "PinOwnerID":1298006079 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":849942283 - }, - "TargetPinAddress":{ - "PinID":7, - "PinOwnerID":1298006079 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AND.json b/TestData/Projects/MainTest/Chips/AND.json deleted file mode 100644 index 9f343dfc..00000000 --- a/TestData/Projects/MainTest/Chips/AND.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "Name": "AND", - "NameLocation": 0, - "Size": { - "x": 0.7, - "y": 0.5 - }, - "Colour": { - "r": 0.2440358, - "g": 0.57116735, - "b": 0.6800216, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":436332053, - "Position":{ - "x":-7.46774, - "y":1.25806 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":123456040, - "Position":{ - "x":-7.32258, - "y":-0.64516 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":1580367471, - "Position":{ - "x":5.43548, - "y":0.08065 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NAND", - "ID":910879205, - "Label":null, - "Position":{ - "x":-2.58065, - "y":0.08065 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1120748047, - "Label":null, - "Position":{ - "x":0.41935, - "y":-0.03226 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":436332053 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":910879205 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":123456040 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":910879205 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":910879205 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1120748047 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":910879205 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1120748047 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1120748047 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1580367471 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/BUF-8.json b/TestData/Projects/MainTest/Chips/BUF-8.json deleted file mode 100644 index e84310e9..00000000 --- a/TestData/Projects/MainTest/Chips/BUF-8.json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.7371017, - "g": 0.401405752, - "b": 0.299559683, - "a": 1 - }, - "Displays":[], - "InputPins":[ - { - "Name":"IN-8", - "ID":581914641, - "Position":{ - "x":-6.11111, - "y":1.37037 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ENABLE", - "ID":1901197910, - "Position":{ - "x":-6.284, - "y":-2.52 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "BUF-8", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT-8", - "ID":158720235, - "Position":{ - "x":8.44974, - "y":0.41799 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.29, - "y": 0.81 - }, - "SubChips":[ - { - "Name":"3-STATE BUFFER", - "ID":2144949054, - "Label":null, - "Position":{ - "x":0.84, - "y":2.94 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":1311967221, - "Label":null, - "Position":{ - "x":0.84, - "y":2.1 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":477501529, - "Label":null, - "Position":{ - "x":0.84, - "y":1.38 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":1620998320, - "Label":null, - "Position":{ - "x":0.84, - "y":0.66 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":708409194, - "Label":null, - "Position":{ - "x":0.84, - "y":-0.06 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":284780235, - "Label":null, - "Position":{ - "x":0.84, - "y":-0.9 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":675217250, - "Label":null, - "Position":{ - "x":0.84, - "y":-1.62 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":1617427347, - "Label":null, - "Position":{ - "x":0.84, - "y":-2.34 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"1-8BIT", - "ID":726605413, - "Label":"", - "Position":{ - "x":3.93082, - "y":0.42727 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":723597622, - "Label":"", - "Position":{ - "x":-3.23156, - "y":1.42618 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1901197910 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1617427347 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1901197910 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":2144949054 - }, - "ConnectionType":1, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.44975,"y":-2.52678},{"x":-0.44974,"y":2.79894},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1901197910 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1311967221 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.44974,"y":1.91005},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1901197910 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":477501529 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.44974,"y":1.26455},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1901197910 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1620998320 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.44974,"y":0.51323},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1901197910 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":284780235 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.44975,"y":-1.06349},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1901197910 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":708409194 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.44975,"y":-0.21693},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1901197910 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":675217250 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.44975,"y":-1.91005},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":726605413 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":158720235 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":2144949054 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":726605413 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1311967221 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":726605413 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":477501529 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":726605413 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1620998320 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":726605413 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":708409194 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":726605413 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":284780235 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":726605413 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":675217250 - }, - "TargetPinAddress":{ - "PinID":6, - "PinOwnerID":726605413 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1617427347 - }, - "TargetPinAddress":{ - "PinID":7, - "PinOwnerID":726605413 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":581914641 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":723597622 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":723597622 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2144949054 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":723597622 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1311967221 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":723597622 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":477501529 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":723597622 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1620998320 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":723597622 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":708409194 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":723597622 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":284780235 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":723597622 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":675217250 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":723597622 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1617427347 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/BUS BUFFER.json b/TestData/Projects/MainTest/Chips/BUS BUFFER.json deleted file mode 100644 index 284319d9..00000000 --- a/TestData/Projects/MainTest/Chips/BUS BUFFER.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "Name": "BUS BUFFER", - "NameLocation": 0, - "Size": { - "x": 1.3175, - "y": 0.625 - }, - "Colour": { - "r": 0.139160484, - "g": 0.139160484, - "b": 0.139160484, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN-4", - "ID":2012805953, - "Position":{ - "x":-6.49568, - "y":1.84125 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ENABLE", - "ID":731095980, - "Position":{ - "x":-6.42009, - "y":-0.89093 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT-4", - "ID":813273076, - "Position":{ - "x":7.35961, - "y":-0.19978 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"3-STATE BUFFER", - "ID":1500722116, - "Label":"", - "Position":{ - "x":0.81533, - "y":2.03564 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":212526182, - "Label":"", - "Position":{ - "x":0.81533, - "y":0.64255 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":646273101, - "Label":"", - "Position":{ - "x":0.81533, - "y":-0.80454 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":1425529248, - "Label":"", - "Position":{ - "x":0.76134, - "y":-2.33801 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"4-1BIT", - "ID":581313038, - "Label":"", - "Position":{ - "x":-4.00108, - "y":1.84125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4}], - "InternalData":null - }, - { - "Name":"1-4BIT", - "ID":1987940987, - "Label":"", - "Position":{ - "x":4.84341, - "y":-0.18898 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1987940987 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":813273076 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1500722116 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1987940987 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":212526182 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1987940987 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":646273101 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":1987940987 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1425529248 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":1987940987 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2012805953 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":581313038 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":581313038 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1500722116 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":581313038 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":212526182 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":581313038 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":646273101 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":581313038 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1425529248 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":731095980 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1500722116 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":731095980 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":212526182 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":731095980 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":646273101 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":731095980 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1425529248 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/CONTROL UNIT.json b/TestData/Projects/MainTest/Chips/CONTROL UNIT.json deleted file mode 100644 index e33291d0..00000000 --- a/TestData/Projects/MainTest/Chips/CONTROL UNIT.json +++ /dev/null @@ -1,975 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.0240214523, - "g": 0.0374177881, - "b": 0.0440898, - "a": 1 - }, - "Displays":[], - "InputPins":[ - { - "Name":"IN-8", - "ID":2007797370, - "Position":{ - "x":-7.01889, - "y":0.06493 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ZERO FLAG", - "ID":1428445592, - "Position":{ - "x":-7.21818, - "y":-1.52893 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ENABLE", - "ID":1263555528, - "Position":{ - "x":-7.18525, - "y":-3.28538 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "CONTROL UNIT", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"HALT", - "ID":1151713402, - "Position":{ - "x":14.71855, - "y":6.97404 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ALU USECONST", - "ID":349361804, - "Position":{ - "x":14.71152, - "y":6.48187 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"PC STORE", - "ID":883528113, - "Position":{ - "x":14.7859, - "y":5.81726 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"DISP WRITE", - "ID":1590314579, - "Position":{ - "x":14.804, - "y":5.16 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"DISP REG STORE", - "ID":1175090400, - "Position":{ - "x":14.804, - "y":4.56 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"RAM IN", - "ID":805153383, - "Position":{ - "x":14.804, - "y":3.96 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"RAM ADDR IN", - "ID":1401872117, - "Position":{ - "x":14.804, - "y":3.24 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"B IN", - "ID":1118858130, - "Position":{ - "x":14.804, - "y":2.64 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"A IN", - "ID":742048505, - "Position":{ - "x":14.804, - "y":2.04 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"CONST OUT", - "ID":1476868706, - "Position":{ - "x":14.804, - "y":0.72 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"RAM OUT", - "ID":87848670, - "Position":{ - "x":14.804, - "y":0.12 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"B OUT", - "ID":288562873, - "Position":{ - "x":14.84395, - "y":-0.54739 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"A OUT", - "ID":1148046748, - "Position":{ - "x":14.84395, - "y":-1.14739 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ALU OUT", - "ID":1249996143, - "Position":{ - "x":14.804, - "y":-1.82484 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ALU OP 2", - "ID":1157119205, - "Position":{ - "x":7.69822, - "y":-6.09362 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ALU OP 1", - "ID":845055315, - "Position":{ - "x":7.69822, - "y":-6.62862 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ALU OP 0", - "ID":895153575, - "Position":{ - "x":7.69822, - "y":-7.16362 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.515, - "y": 5.68 - }, - "SubChips":[ - { - "Name":"ROM 256×16", - "ID":130543641, - "Label":null, - "Position":{ - "x":-3.80078, - "y":0.05949 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":[576,4672,577,4673,65,4161,580,578,4674,579,4675,8,16,24,832,768,704,1344,1280,1152,1664,1856,2368,2176,2240,2688,2752,3072,32768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - }, - { - "Name":"BUF-8", - "ID":816138141, - "Label":null, - "Position":{ - "x":-1.0145, - "y":-2.8662 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - }, - { - "Name":"BUF-8", - "ID":1166732195, - "Label":null, - "Position":{ - "x":-1.08917, - "y":0.39476 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - }, - { - "Name":"OR", - "ID":272005737, - "Label":null, - "Position":{ - "x":15.02063, - "y":-4.68096 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"AND", - "ID":511212918, - "Label":null, - "Position":{ - "x":10.54101, - "y":-4.35941 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":4577975, - "Label":null, - "Position":{ - "x":10.25627, - "y":-3.29937 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"AND", - "ID":140163774, - "Label":null, - "Position":{ - "x":12.11958, - "y":-3.44645 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"DECODE-3", - "ID":976628967, - "Label":null, - "Position":{ - "x":6.70395, - "y":-3.50876 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":548795871},{"PinColour":0,"PinID":419649701},{"PinColour":0,"PinID":2005481858},{"PinColour":0,"PinID":263290457},{"PinColour":0,"PinID":1713538532},{"PinColour":0,"PinID":1298532213},{"PinColour":0,"PinID":376244540},{"PinColour":0,"PinID":1524048856}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1386501746, - "Label":null, - "Position":{ - "x":13.36598, - "y":-4.29898 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"DECODE-3", - "ID":2103494348, - "Label":null, - "Position":{ - "x":6.67403, - "y":-0.59526 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":548795871},{"PinColour":0,"PinID":419649701},{"PinColour":0,"PinID":2005481858},{"PinColour":0,"PinID":263290457},{"PinColour":0,"PinID":1713538532},{"PinColour":0,"PinID":1298532213},{"PinColour":0,"PinID":376244540},{"PinColour":0,"PinID":1524048856}], - "InternalData":null - }, - { - "Name":"DECODE-3", - "ID":1001127185, - "Label":null, - "Position":{ - "x":6.77682, - "y":2.34261 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":548795871},{"PinColour":0,"PinID":419649701},{"PinColour":0,"PinID":2005481858},{"PinColour":0,"PinID":263290457},{"PinColour":0,"PinID":1713538532},{"PinColour":0,"PinID":1298532213},{"PinColour":0,"PinID":376244540},{"PinColour":0,"PinID":1524048856}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":283466863, - "Label":"", - "Position":{ - "x":1.64181, - "y":-4.02907 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":1299497338, - "Label":"", - "Position":{ - "x":0.74495, - "y":0.52657 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2007797370 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":130543641 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":130543641 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":816138141 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":130543641 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":1166732195 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1263555528 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":816138141 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1263555528 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":1166732195 - }, - "ConnectionType":1, - "ConnectedWireIndex":3, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.13682,"y":-3.15985},{"x":-2.19808,"y":0.20574},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":4577975 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":140163774 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1428445592 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":4577975 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.92438,"y":-1.52893},{"x":-3.92438,"y":-7.8291},{"x":8.89459,"y":-7.8291},{"x":8.89459,"y":-3.3303},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":376244540, - "PinOwnerID":976628967 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":272005737 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":8.23976,"y":-4.30876},{"x":8.23976,"y":-4.77332},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1386501746 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":272005737 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":140163774 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1386501746 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":511212918 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1386501746 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1428445592 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":511212918 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":8.89459,"y":-4.5901},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1298532213, - "PinOwnerID":976628967 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":511212918 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1713538532, - "PinOwnerID":976628967 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":140163774 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":376244540, - "PinOwnerID":1001127185 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":742048505 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1298532213, - "PinOwnerID":1001127185 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1118858130 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1713538532, - "PinOwnerID":1001127185 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1401872117 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":263290457, - "PinOwnerID":1001127185 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":805153383 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2005481858, - "PinOwnerID":1001127185 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1175090400 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":419649701, - "PinOwnerID":1001127185 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1590314579 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":272005737 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":883528113 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":15.97975,"y":-4.68096},{"x":15.97975,"y":6.23293},{"x":12.52865,"y":6.23293},{"x":12.52865,"y":5.83553},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":376244540, - "PinOwnerID":2103494348 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1249996143 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1298532213, - "PinOwnerID":2103494348 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1148046748 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1713538532, - "PinOwnerID":2103494348 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":288562873 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":263290457, - "PinOwnerID":2103494348 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":87848670 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2005481858, - "PinOwnerID":2103494348 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1476868706 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":816138141 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":283466863 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":283466863 - }, - "TargetPinAddress":{ - "PinID":596982594, - "PinOwnerID":2103494348 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":283466863 - }, - "TargetPinAddress":{ - "PinID":2056213031, - "PinOwnerID":2103494348 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":283466863 - }, - "TargetPinAddress":{ - "PinID":1280552766, - "PinOwnerID":976628967 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":283466863 - }, - "TargetPinAddress":{ - "PinID":596982594, - "PinOwnerID":976628967 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":283466863 - }, - "TargetPinAddress":{ - "PinID":2056213031, - "PinOwnerID":976628967 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":283466863 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1157119205 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":283466863 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":845055315 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":283466863 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":895153575 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":1166732195 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1299497338 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1299497338 - }, - "TargetPinAddress":{ - "PinID":1280552766, - "PinOwnerID":2103494348 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":1299497338 - }, - "TargetPinAddress":{ - "PinID":2056213031, - "PinOwnerID":1001127185 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":1299497338 - }, - "TargetPinAddress":{ - "PinID":596982594, - "PinOwnerID":1001127185 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":1299497338 - }, - "TargetPinAddress":{ - "PinID":1280552766, - "PinOwnerID":1001127185 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1299497338 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":349361804 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.69921,"y":3.49361},{"x":6.11321,"y":6.00524},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1299497338 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1151713402 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":2.49757,"y":2.11359},{"x":3.67058,"y":6.54344},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/D-LATCH.json b/TestData/Projects/MainTest/Chips/D-LATCH.json deleted file mode 100644 index a25899ac..00000000 --- a/TestData/Projects/MainTest/Chips/D-LATCH.json +++ /dev/null @@ -1,266 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.8017309, - "g": 0.425566971, - "b": 0.11274536, - "a": 1 - }, - "Displays":[], - "InputPins":[ - { - "Name":"DATA", - "ID":1709633590, - "Position":{ - "x":-6.375, - "y":0.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"STORE", - "ID":1820713789, - "Position":{ - "x":-6.375, - "y":-0.25 - }, - "BitCount":1, - "Colour":1, - "ValueDisplayMode":0 - } - ], - "Name": "D-LATCH", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT", - "ID":1677203907, - "Position":{ - "x":2.375, - "y":0.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.29, - "y": 0.5 - }, - "SubChips":[ - { - "Name":"NAND", - "ID":114480724, - "Label":"", - "Position":{ - "x":-0.125, - "y":0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":242969089, - "Label":"", - "Position":{ - "x":-0.125, - "y":-0.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":630167622, - "Label":"", - "Position":{ - "x":-2.125, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":736914670, - "Label":"", - "Position":{ - "x":-2.25, - "y":-0.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1748511812, - "Label":"", - "Position":{ - "x":-3.75, - "y":-0.9375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":114480724 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1677203907 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":0.875},{"x":0.75,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":242969089 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":114480724 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":-0.6875},{"x":0.75,"y":-0.375},{"x":-0.9679,"y":0.57151},{"x":-0.9679,"y":0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":114480724 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":242969089 - }, - "ConnectionType":1, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.75,"y":0.36127},{"x":-0.94879,"y":-0.25672},{"x":-0.94879,"y":-0.5625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":630167622 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":114480724 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":736914670 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":242969089 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1748511812 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":736914670 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1709633590 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1748511812 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.5,"y":0.5},{"x":-4.5,"y":-1.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1709633590 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1748511812 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-4.5,"y":-0.8125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1820713789 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":736914670 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.9375,"y":-0.25},{"x":-2.9375,"y":-0.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1820713789 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":630167622 - }, - "ConnectionType":1, - "ConnectedWireIndex":8, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.9375,"y":-0.25},{"x":-2.9375,"y":0.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1709633590 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":630167622 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-4.5,"y":0.49506},{"x":-4.5,"y":1.125},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DABBLE.json b/TestData/Projects/MainTest/Chips/DABBLE.json deleted file mode 100644 index 1956d895..00000000 --- a/TestData/Projects/MainTest/Chips/DABBLE.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "Name": "DABBLE", - "NameLocation": 0, - "Size": { - "x": 1.29, - "y": 1.0 - }, - "Colour": { - "r": 0.311216146, - "g": 0.5528956, - "b": 0.3318369, - "a": 1 - }, - "InputPins":[ - { - "Name":"A", - "ID":1840387208, - "Position":{ - "x":-2.0, - "y":1.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"B", - "ID":536256266, - "Position":{ - "x":-2.0, - "y":0.625 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"C", - "ID":1476251295, - "Position":{ - "x":-2.0, - "y":0.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"D", - "ID":1508054775, - "Position":{ - "x":-2.0, - "y":-0.375 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"A", - "ID":1118936726, - "Position":{ - "x":7.875, - "y":0.75 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"B", - "ID":2478898, - "Position":{ - "x":7.875, - "y":0.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"C", - "ID":683934649, - "Position":{ - "x":7.875, - "y":-0.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"D", - "ID":1546194494, - "Position":{ - "x":7.875, - "y":-0.75 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NOR", - "ID":1031537183, - "Label":null, - "Position":{ - "x":1.10457, - "y":-0.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"NOR", - "ID":560040010, - "Label":null, - "Position":{ - "x":2.60457, - "y":0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"NOR", - "ID":1879765020, - "Label":null, - "Position":{ - "x":4.10457, - "y":0.75 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"NOR", - "ID":701534357, - "Label":null, - "Position":{ - "x":5.60457, - "y":0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":2079646770, - "Label":null, - "Position":{ - "x":1.11, - "y":-1.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":1118497715, - "Label":null, - "Position":{ - "x":1.11, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"XOR", - "ID":115088339, - "Label":null, - "Position":{ - "x":5.61, - "y":-1.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"AND", - "ID":516092855, - "Label":null, - "Position":{ - "x":5.61, - "y":-0.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"OR", - "ID":2124497676, - "Label":null, - "Position":{ - "x":4.11, - "y":-0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":701534357 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2478898 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1879765020 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1118936726 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":2124497676 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":516092855 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1031537183 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":2124497676 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":1118497715 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":560040010 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":560040010 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1879765020 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1840387208 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":1118497715 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":516092855 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":683934649 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.375,"y":-0.5},{"x":6.375,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":115088339 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1546194494 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.5,"y":-1.25},{"x":6.5,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1879765020 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":115088339 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":4.875,"y":0.75},{"x":4.875,"y":-1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":2124497676 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":701534357 - }, - "ConnectionType":1, - "ConnectedWireIndex":2, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":5.0,"y":-0.375},{"x":5.0,"y":0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":2079646770 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":516092855 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.75,"y":-1.375},{"x":4.75,"y":-0.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1508054775 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":115088339 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-0.625,"y":-0.375},{"x":-0.625,"y":-1.75},{"x":4.875,"y":-1.75},{"x":4.875,"y":-1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1508054775 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":1118497715 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-0.625,"y":-0.375},{"x":-0.625,"y":0.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1476251295 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":701534357 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1476251295 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":2079646770 - }, - "ConnectionType":1, - "ConnectedWireIndex":14, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.5,"y":0.125},{"x":0.5,"y":-1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1840387208 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1031537183 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.375,"y":1.125},{"x":0.375,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1840387208 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":2079646770 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.25,"y":1.125},{"x":0.25,"y":-1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":536256266 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1031537183 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.125,"y":0.625},{"x":0.125,"y":-0.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":2079646770 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":560040010 - }, - "ConnectionType":1, - "ConnectedWireIndex":11, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":2.0,"y":-1.375},{"x":2.0,"y":0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":1118497715 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":2124497676 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.875,"y":1.0},{"x":1.875,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1031537183 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1879765020 - }, - "ConnectionType":1, - "ConnectedWireIndex":3, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":3.5,"y":-0.5},{"x":3.5,"y":0.625},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DECIMAL-4.json b/TestData/Projects/MainTest/Chips/DECIMAL-4.json deleted file mode 100644 index 786e1e5a..00000000 --- a/TestData/Projects/MainTest/Chips/DECIMAL-4.json +++ /dev/null @@ -1,302 +0,0 @@ -{ - "Name": "DECIMAL-4", - "NameLocation": 2, - "Size": { - "x": 1.7, - "y": 1.25 - }, - "Colour": { - "r": 0.0, - "g": 0.0, - "b": 0.0, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN-4", - "ID":47750177, - "Position":{ - "x":-9.52703, - "y":-3.08354 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[], - "SubChips":[ - { - "Name":"DOUBLE DABBLE", - "ID":688996848, - "Label":"", - "Position":{ - "x":-5.41616, - "y":0.37998 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":667009293},{"PinColour":0,"PinID":1206036699},{"PinColour":0,"PinID":646028192},{"PinColour":0,"PinID":346863069},{"PinColour":0,"PinID":1038955236},{"PinColour":0,"PinID":948566781},{"PinColour":0,"PinID":1915399096},{"PinColour":0,"PinID":1157959689},{"PinColour":0,"PinID":1401031050},{"PinColour":0,"PinID":550056922},{"PinColour":0,"PinID":1950268701},{"PinColour":0,"PinID":510485307}], - "InternalData":null - }, - { - "Name":"DISP-7", - "ID":595678759, - "Label":"", - "Position":{ - "x":0.83233, - "y":0.39204 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1537529931}], - "InternalData":null - }, - { - "Name":"DISP-7", - "ID":1164094140, - "Label":"", - "Position":{ - "x":3.05187, - "y":0.39204 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1537529931}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":83814227, - "Label":"", - "Position":{ - "x":-5.46896, - "y":-3.95475 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"4-1BIT", - "ID":1971227245, - "Label":"", - "Position":{ - "x":-8.01597, - "y":-0.68796 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":1038955236, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":558947442, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.25573,"y":-0.91074},{"x":-0.60314,"y":-0.99517},{"x":-0.5187,"y":1.13993},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":948566781, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":1161439921, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.38842,"y":-1.15199},{"x":-0.39807,"y":-1.20024},{"x":-0.28951,"y":0.62123},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1915399096, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":785271935, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.5573,"y":-1.45356},{"x":-0.21713,"y":-1.47768},{"x":-0.15682,"y":0.15078},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1157959689, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":432543011, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.70205,"y":-1.71894},{"x":-0.02413,"y":-1.83957},{"x":-0.01206,"y":-0.47648},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1401031050, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":558947442, - "PinOwnerID":1164094140 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.78649,"y":-2.04463},{"x":1.7491,"y":-2.14113},{"x":1.65259,"y":1.28468},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":550056922, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":1161439921, - "PinOwnerID":1164094140 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.95537,"y":-2.26176},{"x":1.85766,"y":-2.55127},{"x":1.86972,"y":0.74186},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1950268701, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":785271935, - "PinOwnerID":1164094140 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.14837,"y":-2.51508},{"x":2.07479,"y":-2.80458},{"x":2.05066,"y":0.15078},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":510485307, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":432543011, - "PinOwnerID":1164094140 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.41375,"y":-2.75633},{"x":2.25573,"y":-3.02171},{"x":2.20748,"y":-0.45235},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":83814227 - }, - "TargetPinAddress":{ - "PinID":477159319, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":47750177 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1971227245 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1971227245 - }, - "TargetPinAddress":{ - "PinID":1913189227, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":1971227245 - }, - "TargetPinAddress":{ - "PinID":261218530, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1971227245 - }, - "TargetPinAddress":{ - "PinID":1381237603, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1971227245 - }, - "TargetPinAddress":{ - "PinID":1957997324, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[ - { - "SubChipID":595678759, - "Position":{ - "x":-0.3125, - "y":0.01562 - }, - "Scale":0.625 - }, - { - "SubChipID":1164094140, - "Position":{ - "x":0.3125, - "y":0.01562 - }, - "Scale":0.625 - } - ], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DECIMAL-8.json b/TestData/Projects/MainTest/Chips/DECIMAL-8.json deleted file mode 100644 index 181a9966..00000000 --- a/TestData/Projects/MainTest/Chips/DECIMAL-8.json +++ /dev/null @@ -1,447 +0,0 @@ -{ - "Name": "DECIMAL-8", - "NameLocation": 2, - "Size": { - "x": 2.2, - "y": 1.25 - }, - "Colour": { - "r": 0.0, - "g": 0.0, - "b": 0.0, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":39707143, - "Position":{ - "x":-10.125, - "y":0.0 - }, - "BitCount":8, - "Colour":2, - "ValueDisplayMode":0 - } - ], - "OutputPins":[], - "SubChips":[ - { - "Name":"DOUBLE DABBLE", - "ID":688996848, - "Label":"", - "Position":{ - "x":-5.73313, - "y":0.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":667009293},{"PinColour":0,"PinID":1206036699},{"PinColour":2,"PinID":646028192},{"PinColour":2,"PinID":346863069},{"PinColour":2,"PinID":1038955236},{"PinColour":2,"PinID":948566781},{"PinColour":2,"PinID":1915399096},{"PinColour":2,"PinID":1157959689},{"PinColour":2,"PinID":1401031050},{"PinColour":2,"PinID":550056922},{"PinColour":2,"PinID":1950268701},{"PinColour":2,"PinID":510485307}], - "InternalData":null - }, - { - "Name":"DISP-7", - "ID":595678759, - "Label":"TENS", - "Position":{ - "x":-0.22062, - "y":0.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1537529931}], - "InternalData":null - }, - { - "Name":"DISP-7", - "ID":1164094140, - "Label":"ONES", - "Position":{ - "x":2.15438, - "y":0.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1537529931}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":83814227, - "Label":"RIPPLE BLANK", - "Position":{ - "x":-5.64, - "y":-2.0 - }, - "OutputPinColourInfo":[{"PinColour":5,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":571646500, - "Label":"", - "Position":{ - "x":-7.6775, - "y":0.0 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":1},{"PinColour":2,"PinID":2},{"PinColour":2,"PinID":3},{"PinColour":2,"PinID":4},{"PinColour":2,"PinID":5},{"PinColour":2,"PinID":6},{"PinColour":2,"PinID":7},{"PinColour":2,"PinID":8}], - "InternalData":null - }, - { - "Name":"DISP-7", - "ID":1408888375, - "Label":"HUNDREDS", - "Position":{ - "x":-2.59562, - "y":0.5 - }, - "OutputPinColourInfo":[{"PinColour":5,"PinID":1537529931}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":571646500 - }, - "TargetPinAddress":{ - "PinID":834835854, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":571646500 - }, - "TargetPinAddress":{ - "PinID":579679359, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":571646500 - }, - "TargetPinAddress":{ - "PinID":897490227, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":571646500 - }, - "TargetPinAddress":{ - "PinID":590808572, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":571646500 - }, - "TargetPinAddress":{ - "PinID":1957997324, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":571646500 - }, - "TargetPinAddress":{ - "PinID":1381237603, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":571646500 - }, - "TargetPinAddress":{ - "PinID":261218530, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":571646500 - }, - "TargetPinAddress":{ - "PinID":1913189227, - "PinOwnerID":688996848 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":39707143 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":571646500 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":667009293, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":558947442, - "PinOwnerID":1408888375 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1206036699, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":1161439921, - "PinOwnerID":1408888375 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.5,"y":1.125},{"x":-3.5,"y":0.9375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":646028192, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":785271935, - "PinOwnerID":1408888375 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.625,"y":0.875},{"x":-3.625,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":346863069, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":432543011, - "PinOwnerID":1408888375 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.75,"y":0.625},{"x":-3.75,"y":0.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1038955236, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":558947442, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.875,"y":0.375},{"x":-3.875,"y":-1.0},{"x":-1.5,"y":-1.0},{"x":-1.5,"y":1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":948566781, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":1161439921, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.0,"y":0.125},{"x":-4.0,"y":-1.125},{"x":-1.375,"y":-1.125},{"x":-1.375,"y":0.9375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1915399096, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":785271935, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.125,"y":-0.125},{"x":-4.125,"y":-1.25},{"x":-1.25,"y":-1.25},{"x":-1.25,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1157959689, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":432543011, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":-0.375},{"x":-4.25,"y":-1.375},{"x":-1.125,"y":-1.375},{"x":-1.125,"y":0.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1537529931, - "PinOwnerID":1408888375 - }, - "TargetPinAddress":{ - "PinID":477159319, - "PinOwnerID":595678759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.75,"y":0.5},{"x":-1.75,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1401031050, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":558947442, - "PinOwnerID":1164094140 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.375,"y":-0.625},{"x":-4.375,"y":-1.5},{"x":0.875,"y":-1.5},{"x":0.875,"y":1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":550056922, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":1161439921, - "PinOwnerID":1164094140 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.5,"y":-0.875},{"x":-4.5,"y":-1.625},{"x":1.0,"y":-1.625},{"x":1.0,"y":0.9375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1950268701, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":785271935, - "PinOwnerID":1164094140 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.625,"y":-1.125},{"x":-4.625,"y":-1.75},{"x":1.125,"y":-1.75},{"x":1.125,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":510485307, - "PinOwnerID":688996848 - }, - "TargetPinAddress":{ - "PinID":432543011, - "PinOwnerID":1164094140 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.75,"y":-1.375},{"x":-4.75,"y":-1.875},{"x":1.25,"y":-1.875},{"x":1.25,"y":0.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":83814227 - }, - "TargetPinAddress":{ - "PinID":477159319, - "PinOwnerID":1408888375 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.75,"y":-2.0},{"x":-3.75,"y":-0.375},{"x":0.0,"y":0.0}] - } - ], - "Displays":[ - { - "SubChipID":1164094140, - "Position":{ - "x":0.625, - "y":0.01562 - }, - "Scale":0.625 - }, - { - "SubChipID":595678759, - "Position":{ - "x":0.0, - "y":0.01562 - }, - "Scale":0.625 - }, - { - "SubChipID":1408888375, - "Position":{ - "x":-0.625, - "y":0.01562 - }, - "Scale":0.625 - } - ], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DECODE-3.json b/TestData/Projects/MainTest/Chips/DECODE-3.json deleted file mode 100644 index 1073c4b4..00000000 --- a/TestData/Projects/MainTest/Chips/DECODE-3.json +++ /dev/null @@ -1,756 +0,0 @@ -{ - "Name": "DECODE-3", - "NameLocation": 0, - "Size": { - "x": 1.44, - "y": 2.48 - }, - "Colour": { - "r": 0.227245063, - "g": 0.476252764, - "b": 0.4583765, - "a": 1 - }, - "InputPins":[ - { - "Name":"C", - "ID":1280552766, - "Position":{ - "x":-5.9209, - "y":1.78867 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"B", - "ID":596982594, - "Position":{ - "x":-5.9327, - "y":0.97403 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"A", - "ID":2056213031, - "Position":{ - "x":-5.9209, - "y":0.10035 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"7", - "ID":548795871, - "Position":{ - "x":6.22645, - "y":4.10272 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"6", - "ID":419649701, - "Position":{ - "x":6.20283, - "y":3.28808 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"5", - "ID":2005481858, - "Position":{ - "x":6.23967, - "y":2.61511 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"4", - "ID":263290457, - "Position":{ - "x":6.23967, - "y":2.08011 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"3", - "ID":1713538532, - "Position":{ - "x":6.23967, - "y":1.54511 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"2", - "ID":1298532213, - "Position":{ - "x":6.23967, - "y":1.01011 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"1", - "ID":376244540, - "Position":{ - "x":6.23967, - "y":0.47511 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"0", - "ID":1524048856, - "Position":{ - "x":6.23967, - "y":-0.05989 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"AND-3", - "ID":549883333, - "Label":null, - "Position":{ - "x":0.5301, - "y":-0.76269 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND-3", - "ID":461349718, - "Label":null, - "Position":{ - "x":0.54191, - "y":-1.96979 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND-3", - "ID":1391154642, - "Label":null, - "Position":{ - "x":0.5301, - "y":-3.33037 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"NOT", - "ID":767240414, - "Label":null, - "Position":{ - "x":-3.32349, - "y":-0.30106 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"NOT", - "ID":1280457044, - "Label":null, - "Position":{ - "x":-3.32349, - "y":-0.87606 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"NOT", - "ID":1041637034, - "Label":null, - "Position":{ - "x":-3.32349, - "y":-1.45106 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND-3", - "ID":1307433408, - "Label":null, - "Position":{ - "x":0.50649, - "y":0.55962 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND-3", - "ID":1823565403, - "Label":null, - "Position":{ - "x":0.58914, - "y":2.09445 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND-3", - "ID":811475044, - "Label":null, - "Position":{ - "x":0.57733, - "y":3.36954 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND-3", - "ID":229179887, - "Label":null, - "Position":{ - "x":0.58324, - "y":4.53837 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND-3", - "ID":2088888138, - "Label":null, - "Position":{ - "x":0.72609, - "y":5.82409 - }, - "OutputPinColourInfo":null, - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1280552766 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":767240414 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":1.78867},{"x":-4.268,"y":1.78867},{"x":-4.268,"y":-0.25384},{"x":-3.85183,"y":-0.30106}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":596982594 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1280457044 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1687,"y":0.97403},{"x":-4.51594,"y":0.97403},{"x":-4.51594,"y":-0.66706},{"x":-3.85183,"y":-0.87606}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2056213031 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1041637034 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":0.10035},{"x":-4.65762,"y":0.10035},{"x":-4.65762,"y":-1.43447},{"x":-3.85183,"y":-1.45106}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1280457044 - }, - "TargetPinAddress":{ - "PinID":1468640844, - "PinOwnerID":1391154642 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-0.87606},{"x":-0.09823,"y":-3.33037}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":767240414 - }, - "TargetPinAddress":{ - "PinID":467491006, - "PinOwnerID":1391154642 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-0.30106},{"x":-0.09823,"y":-3.01037}] - }, - { - "SourcePinAddress":{ - "PinID":979024900, - "PinOwnerID":1391154642 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1524048856 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.15843,"y":-3.33037},{"x":5.47567,"y":-0.05989}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1041637034 - }, - "TargetPinAddress":{ - "PinID":1821303806, - "PinOwnerID":1391154642 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-1.45106},{"x":-0.09823,"y":-3.65037}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":767240414 - }, - "TargetPinAddress":{ - "PinID":467491006, - "PinOwnerID":461349718 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-0.30106},{"x":-0.08642,"y":-1.64979}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1280457044 - }, - "TargetPinAddress":{ - "PinID":1468640844, - "PinOwnerID":461349718 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-0.87606},{"x":-0.08642,"y":-1.96979}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2056213031 - }, - "TargetPinAddress":{ - "PinID":1821303806, - "PinOwnerID":461349718 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":0.10035},{"x":-0.08642,"y":-2.28979}] - }, - { - "SourcePinAddress":{ - "PinID":979024900, - "PinOwnerID":461349718 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":376244540 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.17024,"y":-1.96979},{"x":5.47567,"y":0.47511}] - }, - { - "SourcePinAddress":{ - "PinID":979024900, - "PinOwnerID":549883333 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1298532213 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.15844,"y":-0.76269},{"x":5.47567,"y":1.01011}] - }, - { - "SourcePinAddress":{ - "PinID":979024900, - "PinOwnerID":1307433408 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1713538532 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.13483,"y":0.55962},{"x":5.47567,"y":1.54511}] - }, - { - "SourcePinAddress":{ - "PinID":979024900, - "PinOwnerID":1823565403 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":263290457 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.21747,"y":2.09445},{"x":5.47567,"y":2.08011}] - }, - { - "SourcePinAddress":{ - "PinID":979024900, - "PinOwnerID":811475044 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2005481858 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.20567,"y":3.36954},{"x":5.47567,"y":2.61511}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":596982594 - }, - "TargetPinAddress":{ - "PinID":1821303806, - "PinOwnerID":549883333 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1687,"y":0.97403},{"x":-0.09823,"y":-1.08269}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":596982594 - }, - "TargetPinAddress":{ - "PinID":1468640844, - "PinOwnerID":1307433408 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1687,"y":0.97403},{"x":-0.12184,"y":0.55962}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2056213031 - }, - "TargetPinAddress":{ - "PinID":1821303806, - "PinOwnerID":1307433408 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":0.10035},{"x":-0.12184,"y":0.23962}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1280552766 - }, - "TargetPinAddress":{ - "PinID":1821303806, - "PinOwnerID":1823565403 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":1.78867},{"x":-0.03919,"y":1.77445}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1280552766 - }, - "TargetPinAddress":{ - "PinID":1468640844, - "PinOwnerID":811475044 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":1.78867},{"x":-0.051,"y":3.36954}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2056213031 - }, - "TargetPinAddress":{ - "PinID":1821303806, - "PinOwnerID":811475044 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":0.10035},{"x":-0.051,"y":3.04954}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":767240414 - }, - "TargetPinAddress":{ - "PinID":467491006, - "PinOwnerID":549883333 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-0.30106},{"x":-0.09823,"y":-0.44269}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1041637034 - }, - "TargetPinAddress":{ - "PinID":1468640844, - "PinOwnerID":549883333 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-1.45106},{"x":-0.09823,"y":-0.76269}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":767240414 - }, - "TargetPinAddress":{ - "PinID":467491006, - "PinOwnerID":1307433408 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-0.30106},{"x":-0.12184,"y":0.87962}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1280457044 - }, - "TargetPinAddress":{ - "PinID":467491006, - "PinOwnerID":1823565403 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-0.87606},{"x":-0.03919,"y":2.41445}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1041637034 - }, - "TargetPinAddress":{ - "PinID":1468640844, - "PinOwnerID":1823565403 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-1.45106},{"x":-0.03919,"y":2.09445}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1280457044 - }, - "TargetPinAddress":{ - "PinID":467491006, - "PinOwnerID":811475044 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-0.87606},{"x":-0.051,"y":3.68954}] - }, - { - "SourcePinAddress":{ - "PinID":979024900, - "PinOwnerID":2088888138 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":548795871 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.35443,"y":5.82409},{"x":5.46245,"y":4.10272}] - }, - { - "SourcePinAddress":{ - "PinID":979024900, - "PinOwnerID":229179887 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":419649701 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.21157,"y":4.53837},{"x":5.43883,"y":3.28808}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1280552766 - }, - "TargetPinAddress":{ - "PinID":1468640844, - "PinOwnerID":229179887 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":1.78867},{"x":-0.0451,"y":4.53837}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":596982594 - }, - "TargetPinAddress":{ - "PinID":1821303806, - "PinOwnerID":229179887 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1687,"y":0.97403},{"x":-0.0451,"y":4.21837}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1041637034 - }, - "TargetPinAddress":{ - "PinID":467491006, - "PinOwnerID":229179887 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.79516,"y":-1.45106},{"x":-0.0451,"y":4.85837}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1280552766 - }, - "TargetPinAddress":{ - "PinID":467491006, - "PinOwnerID":2088888138 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":1.78867},{"x":0.09776,"y":6.14409}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":596982594 - }, - "TargetPinAddress":{ - "PinID":1468640844, - "PinOwnerID":2088888138 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1687,"y":0.97403},{"x":0.09776,"y":5.82409}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2056213031 - }, - "TargetPinAddress":{ - "PinID":1821303806, - "PinOwnerID":2088888138 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.1569,"y":0.10035},{"x":0.09776,"y":5.50409}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DECODER-2.json b/TestData/Projects/MainTest/Chips/DECODER-2.json deleted file mode 100644 index 3e7ff847..00000000 --- a/TestData/Projects/MainTest/Chips/DECODER-2.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "Name": "DECODER-2", - "NameLocation": 0, - "Size": { - "x": 1.475, - "y": 1.0 - }, - "Colour": { - "r": 0.8097011, - "g": 0.809307158, - "b": 0.801633835, - "a": 1 - }, - "InputPins":[ - { - "Name":"B", - "ID":192060771, - "Position":{ - "x":-6.375, - "y":1.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"A", - "ID":1480848655, - "Position":{ - "x":-6.375, - "y":0.625 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"3", - "ID":1868926879, - "Position":{ - "x":2.375, - "y":1.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"2", - "ID":18957384, - "Position":{ - "x":2.375, - "y":0.375 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"1", - "ID":199145797, - "Position":{ - "x":2.375, - "y":-0.375 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"0", - "ID":1076039863, - "Position":{ - "x":2.375, - "y":-1.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"AND", - "ID":1124838394, - "Label":"", - "Position":{ - "x":-0.265, - "y":1.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1547859984, - "Label":"", - "Position":{ - "x":-0.265, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1232041989, - "Label":"", - "Position":{ - "x":-0.265, - "y":-0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1068531987, - "Label":"", - "Position":{ - "x":-0.265, - "y":-1.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":564197126, - "Label":"", - "Position":{ - "x":-3.765, - "y":-0.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1808213522, - "Label":"", - "Position":{ - "x":-3.765, - "y":-1.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1124838394 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1868926879 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1547859984 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":18957384 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1232041989 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":199145797 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1068531987 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1076039863 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1480848655 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1808213522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.875,"y":0.625},{"x":-4.875,"y":-1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":192060771 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":564197126 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.5,"y":1.25},{"x":-4.5,"y":-0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1808213522 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1068531987 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":564197126 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1068531987 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":-0.5},{"x":-2.375,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":192060771 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1124838394 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1480848655 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1124838394 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":0.625},{"x":-2.375,"y":1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1808213522 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1547859984 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.375,"y":-1.25},{"x":-1.375,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":192060771 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1547859984 - }, - "ConnectionType":1, - "ConnectedWireIndex":8, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.375,"y":1.25},{"x":-1.375,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1480848655 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1232041989 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-1.875,"y":1.0},{"x":-1.875,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":564197126 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1232041989 - }, - "ConnectionType":1, - "ConnectedWireIndex":7, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-1.875,"y":-1.0},{"x":-1.875,"y":-0.5},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DISP-7.json b/TestData/Projects/MainTest/Chips/DISP-7.json deleted file mode 100644 index 8d6d3e3c..00000000 --- a/TestData/Projects/MainTest/Chips/DISP-7.json +++ /dev/null @@ -1,768 +0,0 @@ -{ - "Name": "DISP-7", - "NameLocation": 0, - "Size": { - "x": 1.28875, - "y": 2.0 - }, - "Colour": { - "r": 0.0, - "g": 0.0, - "b": 0.0, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":558947442, - "Position":{ - "x":-4.5, - "y":1.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":1161439921, - "Position":{ - "x":-4.5, - "y":1.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":785271935, - "Position":{ - "x":-4.5, - "y":0.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":432543011, - "Position":{ - "x":-4.5, - "y":0.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"BLANK", - "ID":477159319, - "Position":{ - "x":-4.5, - "y":-2.5 - }, - "BitCount":1, - "Colour":5, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"BLANK OUT", - "ID":1537529931, - "Position":{ - "x":7.75, - "y":-2.25 - }, - "BitCount":1, - "Colour":5, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"7-SEGMENT DRIVER", - "ID":1806927845, - "Label":"", - "Position":{ - "x":2.485, - "y":0.75 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1625764615},{"PinColour":0,"PinID":876832376},{"PinColour":0,"PinID":2063837745},{"PinColour":0,"PinID":795836234},{"PinColour":0,"PinID":1275013740},{"PinColour":0,"PinID":1041680072},{"PinColour":0,"PinID":1553234055}], - "InternalData":null - }, - { - "Name":"7-SEGMENT", - "ID":507183861, - "Label":"", - "Position":{ - "x":7.135, - "y":0.5 - }, - "OutputPinColourInfo":[], - "InternalData":null - }, - { - "Name":"OR", - "ID":1709402173, - "Label":"", - "Position":{ - "x":-2.14, - "y":-2.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":911313465, - "Label":"", - "Position":{ - "x":-1.015, - "y":-1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":203193853, - "Label":"", - "Position":{ - "x":0.11, - "y":-1.75 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1000868379, - "Label":"IS ZERO", - "Position":{ - "x":1.235, - "y":-1.75 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"AND", - "ID":559255206, - "Label":"", - "Position":{ - "x":2.485, - "y":-1.875 - }, - "OutputPinColourInfo":[{"PinColour":5,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1700072761, - "Label":"", - "Position":{ - "x":3.86, - "y":-1.875 - }, - "OutputPinColourInfo":[{"PinColour":5,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1238227162, - "Label":"", - "Position":{ - "x":5.235, - "y":1.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":475603102, - "Label":"", - "Position":{ - "x":5.235, - "y":0.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":240869570, - "Label":"", - "Position":{ - "x":5.235, - "y":0.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":740891884, - "Label":"", - "Position":{ - "x":5.235, - "y":-0.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":302814323, - "Label":"", - "Position":{ - "x":5.235, - "y":-1.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":122687566, - "Label":"", - "Position":{ - "x":5.235, - "y":1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1172725389, - "Label":"", - "Position":{ - "x":5.235, - "y":2.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":558947442 - }, - "TargetPinAddress":{ - "PinID":282827618, - "PinOwnerID":1806927845 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1161439921 - }, - "TargetPinAddress":{ - "PinID":1252376139, - "PinOwnerID":1806927845 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":785271935 - }, - "TargetPinAddress":{ - "PinID":149630521, - "PinOwnerID":1806927845 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":432543011 - }, - "TargetPinAddress":{ - "PinID":617512258, - "PinOwnerID":1806927845 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1709402173 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":911313465 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":911313465 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":203193853 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":203193853 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1000868379 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1000868379 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":559255206 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":559255206 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1700072761 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":475603102 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":507183861 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":795836234, - "PinOwnerID":1806927845 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":475603102 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1238227162 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":507183861 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.0,"y":1.25},{"x":6.0,"y":0.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":122687566 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":507183861 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.125,"y":1.875},{"x":6.125,"y":1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1172725389 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":507183861 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.25,"y":2.5},{"x":6.25,"y":1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":240869570 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":507183861 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.0,"y":0.0},{"x":6.0,"y":0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":740891884 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":507183861 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.125,"y":-0.625},{"x":6.125,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":302814323 - }, - "TargetPinAddress":{ - "PinID":6, - "PinOwnerID":507183861 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.25,"y":-1.25},{"x":6.25,"y":-0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1625764615, - "PinOwnerID":1806927845 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1172725389 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.75,"y":1.5},{"x":3.75,"y":2.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":876832376, - "PinOwnerID":1806927845 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":122687566 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.875,"y":1.25},{"x":3.875,"y":2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2063837745, - "PinOwnerID":1806927845 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1238227162 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.0,"y":1.0},{"x":4.0,"y":1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1275013740, - "PinOwnerID":1806927845 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":240869570 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.0,"y":0.5},{"x":4.0,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1041680072, - "PinOwnerID":1806927845 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":740891884 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.875,"y":0.25},{"x":3.875,"y":-0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1553234055, - "PinOwnerID":1806927845 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":302814323 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.75,"y":0.0},{"x":3.75,"y":-1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1700072761 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1172725389 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.625,"y":-1.875},{"x":4.625,"y":2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1700072761 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":122687566 - }, - "ConnectionType":1, - "ConnectedWireIndex":23, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":4.625,"y":1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1700072761 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1238227162 - }, - "ConnectionType":1, - "ConnectedWireIndex":23, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":4.625,"y":1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1700072761 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":475603102 - }, - "ConnectionType":1, - "ConnectedWireIndex":23, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":4.625,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1700072761 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":240869570 - }, - "ConnectionType":1, - "ConnectedWireIndex":23, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":4.625,"y":-0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1700072761 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":740891884 - }, - "ConnectionType":1, - "ConnectedWireIndex":23, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":4.625,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1700072761 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":302814323 - }, - "ConnectionType":1, - "ConnectedWireIndex":23, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":4.625,"y":-1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":558947442 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":203193853 - }, - "ConnectionType":1, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.5,"y":1.5},{"x":-0.5,"y":-1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1161439921 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":911313465 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.625,"y":1.0},{"x":-1.625,"y":-1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":785271935 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1709402173 - }, - "ConnectionType":1, - "ConnectedWireIndex":2, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.75,"y":0.5},{"x":-2.75,"y":-1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":432543011 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1709402173 - }, - "ConnectionType":1, - "ConnectedWireIndex":3, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.875,"y":0.0},{"x":-2.875,"y":-2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":477159319 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":559255206 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.875,"y":-2.5},{"x":1.875,"y":-2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":559255206 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1537529931 - }, - "ConnectionType":1, - "ConnectedWireIndex":8, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":3.125,"y":-1.875},{"x":3.125,"y":-2.25},{"x":0.0,"y":0.0}] - } - ], - "Displays":[ - { - "SubChipID":507183861, - "Position":{ - "x":0.0, - "y":0.0 - }, - "Scale":1.0 - } - ], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DOUBLE DABBLE.json b/TestData/Projects/MainTest/Chips/DOUBLE DABBLE.json deleted file mode 100644 index 70c6fda9..00000000 --- a/TestData/Projects/MainTest/Chips/DOUBLE DABBLE.json +++ /dev/null @@ -1,825 +0,0 @@ -{ - "Name": "DOUBLE DABBLE", - "NameLocation": 0, - "Size": { - "x": 1.51375, - "y": 3.0 - }, - "Colour": { - "r": 0.206960842, - "g": 0.7538684, - "b": 0.4113267, - "a": 1 - }, - "InputPins":[ - { - "Name":"A", - "ID":834835854, - "Position":{ - "x":-4.5, - "y":1.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"B", - "ID":579679359, - "Position":{ - "x":-4.5, - "y":0.75 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"C", - "ID":897490227, - "Position":{ - "x":-4.5, - "y":0.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"D", - "ID":590808572, - "Position":{ - "x":-4.5, - "y":-0.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"E", - "ID":1957997324, - "Position":{ - "x":-4.5, - "y":-0.75 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"F", - "ID":1381237603, - "Position":{ - "x":-4.5, - "y":-1.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"G", - "ID":261218530, - "Position":{ - "x":-4.5, - "y":-1.75 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"H", - "ID":1913189227, - "Position":{ - "x":-4.5, - "y":-2.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"HUNDREDS 3", - "ID":667009293, - "Position":{ - "x":8.625, - "y":3.75 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"HUNDREDS 2", - "ID":1206036699, - "Position":{ - "x":8.625, - "y":3.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"HUNDREDS 1", - "ID":646028192, - "Position":{ - "x":8.625, - "y":2.75 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"HUNDREDS 0", - "ID":346863069, - "Position":{ - "x":8.625, - "y":2.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"TENS 3", - "ID":1038955236, - "Position":{ - "x":8.625, - "y":1.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"TENS 2", - "ID":948566781, - "Position":{ - "x":8.625, - "y":1.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"TENS 1", - "ID":1915399096, - "Position":{ - "x":8.625, - "y":0.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"TENS 0", - "ID":1157959689, - "Position":{ - "x":8.625, - "y":0.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ONES 3", - "ID":1401031050, - "Position":{ - "x":8.625, - "y":-0.75 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ONES 2", - "ID":550056922, - "Position":{ - "x":8.625, - "y":-1.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ONES 1", - "ID":1950268701, - "Position":{ - "x":8.625, - "y":-1.75 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"ONES 0", - "ID":510485307, - "Position":{ - "x":8.625, - "y":-2.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"DABBLE", - "ID":2116503194, - "Label":"T", - "Position":{ - "x":-2.095, - "y":2.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], - "InternalData":null - }, - { - "Name":"DABBLE", - "ID":23857049, - "Label":"U", - "Position":{ - "x":-0.345, - "y":1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], - "InternalData":null - }, - { - "Name":"DABBLE", - "ID":735358462, - "Label":"V", - "Position":{ - "x":1.405, - "y":1.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], - "InternalData":null - }, - { - "Name":"DABBLE", - "ID":2047797415, - "Label":"W", - "Position":{ - "x":3.405, - "y":2.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], - "InternalData":null - }, - { - "Name":"DABBLE", - "ID":1248075745, - "Label":"X", - "Position":{ - "x":3.405, - "y":-1.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], - "InternalData":null - }, - { - "Name":"DABBLE", - "ID":861761765, - "Label":"Y", - "Position":{ - "x":5.405, - "y":0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], - "InternalData":null - }, - { - "Name":"DABBLE", - "ID":1284127487, - "Label":"Z", - "Position":{ - "x":5.405, - "y":-1.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":2478898, - "PinOwnerID":2116503194 - }, - "TargetPinAddress":{ - "PinID":1840387208, - "PinOwnerID":23857049 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":683934649, - "PinOwnerID":2116503194 - }, - "TargetPinAddress":{ - "PinID":536256266, - "PinOwnerID":23857049 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1546194494, - "PinOwnerID":2116503194 - }, - "TargetPinAddress":{ - "PinID":1476251295, - "PinOwnerID":23857049 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2478898, - "PinOwnerID":23857049 - }, - "TargetPinAddress":{ - "PinID":1840387208, - "PinOwnerID":735358462 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":683934649, - "PinOwnerID":23857049 - }, - "TargetPinAddress":{ - "PinID":536256266, - "PinOwnerID":735358462 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1546194494, - "PinOwnerID":23857049 - }, - "TargetPinAddress":{ - "PinID":1476251295, - "PinOwnerID":735358462 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2478898, - "PinOwnerID":1248075745 - }, - "TargetPinAddress":{ - "PinID":1840387208, - "PinOwnerID":1284127487 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":683934649, - "PinOwnerID":1248075745 - }, - "TargetPinAddress":{ - "PinID":536256266, - "PinOwnerID":1284127487 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1546194494, - "PinOwnerID":1248075745 - }, - "TargetPinAddress":{ - "PinID":1476251295, - "PinOwnerID":1284127487 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":261218530 - }, - "TargetPinAddress":{ - "PinID":1508054775, - "PinOwnerID":1284127487 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1913189227 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":510485307 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1546194494, - "PinOwnerID":1284127487 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1950268701 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1546194494, - "PinOwnerID":861761765 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1915399096 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1118936726, - "PinOwnerID":2116503194 - }, - "TargetPinAddress":{ - "PinID":536256266, - "PinOwnerID":2047797415 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1118936726, - "PinOwnerID":23857049 - }, - "TargetPinAddress":{ - "PinID":1476251295, - "PinOwnerID":2047797415 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1118936726, - "PinOwnerID":735358462 - }, - "TargetPinAddress":{ - "PinID":1508054775, - "PinOwnerID":2047797415 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":683934649, - "PinOwnerID":1284127487 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":550056922 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.75,"y":-1.5},{"x":6.75,"y":-1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2478898, - "PinOwnerID":1284127487 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1401031050 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.625,"y":-1.25},{"x":6.625,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1118936726, - "PinOwnerID":1284127487 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1157959689 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.5,"y":-1.0},{"x":6.5,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":683934649, - "PinOwnerID":861761765 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":948566781 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.75,"y":0.75},{"x":6.75,"y":1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2478898, - "PinOwnerID":861761765 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1038955236 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.625,"y":1.0},{"x":6.625,"y":1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1118936726, - "PinOwnerID":861761765 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":346863069 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.25,"y":1.25},{"x":6.25,"y":2.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1118936726, - "PinOwnerID":2047797415 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":646028192 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2478898, - "PinOwnerID":2047797415 - }, - "TargetPinAddress":{ - "PinID":1840387208, - "PinOwnerID":861761765 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.5,"y":2.5},{"x":4.5,"y":1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":683934649, - "PinOwnerID":2047797415 - }, - "TargetPinAddress":{ - "PinID":536256266, - "PinOwnerID":861761765 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.375,"y":2.25},{"x":4.375,"y":1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1546194494, - "PinOwnerID":2047797415 - }, - "TargetPinAddress":{ - "PinID":1476251295, - "PinOwnerID":861761765 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.25,"y":2.0},{"x":4.25,"y":0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1118936726, - "PinOwnerID":1248075745 - }, - "TargetPinAddress":{ - "PinID":1508054775, - "PinOwnerID":861761765 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.25,"y":-0.75},{"x":4.25,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2478898, - "PinOwnerID":735358462 - }, - "TargetPinAddress":{ - "PinID":1840387208, - "PinOwnerID":1248075745 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":2.5,"y":1.75},{"x":2.5,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":683934649, - "PinOwnerID":735358462 - }, - "TargetPinAddress":{ - "PinID":536256266, - "PinOwnerID":1248075745 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":2.375,"y":1.5},{"x":2.375,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1546194494, - "PinOwnerID":735358462 - }, - "TargetPinAddress":{ - "PinID":1476251295, - "PinOwnerID":1248075745 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":2.25,"y":1.25},{"x":2.25,"y":-1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1381237603 - }, - "TargetPinAddress":{ - "PinID":1508054775, - "PinOwnerID":1248075745 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":2.125,"y":-1.25},{"x":2.125,"y":-1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1957997324 - }, - "TargetPinAddress":{ - "PinID":1508054775, - "PinOwnerID":735358462 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.5,"y":-0.75},{"x":0.5,"y":1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":590808572 - }, - "TargetPinAddress":{ - "PinID":1508054775, - "PinOwnerID":23857049 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.25,"y":-0.25},{"x":-1.25,"y":1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":834835854 - }, - "TargetPinAddress":{ - "PinID":536256266, - "PinOwnerID":2116503194 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.25,"y":1.25},{"x":-3.25,"y":2.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":579679359 - }, - "TargetPinAddress":{ - "PinID":1476251295, - "PinOwnerID":2116503194 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.125,"y":0.75},{"x":-3.125,"y":2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":897490227 - }, - "TargetPinAddress":{ - "PinID":1508054775, - "PinOwnerID":2116503194 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.0,"y":0.25},{"x":-3.0,"y":1.75},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/EQUALS-8.json b/TestData/Projects/MainTest/Chips/EQUALS-8.json deleted file mode 100644 index 5c777b2c..00000000 --- a/TestData/Projects/MainTest/Chips/EQUALS-8.json +++ /dev/null @@ -1,706 +0,0 @@ -{ - "Name": "EQUALS-8", - "NameLocation": 0, - "Size": { - "x": 1.45, - "y": 1.0 - }, - "Colour": { - "r": 0.322117865, - "g": 0.8169334, - "b": 0.2998035, - "a": 1 - }, - "InputPins":[ - { - "Name":"B", - "ID":427606127, - "Position":{ - "x":-7.875, - "y":0.875 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"A", - "ID":1445895175, - "Position":{ - "x":-7.875, - "y":-1.4375 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":1960274563, - "Position":{ - "x":7.375, - "y":1.0 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"XNOR", - "ID":427763668, - "Label":"", - "Position":{ - "x":-2.64, - "y":1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], - "InternalData":null - }, - { - "Name":"XNOR", - "ID":318175282, - "Label":"", - "Position":{ - "x":-2.64, - "y":1.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], - "InternalData":null - }, - { - "Name":"XNOR", - "ID":345295526, - "Label":"", - "Position":{ - "x":-2.64, - "y":0.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], - "InternalData":null - }, - { - "Name":"XNOR", - "ID":591045515, - "Label":"", - "Position":{ - "x":-2.64, - "y":0.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], - "InternalData":null - }, - { - "Name":"XNOR", - "ID":803641220, - "Label":"", - "Position":{ - "x":-2.64, - "y":-0.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], - "InternalData":null - }, - { - "Name":"XNOR", - "ID":937088444, - "Label":"", - "Position":{ - "x":-2.64, - "y":-1.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], - "InternalData":null - }, - { - "Name":"XNOR", - "ID":826317906, - "Label":"", - "Position":{ - "x":-2.64, - "y":-1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], - "InternalData":null - }, - { - "Name":"XNOR", - "ID":1213321161, - "Label":"", - "Position":{ - "x":-2.64, - "y":-2.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":1508825634, - "Label":"", - "Position":{ - "x":-5.3025, - "y":0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":1225631437, - "Label":"", - "Position":{ - "x":-5.3025, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1225484485, - "Label":"", - "Position":{ - "x":-1.39, - "y":1.75 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1552722044, - "Label":"", - "Position":{ - "x":-0.265, - "y":1.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1362107608, - "Label":"", - "Position":{ - "x":0.86, - "y":1.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1199059719, - "Label":"", - "Position":{ - "x":1.985, - "y":1.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":97130088, - "Label":"", - "Position":{ - "x":3.11, - "y":1.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":377256245, - "Label":"", - "Position":{ - "x":4.235, - "y":1.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":637885360, - "Label":"", - "Position":{ - "x":5.36, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":427606127 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1508825634 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1445895175 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1225631437 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1508825634 - }, - "TargetPinAddress":{ - "PinID":128924098, - "PinOwnerID":427763668 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1508825634 - }, - "TargetPinAddress":{ - "PinID":128924098, - "PinOwnerID":318175282 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":1508825634 - }, - "TargetPinAddress":{ - "PinID":128924098, - "PinOwnerID":345295526 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1508825634 - }, - "TargetPinAddress":{ - "PinID":128924098, - "PinOwnerID":591045515 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":1508825634 - }, - "TargetPinAddress":{ - "PinID":128924098, - "PinOwnerID":803641220 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":1508825634 - }, - "TargetPinAddress":{ - "PinID":128924098, - "PinOwnerID":937088444 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":1508825634 - }, - "TargetPinAddress":{ - "PinID":128924098, - "PinOwnerID":826317906 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1508825634 - }, - "TargetPinAddress":{ - "PinID":128924098, - "PinOwnerID":1213321161 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1225631437 - }, - "TargetPinAddress":{ - "PinID":1606082193, - "PinOwnerID":427763668 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1225631437 - }, - "TargetPinAddress":{ - "PinID":1606082193, - "PinOwnerID":318175282 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":1225631437 - }, - "TargetPinAddress":{ - "PinID":1606082193, - "PinOwnerID":345295526 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1225631437 - }, - "TargetPinAddress":{ - "PinID":1606082193, - "PinOwnerID":591045515 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":1225631437 - }, - "TargetPinAddress":{ - "PinID":1606082193, - "PinOwnerID":803641220 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":1225631437 - }, - "TargetPinAddress":{ - "PinID":1606082193, - "PinOwnerID":937088444 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":1225631437 - }, - "TargetPinAddress":{ - "PinID":1606082193, - "PinOwnerID":826317906 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1225631437 - }, - "TargetPinAddress":{ - "PinID":1606082193, - "PinOwnerID":1213321161 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1225484485 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1552722044 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2132693630, - "PinOwnerID":427763668 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1225484485 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2132693630, - "PinOwnerID":591045515 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1362107608 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2132693630, - "PinOwnerID":803641220 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1199059719 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2132693630, - "PinOwnerID":937088444 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":97130088 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2132693630, - "PinOwnerID":826317906 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":377256245 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2132693630, - "PinOwnerID":1213321161 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":637885360 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":377256245 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":637885360 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":97130088 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":377256245 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1199059719 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":97130088 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1362107608 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1199059719 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1552722044 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1362107608 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":637885360 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1960274563 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2132693630, - "PinOwnerID":318175282 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1225484485 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2132693630, - "PinOwnerID":345295526 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1552722044 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/FLAGS.json b/TestData/Projects/MainTest/Chips/FLAGS.json deleted file mode 100644 index 19c9e423..00000000 --- a/TestData/Projects/MainTest/Chips/FLAGS.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "Name": "FLAGS", - "NameLocation": 0, - "Size": { - "x": 1.14, - "y": 0.88 - }, - "Colour": { - "r": 0.5022173, - "g": 0.319064438, - "b": 0.4171181, - "a": 1 - }, - "InputPins":[ - { - "Name":"ZERO", - "ID":792064669, - "Position":{ - "x":-6.65289, - "y":0.71429 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"STORE", - "ID":227439812, - "Position":{ - "x":-6.73412, - "y":-0.26564 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":977455228, - "Position":{ - "x":-6.89941, - "y":-1.34002 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"ZERO", - "ID":605802866, - "Position":{ - "x":5.61393, - "y":0.04132 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"REGISTER-1", - "ID":364273569, - "Label":null, - "Position":{ - "x":-0.13577, - "y":0.12397 - }, - "OutputPinColourInfo":null, - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":977455228 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":364273569 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-6.13541,"y":-1.34002},{"x":-0.7641,"y":-0.19603}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":227439812 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":364273569 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.97012,"y":-0.26564},{"x":-0.7641,"y":0.12397}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":792064669 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":364273569 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.88889,"y":0.71429},{"x":-0.7641,"y":0.44397}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":364273569 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":605802866 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.49256,"y":0.12397},{"x":4.84993,"y":0.04132}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/FLIP-FLOP.json b/TestData/Projects/MainTest/Chips/FLIP-FLOP.json deleted file mode 100644 index 5f43b6dd..00000000 --- a/TestData/Projects/MainTest/Chips/FLIP-FLOP.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "Name": "FLIP-FLOP", - "NameLocation": 0, - "Size": { - "x": 1.59, - "y": 0.56 - }, - "Colour": { - "r": 0.763959, - "g": 0.3430992, - "b": 0.267745525, - "a": 1 - }, - "InputPins":[ - { - "Name":"DATA", - "ID":1732460994, - "Position":{ - "x":-7.875, - "y":0.375 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":2143575788, - "Position":{ - "x":-7.875, - "y":-0.1875 - }, - "BitCount":1, - "Colour":5, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":1920302974, - "Position":{ - "x":1.375, - "y":-0.4375 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"D-LATCH", - "ID":1435657029, - "Label":null, - "Position":{ - "x":-3.22, - "y":0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1677203907}], - "InternalData":null - }, - { - "Name":"D-LATCH", - "ID":1262867679, - "Label":null, - "Position":{ - "x":-0.97, - "y":-0.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1677203907}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":687615599, - "Label":null, - "Position":{ - "x":-5.14, - "y":-0.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":1677203907, - "PinOwnerID":1262867679 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1920302974 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2143575788 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":687615599 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1732460994 - }, - "TargetPinAddress":{ - "PinID":1709633590, - "PinOwnerID":1435657029 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":687615599 - }, - "TargetPinAddress":{ - "PinID":1820713789, - "PinOwnerID":1435657029 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":-0.1875},{"x":-4.25,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2143575788 - }, - "TargetPinAddress":{ - "PinID":1820713789, - "PinOwnerID":1262867679 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-5.96018,"y":-0.1875},{"x":-5.96018,"y":-0.5625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1677203907, - "PinOwnerID":1435657029 - }, - "TargetPinAddress":{ - "PinID":1709633590, - "PinOwnerID":1262867679 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.0,"y":0.25},{"x":-2.0,"y":-0.3125},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/KeyTest.json b/TestData/Projects/MainTest/Chips/KeyTest.json deleted file mode 100644 index 505341d4..00000000 --- a/TestData/Projects/MainTest/Chips/KeyTest.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "Name": "KeyTest", - "NameLocation": 0, - "Size": { - "x": 1.44, - "y": 0.5675 - }, - "Colour": { - "r": 0.185919926, - "g": 0.454911739, - "b": 0.384076327, - "a": 1 - }, - "InputPins":[], - "OutputPins":[], - "SubChips":[ - { - "Name":"KEY", - "ID":1584306565, - "Label":null, - "Position":{ - "x":-1.06366, - "y":-0.62112 - }, - "OutputPinColourInfo":null, - "InternalData":[69] - } - ], - "Wires":[], - "Displays": null, - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/LSB.json b/TestData/Projects/MainTest/Chips/LSB.json deleted file mode 100644 index f7efeede..00000000 --- a/TestData/Projects/MainTest/Chips/LSB.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.268787533, - "g": 0.0914283544, - "b": 0.468588352, - "a": 1 - }, - "Displays": null, - "InputPins":[ - { - "Name":"IN-8", - "ID":1285607522, - "Position":{ - "x":-7.31405, - "y":-0.07674 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "LSB", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT", - "ID":1222614200, - "Position":{ - "x":6.35773, - "y":-0.30106 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 0.84, - "y": 0.5275 - }, - "SubChips":[ - { - "Name":"8-1BIT", - "ID":1718871322, - "Label":"", - "Position":{ - "x":-1.9588699999999999, - "y":-0.03884 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1285607522 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1718871322 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1718871322 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1222614200 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/LSHIFT-8.json b/TestData/Projects/MainTest/Chips/LSHIFT-8.json deleted file mode 100644 index 68f79a73..00000000 --- a/TestData/Projects/MainTest/Chips/LSHIFT-8.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.228995532, - "g": 0.175464317, - "b": 0.350601465, - "a": 1 - }, - "Displays":[], - "InputPins":[ - { - "Name":"IN-8", - "ID":1888645677, - "Position":{ - "x":-8.15344, - "y":0.4709 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "LSHIFT-8", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT-8", - "ID":2004659665, - "Position":{ - "x":7.21164, - "y":-0.42857 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.63, - "y": 0.77125 - }, - "SubChips":[ - { - "Name":"8-1BIT", - "ID":2106702773, - "Label":"", - "Position":{ - "x":-4.96763, - "y":0.36759 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"1-8BIT", - "ID":783985744, - "Label":"", - "Position":{ - "x":3.18407, - "y":-0.33018 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1888645677 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2106702773 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":783985744 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2004659665 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":2106702773 - }, - "TargetPinAddress":{ - "PinID":6, - "PinOwnerID":783985744 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":2106702773 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":783985744 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":2106702773 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":783985744 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":2106702773 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":783985744 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":2106702773 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":783985744 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":2106702773 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":783985744 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":2106702773 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":783985744 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/MEM-1.json b/TestData/Projects/MainTest/Chips/MEM-1.json deleted file mode 100644 index a09046ed..00000000 --- a/TestData/Projects/MainTest/Chips/MEM-1.json +++ /dev/null @@ -1,249 +0,0 @@ -{ - "Name": "MEM-1", - "NameLocation": 0, - "Size": { - "x": 1.015, - "y": 1.0 - }, - "Colour": { - "r": 0.7492096, - "g": 0.489632368, - "b": 0.149908349, - "a": 1 - }, - "InputPins":[ - { - "Name":"DATA", - "ID":1453644181, - "Position":{ - "x":-6.875, - "y":0.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"STORE", - "ID":870941495, - "Position":{ - "x":-6.875, - "y":-0.5 - }, - "BitCount":1, - "Colour":1, - "ValueDisplayMode":0 - }, - { - "Name":"ROW", - "ID":1413611334, - "Position":{ - "x":-6.875, - "y":-1.375 - }, - "BitCount":1, - "Colour":2, - "ValueDisplayMode":0 - }, - { - "Name":"COLUMN", - "ID":1709778081, - "Position":{ - "x":-6.875, - "y":-2.0 - }, - "BitCount":1, - "Colour":3, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":1923212434, - "Position":{ - "x":4.125, - "y":-0.1875 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"D-LATCH", - "ID":782972032, - "Label":null, - "Position":{ - "x":-0.72, - "y":0.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1677203907}], - "InternalData":null - }, - { - "Name":"AND", - "ID":936394086, - "Label":null, - "Position":{ - "x":-4.015, - "y":-1.5 - }, - "OutputPinColourInfo":[{"PinColour":4,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"3-STATE BUFFER", - "ID":364195663, - "Label":null, - "Position":{ - "x":1.5, - "y":-0.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"AND", - "ID":957057383, - "Label":null, - "Position":{ - "x":-2.64, - "y":-0.625 - }, - "OutputPinColourInfo":[{"PinColour":1,"PinID":1580367471}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1413611334 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":936394086 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":364195663 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1923212434 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1677203907, - "PinOwnerID":782972032 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":364195663 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1453644181 - }, - "TargetPinAddress":{ - "PinID":1709633590, - "PinOwnerID":782972032 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":870941495 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":957057383 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":936394086 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":364195663 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":-1.5},{"x":0.25,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":957057383 - }, - "TargetPinAddress":{ - "PinID":1820713789, - "PinOwnerID":782972032 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.875,"y":-0.625},{"x":-1.875,"y":-0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":936394086 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":957057383 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.25,"y":-1.5},{"x":-3.25,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1709778081 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":936394086 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.75,"y":-2.0},{"x":-4.75,"y":-1.625},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/MEM-16.json b/TestData/Projects/MainTest/Chips/MEM-16.json deleted file mode 100644 index 67be2eb4..00000000 --- a/TestData/Projects/MainTest/Chips/MEM-16.json +++ /dev/null @@ -1,1656 +0,0 @@ -{ - "Name": "MEM-16", - "NameLocation": 0, - "Size": { - "x": 1.2, - "y": 1.375 - }, - "Colour": { - "r": 0.828141, - "g": 0.446045637, - "b": 0.176697254, - "a": 1 - }, - "InputPins":[ - { - "Name":"DATA", - "ID":1841003398, - "Position":{ - "x":-11.5, - "y":4.375 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"STORE", - "ID":1875743195, - "Position":{ - "x":-11.5, - "y":3.75 - }, - "BitCount":1, - "Colour":1, - "ValueDisplayMode":0 - }, - { - "Name":"ROW", - "ID":1052884450, - "Position":{ - "x":-11.5, - "y":2.875 - }, - "BitCount":1, - "Colour":2, - "ValueDisplayMode":0 - }, - { - "Name":"COLUMN", - "ID":1707980435, - "Position":{ - "x":-11.5, - "y":2.25 - }, - "BitCount":1, - "Colour":3, - "ValueDisplayMode":0 - }, - { - "Name":"ADDR", - "ID":522472268, - "Position":{ - "x":-11.5, - "y":1.0 - }, - "BitCount":4, - "Colour":2, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":350543267, - "Position":{ - "x":5.75, - "y":-1.5 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"4-1BIT", - "ID":1693845699, - "Label":null, - "Position":{ - "x":-9.0525, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":3,"PinID":1},{"PinColour":3,"PinID":2},{"PinColour":2,"PinID":3},{"PinColour":2,"PinID":4}], - "InternalData":null - }, - { - "Name":"DECODER-2", - "ID":148960258, - "Label":"COLUMN", - "Position":{ - "x":-7.265, - "y":2.875 - }, - "OutputPinColourInfo":[{"PinColour":3,"PinID":1868926879},{"PinColour":3,"PinID":18957384},{"PinColour":3,"PinID":199145797},{"PinColour":3,"PinID":1076039863}], - "InternalData":null - }, - { - "Name":"DECODER-2", - "ID":1225817006, - "Label":"ROW", - "Position":{ - "x":-7.265, - "y":-0.625 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":1868926879},{"PinColour":2,"PinID":18957384},{"PinColour":2,"PinID":199145797},{"PinColour":2,"PinID":1076039863}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":100866357, - "Label":"", - "Position":{ - "x":-5.1075, - "y":1.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":600579192, - "Label":"", - "Position":{ - "x":-5.1075, - "y":0.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":267273814, - "Label":"", - "Position":{ - "x":-5.1075, - "y":-1.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":1498518742, - "Label":"", - "Position":{ - "x":-5.1075, - "y":-2.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":1038408772, - "Label":"", - "Position":{ - "x":-2.4825, - "y":1.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":2094839483, - "Label":"", - "Position":{ - "x":-2.4825, - "y":0.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":2101761236, - "Label":"", - "Position":{ - "x":-2.4825, - "y":-1.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":551489447, - "Label":"", - "Position":{ - "x":-2.4825, - "y":-2.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":627338687, - "Label":"", - "Position":{ - "x":0.1425, - "y":1.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":574781497, - "Label":"", - "Position":{ - "x":0.1425, - "y":0.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":844162557, - "Label":"", - "Position":{ - "x":0.1425, - "y":-1.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":172825662, - "Label":"", - "Position":{ - "x":0.1425, - "y":-2.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":580734989, - "Label":"", - "Position":{ - "x":2.7675, - "y":1.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":181927659, - "Label":"", - "Position":{ - "x":2.7675, - "y":0.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":788454371, - "Label":"", - "Position":{ - "x":2.7675, - "y":-1.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"MEM-1", - "ID":452514110, - "Label":"", - "Position":{ - "x":2.7675, - "y":-2.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1048288960, - "Label":"", - "Position":{ - "x":-9.015, - "y":2.75 - }, - "OutputPinColourInfo":[{"PinColour":4,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":52524135, - "Label":"", - "Position":{ - "x":-7.265, - "y":4.0 - }, - "OutputPinColourInfo":[{"PinColour":1,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"BUS-1", - "ID":1367944743, - "Label":"", - "Position":{ - "x":-4.74, - "y":0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], - "InternalData":[833997787,0] - }, - { - "Name":"BUS-TERMINUS-1", - "ID":833997787, - "Label":"", - "Position":{ - "x":-4.74, - "y":-2.125 - }, - "OutputPinColourInfo":[], - "InternalData":[1367944743,1] - }, - { - "Name":"3-STATE BUFFER", - "ID":109387279, - "Label":"", - "Position":{ - "x":4.875, - "y":-0.5625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":522472268 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1693845699 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1693845699 - }, - "TargetPinAddress":{ - "PinID":192060771, - "PinOwnerID":148960258 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-8.25,"y":1.375},{"x":-8.25,"y":3.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1693845699 - }, - "TargetPinAddress":{ - "PinID":1480848655, - "PinOwnerID":148960258 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-8.125,"y":1.125},{"x":-8.125,"y":2.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":1693845699 - }, - "TargetPinAddress":{ - "PinID":192060771, - "PinOwnerID":1225817006 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-8.125,"y":0.875},{"x":-8.125,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1693845699 - }, - "TargetPinAddress":{ - "PinID":1480848655, - "PinOwnerID":1225817006 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-8.25,"y":0.625},{"x":-8.25,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":452514110 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.375,"y":-1.0},{"x":-6.375,"y":-3.625},{"x":1.75,"y":-3.625},{"x":1.75,"y":-3.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":172825662 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-0.875,"y":-3.625},{"x":-0.875,"y":-3.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":551489447 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-3.5,"y":-3.625},{"x":-3.5,"y":-3.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":1498518742 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-6.125,"y":-3.625},{"x":-6.125,"y":-3.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":788454371 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.75,"y":-0.75},{"x":1.75,"y":-1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":844162557 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.875,"y":-0.75},{"x":-0.875,"y":-1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":2101761236 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.5,"y":-0.75},{"x":-3.5,"y":-1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":267273814 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-6.125,"y":-0.75},{"x":-6.125,"y":-1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":181927659 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.75,"y":-0.5},{"x":1.75,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":574781497 - }, - "ConnectionType":1, - "ConnectedWireIndex":13, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.875,"y":-0.5},{"x":-0.875,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":2094839483 - }, - "ConnectionType":1, - "ConnectedWireIndex":13, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.5,"y":-0.5},{"x":-3.5,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":600579192 - }, - "ConnectionType":1, - "ConnectedWireIndex":13, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-6.125,"y":-0.5},{"x":-6.125,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":580734989 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.375,"y":-0.25},{"x":-6.375,"y":2.375},{"x":1.75,"y":2.375},{"x":1.75,"y":1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":627338687 - }, - "ConnectionType":1, - "ConnectedWireIndex":17, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-0.875,"y":2.375},{"x":-0.875,"y":1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":1038408772 - }, - "ConnectionType":1, - "ConnectedWireIndex":17, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-3.5,"y":2.375},{"x":-3.5,"y":1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":1225817006 - }, - "TargetPinAddress":{ - "PinID":1413611334, - "PinOwnerID":100866357 - }, - "ConnectionType":1, - "ConnectedWireIndex":17, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-6.125,"y":2.375},{"x":-6.125,"y":1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":1498518742 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.25,"y":2.5},{"x":-6.25,"y":-3.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":267273814 - }, - "ConnectionType":1, - "ConnectedWireIndex":21, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-6.25,"y":-1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":600579192 - }, - "ConnectionType":1, - "ConnectedWireIndex":21, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-6.25,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":100866357 - }, - "ConnectionType":1, - "ConnectedWireIndex":21, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-6.25,"y":1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":551489447 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.625,"y":2.75},{"x":-3.625,"y":-3.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":2101761236 - }, - "ConnectionType":1, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-3.625,"y":-1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":2094839483 - }, - "ConnectionType":1, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-3.625,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":1038408772 - }, - "ConnectionType":1, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-3.625,"y":1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":172825662 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.0,"y":3.0},{"x":-1.0,"y":-3.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":844162557 - }, - "ConnectionType":1, - "ConnectedWireIndex":29, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.0,"y":-1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":574781497 - }, - "ConnectionType":1, - "ConnectedWireIndex":29, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.0,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":627338687 - }, - "ConnectionType":1, - "ConnectedWireIndex":29, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.0,"y":1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":452514110 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.625,"y":3.25},{"x":1.625,"y":-3.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":788454371 - }, - "ConnectionType":1, - "ConnectedWireIndex":33, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":1.625,"y":-1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":181927659 - }, - "ConnectionType":1, - "ConnectedWireIndex":33, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":1.625,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":148960258 - }, - "TargetPinAddress":{ - "PinID":1709778081, - "PinOwnerID":580734989 - }, - "ConnectionType":1, - "ConnectedWireIndex":33, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":1.625,"y":1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":452514110 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":2.0,"y":4.375},{"x":2.0,"y":-2.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":788454371 - }, - "ConnectionType":1, - "ConnectedWireIndex":37, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":2.0,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":181927659 - }, - "ConnectionType":1, - "ConnectedWireIndex":37, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":2.0,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":580734989 - }, - "ConnectionType":1, - "ConnectedWireIndex":37, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":2.0,"y":2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":172825662 - }, - "ConnectionType":1, - "ConnectedWireIndex":37, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.625,"y":4.375},{"x":-0.625,"y":-2.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":844162557 - }, - "ConnectionType":1, - "ConnectedWireIndex":41, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.625,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":574781497 - }, - "ConnectionType":1, - "ConnectedWireIndex":41, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.625,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":627338687 - }, - "ConnectionType":1, - "ConnectedWireIndex":41, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.625,"y":2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":551489447 - }, - "ConnectionType":1, - "ConnectedWireIndex":37, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.25,"y":4.375},{"x":-3.25,"y":-2.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":2101761236 - }, - "ConnectionType":1, - "ConnectedWireIndex":45, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.25,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":2094839483 - }, - "ConnectionType":1, - "ConnectedWireIndex":45, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.25,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":1038408772 - }, - "ConnectionType":1, - "ConnectedWireIndex":45, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.25,"y":2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":1498518742 - }, - "ConnectionType":1, - "ConnectedWireIndex":37, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-5.875,"y":4.375},{"x":-5.875,"y":-2.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":267273814 - }, - "ConnectionType":1, - "ConnectedWireIndex":49, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-5.875,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":600579192 - }, - "ConnectionType":1, - "ConnectedWireIndex":49, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-5.875,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1841003398 - }, - "TargetPinAddress":{ - "PinID":1453644181, - "PinOwnerID":100866357 - }, - "ConnectionType":1, - "ConnectedWireIndex":49, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-5.875,"y":2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1707980435 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1048288960 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-9.625,"y":2.25},{"x":-9.625,"y":2.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1052884450 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1048288960 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1048288960 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":52524135 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-8.375,"y":2.75},{"x":-8.375,"y":3.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1875743195 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":52524135 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-8.625,"y":3.75},{"x":-8.625,"y":4.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":452514110 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.875,"y":4.0},{"x":1.875,"y":-2.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":788454371 - }, - "ConnectionType":1, - "ConnectedWireIndex":57, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":1.875,"y":-1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":181927659 - }, - "ConnectionType":1, - "ConnectedWireIndex":57, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":1.875,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":580734989 - }, - "ConnectionType":1, - "ConnectedWireIndex":57, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":1.875,"y":1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":172825662 - }, - "ConnectionType":1, - "ConnectedWireIndex":57, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.75,"y":4.0},{"x":-0.75,"y":-2.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":844162557 - }, - "ConnectionType":1, - "ConnectedWireIndex":61, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.75,"y":-1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":574781497 - }, - "ConnectionType":1, - "ConnectedWireIndex":61, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.75,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":627338687 - }, - "ConnectionType":1, - "ConnectedWireIndex":61, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-0.75,"y":1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":551489447 - }, - "ConnectionType":1, - "ConnectedWireIndex":57, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.375,"y":4.0},{"x":-3.375,"y":-2.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":2101761236 - }, - "ConnectionType":1, - "ConnectedWireIndex":65, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.375,"y":-1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":2094839483 - }, - "ConnectionType":1, - "ConnectedWireIndex":65, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.375,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":1038408772 - }, - "ConnectionType":1, - "ConnectedWireIndex":65, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.375,"y":1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":1498518742 - }, - "ConnectionType":1, - "ConnectedWireIndex":57, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-6.0,"y":4.0},{"x":-6.0,"y":-2.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":267273814 - }, - "ConnectionType":1, - "ConnectedWireIndex":69, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-6.0,"y":-1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":600579192 - }, - "ConnectionType":1, - "ConnectedWireIndex":69, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-6.0,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":52524135 - }, - "TargetPinAddress":{ - "PinID":870941495, - "PinOwnerID":100866357 - }, - "ConnectionType":1, - "ConnectedWireIndex":69, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-6.0,"y":1.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1367944743 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":833997787 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.625,"y":0.875},{"x":3.625,"y":-2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":100866357 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":1.625},{"x":-4.25,"y":0.875}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":600579192 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":0.125},{"x":-4.25,"y":0.875}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":1038408772 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":1.625},{"x":-1.625,"y":0.875}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":2094839483 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":0.125},{"x":-1.625,"y":0.875}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":627338687 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":1.625},{"x":1.0,"y":0.875}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":574781497 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":0.125},{"x":1.0,"y":0.875}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":580734989 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":1.625},{"x":3.5,"y":0.875}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":181927659 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.0,"y":0.0},{"x":3.625,"y":0.125}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":788454371 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.0,"y":0.0},{"x":3.625,"y":-1.375}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":452514110 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":-2.875},{"x":3.5,"y":-2.125}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":172825662 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":-2.875},{"x":1.0,"y":-2.125}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":844162557 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":-1.375},{"x":1.0,"y":-2.125}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":2101761236 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":-1.375},{"x":-1.625,"y":-2.125}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":551489447 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":-2.875},{"x":-1.625,"y":-2.125}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":267273814 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":-1.375},{"x":-4.25,"y":-2.125}] - }, - { - "SourcePinAddress":{ - "PinID":1923212434, - "PinOwnerID":1498518742 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1367944743 - }, - "ConnectionType":2, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":-2.875},{"x":-4.25,"y":-2.125}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1367944743 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":109387279 - }, - "ConnectionType":1, - "ConnectedWireIndex":73, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":3.625,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1048288960 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":109387279 - }, - "ConnectionType":1, - "ConnectedWireIndex":55, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-8.375,"y":3.625},{"x":3.875,"y":3.625},{"x":3.875,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":109387279 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":350543267 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.875,"y":-0.5625},{"x":5.875,"y":-1.125},{"x":4.125,"y":-1.125},{"x":4.125,"y":-1.5},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/MEM-256.json b/TestData/Projects/MainTest/Chips/MEM-256.json deleted file mode 100644 index 6035a59c..00000000 --- a/TestData/Projects/MainTest/Chips/MEM-256.json +++ /dev/null @@ -1,1766 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.819403052, - "g": 0.490690053, - "b": 0.106813826, - "a": 1 - }, - "Displays":[], - "InputPins":[ - { - "Name":"DATA", - "ID":50697977, - "Position":{ - "x":-11.875, - "y":4.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"STORE", - "ID":1274086089, - "Position":{ - "x":-11.875, - "y":3.5625 - }, - "BitCount":1, - "Colour":1, - "ValueDisplayMode":0 - }, - { - "Name":"ADDR", - "ID":882163141, - "Position":{ - "x":-11.875, - "y":2.6875 - }, - "BitCount":8, - "Colour":2, - "ValueDisplayMode":0 - } - ], - "Name": "MEM-256", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT", - "ID":888145750, - "Position":{ - "x":7.25, - "y":-1.1875 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.36327, - "y": 1.0 - }, - "SubChips":[ - { - "Name":"MEM-16", - "ID":641159173, - "Label":"", - "Position":{ - "x":-3.265, - "y":1.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":1109383114, - "Label":"", - "Position":{ - "x":-3.265, - "y":-0.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":2135605371, - "Label":"", - "Position":{ - "x":-3.265, - "y":-2.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":1039278762, - "Label":"", - "Position":{ - "x":-3.265, - "y":-4.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":1119351010, - "Label":"", - "Position":{ - "x":-0.64, - "y":1.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":2000888510, - "Label":"", - "Position":{ - "x":-0.64, - "y":-0.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":1928097403, - "Label":"", - "Position":{ - "x":-0.64, - "y":-2.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":76640043, - "Label":"", - "Position":{ - "x":-0.64, - "y":-4.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":510436228, - "Label":"", - "Position":{ - "x":1.985, - "y":1.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":684417203, - "Label":"", - "Position":{ - "x":1.985, - "y":-0.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":1600798356, - "Label":"", - "Position":{ - "x":1.985, - "y":-2.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":1490309237, - "Label":"", - "Position":{ - "x":1.985, - "y":-4.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":265465071, - "Label":"", - "Position":{ - "x":4.61, - "y":1.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":93777886, - "Label":"", - "Position":{ - "x":4.61, - "y":-0.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":992845923, - "Label":"", - "Position":{ - "x":4.61, - "y":-2.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"MEM-16", - "ID":349962702, - "Label":"", - "Position":{ - "x":4.61, - "y":-4.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], - "InternalData":null - }, - { - "Name":"8-4BIT", - "ID":171647764, - "Label":"", - "Position":{ - "x":-9.4275, - "y":1.6875 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":1},{"PinColour":6,"PinID":2}], - "InternalData":null - }, - { - "Name":"4-1BIT", - "ID":808479528, - "Label":"", - "Position":{ - "x":-7.6775, - "y":1.875 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":1},{"PinColour":2,"PinID":2},{"PinColour":3,"PinID":3},{"PinColour":3,"PinID":4}], - "InternalData":null - }, - { - "Name":"DECODER-2", - "ID":570339773, - "Label":"COLUMN", - "Position":{ - "x":-5.8775, - "y":3.25 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":1868926879},{"PinColour":2,"PinID":18957384},{"PinColour":2,"PinID":199145797},{"PinColour":2,"PinID":1076039863}], - "InternalData":null - }, - { - "Name":"DECODER-2", - "ID":2072605531, - "Label":"ROW", - "Position":{ - "x":-5.8775, - "y":-1.1875 - }, - "OutputPinColourInfo":[{"PinColour":3,"PinID":1868926879},{"PinColour":3,"PinID":18957384},{"PinColour":3,"PinID":199145797},{"PinColour":3,"PinID":1076039863}], - "InternalData":null - }, - { - "Name":"BUS-1", - "ID":1103306126, - "Label":"", - "Position":{ - "x":-2.865, - "y":0.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], - "InternalData":[383283908,0] - }, - { - "Name":"BUS-TERMINUS-1", - "ID":383283908, - "Label":"", - "Position":{ - "x":-2.865, - "y":-3.1875 - }, - "OutputPinColourInfo":[], - "InternalData":[1103306126,1] - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":882163141 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":171647764 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-10.375,"y":2.6875},{"x":-10.375,"y":1.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":265465071 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-8.5,"y":1.5},{"x":-8.5,"y":-5.375},{"x":3.125,"y":-5.375},{"x":3.125,"y":1.3125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":93777886 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":3.125,"y":-0.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":992845923 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":3.125,"y":-2.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":349962702 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":3.125,"y":-4.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":510436228 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.5,"y":-5.375},{"x":0.5,"y":1.3125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":684417203 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.5,"y":-0.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":1600798356 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.5,"y":-2.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":1490309237 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.5,"y":-4.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":1119351010 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-2.125,"y":-5.375},{"x":-2.125,"y":1.3125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":2000888510 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.125,"y":-0.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":1928097403 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.125,"y":-2.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":76640043 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.125,"y":-4.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":641159173 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-4.75,"y":-5.375},{"x":-4.75,"y":1.3125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":1109383114 - }, - "ConnectionType":1, - "ConnectedWireIndex":13, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.75,"y":-0.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":2135605371 - }, - "ConnectionType":1, - "ConnectedWireIndex":13, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.75,"y":-2.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":522472268, - "PinOwnerID":1039278762 - }, - "ConnectionType":1, - "ConnectedWireIndex":13, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.75,"y":-4.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":171647764 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":808479528 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":808479528 - }, - "TargetPinAddress":{ - "PinID":1480848655, - "PinOwnerID":2072605531 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.9375,"y":1.5},{"x":-6.9375,"y":-1.5625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":808479528 - }, - "TargetPinAddress":{ - "PinID":192060771, - "PinOwnerID":2072605531 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.8125,"y":1.75},{"x":-6.8125,"y":-0.8125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":808479528 - }, - "TargetPinAddress":{ - "PinID":1480848655, - "PinOwnerID":570339773 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.8125,"y":2.0},{"x":-6.8125,"y":2.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":808479528 - }, - "TargetPinAddress":{ - "PinID":192060771, - "PinOwnerID":570339773 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.9375,"y":2.25},{"x":-6.9375,"y":3.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":349962702 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.375,"y":3.625},{"x":3.375,"y":-4.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":992845923 - }, - "ConnectionType":1, - "ConnectedWireIndex":22, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":3.375,"y":-2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":93777886 - }, - "ConnectionType":1, - "ConnectedWireIndex":22, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":3.375,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":265465071 - }, - "ConnectionType":1, - "ConnectedWireIndex":22, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":3.375,"y":1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":1490309237 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":3.375},{"x":0.75,"y":-4.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":1600798356 - }, - "ConnectionType":1, - "ConnectedWireIndex":26, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.75,"y":-2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":684417203 - }, - "ConnectionType":1, - "ConnectedWireIndex":26, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.75,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":510436228 - }, - "ConnectionType":1, - "ConnectedWireIndex":26, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.75,"y":1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":76640043 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.875,"y":3.125},{"x":-1.875,"y":-4.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":1928097403 - }, - "ConnectionType":1, - "ConnectedWireIndex":30, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.875,"y":-2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":2000888510 - }, - "ConnectionType":1, - "ConnectedWireIndex":30, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.875,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":1119351010 - }, - "ConnectionType":1, - "ConnectedWireIndex":30, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.875,"y":1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":1039278762 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.5,"y":2.875},{"x":-4.5,"y":-4.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":2135605371 - }, - "ConnectionType":1, - "ConnectedWireIndex":34, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-4.5,"y":-2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":1109383114 - }, - "ConnectionType":1, - "ConnectedWireIndex":34, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-4.5,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":570339773 - }, - "TargetPinAddress":{ - "PinID":1707980435, - "PinOwnerID":641159173 - }, - "ConnectionType":1, - "ConnectedWireIndex":34, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-4.5,"y":1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":265465071 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.9375,"y":-0.8125},{"x":-4.9375,"y":2.6875},{"x":3.5,"y":2.6875},{"x":3.5,"y":1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":510436228 - }, - "ConnectionType":1, - "ConnectedWireIndex":38, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.875,"y":2.6875},{"x":0.875,"y":1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":1119351010 - }, - "ConnectionType":1, - "ConnectedWireIndex":38, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-1.75,"y":2.6875},{"x":-1.75,"y":1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1868926879, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":641159173 - }, - "ConnectionType":1, - "ConnectedWireIndex":38, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-4.375,"y":2.6875},{"x":-4.375,"y":1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":93777886 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":-1.0625},{"x":3.5,"y":-0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":684417203 - }, - "ConnectionType":1, - "ConnectedWireIndex":42, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.875,"y":-1.0625},{"x":0.875,"y":-0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":2000888510 - }, - "ConnectionType":1, - "ConnectedWireIndex":42, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.75,"y":-1.0625},{"x":-1.75,"y":-0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":18957384, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":1109383114 - }, - "ConnectionType":1, - "ConnectedWireIndex":42, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.375,"y":-1.0625},{"x":-4.375,"y":-0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":992845923 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":-1.3125},{"x":3.5,"y":-2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":1600798356 - }, - "ConnectionType":1, - "ConnectedWireIndex":46, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.875,"y":-1.3125},{"x":0.875,"y":-2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":1928097403 - }, - "ConnectionType":1, - "ConnectedWireIndex":46, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.75,"y":-1.3125},{"x":-1.75,"y":-2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":199145797, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":2135605371 - }, - "ConnectionType":1, - "ConnectedWireIndex":46, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.375,"y":-1.3125},{"x":-4.375,"y":-2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":349962702 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.9375,"y":-1.5625},{"x":-4.9375,"y":-5.125},{"x":3.5,"y":-5.125},{"x":3.5,"y":-4.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":1490309237 - }, - "ConnectionType":1, - "ConnectedWireIndex":50, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.875,"y":-5.125},{"x":0.875,"y":-4.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":76640043 - }, - "ConnectionType":1, - "ConnectedWireIndex":50, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-1.75,"y":-5.125},{"x":-1.75,"y":-4.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1076039863, - "PinOwnerID":2072605531 - }, - "TargetPinAddress":{ - "PinID":1052884450, - "PinOwnerID":1039278762 - }, - "ConnectionType":1, - "ConnectedWireIndex":50, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-4.375,"y":-5.125},{"x":-4.375,"y":-4.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":349962702 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.75,"y":4.125},{"x":3.75,"y":-3.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":992845923 - }, - "ConnectionType":1, - "ConnectedWireIndex":54, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":3.75,"y":-1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":93777886 - }, - "ConnectionType":1, - "ConnectedWireIndex":54, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":3.75,"y":0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":265465071 - }, - "ConnectionType":1, - "ConnectedWireIndex":54, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":3.75,"y":2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":1490309237 - }, - "ConnectionType":1, - "ConnectedWireIndex":54, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.125,"y":4.125},{"x":1.125,"y":-3.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":1600798356 - }, - "ConnectionType":1, - "ConnectedWireIndex":58, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.125,"y":-1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":684417203 - }, - "ConnectionType":1, - "ConnectedWireIndex":58, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.125,"y":0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":510436228 - }, - "ConnectionType":1, - "ConnectedWireIndex":58, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.125,"y":2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":76640043 - }, - "ConnectionType":1, - "ConnectedWireIndex":54, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.5,"y":4.125},{"x":-1.5,"y":-3.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":1928097403 - }, - "ConnectionType":1, - "ConnectedWireIndex":62, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.5,"y":-1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":2000888510 - }, - "ConnectionType":1, - "ConnectedWireIndex":62, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.5,"y":0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":1119351010 - }, - "ConnectionType":1, - "ConnectedWireIndex":62, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.5,"y":2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":1039278762 - }, - "ConnectionType":1, - "ConnectedWireIndex":54, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.125,"y":4.125},{"x":-4.125,"y":-3.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":2135605371 - }, - "ConnectionType":1, - "ConnectedWireIndex":66, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.125,"y":-1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":1109383114 - }, - "ConnectionType":1, - "ConnectedWireIndex":66, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.125,"y":0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":50697977 - }, - "TargetPinAddress":{ - "PinID":1841003398, - "PinOwnerID":641159173 - }, - "ConnectionType":1, - "ConnectedWireIndex":66, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.125,"y":2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":349962702 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-9.5625,"y":3.5625},{"x":-9.5625,"y":4.0},{"x":3.625,"y":4.0},{"x":3.625,"y":-3.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":992845923 - }, - "ConnectionType":1, - "ConnectedWireIndex":70, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":3.625,"y":-1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":93777886 - }, - "ConnectionType":1, - "ConnectedWireIndex":70, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":3.625,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":265465071 - }, - "ConnectionType":1, - "ConnectedWireIndex":70, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":3.625,"y":2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":1490309237 - }, - "ConnectionType":1, - "ConnectedWireIndex":70, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":1.0,"y":4.0},{"x":1.0,"y":-3.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":1600798356 - }, - "ConnectionType":1, - "ConnectedWireIndex":74, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.0,"y":-1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":684417203 - }, - "ConnectionType":1, - "ConnectedWireIndex":74, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.0,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":510436228 - }, - "ConnectionType":1, - "ConnectedWireIndex":74, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.0,"y":2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":76640043 - }, - "ConnectionType":1, - "ConnectedWireIndex":70, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-1.625,"y":4.0},{"x":-1.625,"y":-3.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":1928097403 - }, - "ConnectionType":1, - "ConnectedWireIndex":78, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.625,"y":-1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":2000888510 - }, - "ConnectionType":1, - "ConnectedWireIndex":78, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.625,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":1119351010 - }, - "ConnectionType":1, - "ConnectedWireIndex":78, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.625,"y":2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":1039278762 - }, - "ConnectionType":1, - "ConnectedWireIndex":70, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-4.25,"y":4.0},{"x":-4.25,"y":-3.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":2135605371 - }, - "ConnectionType":1, - "ConnectedWireIndex":82, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.25,"y":-1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":1109383114 - }, - "ConnectionType":1, - "ConnectedWireIndex":82, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.25,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1274086089 - }, - "TargetPinAddress":{ - "PinID":1875743195, - "PinOwnerID":641159173 - }, - "ConnectionType":1, - "ConnectedWireIndex":82, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.25,"y":2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1103306126 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":383283908 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.75,"y":0.8125},{"x":5.75,"y":-3.1875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1103306126 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":888145750 - }, - "ConnectionType":1, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":5.75,"y":-1.1875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":641159173 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":1.8125},{"x":-2.375,"y":0.8125}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":1109383114 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":-0.1875},{"x":-2.375,"y":0.8125}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":1119351010 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":1.8125},{"x":0.25,"y":0.8125}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":2000888510 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":-0.1875},{"x":0.25,"y":0.8125}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":510436228 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":2.875,"y":1.8125},{"x":2.875,"y":0.8125}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":684417203 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":2.875,"y":-0.1875},{"x":2.875,"y":0.8125}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":265465071 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":1.8125},{"x":5.5,"y":0.8125}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":93777886 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":-0.1875},{"x":5.5,"y":0.8125}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":992845923 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":-2.1875},{"x":5.5,"y":-3.1875}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":349962702 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":-4.1875},{"x":5.5,"y":-3.1875}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":1600798356 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":2.875,"y":-2.1875},{"x":2.875,"y":-3.1875}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":1490309237 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":2.875,"y":-4.1875},{"x":2.875,"y":-3.1875}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":1928097403 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":-2.1875},{"x":0.25,"y":-3.1875}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":76640043 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":-4.1875},{"x":0.25,"y":-3.1875}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":2135605371 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":-2.1875},{"x":-2.375,"y":-3.1875}] - }, - { - "SourcePinAddress":{ - "PinID":350543267, - "PinOwnerID":1039278762 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1103306126 - }, - "ConnectionType":2, - "ConnectedWireIndex":86, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":-4.1875},{"x":-2.375,"y":-3.1875}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/MUX-8.json b/TestData/Projects/MainTest/Chips/MUX-8.json deleted file mode 100644 index 39a91afc..00000000 --- a/TestData/Projects/MainTest/Chips/MUX-8.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "Name": "MUX-8", - "NameLocation": 0, - "Size": { - "x": 0.95, - "y": 1.25 - }, - "Colour": { - "r": 0.228413224, - "g": 0.443671256, - "b": 0.387848169, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN-8", - "ID":480667918, - "Position":{ - "x":-6.86243, - "y":2.0582 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN-8", - "ID":1796221764, - "Position":{ - "x":-6.82011, - "y":0.7672 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":1880005784, - "Position":{ - "x":-6.71429, - "y":-1.08466 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT-8", - "ID":1454394007, - "Position":{ - "x":6.1746, - "y":0.42857 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"AND(8,1)", - "ID":658830639, - "Label":null, - "Position":{ - "x":-0.81031, - "y":1.32927 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":396985423, - "Label":null, - "Position":{ - "x":-3.62538, - "y":-1.12454 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"AND(8,1)", - "ID":241193890, - "Label":null, - "Position":{ - "x":-0.67196, - "y":-0.51323 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], - "InternalData":null - }, - { - "Name":"OR-8", - "ID":73748522, - "Label":null, - "Position":{ - "x":2.1746, - "y":0.41799 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1880005784 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":396985423 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":480667918 - }, - "TargetPinAddress":{ - "PinID":1888645677, - "PinOwnerID":658830639 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1796221764 - }, - "TargetPinAddress":{ - "PinID":1888645677, - "PinOwnerID":241193890 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2004659665, - "PinOwnerID":658830639 - }, - "TargetPinAddress":{ - "PinID":1888645677, - "PinOwnerID":73748522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2004659665, - "PinOwnerID":241193890 - }, - "TargetPinAddress":{ - "PinID":955458786, - "PinOwnerID":73748522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2004659665, - "PinOwnerID":73748522 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1454394007 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":396985423 - }, - "TargetPinAddress":{ - "PinID":1465123542, - "PinOwnerID":658830639 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1880005784 - }, - "TargetPinAddress":{ - "PinID":1465123542, - "PinOwnerID":241193890 - }, - "ConnectionType":1, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.72783,"y":-1.11126},{"x":-4.76387,"y":-1.95395},{"x":-2.39079,"y":-2.10744},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/NOR.json b/TestData/Projects/MainTest/Chips/NOR.json deleted file mode 100644 index a6b3e961..00000000 --- a/TestData/Projects/MainTest/Chips/NOR.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "Name": "NOR", - "NameLocation": 0, - "Size": { - "x": 0.68914, - "y": 0.5 - }, - "Colour": { - "r": 0.5507216, - "g": 0.33768934, - "b": 0.860487044, - "a": 1 - }, - "InputPins":[ - { - "Name":"B", - "ID":2119183610, - "Position":{ - "x":-5.125, - "y":-0.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"A", - "ID":115927082, - "Position":{ - "x":-5.125, - "y":-1.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":356855654, - "Position":{ - "x":3.0, - "y":-0.625 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NAND", - "ID":25157768, - "Label":null, - "Position":{ - "x":-0.875, - "y":-0.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":675789592, - "Label":"", - "Position":{ - "x":0.75, - "y":-0.625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1513462588, - "Label":"", - "Position":{ - "x":-2.75, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1846003621, - "Label":"", - "Position":{ - "x":-2.75, - "y":-1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":675789592 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":356855654 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":25157768 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":675789592 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":-0.625},{"x":0.0,"y":-0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":25157768 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":675789592 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":-0.625},{"x":0.0,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2119183610 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1513462588 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2119183610 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1513462588 - }, - "ConnectionType":1, - "ConnectedWireIndex":3, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.625,"y":-0.125},{"x":-3.625,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":115927082 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1846003621 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":115927082 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1846003621 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.625,"y":-1.125},{"x":-3.625,"y":-0.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1513462588 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":25157768 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.75,"y":-0.25},{"x":-1.75,"y":-0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1846003621 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":25157768 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.75,"y":-1.0},{"x":-1.75,"y":-0.75},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/NOT-8.json b/TestData/Projects/MainTest/Chips/NOT-8.json deleted file mode 100644 index f3008553..00000000 --- a/TestData/Projects/MainTest/Chips/NOT-8.json +++ /dev/null @@ -1,408 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.581735969, - "g": 0.8893554, - "b": 0.9458656, - "a": 1 - }, - "Displays": null, - "InputPins":[ - { - "Name":"IN-8", - "ID":1888645677, - "Position":{ - "x":-8.15344, - "y":0.4709 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "NOT-8", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT-8", - "ID":2004659665, - "Position":{ - "x":7.25, - "y":-0.25 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.14, - "y": 1.06 - }, - "SubChips":[ - { - "Name":"NOT", - "ID":1232575724, - "Label":null, - "Position":{ - "x":-1.265, - "y":1.9375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":144616815, - "Label":null, - "Position":{ - "x":-1.265, - "y":1.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1320117519, - "Label":null, - "Position":{ - "x":-1.265, - "y":0.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1018796979, - "Label":null, - "Position":{ - "x":-1.265, - "y":0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1652402405, - "Label":null, - "Position":{ - "x":-1.265, - "y":-0.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1233333987, - "Label":null, - "Position":{ - "x":-1.265, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":526472203, - "Label":null, - "Position":{ - "x":-1.265, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":601342476, - "Label":null, - "Position":{ - "x":-1.265, - "y":-2.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":17125604, - "Label":"", - "Position":{ - "x":-4.87902, - "y":0.42697 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"1-8BIT", - "ID":1813651453, - "Label":"", - "Position":{ - "x":2.1975, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1888645677 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":17125604 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":17125604 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1232575724 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":17125604 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":144616815 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":17125604 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1320117519 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":17125604 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1018796979 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":17125604 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1652402405 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":17125604 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1233333987 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":17125604 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":526472203 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":17125604 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":601342476 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1813651453 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2004659665 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1232575724 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1813651453 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":144616815 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1813651453 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1320117519 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":1813651453 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1018796979 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":1813651453 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1652402405 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":1813651453 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1233333987 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":1813651453 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":526472203 - }, - "TargetPinAddress":{ - "PinID":6, - "PinOwnerID":1813651453 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":601342476 - }, - "TargetPinAddress":{ - "PinID":7, - "PinOwnerID":1813651453 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/NOT.json b/TestData/Projects/MainTest/Chips/NOT.json deleted file mode 100644 index 496ff9be..00000000 --- a/TestData/Projects/MainTest/Chips/NOT.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "Name": "NOT", - "NameLocation": 0, - "Size": { - "x": 0.95, - "y": 0.375 - }, - "Colour": { - "r": 0.61706847, - "g": 0.148353323, - "b": 0.102315307, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":913380392, - "Position":{ - "x":-6.83871, - "y":-0.70968 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":2001814538, - "Position":{ - "x":4.90323, - "y":-0.82258 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NAND", - "ID":1990789974, - "Label":null, - "Position":{ - "x":-1.98387, - "y":-0.25806 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":913380392 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1990789974 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":913380392 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1990789974 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1990789974 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2001814538 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/OR-8.json b/TestData/Projects/MainTest/Chips/OR-8.json deleted file mode 100644 index df8d4052..00000000 --- a/TestData/Projects/MainTest/Chips/OR-8.json +++ /dev/null @@ -1,556 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.581735969, - "g": 0.8893554, - "b": 0.9458656, - "a": 1 - }, - "Displays": null, - "InputPins":[ - { - "Name":"IN-8", - "ID":1888645677, - "Position":{ - "x":-8.15344, - "y":0.4709 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN-8", - "ID":955458786, - "Position":{ - "x":-8.19278, - "y":-2.65079 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Name": "OR-8", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT-8", - "ID":2004659665, - "Position":{ - "x":7.21164, - "y":-0.42857 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 1.14, - "y": 1.06 - }, - "SubChips":[ - { - "Name":"OR", - "ID":1514715763, - "Label":null, - "Position":{ - "x":-0.78836, - "y":1.61376 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":521432609, - "Label":null, - "Position":{ - "x":-0.78836, - "y":0.90376 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1299591218, - "Label":null, - "Position":{ - "x":-0.78836, - "y":0.19376 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":2048311878, - "Label":null, - "Position":{ - "x":-0.78836, - "y":-0.51624 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":75564828, - "Label":null, - "Position":{ - "x":-0.78836, - "y":-1.22624 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":814774284, - "Label":null, - "Position":{ - "x":-0.78836, - "y":-1.93624 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":913923563, - "Label":null, - "Position":{ - "x":-0.78836, - "y":-2.64624 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1589421104, - "Label":null, - "Position":{ - "x":-0.78836, - "y":-3.35624 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":133364796, - "Label":"", - "Position":{ - "x":-4.31023, - "y":-2.63635 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":670864341, - "Label":"", - "Position":{ - "x":-4.17698, - "y":0.38384 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"1-8BIT", - "ID":615299522, - "Label":"", - "Position":{ - "x":2.1521, - "y":-0.42672 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":615299522 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2004659665 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1514715763 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":615299522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":521432609 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":615299522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1299591218 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":615299522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":2048311878 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":615299522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":75564828 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":615299522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":814774284 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":615299522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":913923563 - }, - "TargetPinAddress":{ - "PinID":6, - "PinOwnerID":615299522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1589421104 - }, - "TargetPinAddress":{ - "PinID":7, - "PinOwnerID":615299522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1888645677 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":670864341 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":670864341 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1514715763 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":670864341 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":521432609 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":670864341 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1299591218 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":670864341 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":2048311878 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":670864341 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":75564828 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":670864341 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":814774284 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":670864341 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":913923563 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":670864341 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1589421104 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":955458786 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":133364796 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":133364796 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1589421104 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":133364796 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":913923563 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":133364796 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":814774284 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":133364796 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":75564828 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":133364796 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":2048311878 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":133364796 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1299591218 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":133364796 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":521432609 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":133364796 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1514715763 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/OR.json b/TestData/Projects/MainTest/Chips/OR.json deleted file mode 100644 index e2f170e0..00000000 --- a/TestData/Projects/MainTest/Chips/OR.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "Name": "OR", - "NameLocation": 0, - "Size": { - "x": 0.7, - "y": 0.5 - }, - "Colour": { - "r": 0.6263048, - "g": 0.301900476, - "b": 0.9402276, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":2119183610, - "Position":{ - "x":-7.35484, - "y":-0.19355 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":115927082, - "Position":{ - "x":-7.35484, - "y":-0.69355 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":356855654, - "Position":{ - "x":3.06452, - "y":-0.80645 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NOT", - "ID":9409912, - "Label":null, - "Position":{ - "x":-3.66129, - "y":-0.27419 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":645027765, - "Label":null, - "Position":{ - "x":-3.66129, - "y":-0.84919 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":25157768, - "Label":null, - "Position":{ - "x":-0.91935, - "y":-0.58065 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2119183610 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":9409912 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":115927082 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":645027765 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":9409912 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":25157768 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":645027765 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":25157768 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":25157768 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":356855654 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/PC.json b/TestData/Projects/MainTest/Chips/PC.json deleted file mode 100644 index af5862e6..00000000 --- a/TestData/Projects/MainTest/Chips/PC.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "Name": "PC", - "NameLocation": 0, - "Size": { - "x": 0.91, - "y": 2.09 - }, - "Colour": { - "r": 0.307888329, - "g": 0.156660333, - "b": 0.102064058, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN-8", - "ID":1305525690, - "Position":{ - "x":-6.53439, - "y":1.24339 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"STORE", - "ID":1847613819, - "Position":{ - "x":-6.44974, - "y":-0.41799 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":1506181664, - "Position":{ - "x":-6.52381, - "y":-1.79365 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"INCREMENT", - "ID":572135790, - "Position":{ - "x":-6.74603, - "y":-3.66667 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"RESET", - "ID":939662745, - "Position":{ - "x":-6.75088, - "y":-4.5889 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT-8", - "ID":1994428648, - "Position":{ - "x":6.18982, - "y":1.13845 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - } - ], - "SubChips":[ - { - "Name":"MUX-8", - "ID":1043788059, - "Label":null, - "Position":{ - "x":-2.13228, - "y":1.37037 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1454394007}], - "InternalData":null - }, - { - "Name":"REG-8", - "ID":776688162, - "Label":null, - "Position":{ - "x":0.7037, - "y":-1.06349 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], - "InternalData":null - }, - { - "Name":"ADDER-8", - "ID":1377545368, - "Label":null, - "Position":{ - "x":5.97355, - "y":-0.31217 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":749386852}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1851679904, - "Label":null, - "Position":{ - "x":-2.03704, - "y":-1.14815 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"AND(8,1)", - "ID":597423727, - "Label":null, - "Position":{ - "x":0.04911, - "y":1.56824 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1251472047, - "Label":null, - "Position":{ - "x":-3.70803, - "y":-4.61747 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1827821226, - "Label":null, - "Position":{ - "x":-0.43093, - "y":-2.42621 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1506181664 - }, - "TargetPinAddress":{ - "PinID":1027672421, - "PinOwnerID":776688162 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":776688162 - }, - "TargetPinAddress":{ - "PinID":1729060963, - "PinOwnerID":1377545368 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":749386852, - "PinOwnerID":1377545368 - }, - "TargetPinAddress":{ - "PinID":480667918, - "PinOwnerID":1043788059 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":7.59259,"y":-0.2381},{"x":7.22222,"y":2.77778},{"x":-4.04762,"y":3.06349},{"x":-4.25926,"y":1.70899},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1305525690 - }, - "TargetPinAddress":{ - "PinID":1796221764, - "PinOwnerID":1043788059 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1847613819 - }, - "TargetPinAddress":{ - "PinID":1880005784, - "PinOwnerID":1043788059 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":572135790 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1851679904 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.03161,"y":-3.74639},{"x":-2.96825,"y":-1.32804},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1847613819 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1851679904 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1454394007, - "PinOwnerID":1043788059 - }, - "TargetPinAddress":{ - "PinID":1888645677, - "PinOwnerID":597423727 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2004659665, - "PinOwnerID":597423727 - }, - "TargetPinAddress":{ - "PinID":248954118, - "PinOwnerID":776688162 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.5634,"y":1.72538},{"x":-0.60803,"y":-0.51747},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":939662745 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1251472047 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1251472047 - }, - "TargetPinAddress":{ - "PinID":1465123542, - "PinOwnerID":597423727 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.15088,"y":-4.61747},{"x":-1.16517,"y":1.1111},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1851679904 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1827821226 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":939662745 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1827821226 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-4.75242,"y":-4.60863},{"x":-2.39079,"y":-2.7804},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1827821226 - }, - "TargetPinAddress":{ - "PinID":1830871312, - "PinOwnerID":776688162 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-0.0059,"y":-2.44982},{"x":-0.33648,"y":-1.21015},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":776688162 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1994428648 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":3.08802,"y":-0.31653},{"x":3.24962,"y":1.30313},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":572135790 - }, - "TargetPinAddress":{ - "PinID":833981293, - "PinOwnerID":1377545368 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.65278,"y":-3.67924},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git "a/TestData/Projects/MainTest/Chips/RAM-256\303\2278 (async).json" "b/TestData/Projects/MainTest/Chips/RAM-256\303\2278 (async).json" deleted file mode 100644 index 91ca927c..00000000 --- "a/TestData/Projects/MainTest/Chips/RAM-256\303\2278 (async).json" +++ /dev/null @@ -1,679 +0,0 @@ -{ - "Name": "RAM-256×8 (async)", - "NameLocation": 0, - "Size": { - "x": 1.7278, - "y": 1.25 - }, - "Colour": { - "r": 0.7656969, - "g": 0.454501241, - "b": 0.229379833, - "a": 1 - }, - "InputPins":[ - { - "Name":"STORE", - "ID":1925084150, - "Position":{ - "x":-7.125, - "y":2.5 - }, - "BitCount":1, - "Colour":1, - "ValueDisplayMode":0 - }, - { - "Name":"ADDR", - "ID":1622111906, - "Position":{ - "x":-7.125, - "y":1.625 - }, - "BitCount":8, - "Colour":2, - "ValueDisplayMode":1 - }, - { - "Name":"DATA", - "ID":1231977344, - "Position":{ - "x":-7.125, - "y":0.6875 - }, - "BitCount":8, - "Colour":4, - "ValueDisplayMode":1 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":1280023136, - "Position":{ - "x":7.25, - "y":2.0 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - } - ], - "SubChips":[ - { - "Name":"MEM-256", - "ID":1716858917, - "Label":"", - "Position":{ - "x":-1.18336, - "y":1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], - "InternalData":null - }, - { - "Name":"MEM-256", - "ID":455184846, - "Label":"", - "Position":{ - "x":-1.18336, - "y":0.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], - "InternalData":null - }, - { - "Name":"MEM-256", - "ID":173685817, - "Label":"", - "Position":{ - "x":-1.18336, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], - "InternalData":null - }, - { - "Name":"MEM-256", - "ID":1511496036, - "Label":"", - "Position":{ - "x":-1.18336, - "y":-2.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], - "InternalData":null - }, - { - "Name":"MEM-256", - "ID":2011167740, - "Label":"", - "Position":{ - "x":2.44164, - "y":1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], - "InternalData":null - }, - { - "Name":"MEM-256", - "ID":1451048781, - "Label":"", - "Position":{ - "x":2.44164, - "y":0.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], - "InternalData":null - }, - { - "Name":"MEM-256", - "ID":1777680199, - "Label":"", - "Position":{ - "x":2.44164, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], - "InternalData":null - }, - { - "Name":"MEM-256", - "ID":1472069271, - "Label":"", - "Position":{ - "x":2.44164, - "y":-2.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], - "InternalData":null - }, - { - "Name":"1-8BIT", - "ID":1996454512, - "Label":"", - "Position":{ - "x":4.5725, - "y":2.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"DECIMAL-8", - "ID":101208108, - "Label":"", - "Position":{ - "x":5.86, - "y":-0.25 - }, - "OutputPinColourInfo":[], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":1651323147, - "Label":"", - "Position":{ - "x":-4.3025, - "y":-2.875 - }, - "OutputPinColourInfo":[{"PinColour":4,"PinID":1},{"PinColour":4,"PinID":2},{"PinColour":4,"PinID":3},{"PinColour":4,"PinID":4},{"PinColour":4,"PinID":5},{"PinColour":4,"PinID":6},{"PinColour":4,"PinID":7},{"PinColour":4,"PinID":8}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1996454512 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1280023136 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":888145750, - "PinOwnerID":1472069271 - }, - "TargetPinAddress":{ - "PinID":7, - "PinOwnerID":1996454512 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.625,"y":-2.25},{"x":3.625,"y":1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":888145750, - "PinOwnerID":1777680199 - }, - "TargetPinAddress":{ - "PinID":6, - "PinOwnerID":1996454512 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":-0.875},{"x":3.5,"y":1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":888145750, - "PinOwnerID":1451048781 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":1996454512 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.375,"y":0.5},{"x":3.375,"y":1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":888145750, - "PinOwnerID":2011167740 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":1996454512 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":888145750, - "PinOwnerID":1511496036 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":1996454512 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.125,"y":-2.25},{"x":0.125,"y":2.5},{"x":3.375,"y":2.5},{"x":3.375,"y":2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":888145750, - "PinOwnerID":173685817 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":1996454512 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":-0.875},{"x":0.0,"y":2.625},{"x":3.5,"y":2.625},{"x":3.5,"y":2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":888145750, - "PinOwnerID":455184846 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1996454512 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-0.125,"y":0.5},{"x":-0.125,"y":2.75},{"x":3.625,"y":2.75},{"x":3.625,"y":2.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":888145750, - "PinOwnerID":1716858917 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1996454512 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-0.25,"y":1.875},{"x":-0.25,"y":2.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1996454512 - }, - "TargetPinAddress":{ - "PinID":39707143, - "PinOwnerID":101208108 - }, - "ConnectionType":1, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":5.625,"y":2.0},{"x":5.625,"y":0.625},{"x":4.1875,"y":0.625},{"x":4.1875,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1231977344 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1651323147 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-5.25,"y":0.6875},{"x":-5.25,"y":-2.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1651323147 - }, - "TargetPinAddress":{ - "PinID":50697977, - "PinOwnerID":1472069271 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.875,"y":-3.75},{"x":0.875,"y":-1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":1651323147 - }, - "TargetPinAddress":{ - "PinID":50697977, - "PinOwnerID":1777680199 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.0,"y":-3.5},{"x":-3.0,"y":-3.625},{"x":0.75,"y":-3.625},{"x":0.75,"y":-0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":1651323147 - }, - "TargetPinAddress":{ - "PinID":50697977, - "PinOwnerID":1451048781 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.875,"y":-3.25},{"x":-2.875,"y":-3.5},{"x":0.625,"y":-3.5},{"x":0.625,"y":0.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":1651323147 - }, - "TargetPinAddress":{ - "PinID":50697977, - "PinOwnerID":2011167740 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.75,"y":-3.0},{"x":-2.75,"y":-3.375},{"x":0.5,"y":-3.375},{"x":0.5,"y":2.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1651323147 - }, - "TargetPinAddress":{ - "PinID":50697977, - "PinOwnerID":1511496036 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.75,"y":-2.75},{"x":-2.75,"y":-1.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":1651323147 - }, - "TargetPinAddress":{ - "PinID":50697977, - "PinOwnerID":173685817 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.875,"y":-2.5},{"x":-2.875,"y":-0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1651323147 - }, - "TargetPinAddress":{ - "PinID":50697977, - "PinOwnerID":455184846 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.0,"y":-2.25},{"x":-3.0,"y":0.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1651323147 - }, - "TargetPinAddress":{ - "PinID":50697977, - "PinOwnerID":1716858917 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.125,"y":-2.0},{"x":-3.125,"y":2.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":882163141, - "PinOwnerID":1716858917 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":882163141, - "PinOwnerID":2011167740 - }, - "ConnectionType":1, - "ConnectedWireIndex":19, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.25,"y":1.625},{"x":-2.25,"y":-3.0625},{"x":1.3125,"y":-3.0625},{"x":1.3125,"y":1.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":882163141, - "PinOwnerID":1451048781 - }, - "ConnectionType":1, - "ConnectedWireIndex":20, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":1.3125,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":882163141, - "PinOwnerID":1777680199 - }, - "ConnectionType":1, - "ConnectedWireIndex":20, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":1.3125,"y":-1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":882163141, - "PinOwnerID":1472069271 - }, - "ConnectionType":1, - "ConnectedWireIndex":20, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":1.3125,"y":-2.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":882163141, - "PinOwnerID":1511496036 - }, - "ConnectionType":1, - "ConnectedWireIndex":20, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.25,"y":-2.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":882163141, - "PinOwnerID":173685817 - }, - "ConnectionType":1, - "ConnectedWireIndex":20, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.25,"y":-1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":882163141, - "PinOwnerID":455184846 - }, - "ConnectionType":1, - "ConnectedWireIndex":20, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.25,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":1274086089, - "PinOwnerID":1472069271 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-5.125,"y":2.5},{"x":-5.125,"y":3.0},{"x":1.0,"y":3.0},{"x":1.0,"y":-2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":1274086089, - "PinOwnerID":1777680199 - }, - "ConnectionType":1, - "ConnectedWireIndex":27, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":1.0,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":1274086089, - "PinOwnerID":1451048781 - }, - "ConnectionType":1, - "ConnectedWireIndex":27, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":1.0,"y":0.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":1274086089, - "PinOwnerID":2011167740 - }, - "ConnectionType":1, - "ConnectedWireIndex":27, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":1.0,"y":2.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":1274086089, - "PinOwnerID":1511496036 - }, - "ConnectionType":1, - "ConnectedWireIndex":27, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-2.625,"y":3.0},{"x":-2.625,"y":-2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":1274086089, - "PinOwnerID":173685817 - }, - "ConnectionType":1, - "ConnectedWireIndex":31, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.625,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":1274086089, - "PinOwnerID":455184846 - }, - "ConnectionType":1, - "ConnectedWireIndex":31, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.625,"y":0.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":1274086089, - "PinOwnerID":1716858917 - }, - "ConnectionType":1, - "ConnectedWireIndex":31, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.625,"y":2.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/RAM-sync.json b/TestData/Projects/MainTest/Chips/RAM-sync.json deleted file mode 100644 index acc048d4..00000000 --- a/TestData/Projects/MainTest/Chips/RAM-sync.json +++ /dev/null @@ -1,366 +0,0 @@ -{ - "ChipType": 0, - "Colour": { - "r": 0.502313733, - "g": 0.3239678, - "b": 0.28062588, - "a": 1 - }, - "Displays": null, - "InputPins":[ - { - "Name":"STORE", - "ID":1925084150, - "Position":{ - "x":-7.125, - "y":2.875 - }, - "BitCount":1, - "Colour":1, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":2039852248, - "Position":{ - "x":-7.125, - "y":2.375 - }, - "BitCount":1, - "Colour":6, - "ValueDisplayMode":0 - }, - { - "Name":"ADDR", - "ID":1622111906, - "Position":{ - "x":-7.125, - "y":1.625 - }, - "BitCount":8, - "Colour":2, - "ValueDisplayMode":1 - }, - { - "Name":"DATA", - "ID":1231977344, - "Position":{ - "x":-7.125, - "y":0.8125 - }, - "BitCount":8, - "Colour":4, - "ValueDisplayMode":1 - } - ], - "Name": "RAM-sync", - "NameLocation": 0, - "OutputPins":[ - { - "Name":"OUT", - "ID":1528719550, - "Position":{ - "x":6.125, - "y":0.125 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "Size": { - "x": 2.675, - "y": 1.5 - }, - "SubChips":[ - { - "Name":"RAM-256×8 (async)", - "ID":989443350, - "Label":"", - "Position":{ - "x":3.3739, - "y":0.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1280023136}], - "InternalData":null - }, - { - "Name":"REGISTER-8", - "ID":5917977, - "Label":"ADDRESS", - "Position":{ - "x":-2.1775, - "y":1.375 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":10415736}], - "InternalData":null - }, - { - "Name":"REGISTER-8", - "ID":472885907, - "Label":"DATA", - "Position":{ - "x":-2.1775, - "y":-0.625 - }, - "OutputPinColourInfo":[{"PinColour":4,"PinID":10415736}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1068126646, - "Label":"", - "Position":{ - "x":-6.515, - "y":0.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"DECIMAL-8", - "ID":1076479372, - "Label":"", - "Position":{ - "x":5.11, - "y":2.25 - }, - "OutputPinColourInfo":[], - "InternalData":null - }, - { - "Name":"AND", - "ID":1935031734, - "Label":"", - "Position":{ - "x":1.61, - "y":1.25 - }, - "OutputPinColourInfo":[{"PinColour":1,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"EQUALS-8", - "ID":904871778, - "Label":"", - "Position":{ - "x":0.11, - "y":1.125 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":1960274563}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":10415736, - "PinOwnerID":472885907 - }, - "TargetPinAddress":{ - "PinID":1231977344, - "PinOwnerID":989443350 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-0.9375,"y":-0.625},{"x":-0.9375,"y":-0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1231977344 - }, - "TargetPinAddress":{ - "PinID":69098308, - "PinOwnerID":472885907 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.375,"y":0.8125},{"x":-4.375,"y":-0.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":69098308, - "PinOwnerID":5917977 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2039852248 - }, - "TargetPinAddress":{ - "PinID":81439827, - "PinOwnerID":472885907 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.375,"y":2.375},{"x":-3.375,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2039852248 - }, - "TargetPinAddress":{ - "PinID":81439827, - "PinOwnerID":5917977 - }, - "ConnectionType":1, - "ConnectedWireIndex":3, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-3.375,"y":1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1068126646 - }, - "TargetPinAddress":{ - "PinID":919078193, - "PinOwnerID":5917977 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.5,"y":0.0},{"x":-3.5,"y":1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1280023136, - "PinOwnerID":989443350 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1528719550 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1280023136, - "PinOwnerID":989443350 - }, - "TargetPinAddress":{ - "PinID":39707143, - "PinOwnerID":1076479372 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":4.625,"y":0.125},{"x":4.625,"y":1.0625},{"x":3.4375,"y":1.0625},{"x":3.4375,"y":2.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":1622111906, - "PinOwnerID":989443350 - }, - "ConnectionType":1, - "ConnectedWireIndex":2, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.8125,"y":1.625},{"x":-3.8125,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":919078193, - "PinOwnerID":472885907 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.25,"y":2.875},{"x":-3.25,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1925084150 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1935031734 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-0.5,"y":2.875},{"x":1.0,"y":2.875},{"x":1.0,"y":1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1935031734 - }, - "TargetPinAddress":{ - "PinID":1925084150, - "PinOwnerID":989443350 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":2.25,"y":1.25},{"x":2.25,"y":0.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1622111906 - }, - "TargetPinAddress":{ - "PinID":1445895175, - "PinOwnerID":904871778 - }, - "ConnectionType":1, - "ConnectedWireIndex":8, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.0625,"y":0.25},{"x":-1.0625,"y":0.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":10415736, - "PinOwnerID":5917977 - }, - "TargetPinAddress":{ - "PinID":427606127, - "PinOwnerID":904871778 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1960274563, - "PinOwnerID":904871778 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1935031734 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ] -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/REG-8.json b/TestData/Projects/MainTest/Chips/REG-8.json deleted file mode 100644 index 7b913dc3..00000000 --- a/TestData/Projects/MainTest/Chips/REG-8.json +++ /dev/null @@ -1,327 +0,0 @@ -{ - "Name": "REG-8", - "NameLocation": 0, - "Size": { - "x": 1.14, - "y": 1.25 - }, - "Colour": { - "r": 0.607355, - "g": 0.3229908, - "b": 0.082576625, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN-8", - "ID":248954118, - "Position":{ - "x":-5.97355, - "y":1.13757 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"STORE", - "ID":1830871312, - "Position":{ - "x":-6.0956, - "y":-0.54702 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OUT ENABLE", - "ID":455764185, - "Position":{ - "x":-6.06339, - "y":-1.4866 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":1027672421, - "Position":{ - "x":-6.01727, - "y":-2.51649 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":128796038, - "Position":{ - "x":10.38769, - "y":-0.09384 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OUT-BUS", - "ID":632432616, - "Position":{ - "x":10.40129, - "y":-0.79517 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"REGISTER-4", - "ID":1502552159, - "Label":null, - "Position":{ - "x":0.74603, - "y":0.80952 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], - "InternalData":null - }, - { - "Name":"REGISTER-4", - "ID":538425792, - "Label":null, - "Position":{ - "x":0.75661, - "y":-1.43386 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], - "InternalData":null - }, - { - "Name":"8-4BIT", - "ID":1322908463, - "Label":null, - "Position":{ - "x":-2.96825, - "y":1.12698 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"4-8BIT", - "ID":196696826, - "Label":null, - "Position":{ - "x":4.46032, - "y":-0.12169 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"BUF-8", - "ID":1048756314, - "Label":null, - "Position":{ - "x":6.81689, - "y":-1.65946 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":248954118 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1322908463 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1322908463 - }, - "TargetPinAddress":{ - "PinID":634643294, - "PinOwnerID":1502552159 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1322908463 - }, - "TargetPinAddress":{ - "PinID":634643294, - "PinOwnerID":538425792 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1027672421 - }, - "TargetPinAddress":{ - "PinID":81439827, - "PinOwnerID":538425792 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1027672421 - }, - "TargetPinAddress":{ - "PinID":81439827, - "PinOwnerID":1502552159 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1830871312 - }, - "TargetPinAddress":{ - "PinID":919078193, - "PinOwnerID":538425792 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1830871312 - }, - "TargetPinAddress":{ - "PinID":919078193, - "PinOwnerID":1502552159 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":9902874, - "PinOwnerID":1502552159 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":196696826 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":9902874, - "PinOwnerID":538425792 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":196696826 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":196696826 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":128796038 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":455764185 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":1048756314 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.02618,"y":-2.83489},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":196696826 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":1048756314 - }, - "ConnectionType":1, - "ConnectedWireIndex":9, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":5.53762,"y":-0.11911},{"x":5.53775,"y":-1.4866},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":1048756314 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":632432616 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":8.32075,"y":-1.65946},{"x":8.28618,"y":-0.77789},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/REGISTER-1.json b/TestData/Projects/MainTest/Chips/REGISTER-1.json deleted file mode 100644 index f2902726..00000000 --- a/TestData/Projects/MainTest/Chips/REGISTER-1.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "Name": "REGISTER-1", - "NameLocation": 0, - "Size": { - "x": 1.95, - "y": 0.75 - }, - "Colour": { - "r": 0.7800823, - "g": 0.5258629, - "b": 0.186892092, - "a": 1 - }, - "InputPins":[ - { - "Name":"DATA", - "ID":2007348307, - "Position":{ - "x":-7.75, - "y":0.9375 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"STORE", - "ID":252188563, - "Position":{ - "x":-7.75, - "y":0.4375 - }, - "BitCount":1, - "Colour":1, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":389514335, - "Position":{ - "x":-7.75, - "y":-0.0625 - }, - "BitCount":1, - "Colour":5, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":1938418986, - "Position":{ - "x":3.125, - "y":0.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"FLIP-FLOP", - "ID":114037759, - "Label":null, - "Position":{ - "x":-0.32, - "y":0.095 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1920302974}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1299793771, - "Label":null, - "Position":{ - "x":-3.265, - "y":1.5625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"AND", - "ID":1141475335, - "Label":null, - "Position":{ - "x":-3.265, - "y":0.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"OR", - "ID":912527488, - "Label":null, - "Position":{ - "x":-1.89, - "y":0.9375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":2081481123, - "Label":null, - "Position":{ - "x":-4.89, - "y":1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":2081481123 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1299793771 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2007348307 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1141475335 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1141475335 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":912527488 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":389514335 - }, - "TargetPinAddress":{ - "PinID":2143575788, - "PinOwnerID":114037759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1920302974, - "PinOwnerID":114037759 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1938418986 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":1299793771 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":912527488 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.5,"y":1.5625},{"x":-2.5,"y":1.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":912527488 - }, - "TargetPinAddress":{ - "PinID":1732460994, - "PinOwnerID":114037759 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.3125,"y":0.9375},{"x":-1.3125,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":252188563 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":1141475335 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.125,"y":0.4375},{"x":-4.125,"y":0.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1920302974, - "PinOwnerID":114037759 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":1299793771 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.85422,"y":0.10086},{"x":0.85422,"y":2.0},{"x":-4.125,"y":2.0},{"x":-4.125,"y":1.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":252188563 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":2081481123 - }, - "ConnectionType":1, - "ConnectedWireIndex":7, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-5.8125,"y":0.4375},{"x":-5.8125,"y":1.4375},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/REGISTER-4.json b/TestData/Projects/MainTest/Chips/REGISTER-4.json deleted file mode 100644 index 1d1e2aaf..00000000 --- a/TestData/Projects/MainTest/Chips/REGISTER-4.json +++ /dev/null @@ -1,420 +0,0 @@ -{ - "Name": "REGISTER-4", - "NameLocation": 1, - "Size": { - "x": 1.625, - "y": 1.125 - }, - "Colour": { - "r": 0.8732669, - "g": 0.5192768, - "b": 0.127885342, - "a": 1 - }, - "InputPins":[ - { - "Name":"DATA", - "ID":634643294, - "Position":{ - "x":-7.25, - "y":1.0 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"STORE", - "ID":919078193, - "Position":{ - "x":-7.25, - "y":0.0625 - }, - "BitCount":1, - "Colour":1, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":81439827, - "Position":{ - "x":-7.25, - "y":-0.5 - }, - "BitCount":1, - "Colour":5, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":9902874, - "Position":{ - "x":4.625, - "y":-0.3125 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"REGISTER-1", - "ID":1240946790, - "Label":null, - "Position":{ - "x":-1.14, - "y":1.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":631727069, - "Label":null, - "Position":{ - "x":-1.14, - "y":0.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":142511461, - "Label":null, - "Position":{ - "x":-1.14, - "y":-0.75 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":74143113, - "Label":null, - "Position":{ - "x":-1.14, - "y":-1.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"4-1BIT", - "ID":2091459543, - "Label":null, - "Position":{ - "x":-4.6775, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4}], - "InternalData":null - }, - { - "Name":"1-4BIT", - "ID":640874672, - "Label":null, - "Position":{ - "x":1.4475, - "y":-0.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], - "InternalData":null - }, - { - "Name":"DECIMAL-4", - "ID":470739589, - "Label":"", - "Position":{ - "x":3.99536, - "y":1.11625 - }, - "OutputPinColourInfo":[], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":634643294 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2091459543 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":640874672 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":9902874 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":2091459543 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":1240946790 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":2091459543 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":631727069 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.75,"y":1.125},{"x":-2.75,"y":0.4375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":2091459543 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":142511461 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.9375,"y":0.875},{"x":-2.9375,"y":-0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":2091459543 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":74143113 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.125,"y":0.625},{"x":-3.125,"y":-1.4375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":1240946790 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.0,"y":0.0625},{"x":-4.0,"y":-2.375},{"x":-2.5625,"y":-2.375},{"x":-2.5625,"y":1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":631727069 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":-2.5625,"y":0.1875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":142511461 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":-2.5625,"y":-0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":74143113 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":-2.5625,"y":-1.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":1240946790 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.1875,"y":-0.5},{"x":-4.1875,"y":-2.5625},{"x":-2.375,"y":-2.5625},{"x":-2.375,"y":0.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":631727069 - }, - "ConnectionType":1, - "ConnectedWireIndex":10, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":-2.375,"y":-0.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":142511461 - }, - "ConnectionType":1, - "ConnectedWireIndex":10, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":-2.375,"y":-1.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":74143113 - }, - "ConnectionType":1, - "ConnectedWireIndex":10, - "ConnectedWireSegmentIndex":3, - "Points":[{"x":-2.375,"y":-1.9375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":74143113 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":640874672 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.5,"y":-1.6875},{"x":0.5,"y":-0.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":1240946790 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":640874672 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.5,"y":1.125},{"x":0.5,"y":0.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":631727069 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":640874672 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.1875,"y":0.1875},{"x":0.1875,"y":-0.1875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":142511461 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":640874672 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.1875,"y":-0.75},{"x":0.1875,"y":-0.4375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":640874672 - }, - "TargetPinAddress":{ - "PinID":47750177, - "PinOwnerID":470739589 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":2.59618,"y":-0.3125},{"x":2.59618,"y":1.125},{"x":0.0,"y":0.0}] - } - ], - "Displays":[ - { - "SubChipID":470739589, - "Position":{ - "x":-0.0044, - "y":-0.15723 - }, - "Scale":0.696772158 - } - ], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/REGISTER-8.json b/TestData/Projects/MainTest/Chips/REGISTER-8.json deleted file mode 100644 index 28adeb01..00000000 --- a/TestData/Projects/MainTest/Chips/REGISTER-8.json +++ /dev/null @@ -1,688 +0,0 @@ -{ - "Name": "REGISTER-8", - "NameLocation": 1, - "Size": { - "x": 1.625, - "y": 1.0 - }, - "Colour": { - "r": 0.8732669, - "g": 0.5192768, - "b": 0.127885342, - "a": 1 - }, - "InputPins":[ - { - "Name":"DATA", - "ID":69098308, - "Position":{ - "x":-7.625, - "y":1.375 - }, - "BitCount":8, - "Colour":4, - "ValueDisplayMode":1 - }, - { - "Name":"STORE", - "ID":919078193, - "Position":{ - "x":-7.625, - "y":-0.4375 - }, - "BitCount":1, - "Colour":1, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":81439827, - "Position":{ - "x":-7.625, - "y":-1.625 - }, - "BitCount":1, - "Colour":5, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":10415736, - "Position":{ - "x":5.75, - "y":-0.9375 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"REGISTER-1", - "ID":1240946790, - "Label":null, - "Position":{ - "x":-0.64, - "y":2.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":631727069, - "Label":null, - "Position":{ - "x":-0.64, - "y":1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":142511461, - "Label":null, - "Position":{ - "x":-0.64, - "y":0.5 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":74143113, - "Label":null, - "Position":{ - "x":-0.64, - "y":-0.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"8-1BIT", - "ID":224870780, - "Label":"", - "Position":{ - "x":-4.9275, - "y":1.375 - }, - "OutputPinColourInfo":[{"PinColour":4,"PinID":1},{"PinColour":4,"PinID":2},{"PinColour":4,"PinID":3},{"PinColour":4,"PinID":4},{"PinColour":4,"PinID":5},{"PinColour":4,"PinID":6},{"PinColour":4,"PinID":7},{"PinColour":4,"PinID":8}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":2089722478, - "Label":"", - "Position":{ - "x":-0.64, - "y":-1.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":1995156153, - "Label":"", - "Position":{ - "x":-0.64, - "y":-2.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":706131724, - "Label":"", - "Position":{ - "x":-0.64, - "y":-3.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":2134894443, - "Label":"", - "Position":{ - "x":-0.64, - "y":-4.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"1-8BIT", - "ID":1106997725, - "Label":"", - "Position":{ - "x":2.1975, - "y":-0.9375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], - "InternalData":null - }, - { - "Name":"DECIMAL-8", - "ID":2080136468, - "Label":"", - "Position":{ - "x":4.86, - "y":0.3125 - }, - "OutputPinColourInfo":[], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":69098308 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":224870780 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":224870780 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":1240946790 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.125,"y":2.25},{"x":-4.125,"y":3.375},{"x":-1.875,"y":3.375},{"x":-1.875,"y":2.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":224870780 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":631727069 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.0,"y":2.0},{"x":-4.0,"y":3.25},{"x":-2.0,"y":3.25},{"x":-2.0,"y":1.6875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":224870780 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":142511461 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.875,"y":1.75},{"x":-3.875,"y":3.125},{"x":-2.125,"y":3.125},{"x":-2.125,"y":0.75},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":224870780 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":74143113 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.75,"y":1.5},{"x":-3.75,"y":3.0},{"x":-2.25,"y":3.0},{"x":-2.25,"y":-0.1875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":224870780 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":2089722478 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.625,"y":1.25},{"x":-3.625,"y":2.875},{"x":-2.375,"y":2.875},{"x":-2.375,"y":-1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":224870780 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":1995156153 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.5,"y":1.0},{"x":-3.5,"y":2.75},{"x":-2.5,"y":2.75},{"x":-2.5,"y":-2.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":224870780 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":706131724 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.375,"y":0.75},{"x":-3.375,"y":2.625},{"x":-2.625,"y":2.625},{"x":-2.625,"y":-3.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":224870780 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":2134894443 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.25,"y":0.5},{"x":-3.25,"y":2.5},{"x":-2.75,"y":2.5},{"x":-2.75,"y":-3.9375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":1240946790 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1106997725 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.125,"y":2.375},{"x":1.125,"y":-0.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":631727069 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1106997725 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":1.4375},{"x":1.0,"y":-0.3125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":142511461 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":1106997725 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.875,"y":0.5},{"x":0.875,"y":-0.5625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":74143113 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":1106997725 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":-0.4375},{"x":0.75,"y":-0.8125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":2089722478 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":1106997725 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":-1.375},{"x":0.75,"y":-1.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":1995156153 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":1106997725 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.875,"y":-2.3125},{"x":0.875,"y":-1.3125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":706131724 - }, - "TargetPinAddress":{ - "PinID":6, - "PinOwnerID":1106997725 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":-3.25},{"x":1.0,"y":-1.5625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":2134894443 - }, - "TargetPinAddress":{ - "PinID":7, - "PinOwnerID":1106997725 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.125,"y":-4.1875},{"x":1.125,"y":-1.8125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1106997725 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":10415736 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":8, - "PinOwnerID":1106997725 - }, - "TargetPinAddress":{ - "PinID":39707143, - "PinOwnerID":2080136468 - }, - "ConnectionType":1, - "ConnectedWireIndex":17, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":3.25,"y":-0.9375},{"x":3.25,"y":0.3125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":2089722478 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":74143113 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":1240946790 - }, - "ConnectionType":1, - "ConnectedWireIndex":20, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.875,"y":-0.4375},{"x":-2.875,"y":2.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":631727069 - }, - "ConnectionType":1, - "ConnectedWireIndex":21, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.875,"y":1.4375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":142511461 - }, - "ConnectionType":1, - "ConnectedWireIndex":21, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.875,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":2134894443 - }, - "ConnectionType":1, - "ConnectedWireIndex":20, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.875,"y":-0.4375},{"x":-2.875,"y":-4.1875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":706131724 - }, - "ConnectionType":1, - "ConnectedWireIndex":24, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.875,"y":-3.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":1995156153 - }, - "ConnectionType":1, - "ConnectedWireIndex":24, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.875,"y":-2.3125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":919078193 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":2089722478 - }, - "ConnectionType":1, - "ConnectedWireIndex":24, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-2.875,"y":-1.375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":2134894443 - }, - "ConnectionType":1, - "ConnectedWireIndex":19, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.0,"y":-1.625},{"x":-3.0,"y":-4.4375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":706131724 - }, - "ConnectionType":1, - "ConnectedWireIndex":28, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.0,"y":-3.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":1995156153 - }, - "ConnectionType":1, - "ConnectedWireIndex":28, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.0,"y":-2.5625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":1240946790 - }, - "ConnectionType":1, - "ConnectedWireIndex":19, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.0,"y":-1.625},{"x":-3.0,"y":2.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":631727069 - }, - "ConnectionType":1, - "ConnectedWireIndex":31, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.0,"y":1.1875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":142511461 - }, - "ConnectionType":1, - "ConnectedWireIndex":31, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.0,"y":0.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":81439827 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":74143113 - }, - "ConnectionType":1, - "ConnectedWireIndex":31, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.0,"y":-0.6875},{"x":0.0,"y":0.0}] - } - ], - "Displays":[ - { - "SubChipID":2080136468, - "Position":{ - "x":-0.00155, - "y":-0.15883 - }, - "Scale":0.618453562 - } - ], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/TOGGLE.json b/TestData/Projects/MainTest/Chips/TOGGLE.json deleted file mode 100644 index 7b99b03f..00000000 --- a/TestData/Projects/MainTest/Chips/TOGGLE.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "Name": "TOGGLE", - "NameLocation": 0, - "Size": { - "x": 1.29, - "y": 0.56 - }, - "Colour": { - "r": 0.197379187, - "g": 0.4479455, - "b": 0.645889342, - "a": 1 - }, - "InputPins":[ - { - "Name":"RESET", - "ID":2114093876, - "Position":{ - "x":-6.5806, - "y":0.1122 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":2141785414, - "Position":{ - "x":-6.4404, - "y":-0.974 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":1782291836, - "Position":{ - "x":6.2869, - "y":-0.8914 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"FLIP-FLOP", - "ID":1409885951, - "Label":null, - "Position":{ - "x":0.9622, - "y":-0.6553 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"NOT", - "ID":1958903897, - "Label":null, - "Position":{ - "x":3.477, - "y":-0.0413 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"AND", - "ID":529164248, - "Label":null, - "Position":{ - "x":-1.1275, - "y":0.4545 - }, - "OutputPinColourInfo":null, - "InternalData":null - }, - { - "Name":"NOT", - "ID":360071104, - "Label":null, - "Position":{ - "x":-2.6505, - "y":0.2656 - }, - "OutputPinColourInfo":null, - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":1920302974, - "PinOwnerID":1409885951 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1958903897 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.8156,"y":-0.6553},{"x":2.9486,"y":-0.0413}] - }, - { - "SourcePinAddress":{ - "PinID":1920302974, - "PinOwnerID":1409885951 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1782291836 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":1.8156,"y":-0.6553},{"x":5.5229,"y":-0.8914}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2141785414 - }, - "TargetPinAddress":{ - "PinID":2143575788, - "PinOwnerID":1409885951 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.6764,"y":-0.974},{"x":0.1089,"y":-0.8153}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1958903897 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":529164248 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":4.0053,"y":-0.0413},{"x":4.7403,"y":-0.0059},{"x":4.8229,"y":1.588},{"x":-2.2019,"y":1.6234},{"x":-2.2373,"y":0.6907},{"x":-1.5808,"y":0.6145}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":360071104 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":529164248 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-2.1222,"y":0.2656},{"x":-1.5808,"y":0.2945}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2114093876 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":360071104 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-5.8166,"y":0.1122},{"x":-3.1789,"y":0.2656}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":529164248 - }, - "TargetPinAddress":{ - "PinID":1732460994, - "PinOwnerID":1409885951 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":-0.6742,"y":0.4545},{"x":-0.1948,"y":0.4427},{"x":-0.3601,"y":-0.3601},{"x":0.1089,"y":-0.4953}] - } - ], - "Displays": null, - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/WIP2.json b/TestData/Projects/MainTest/Chips/WIP2.json deleted file mode 100644 index 65dd1d8b..00000000 --- a/TestData/Projects/MainTest/Chips/WIP2.json +++ /dev/null @@ -1,1548 +0,0 @@ -{ - "Name": "WIP2", - "NameLocation": 0, - "Size": { - "x": 0.99, - "y": 5.29 - }, - "Colour": { - "r": 0.223280087, - "g": 0.415004134, - "b": 0.3977041, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":109466336, - "Position":{ - "x":-6.07331, - "y":-1.66224 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT-8", - "ID":733867237, - "Position":{ - "x":-1.50295, - "y":7.39811 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"A", - "ID":1661183643, - "Position":{ - "x":1.6467, - "y":2.99376 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"B", - "ID":296720068, - "Position":{ - "x":4.11785, - "y":-0.46966 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - } - ], - "SubChips":[ - { - "Name":"PC", - "ID":1255067638, - "Label":null, - "Position":{ - "x":-4.22323, - "y":6.48452 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1994428648}], - "InternalData":null - }, - { - "Name":"KEY", - "ID":1661333381, - "Label":null, - "Position":{ - "x":-10.30913, - "y":1.30694 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], - "InternalData":[75] - }, - { - "Name":"REG-8", - "ID":2007842624, - "Label":null, - "Position":{ - "x":-0.54797, - "y":1.82081 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], - "InternalData":null - }, - { - "Name":"REG-8", - "ID":1237918361, - "Label":null, - "Position":{ - "x":-0.52274, - "y":0.06068 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], - "InternalData":null - }, - { - "Name":"dev.RAM-8", - "ID":247733947, - "Label":null, - "Position":{ - "x":7.47288, - "y":5.30698 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":5}], - "InternalData":null - }, - { - "Name":"ALU-8", - "ID":301021643, - "Label":null, - "Position":{ - "x":4.04441, - "y":1.33358 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1627170817},{"PinColour":0,"PinID":333324187}], - "InternalData":null - }, - { - "Name":"BUF-8", - "ID":172301081, - "Label":null, - "Position":{ - "x":2.43397, - "y":4.82993 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - }, - { - "Name":"BUF-8", - "ID":153832190, - "Label":null, - "Position":{ - "x":9.29044, - "y":5.14383 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], - "InternalData":null - }, - { - "Name":"ROM 256\u00d716", - "ID":917070333, - "Label":null, - "Position":{ - "x":0.10546, - "y":6.17454 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":[5376,5633,5377,5633,5378,5633,5379,5632,5380,5632,5381,5633,5382,5633,5383,5632,5384,5632,5385,5632,5386,5633,5387,5633,5388,5633,5389,5633,5390,5633,5391,5632,5408,5632,5409,5632,5410,5632,5411,5633,5412,5633,5413,5633,5414,5633,5415,5632,5416,5632,5417,5632,5416,3840,5120,4608,769,2063,5120,3840,1536,2304,1536,4864,5416,3840,257,2063,5120,3840,2304,288,5120,4608,5416,3840,272,5120,6144,6656,5417,4608,5416,3840,6912,257,2063,5888,3487,4096,257,5417,5888,1296,3232,5392,3840,5376,5888,5393,3840,5377,5888,5394,3840,5378,5888,5395,3840,5379,5888,5396,3840,5380,5888,5397,3840,5381,5888,5398,3840,5382,5888,5399,3840,5383,5888,5400,3840,5384,5888,5401,3840,5385,5888,5402,3840,5386,5888,5403,3840,5387,5888,5404,3840,5388,5888,5405,3840,5389,5888,5406,3840,5390,5888,5407,3840,5391,5888,2868,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - }, - { - "Name":"KEY", - "ID":2111501455, - "Label":null, - "Position":{ - "x":-10.35449, - "y":1.88111 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], - "InternalData":[82] - }, - { - "Name":"NOT", - "ID":437704005, - "Label":null, - "Position":{ - "x":-6.29996, - "y":-0.34476 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"CONTROL UNIT", - "ID":518660003, - "Label":null, - "Position":{ - "x":-9.20893, - "y":5.13451 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":1151713402},{"PinColour":2,"PinID":349361804},{"PinColour":2,"PinID":883528113},{"PinColour":2,"PinID":1590314579},{"PinColour":2,"PinID":1175090400},{"PinColour":2,"PinID":805153383},{"PinColour":2,"PinID":1401872117},{"PinColour":2,"PinID":1118858130},{"PinColour":2,"PinID":742048505},{"PinColour":2,"PinID":1476868706},{"PinColour":2,"PinID":87848670},{"PinColour":0,"PinID":288562873},{"PinColour":0,"PinID":1148046748},{"PinColour":0,"PinID":1249996143},{"PinColour":0,"PinID":1157119205},{"PinColour":0,"PinID":845055315},{"PinColour":0,"PinID":895153575}], - "InternalData":null - }, - { - "Name":"REG-8", - "ID":609414526, - "Label":null, - "Position":{ - "x":-2.20417, - "y":5.98531 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], - "InternalData":null - }, - { - "Name":"AND", - "ID":2092373440, - "Label":null, - "Position":{ - "x":-8.16773, - "y":-0.35528 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1100513352, - "Label":null, - "Position":{ - "x":-11.46016, - "y":-0.06158 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"TOGGLE", - "ID":1424033922, - "Label":null, - "Position":{ - "x":-4.96168, - "y":0.70267 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1782291836}], - "InternalData":null - }, - { - "Name":"FLAGS", - "ID":687931053, - "Label":null, - "Position":{ - "x":7.04437, - "y":0.63864 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":605802866}], - "InternalData":null - }, - { - "Name":"OR", - "ID":1805959142, - "Label":null, - "Position":{ - "x":-9.44244, - "y":-0.2815 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"BUS-8", - "ID":76195595, - "Label":null, - "Position":{ - "x":0.00754, - "y":3.93489 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], - "InternalData":[1275120978] - }, - { - "Name":"BUS-TERMINUS-8", - "ID":1275120978, - "Label":null, - "Position":{ - "x":-3.46073, - "y":-2.69268 - }, - "OutputPinColourInfo":[], - "InternalData":[76195595] - }, - { - "Name":"NOT", - "ID":1867709155, - "Label":null, - "Position":{ - "x":-4.13737, - "y":4.77385 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"DOT DISPLAY", - "ID":2085911674, - "Label":null, - "Position":{ - "x":12.75586, - "y":-1.4854 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":6}], - "InternalData":null - }, - { - "Name":"LSB", - "ID":1189702948, - "Label":null, - "Position":{ - "x":6.98436, - "y":1.59642 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1222614200}], - "InternalData":null - }, - { - "Name":"8-4BIT", - "ID":657752229, - "Label":null, - "Position":{ - "x":7.0552, - "y":-0.62319 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"REGISTER-1", - "ID":602363710, - "Label":null, - "Position":{ - "x":9.12522, - "y":0.9806 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], - "InternalData":null - }, - { - "Name":"8-4BIT", - "ID":1049240007, - "Label":null, - "Position":{ - "x":7.0925, - "y":-1.44374 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"CLOCK", - "ID":719592481, - "Label":null, - "Position":{ - "x":-12.81953, - "y":-2.40551 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], - "InternalData":null - }, - { - "Name":"AND", - "ID":503002167, - "Label":null, - "Position":{ - "x":-11.58111, - "y":-1.49484 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - }, - { - "Name":"KEY", - "ID":1717614320, - "Label":null, - "Position":{ - "x":-12.96951, - "y":-1.24071 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], - "InternalData":[67] - }, - { - "Name":"OR", - "ID":720620420, - "Label":null, - "Position":{ - "x":-9.17539, - "y":0.53817 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":1493304698, - "Label":null, - "Position":{ - "x":9.59097, - "y":-4.01915 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - }, - { - "Name":"REG-8", - "ID":1137372670, - "Label":null, - "Position":{ - "x":5.56148, - "y":6.51579 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], - "InternalData":null - }, - { - "Name":"MUX-8", - "ID":1460479845, - "Label":null, - "Position":{ - "x":2.64782, - "y":1.72201 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1454394007}], - "InternalData":null - }, - { - "Name":"4-8BIT", - "ID":769198515, - "Label":"", - "Position":{ - "x":9.07547, - "y":-0.88058 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":1994428648, - "PinOwnerID":1255067638 - }, - "TargetPinAddress":{ - "PinID":248954118, - "PinOwnerID":609414526 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":609414526 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":917070333 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":333324187, - "PinOwnerID":301021643 - }, - "TargetPinAddress":{ - "PinID":792064669, - "PinOwnerID":687931053 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1100513352 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":1805959142 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":76195595 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1275120978 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.73811,"y":3.9955599999999998},{"x":5.73811,"y":-1.84911},{"x":-4.28421,"y":-1.84911},{"x":-4.28421,"y":-2.71276},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":632432616, - "PinOwnerID":1237918361 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":76195595 - }, - "ConnectionType":2, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":0.75708,"y":-0.41932},{"x":0.75708,"y":-1.84911}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":2007842624 - }, - "TargetPinAddress":{ - "PinID":1327939519, - "PinOwnerID":301021643 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1627170817, - "PinOwnerID":301021643 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":76195595 - }, - "ConnectionType":2, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.0,"y":0.0},{"x":5.73811,"y":2.28978}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":917070333 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":172301081 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.23784,"y":5.88339},{"x":1.2602,"y":5.01362},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":247733947 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":153832190 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":153832190 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":76195595 - }, - "ConnectionType":2, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.0,"y":0.0},{"x":10.19621,"y":5.18547},{"x":10.19621,"y":3.13893},{"x":5.73811,"y":3.12331}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":917070333 - }, - "TargetPinAddress":{ - "PinID":1305525690, - "PinOwnerID":1255067638 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.87054,"y":5.9101},{"x":3.87055,"y":8.5756},{"x":-5.43935,"y":8.5756},{"x":-5.43935,"y":7.28566},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":437704005 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":437704005 - }, - "TargetPinAddress":{ - "PinID":2141785414, - "PinOwnerID":1424033922 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1867709155 - }, - "TargetPinAddress":{ - "PinID":1830871312, - "PinOwnerID":609414526 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.46736,"y":4.74964},{"x":-3.46736,"y":5.97817},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":1506181664, - "PinOwnerID":1255067638 - }, - "ConnectionType":1, - "ConnectedWireIndex":12, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-7.14197,"y":-0.34843},{"x":-7.32057,"y":2.72294},{"x":-5.72798,"y":2.72294},{"x":-5.72798,"y":6.37857},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":247733947 - }, - "ConnectionType":1, - "ConnectedWireIndex":15, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-5.72798,"y":5.10441},{"x":-0.72235,"y":5.10441},{"x":-0.72235,"y":4.33081},{"x":5.52711,"y":4.33081},{"x":5.52711,"y":4.58868},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":1027672421, - "PinOwnerID":609414526 - }, - "ConnectionType":1, - "ConnectedWireIndex":16, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.13415,"y":5.10441},{"x":-3.13415,"y":5.33194},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":605802866, - "PinOwnerID":687931053 - }, - "TargetPinAddress":{ - "PinID":1428445592, - "PinOwnerID":518660003 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":8.0906,"y":0.63864},{"x":8.0906,"y":-2.26752},{"x":-10.70327,"y":-2.26752},{"x":-10.70327,"y":4.54317},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":76195595 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":247733947 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":5.05626,"y":3.98817},{"x":5.05627,"y":5.40778},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":158720235, - "PinOwnerID":172301081 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":76195595 - }, - "ConnectionType":2, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":3.85857,"y":4.82993},{"x":3.85865,"y":3.97518}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":76195595 - }, - "TargetPinAddress":{ - "PinID":248954118, - "PinOwnerID":2007842624 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-1.89033,"y":-1.84911},{"x":-1.89033,"y":2.31339},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":76195595 - }, - "TargetPinAddress":{ - "PinID":248954118, - "PinOwnerID":1237918361 - }, - "ConnectionType":1, - "ConnectedWireIndex":21, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.89033,"y":0.5235},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":632432616, - "PinOwnerID":2007842624 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":76195595 - }, - "ConnectionType":2, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":1.37092,"y":1.34081},{"x":1.37092,"y":-1.84911}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":1805959142 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":2092373440 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2111501455 - }, - "TargetPinAddress":{ - "PinID":2114093876, - "PinOwnerID":1424033922 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-8.42798,"y":1.88111},{"x":-8.42798,"y":0.87237},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2111501455 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":1805959142 - }, - "ConnectionType":1, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-9.97518,"y":1.88111},{"x":-9.97518,"y":0.08361},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1782291836, - "PinOwnerID":1424033922 - }, - "TargetPinAddress":{ - "PinID":1263555528, - "PinOwnerID":518660003 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.00913,"y":0.75109},{"x":-4.00913,"y":1.25578},{"x":-8.19458,"y":1.25578},{"x":-8.19458,"y":2.10659},{"x":-10.19811,"y":2.10659},{"x":-10.19811,"y":3.02602},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1782291836, - "PinOwnerID":1424033922 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1867709155 - }, - "ConnectionType":1, - "ConnectedWireIndex":27, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-5.10695,"y":1.25578},{"x":-5.10695,"y":4.79626},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":977455228, - "PinOwnerID":687931053 - }, - "ConnectionType":1, - "ConnectedWireIndex":12, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-7.44021,"y":-0.3515},{"x":-7.4402,"y":-1.17057},{"x":4.71352,"y":-1.17057},{"x":4.71352,"y":0.27946},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":1027672421, - "PinOwnerID":2007842624 - }, - "ConnectionType":1, - "ConnectedWireIndex":29, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.54796,"y":-1.17057},{"x":-1.54796,"y":1.16265},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":1027672421, - "PinOwnerID":1237918361 - }, - "ConnectionType":1, - "ConnectedWireIndex":30, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.54796,"y":-0.55101},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2111501455 - }, - "TargetPinAddress":{ - "PinID":939662745, - "PinOwnerID":1255067638 - }, - "ConnectionType":1, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-6.06223,"y":0.86},{"x":-6.00002,"y":2.45656},{"x":-5.28537,"y":2.45656},{"x":-5.28537,"y":5.55538},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1782291836, - "PinOwnerID":1424033922 - }, - "TargetPinAddress":{ - "PinID":572135790, - "PinOwnerID":1255067638 - }, - "ConnectionType":1, - "ConnectedWireIndex":28, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-4.93394,"y":4.78826},{"x":-4.93398,"y":5.94273},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":1237918361 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":296720068 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.90142,"y":0.54068},{"x":1.90142,"y":-0.43051},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":76195595 - }, - "TargetPinAddress":{ - "PinID":1285607522, - "PinOwnerID":1189702948 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":5.73811,"y":1.59642},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1222614200, - "PinOwnerID":1189702948 - }, - "TargetPinAddress":{ - "PinID":2007348307, - "PinOwnerID":602363710 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":389514335, - "PinOwnerID":602363710 - }, - "ConnectionType":1, - "ConnectedWireIndex":29, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-6.53977,"y":-1.17057},{"x":-6.53977,"y":-3.23403},{"x":8.24873,"y":-3.23403},{"x":8.24873,"y":0.62628},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":2007842624 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":657752229 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.6297,"y":2.29716},{"x":1.62996,"y":2.95738},{"x":5.22762,"y":2.95738},{"x":5.22762,"y":-0.60454},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":1237918361 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1049240007 - }, - "ConnectionType":1, - "ConnectedWireIndex":34, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":2.37536,"y":-0.44751},{"x":2.37532,"y":-1.42509},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":719592481 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":503002167 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1717614320 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":503002167 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1661333381 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":720620420 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":720620420 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":2092373440 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":503002167 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":720620420 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":76195595 - }, - "TargetPinAddress":{ - "PinID":248954118, - "PinOwnerID":1137372670 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":4.36891,"y":3.98071},{"x":4.36892,"y":7.03436},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":1137372670 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":247733947 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.51219,"y":6.99579},{"x":6.51219,"y":5.85893},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":1027672421, - "PinOwnerID":1137372670 - }, - "ConnectionType":1, - "ConnectedWireIndex":16, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":4.69719,"y":4.33081},{"x":4.69719,"y":5.91079},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1151713402, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":1100513352 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-8.05927,"y":7.53451},{"x":-8.05927,"y":2.46435},{"x":-12.51155,"y":2.46435},{"x":-12.51155,"y":-0.11248},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":883528113, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":1847613819, - "PinOwnerID":1255067638 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.10758,"y":7.21451},{"x":-6.10758,"y":6.74892},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1590314579, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":2085911674 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-7.03358,"y":6.89451},{"x":-7.03358,"y":9.14334},{"x":11.96242,"y":9.14334},{"x":11.96242,"y":0.13674},{"x":9.36961,"y":0.13674},{"x":9.36961,"y":-1.46184},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1175090400, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":252188563, - "PinOwnerID":602363710 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.88907,"y":6.57451},{"x":-6.88907,"y":8.98738},{"x":11.72848,"y":8.98738},{"x":11.72848,"y":1.91077},{"x":8.02446,"y":1.91077},{"x":8.02446,"y":0.93603},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":805153383, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":247733947 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.08978,"y":6.25451},{"x":-6.08978,"y":3.45086},{"x":6.48437,"y":3.45086},{"x":6.48437,"y":5.04943},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1401872117, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":1830871312, - "PinOwnerID":1137372670 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.59665,"y":5.93451},{"x":-6.59665,"y":8.85092},{"x":4.74934,"y":8.85092},{"x":4.74934,"y":6.53104},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1118858130, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":1830871312, - "PinOwnerID":1237918361 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.36271,"y":5.61451},{"x":-6.36271,"y":2.04723},{"x":-2.85364,"y":2.04723},{"x":-2.85364,"y":0.09775},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":742048505, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":1830871312, - "PinOwnerID":2007842624 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.55766,"y":5.29451},{"x":-6.55766,"y":1.7938},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1476868706, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":172301081 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.55795,"y":4.97451},{"x":0.55795,"y":4.50358},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":87848670, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":1901197910, - "PinOwnerID":153832190 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.92806,"y":4.65451},{"x":-6.92806,"y":4.23065},{"x":8.2584,"y":4.23065},{"x":8.2584,"y":4.87398},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":288562873, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":455764185, - "PinOwnerID":1237918361 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-7.18149,"y":4.33451},{"x":-7.18149,"y":-0.89649},{"x":-2.69768,"y":-0.89649},{"x":-2.69768,"y":-0.42861},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1148046748, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":455764185, - "PinOwnerID":2007842624 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-7.5129,"y":4.01451},{"x":-7.5129,"y":0.17573},{"x":-3.36051,"y":0.17573},{"x":-3.36051,"y":1.46239},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1249996143, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":1427344851, - "PinOwnerID":301021643 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-7.72735,"y":3.69451},{"x":-7.72735,"y":-4.11313},{"x":2.91682,"y":-4.11313},{"x":2.91682,"y":0.09775},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":895153575, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":967634411, - "PinOwnerID":301021643 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-7.94179,"y":2.73451},{"x":-7.94179,"y":-4.32757},{"x":2.68288,"y":-4.32757},{"x":2.68288,"y":0.44866},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":845055315, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":1047676952, - "PinOwnerID":301021643 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-7.84431,"y":3.05451},{"x":-7.84431,"y":-4.48353},{"x":2.52693,"y":-4.48353},{"x":2.52693,"y":0.85805},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1157119205, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":441446737, - "PinOwnerID":301021643 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-7.41543,"y":3.37451},{"x":-7.41543,"y":-4.58101},{"x":2.35147,"y":-4.58101},{"x":2.35147,"y":1.24794},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":917070333 - }, - "TargetPinAddress":{ - "PinID":2007797370, - "PinOwnerID":518660003 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":1.55219,"y":6.46954},{"x":1.55219,"y":8.1686},{"x":-10.55409,"y":8.1686},{"x":-10.55409,"y":7.44729},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1249996143, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":227439812, - "PinOwnerID":687931053 - }, - "ConnectionType":1, - "ConnectedWireIndex":60, - "ConnectedWireSegmentIndex":4, - "Points":[{"x":3.21705,"y":0.11463},{"x":3.22904,"y":-0.08855},{"x":6.1216,"y":-0.06494},{"x":6.1098,"y":0.57261},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1454394007, - "PinOwnerID":1460479845 - }, - "TargetPinAddress":{ - "PinID":297829662, - "PinOwnerID":301021643 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":1237918361 - }, - "TargetPinAddress":{ - "PinID":480667918, - "PinOwnerID":1460479845 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":917070333 - }, - "TargetPinAddress":{ - "PinID":1796221764, - "PinOwnerID":1460479845 - }, - "ConnectionType":1, - "ConnectedWireIndex":8, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":1.25178,"y":5.34118},{"x":1.76496,"y":1.50094},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":349361804, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":1880005784, - "PinOwnerID":1460479845 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1994428648, - "PinOwnerID":1255067638 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":733867237 - }, - "ConnectionType":1, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.28326,"y":6.42395},{"x":-3.23163,"y":7.3711},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":2007842624 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1661183643 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.39123,"y":2.2186},{"x":-0.01634,"y":2.99506},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2111501455 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":2085911674 - }, - "ConnectionType":1, - "ConnectedWireIndex":25, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-6.93894,"y":0.86458},{"x":-6.93908,"y":-3.70234},{"x":9.74005,"y":-3.60917},{"x":9.77077,"y":-2.85651},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":1493304698 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":2085911674 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":769198515 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2085911674 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1938418986, - "PinOwnerID":602363710 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":2085911674 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":5, - "PinOwnerID":2085911674 - }, - "ConnectionType":1, - "ConnectedWireIndex":37, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":8.22771,"y":-3.23403},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":657752229 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":769198515 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1049240007 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":769198515 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays": null, - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/XNOR.json b/TestData/Projects/MainTest/Chips/XNOR.json deleted file mode 100644 index e4e80fb1..00000000 --- a/TestData/Projects/MainTest/Chips/XNOR.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "Name": "XNOR", - "NameLocation": 0, - "Size": { - "x": 0.95, - "y": 0.5 - }, - "Colour": { - "r": 0.435261548, - "g": 0.164612457, - "b": 0.709067047, - "a": 1 - }, - "InputPins":[ - { - "Name":"B", - "ID":128924098, - "Position":{ - "x":-4.5, - "y":0.625 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"A", - "ID":1606082193, - "Position":{ - "x":-4.5, - "y":-0.125 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":2132693630, - "Position":{ - "x":2.5, - "y":0.25 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"XOR", - "ID":909017048, - "Label":"", - "Position":{ - "x":-1.39777, - "y":0.25732 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], - "InternalData":null - }, - { - "Name":"NOT", - "ID":650858276, - "Label":"", - "Position":{ - "x":-0.02494, - "y":0.2538 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1606082193 - }, - "TargetPinAddress":{ - "PinID":2129479289, - "PinOwnerID":909017048 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":128924098 - }, - "TargetPinAddress":{ - "PinID":2008317865, - "PinOwnerID":909017048 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":977613743, - "PinOwnerID":909017048 - }, - "TargetPinAddress":{ - "PinID":913380392, - "PinOwnerID":650858276 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":650858276 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2132693630 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/XOR.json b/TestData/Projects/MainTest/Chips/XOR.json deleted file mode 100644 index 93bda63b..00000000 --- a/TestData/Projects/MainTest/Chips/XOR.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "Name": "XOR", - "NameLocation": 0, - "Size": { - "x": 0.7, - "y": 0.5 - }, - "Colour": { - "r": 0.6834233, - "g": 0.346940726, - "b": 0.7363925, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":2008317865, - "Position":{ - "x":-7.40323, - "y":-0.24194 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":2129479289, - "Position":{ - "x":-7.40323, - "y":-0.74194 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":977613743, - "Position":{ - "x":6.41935, - "y":-0.59677 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NAND", - "ID":366730522, - "Label":null, - "Position":{ - "x":-4.0, - "y":-2.14516 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"OR", - "ID":277097586, - "Label":null, - "Position":{ - "x":-3.62903, - "y":1.48387 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], - "InternalData":null - }, - { - "Name":"AND", - "ID":252315131, - "Label":null, - "Position":{ - "x":0.96774, - "y":-0.62637 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2129479289 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":366730522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2008317865 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":366730522 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2008317865 - }, - "TargetPinAddress":{ - "PinID":2119183610, - "PinOwnerID":277097586 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2129479289 - }, - "TargetPinAddress":{ - "PinID":115927082, - "PinOwnerID":277097586 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":356855654, - "PinOwnerID":277097586 - }, - "TargetPinAddress":{ - "PinID":436332053, - "PinOwnerID":252315131 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":366730522 - }, - "TargetPinAddress":{ - "PinID":123456040, - "PinOwnerID":252315131 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":252315131 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":977613743 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/demo.json b/TestData/Projects/MainTest/Chips/demo.json deleted file mode 100644 index 4d5b2434..00000000 --- a/TestData/Projects/MainTest/Chips/demo.json +++ /dev/null @@ -1,529 +0,0 @@ -{ - "Name": "demo", - "NameLocation": 0, - "Size": { - "x": 0.98875, - "y": 2.375 - }, - "Colour": { - "r": 0.5283218, - "g": 0.79503417, - "b": 0.788752854, - "a": 1 - }, - "InputPins":[ - { - "Name":"DATA", - "ID":1946922510, - "Position":{ - "x":-6.0, - "y":2.8125 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"OUTPUT DATA", - "ID":989966914, - "Position":{ - "x":-6.0, - "y":1.9375 - }, - "BitCount":1, - "Colour":3, - "ValueDisplayMode":0 - }, - { - "Name":"OUTPUT REG A", - "ID":1746917069, - "Position":{ - "x":-6.0, - "y":1.375 - }, - "BitCount":1, - "Colour":3, - "ValueDisplayMode":0 - }, - { - "Name":"OUTPUT ALU", - "ID":1922880267, - "Position":{ - "x":-6.0, - "y":0.8125 - }, - "BitCount":1, - "Colour":3, - "ValueDisplayMode":0 - }, - { - "Name":"OUTPUT REG B", - "ID":387726791, - "Position":{ - "x":-6.0, - "y":0.25 - }, - "BitCount":1, - "Colour":3, - "ValueDisplayMode":0 - }, - { - "Name":"STORE REG A", - "ID":1247859556, - "Position":{ - "x":-6.0, - "y":-0.4375 - }, - "BitCount":1, - "Colour":4, - "ValueDisplayMode":0 - }, - { - "Name":"SUBTRACT", - "ID":819342643, - "Position":{ - "x":-6.0, - "y":-1.0 - }, - "BitCount":1, - "Colour":4, - "ValueDisplayMode":0 - }, - { - "Name":"STORE REG B", - "ID":1740381118, - "Position":{ - "x":-6.0, - "y":-1.5625 - }, - "BitCount":1, - "Colour":4, - "ValueDisplayMode":0 - }, - { - "Name":"CLOCK", - "ID":1370591207, - "Position":{ - "x":-6.0, - "y":-2.125 - }, - "BitCount":1, - "Colour":5, - "ValueDisplayMode":0 - } - ], - "OutputPins":[], - "SubChips":[ - { - "Name":"REGISTER-4", - "ID":1477900478, - "Label":"", - "Position":{ - "x":-0.06852, - "y":1.5625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], - "InternalData":null - }, - { - "Name":"REGISTER-4", - "ID":1140491228, - "Label":"", - "Position":{ - "x":-0.06852, - "y":-1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], - "InternalData":null - }, - { - "Name":"ALU", - "ID":1130446836, - "Label":"", - "Position":{ - "x":2.45438, - "y":0.1875 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":683281904}], - "InternalData":null - }, - { - "Name":"BUS-4", - "ID":91787565, - "Label":"", - "Position":{ - "x":-2.115, - "y":2.8125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], - "InternalData":[126656166,0] - }, - { - "Name":"BUS-TERMINUS-4", - "ID":126656166, - "Label":"", - "Position":{ - "x":-2.135, - "y":-2.4375 - }, - "OutputPinColourInfo":[], - "InternalData":[91787565,1] - }, - { - "Name":"BUS BUFFER", - "ID":1677123653, - "Label":"", - "Position":{ - "x":2.54375, - "y":1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":813273076}], - "InternalData":null - }, - { - "Name":"BUS BUFFER", - "ID":1255591016, - "Label":"", - "Position":{ - "x":2.54375, - "y":-1.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":813273076}], - "InternalData":null - }, - { - "Name":"BUS BUFFER", - "ID":828151909, - "Label":"", - "Position":{ - "x":4.29375, - "y":0.0625 - }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":813273076}], - "InternalData":null - }, - { - "Name":"BUS BUFFER", - "ID":1017276518, - "Label":"", - "Position":{ - "x":-2.59066, - "y":2.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":813273076}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":683281904, - "PinOwnerID":1130446836 - }, - "TargetPinAddress":{ - "PinID":2012805953, - "PinOwnerID":828151909 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":989966914 - }, - "TargetPinAddress":{ - "PinID":731095980, - "PinOwnerID":1017276518 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1946922510 - }, - "TargetPinAddress":{ - "PinID":2012805953, - "PinOwnerID":1017276518 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.0115,"y":2.8125},{"x":-4.0115,"y":2.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":9902874, - "PinOwnerID":1477900478 - }, - "TargetPinAddress":{ - "PinID":2012805953, - "PinOwnerID":1677123653 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":9902874, - "PinOwnerID":1140491228 - }, - "TargetPinAddress":{ - "PinID":2012805953, - "PinOwnerID":1255591016 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":91787565 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":126656166 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.375,"y":2.8125},{"x":5.375,"y":-2.4375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":813273076, - "PinOwnerID":1255591016 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":91787565 - }, - "ConnectionType":2, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":0.0,"y":0.0},{"x":4.0,"y":-1.125},{"x":4.0,"y":-2.4375}] - }, - { - "SourcePinAddress":{ - "PinID":813273076, - "PinOwnerID":828151909 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":91787565 - }, - "ConnectionType":2, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":0.0,"y":0.0},{"x":5.375,"y":0.0625}] - }, - { - "SourcePinAddress":{ - "PinID":813273076, - "PinOwnerID":1677123653 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":91787565 - }, - "ConnectionType":2, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":4.0,"y":1.4375},{"x":4.0,"y":2.8125}] - }, - { - "SourcePinAddress":{ - "PinID":813273076, - "PinOwnerID":1017276518 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":91787565 - }, - "ConnectionType":2, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":2.125},{"x":-1.625,"y":2.8125}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":91787565 - }, - "TargetPinAddress":{ - "PinID":634643294, - "PinOwnerID":1477900478 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-1.3125,"y":2.8125},{"x":-1.3125,"y":1.9375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":9902874, - "PinOwnerID":1140491228 - }, - "TargetPinAddress":{ - "PinID":1514224661, - "PinOwnerID":1130446836 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.25,"y":-1.0},{"x":1.25,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":9902874, - "PinOwnerID":1477900478 - }, - "TargetPinAddress":{ - "PinID":320227374, - "PinOwnerID":1130446836 - }, - "ConnectionType":1, - "ConnectedWireIndex":3, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.25,"y":1.5625},{"x":1.25,"y":0.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":91787565 - }, - "TargetPinAddress":{ - "PinID":634643294, - "PinOwnerID":1140491228 - }, - "ConnectionType":1, - "ConnectedWireIndex":5, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-1.3125,"y":-2.4375},{"x":-1.3125,"y":-0.625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1247859556 - }, - "TargetPinAddress":{ - "PinID":919078193, - "PinOwnerID":1477900478 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.8125,"y":-0.4375},{"x":-2.8125,"y":1.5},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1740381118 - }, - "TargetPinAddress":{ - "PinID":919078193, - "PinOwnerID":1140491228 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.8125,"y":-1.5625},{"x":-2.8125,"y":-1.0625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":819342643 - }, - "TargetPinAddress":{ - "PinID":2015026118, - "PinOwnerID":1130446836 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.0625,"y":-1.0},{"x":-3.0625,"y":-0.6875},{"x":-2.4375,"y":-0.6875},{"x":-2.4375,"y":-0.1875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1370591207 - }, - "TargetPinAddress":{ - "PinID":81439827, - "PinOwnerID":1477900478 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.74596,"y":-2.125},{"x":-1.74596,"y":1.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1370591207 - }, - "TargetPinAddress":{ - "PinID":81439827, - "PinOwnerID":1140491228 - }, - "ConnectionType":1, - "ConnectedWireIndex":17, - "ConnectedWireSegmentIndex":1, - "Points":[{"x":-1.74596,"y":-1.4375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1746917069 - }, - "TargetPinAddress":{ - "PinID":731095980, - "PinOwnerID":1677123653 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.125,"y":1.375},{"x":-3.125,"y":0.875},{"x":1.5625,"y":0.875},{"x":1.5625,"y":1.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":387726791 - }, - "TargetPinAddress":{ - "PinID":731095980, - "PinOwnerID":1255591016 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.3125,"y":0.25},{"x":-3.3125,"y":-1.875},{"x":0.9375,"y":-1.875},{"x":0.9375,"y":-1.3125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1922880267 - }, - "TargetPinAddress":{ - "PinID":731095980, - "PinOwnerID":828151909 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-3.3125,"y":0.8125},{"x":-3.3125,"y":0.625},{"x":0.9375,"y":0.625},{"x":0.9375,"y":-0.5},{"x":3.3125,"y":-0.5},{"x":3.3125,"y":-0.125},{"x":0.0,"y":0.0}] - } - ], - "Displays": null, - "ChipType": 0 -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/test.json b/TestData/Projects/MainTest/Chips/test.json deleted file mode 100644 index c3f30c19..00000000 --- a/TestData/Projects/MainTest/Chips/test.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "Name": "test", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 0.725, - "y": 1.125 - }, - "Colour": { - "r": 0.5414247, - "g": 0.390782118, - "b": 0.6613721, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":1421188130, - "Position":{ - "x":-7.40141, - "y":3.912 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":379144233, - "Position":{ - "x":-3.83526, - "y":0.31532 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":2025946763, - "Position":{ - "x":8.50862, - "y":-3.78063 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":315547482, - "Position":{ - "x":8.06068, - "y":1.785 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OUT", - "ID":784653966, - "Position":{ - "x":7.97995, - "y":0.85658 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NAND", - "ID":240905991, - "Label":"", - "Position":{ - "x":-0.55341, - "y":0.2381 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"REGISTER-4", - "ID":149684545, - "Label":"", - "Position":{ - "x":-0.53703, - "y":2.27566 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":96791616, - "Label":"", - "Position":{ - "x":-0.63063, - "y":-1.35779 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"REGISTER-4", - "ID":31831749, - "Label":"", - "Position":{ - "x":2.74131, - "y":-0.26384 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], - "InternalData":null - }, - { - "Name":"ROM 256×16", - "ID":1318148087, - "Label":"", - "Position":{ - "x":3.94338, - "y":1.69081 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":[49392,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1318148087 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":315547482 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1318148087 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":784653966 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays": null -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json deleted file mode 100644 index 29998da7..00000000 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "ProjectName": "MainTest", - "DLSVersion_LastSaved": "2.1.2", - "DLSVersion_EarliestCompatible": "2.0.0", - "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-04-20T15:18:17.676+02:00", - "Prefs_MainPinNamesDisplayMode": 0, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 1, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 20000, - "Prefs_SimStepsPerClockTick": 6, - "AllCustomChipNames":[ - "AND", - "D-LATCH", - "NOT", - "OR", - "NOR", - "FLIP-FLOP", - "XOR", - "ADDER", - "ADDER-4", - "REGISTER-1", - "REGISTER-4", - "MEM-1", - "MEM-16", - "ADDER-8", - "REG-8", - "AND-8", - "OR-8", - "NOT-8", - "AND(8,1)", - "MUX-8", - "PC", - "BUF-8", - "ALU-8", - "DECODE-3", - "AND-3", - "CONTROL UNIT", - "TOGGLE", - "FLAGS", - "7-SEGMENT DRIVER", - "DABBLE", - "WIP2", - "LSB", - "LSHIFT-8", - "DOUBLE DABBLE", - "DISP-7", - "DECIMAL-4", - "demo", - "ALU", - "BUS BUFFER", - "MEM-256", - "DECIMAL-8", - "REGISTER-8", - "XNOR", - "EQUALS-8", - "DECODER-2", - "RAM-256×8 (async)", - "RAM-sync", - "test" - ], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"MERGE/SPLIT", - "IsCollection":true - }, - { - "Name":"WIP2", - "IsCollection":false - }, - { - "Name":"RAM-sync", - "IsCollection":false - }, - { - "Name":"test", - "IsCollection":false - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","AND","NOT","NOR","XOR","OR","KEY","CLOCK","3-STATE BUFFER"], - "IsToggledOpen":false, - "Name":"BASICS" - }, - { - "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["1-4BIT","1-8BIT","4-8BIT","8-4BIT","8-1BIT","4-1BIT"], - "IsToggledOpen":false, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["7-SEGMENT","DECIMAL-4","DECIMAL-8","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["REGISTER-4","REG-8"], - "IsToggledOpen":false, - "Name":"MEMORY" - }, - { - "Chips":["D-LATCH","FLIP-FLOP","OR-8","MEM-1","NOT-8","AND(8,1)","MUX-8","PC","BUF-8","ALU-8","DECODE-3","AND-3","CONTROL UNIT","TOGGLE","FLAGS","DISP-7","demo","7-SEGMENT DRIVER","DABBLE","LSB","LSHIFT-8","DOUBLE DABBLE","ALU","BUS BUFFER","MEM-256","REGISTER-8","XNOR","EQUALS-8","ADDER-4","DECODER-2","ADDER-8","ADDER","MEM-16","REGISTER-1","AND-8","RAM-256×8 (async)","ROM 256×16"], - "IsToggledOpen":false, - "Name":"KEEP" - }, - { - "Chips":["WIP2","RAM-sync"], - "IsToggledOpen":false, - "Name":"TEST" - }, - { - "Chips":[], - "IsToggledOpen":true, - "Name":"OTHER" - } - ] -} \ No newline at end of file From b0c7d450192a03a9b65d94336f3150522b46073b Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Tue, 22 Apr 2025 21:39:09 +0300 Subject: [PATCH 024/124] Revert "Delete TestData directory" This reverts commit 627ca20d2420879b8d03b02721869e14c8367084. --- TestData/AppSettings.json | 6 + .../Deleted Projects/MainTest/Chips/AND.json | 149 ++ .../MainTest/Chips/7-SEGMENT DRIVER.json | 814 ++++++++ TestData/Projects/MainTest/Chips/ADDER-4.json | 436 ++++ TestData/Projects/MainTest/Chips/ADDER-8.json | 277 +++ TestData/Projects/MainTest/Chips/ADDER.json | 302 +++ TestData/Projects/MainTest/Chips/ALU-8.json | 1076 ++++++++++ TestData/Projects/MainTest/Chips/ALU.json | 383 ++++ TestData/Projects/MainTest/Chips/AMFsdf.json | 33 + .../Projects/MainTest/Chips/AND(8,1).json | 531 +++++ TestData/Projects/MainTest/Chips/AND-3.json | 160 ++ TestData/Projects/MainTest/Chips/AND-8.json | 556 ++++++ TestData/Projects/MainTest/Chips/AND.json | 149 ++ TestData/Projects/MainTest/Chips/BUF-8.json | 531 +++++ .../Projects/MainTest/Chips/BUS BUFFER.json | 319 +++ .../Projects/MainTest/Chips/CONTROL UNIT.json | 975 +++++++++ TestData/Projects/MainTest/Chips/D-LATCH.json | 266 +++ TestData/Projects/MainTest/Chips/DABBLE.json | 519 +++++ .../Projects/MainTest/Chips/DECIMAL-4.json | 302 +++ .../Projects/MainTest/Chips/DECIMAL-8.json | 447 +++++ .../Projects/MainTest/Chips/DECODE-3.json | 756 +++++++ .../Projects/MainTest/Chips/DECODER-2.json | 352 ++++ TestData/Projects/MainTest/Chips/DISP-7.json | 768 +++++++ .../MainTest/Chips/DOUBLE DABBLE.json | 825 ++++++++ .../Projects/MainTest/Chips/EQUALS-8.json | 706 +++++++ TestData/Projects/MainTest/Chips/FLAGS.json | 135 ++ .../Projects/MainTest/Chips/FLIP-FLOP.json | 174 ++ TestData/Projects/MainTest/Chips/KeyTest.json | 32 + TestData/Projects/MainTest/Chips/LSB.json | 85 + .../Projects/MainTest/Chips/LSHIFT-8.json | 194 ++ TestData/Projects/MainTest/Chips/MEM-1.json | 249 +++ TestData/Projects/MainTest/Chips/MEM-16.json | 1656 ++++++++++++++++ TestData/Projects/MainTest/Chips/MEM-256.json | 1766 +++++++++++++++++ TestData/Projects/MainTest/Chips/MUX-8.json | 224 +++ TestData/Projects/MainTest/Chips/NOR.json | 227 +++ TestData/Projects/MainTest/Chips/NOT-8.json | 408 ++++ TestData/Projects/MainTest/Chips/NOT.json | 99 + TestData/Projects/MainTest/Chips/OR-8.json | 556 ++++++ TestData/Projects/MainTest/Chips/OR.json | 160 ++ TestData/Projects/MainTest/Chips/PC.json | 391 ++++ .../Chips/RAM-256\303\2278 (async).json" | 679 +++++++ .../Projects/MainTest/Chips/RAM-sync.json | 366 ++++ TestData/Projects/MainTest/Chips/REG-8.json | 327 +++ .../Projects/MainTest/Chips/REGISTER-1.json | 263 +++ .../Projects/MainTest/Chips/REGISTER-4.json | 420 ++++ .../Projects/MainTest/Chips/REGISTER-8.json | 688 +++++++ TestData/Projects/MainTest/Chips/TOGGLE.json | 199 ++ TestData/Projects/MainTest/Chips/WIP2.json | 1548 +++++++++++++++ TestData/Projects/MainTest/Chips/XNOR.json | 135 ++ TestData/Projects/MainTest/Chips/XOR.json | 188 ++ TestData/Projects/MainTest/Chips/demo.json | 529 +++++ TestData/Projects/MainTest/Chips/test.json | 162 ++ .../Projects/MainTest/ProjectDescription.json | 138 ++ 53 files changed, 23636 insertions(+) create mode 100644 TestData/AppSettings.json create mode 100644 TestData/Deleted Projects/MainTest/Chips/AND.json create mode 100644 TestData/Projects/MainTest/Chips/7-SEGMENT DRIVER.json create mode 100644 TestData/Projects/MainTest/Chips/ADDER-4.json create mode 100644 TestData/Projects/MainTest/Chips/ADDER-8.json create mode 100644 TestData/Projects/MainTest/Chips/ADDER.json create mode 100644 TestData/Projects/MainTest/Chips/ALU-8.json create mode 100644 TestData/Projects/MainTest/Chips/ALU.json create mode 100644 TestData/Projects/MainTest/Chips/AMFsdf.json create mode 100644 TestData/Projects/MainTest/Chips/AND(8,1).json create mode 100644 TestData/Projects/MainTest/Chips/AND-3.json create mode 100644 TestData/Projects/MainTest/Chips/AND-8.json create mode 100644 TestData/Projects/MainTest/Chips/AND.json create mode 100644 TestData/Projects/MainTest/Chips/BUF-8.json create mode 100644 TestData/Projects/MainTest/Chips/BUS BUFFER.json create mode 100644 TestData/Projects/MainTest/Chips/CONTROL UNIT.json create mode 100644 TestData/Projects/MainTest/Chips/D-LATCH.json create mode 100644 TestData/Projects/MainTest/Chips/DABBLE.json create mode 100644 TestData/Projects/MainTest/Chips/DECIMAL-4.json create mode 100644 TestData/Projects/MainTest/Chips/DECIMAL-8.json create mode 100644 TestData/Projects/MainTest/Chips/DECODE-3.json create mode 100644 TestData/Projects/MainTest/Chips/DECODER-2.json create mode 100644 TestData/Projects/MainTest/Chips/DISP-7.json create mode 100644 TestData/Projects/MainTest/Chips/DOUBLE DABBLE.json create mode 100644 TestData/Projects/MainTest/Chips/EQUALS-8.json create mode 100644 TestData/Projects/MainTest/Chips/FLAGS.json create mode 100644 TestData/Projects/MainTest/Chips/FLIP-FLOP.json create mode 100644 TestData/Projects/MainTest/Chips/KeyTest.json create mode 100644 TestData/Projects/MainTest/Chips/LSB.json create mode 100644 TestData/Projects/MainTest/Chips/LSHIFT-8.json create mode 100644 TestData/Projects/MainTest/Chips/MEM-1.json create mode 100644 TestData/Projects/MainTest/Chips/MEM-16.json create mode 100644 TestData/Projects/MainTest/Chips/MEM-256.json create mode 100644 TestData/Projects/MainTest/Chips/MUX-8.json create mode 100644 TestData/Projects/MainTest/Chips/NOR.json create mode 100644 TestData/Projects/MainTest/Chips/NOT-8.json create mode 100644 TestData/Projects/MainTest/Chips/NOT.json create mode 100644 TestData/Projects/MainTest/Chips/OR-8.json create mode 100644 TestData/Projects/MainTest/Chips/OR.json create mode 100644 TestData/Projects/MainTest/Chips/PC.json create mode 100644 "TestData/Projects/MainTest/Chips/RAM-256\303\2278 (async).json" create mode 100644 TestData/Projects/MainTest/Chips/RAM-sync.json create mode 100644 TestData/Projects/MainTest/Chips/REG-8.json create mode 100644 TestData/Projects/MainTest/Chips/REGISTER-1.json create mode 100644 TestData/Projects/MainTest/Chips/REGISTER-4.json create mode 100644 TestData/Projects/MainTest/Chips/REGISTER-8.json create mode 100644 TestData/Projects/MainTest/Chips/TOGGLE.json create mode 100644 TestData/Projects/MainTest/Chips/WIP2.json create mode 100644 TestData/Projects/MainTest/Chips/XNOR.json create mode 100644 TestData/Projects/MainTest/Chips/XOR.json create mode 100644 TestData/Projects/MainTest/Chips/demo.json create mode 100644 TestData/Projects/MainTest/Chips/test.json create mode 100644 TestData/Projects/MainTest/ProjectDescription.json diff --git a/TestData/AppSettings.json b/TestData/AppSettings.json new file mode 100644 index 00000000..75e0b057 --- /dev/null +++ b/TestData/AppSettings.json @@ -0,0 +1,6 @@ +{ + "ResolutionX": 1280, + "ResolutionY": 720, + "fullscreenMode": 1, + "VSyncEnabled": true +} \ No newline at end of file diff --git a/TestData/Deleted Projects/MainTest/Chips/AND.json b/TestData/Deleted Projects/MainTest/Chips/AND.json new file mode 100644 index 00000000..9f343dfc --- /dev/null +++ b/TestData/Deleted Projects/MainTest/Chips/AND.json @@ -0,0 +1,149 @@ +{ + "Name": "AND", + "NameLocation": 0, + "Size": { + "x": 0.7, + "y": 0.5 + }, + "Colour": { + "r": 0.2440358, + "g": 0.57116735, + "b": 0.6800216, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":436332053, + "Position":{ + "x":-7.46774, + "y":1.25806 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":123456040, + "Position":{ + "x":-7.32258, + "y":-0.64516 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":1580367471, + "Position":{ + "x":5.43548, + "y":0.08065 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NAND", + "ID":910879205, + "Label":null, + "Position":{ + "x":-2.58065, + "y":0.08065 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1120748047, + "Label":null, + "Position":{ + "x":0.41935, + "y":-0.03226 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":436332053 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":910879205 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":123456040 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":910879205 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":910879205 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1120748047 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":910879205 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1120748047 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1120748047 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1580367471 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/7-SEGMENT DRIVER.json b/TestData/Projects/MainTest/Chips/7-SEGMENT DRIVER.json new file mode 100644 index 00000000..16595c77 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/7-SEGMENT DRIVER.json @@ -0,0 +1,814 @@ +{ + "Name": "7-SEGMENT DRIVER", + "NameLocation": 0, + "Size": { + "x": 1.7, + "y": 1.75 + }, + "Colour": { + "r": 0.356291771, + "g": 0.155408725, + "b": 0.155408725, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":282827618, + "Position":{ + "x":-4.125, + "y":1.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":1252376139, + "Position":{ + "x":-4.125, + "y":1.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":149630521, + "Position":{ + "x":-4.125, + "y":0.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":617512258, + "Position":{ + "x":-4.125, + "y":0.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"A", + "ID":1625764615, + "Position":{ + "x":7.25, + "y":1.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"B", + "ID":876832376, + "Position":{ + "x":7.25, + "y":1.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"C", + "ID":2063837745, + "Position":{ + "x":7.25, + "y":0.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"D", + "ID":795836234, + "Position":{ + "x":7.25, + "y":0.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"E", + "ID":1275013740, + "Position":{ + "x":7.25, + "y":-0.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"F", + "ID":1041680072, + "Position":{ + "x":7.25, + "y":-1.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"G", + "ID":1553234055, + "Position":{ + "x":7.25, + "y":-1.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NOT", + "ID":1930948696, + "Label":null, + "Position":{ + "x":-1.765, + "y":-1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":753401946, + "Label":null, + "Position":{ + "x":0.0, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"OR", + "ID":948454002, + "Label":null, + "Position":{ + "x":3.11, + "y":2.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1135099145, + "Label":null, + "Position":{ + "x":4.735, + "y":0.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":1198819388, + "Label":null, + "Position":{ + "x":-1.765, + "y":2.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":877685943, + "Label":null, + "Position":{ + "x":1.61, + "y":1.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1860419561, + "Label":null, + "Position":{ + "x":1.61, + "y":0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1760275203, + "Label":null, + "Position":{ + "x":4.735, + "y":0.75 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1609264561, + "Label":null, + "Position":{ + "x":4.625, + "y":1.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1338291281, + "Label":null, + "Position":{ + "x":4.735, + "y":-0.75 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":619943523, + "Label":null, + "Position":{ + "x":4.735, + "y":-1.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1248357854, + "Label":null, + "Position":{ + "x":4.735, + "y":-2.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"OR", + "ID":161748073, + "Label":null, + "Position":{ + "x":-0.14, + "y":-2.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1431667775, + "Label":null, + "Position":{ + "x":3.11, + "y":-2.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":1854753101, + "Label":null, + "Position":{ + "x":-0.14, + "y":-2.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1930948696 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":753401946 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":1198819388 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":948454002 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1252376139 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1860419561 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1860419561 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1760275203 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":877685943 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1609264561 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":1854753101 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1431667775 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1431667775 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1248357854 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":753401946 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1338291281 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1135099145 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":795836234 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":948454002 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1625764615 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.0,"y":2.125},{"x":6.0,"y":1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1609264561 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":876832376 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.75,"y":1.5},{"x":5.75,"y":1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1760275203 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2063837745 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":0.75},{"x":5.5,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1338291281 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1275013740 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":-0.75},{"x":5.5,"y":-0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":619943523 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1041680072 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.75,"y":-1.5},{"x":5.75,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1248357854 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1553234055 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.0,"y":-2.25},{"x":6.0,"y":-1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":877685943 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":948454002 + }, + "ConnectionType":1, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":2.5,"y":1.625},{"x":2.5,"y":2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":877685943 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1431667775 + }, + "ConnectionType":1, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":2.5,"y":1.625},{"x":2.5,"y":-2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":877685943 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1338291281 + }, + "ConnectionType":1, + "ConnectedWireIndex":16, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":2.5,"y":-0.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":948454002 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1135099145 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":3.75,"y":2.125},{"x":3.75,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1431667775 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1135099145 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":3.75,"y":-2.125},{"x":3.75,"y":-0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1431667775 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":619943523 + }, + "ConnectionType":1, + "ConnectedWireIndex":19, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":3.75,"y":-1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1860419561 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":619943523 + }, + "ConnectionType":1, + "ConnectedWireIndex":3, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":3.60986,"y":0.875},{"x":3.60986,"y":-1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":753401946 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":877685943 + }, + "ConnectionType":1, + "ConnectedWireIndex":7, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.875,"y":-0.875},{"x":0.875,"y":1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":161748073 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1248357854 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.75,"y":-2.875},{"x":3.75,"y":-2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":1198819388 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":161748073 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.0,"y":2.25},{"x":-1.0,"y":-3.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":1198819388 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":1854753101 + }, + "ConnectionType":1, + "ConnectedWireIndex":24, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.0,"y":-2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1930948696 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1860419561 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.875,"y":-1.0},{"x":-0.875,"y":0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1252376139 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1609264561 + }, + "ConnectionType":1, + "ConnectedWireIndex":2, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.0,"y":1.0},{"x":1.0,"y":1.25},{"x":2.125,"y":1.25},{"x":2.125,"y":1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1252376139 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":161748073 + }, + "ConnectionType":1, + "ConnectedWireIndex":2, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.75,"y":1.0},{"x":-0.75,"y":-2.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1252376139 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":1854753101 + }, + "ConnectionType":1, + "ConnectedWireIndex":28, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.75,"y":-2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1252376139 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":753401946 + }, + "ConnectionType":1, + "ConnectedWireIndex":28, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.75,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":149630521 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":1198819388 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.5,"y":0.5},{"x":-2.5,"y":2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":149630521 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1930948696 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.5,"y":0.5},{"x":-2.5,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":617512258 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1760275203 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.0625,"y":0.0},{"x":3.0625,"y":0.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":617512258 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":877685943 + }, + "ConnectionType":1, + "ConnectedWireIndex":33, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.75,"y":0.0},{"x":0.75,"y":1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":282827618 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":1198819388 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.625,"y":1.5},{"x":-2.625,"y":2.375},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ADDER-4.json b/TestData/Projects/MainTest/Chips/ADDER-4.json new file mode 100644 index 00000000..16b61c06 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/ADDER-4.json @@ -0,0 +1,436 @@ +{ + "Name": "ADDER-4", + "NameLocation": 0, + "Size": { + "x": 1.89, + "y": 0.98 + }, + "Colour": { + "r": 0.6511687, + "g": 0.327637434, + "b": 0.6576214, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN-4", + "ID":1102331041, + "Position":{ + "x":-11.33533, + "y":-1.23446 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"IN-4", + "ID":21685109, + "Position":{ + "x":-11.70779, + "y":2.12458 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"CARRY", + "ID":601345531, + "Position":{ + "x":-11.27197, + "y":-3.01144 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"CARRY", + "ID":1319151723, + "Position":{ + "x":8.28409, + "y":1.75839 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT-4", + "ID":146298398, + "Position":{ + "x":8.22843, + "y":0.84004 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":1 + } + ], + "SubChips":[ + { + "Name":"ADDER", + "ID":542778503, + "Label":null, + "Position":{ + "x":-1.04069, + "y":2.24322 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"ADDER", + "ID":1363793689, + "Label":null, + "Position":{ + "x":-2.74802, + "y":0.97055 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"ADDER", + "ID":2095960444, + "Label":null, + "Position":{ + "x":-4.28297, + "y":-0.34479 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"ADDER", + "ID":1925515444, + "Label":null, + "Position":{ + "x":-5.66835, + "y":-1.74222 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"4-1BIT", + "ID":2048651980, + "Label":null, + "Position":{ + "x":-8.32584, + "y":2.18687 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"4-1BIT", + "ID":54656751, + "Label":null, + "Position":{ + "x":-8.30472, + "y":-1.25558 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"1-4BIT", + "ID":1331395293, + "Label":null, + "Position":{ + "x":4.55344, + "y":0.80683 + }, + "OutputPinColourInfo":null, + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1102331041 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":54656751 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-10.56883,"y":-1.23446},{"x":-8.99805,"y":-1.25558}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":54656751 + }, + "TargetPinAddress":{ + "PinID":1488754317, + "PinOwnerID":1925515444 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.61139,"y":-1.61558},{"x":-6.29668,"y":-1.74222}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":2048651980 + }, + "TargetPinAddress":{ + "PinID":1807442703, + "PinOwnerID":1925515444 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.63251,"y":1.82687},{"x":-6.29668,"y":-1.42222}] + }, + { + "SourcePinAddress":{ + "PinID":1109549932, + "PinOwnerID":1925515444 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":1331395293 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.04002,"y":-1.42222},{"x":3.86011,"y":0.44683}] + }, + { + "SourcePinAddress":{ + "PinID":2093446574, + "PinOwnerID":1925515444 + }, + "TargetPinAddress":{ + "PinID":1514297445, + "PinOwnerID":2095960444 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.04002,"y":-2.06222},{"x":-4.9113,"y":-0.66479}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":54656751 + }, + "TargetPinAddress":{ + "PinID":1488754317, + "PinOwnerID":2095960444 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.61139,"y":-1.37558},{"x":-4.9113,"y":-0.34479}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":2048651980 + }, + "TargetPinAddress":{ + "PinID":1807442703, + "PinOwnerID":2095960444 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.63251,"y":2.06687},{"x":-4.9113,"y":-0.02479}] + }, + { + "SourcePinAddress":{ + "PinID":2093446574, + "PinOwnerID":2095960444 + }, + "TargetPinAddress":{ + "PinID":1514297445, + "PinOwnerID":1363793689 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-3.65464,"y":-0.66479},{"x":-3.37635,"y":0.65055}] + }, + { + "SourcePinAddress":{ + "PinID":1109549932, + "PinOwnerID":2095960444 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":1331395293 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-3.65464,"y":-0.02479},{"x":3.86011,"y":0.68683}] + }, + { + "SourcePinAddress":{ + "PinID":1109549932, + "PinOwnerID":1363793689 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1331395293 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.11969,"y":1.29055},{"x":3.86011,"y":0.92683}] + }, + { + "SourcePinAddress":{ + "PinID":1109549932, + "PinOwnerID":542778503 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1331395293 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-0.41236,"y":2.56322},{"x":3.86011,"y":1.16683}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":54656751 + }, + "TargetPinAddress":{ + "PinID":1488754317, + "PinOwnerID":1363793689 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.61139,"y":-1.13558},{"x":-3.37635,"y":0.97055}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":2048651980 + }, + "TargetPinAddress":{ + "PinID":1807442703, + "PinOwnerID":1363793689 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.63251,"y":2.30687},{"x":-3.37635,"y":1.29055}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":54656751 + }, + "TargetPinAddress":{ + "PinID":1488754317, + "PinOwnerID":542778503 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.61139,"y":-0.89558},{"x":-1.66902,"y":2.24322}] + }, + { + "SourcePinAddress":{ + "PinID":2093446574, + "PinOwnerID":1363793689 + }, + "TargetPinAddress":{ + "PinID":1514297445, + "PinOwnerID":542778503 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.11969,"y":0.65055},{"x":-1.66902,"y":1.92322}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":2048651980 + }, + "TargetPinAddress":{ + "PinID":1807442703, + "PinOwnerID":542778503 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.63251,"y":2.54687},{"x":-1.66902,"y":2.56322}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1331395293 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":146298398 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":5.24677,"y":0.80683},{"x":7.46193,"y":0.84004}] + }, + { + "SourcePinAddress":{ + "PinID":2093446574, + "PinOwnerID":542778503 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1319151723 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-0.41236,"y":1.92322},{"x":7.52009,"y":1.75839}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":21685109 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2048651980 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-10.94129,"y":2.12458},{"x":-9.01917,"y":2.18687}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":601345531 + }, + "TargetPinAddress":{ + "PinID":1514297445, + "PinOwnerID":1925515444 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-10.50797,"y":-3.01144},{"x":-6.29668,"y":-2.06222}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ADDER-8.json b/TestData/Projects/MainTest/Chips/ADDER-8.json new file mode 100644 index 00000000..f9ead461 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/ADDER-8.json @@ -0,0 +1,277 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.208691791, + "g": 0.472802222, + "b": 0.263934553, + "a": 1 + }, + "Displays":[], + "InputPins":[ + { + "Name":"IN-8", + "ID":1729060963, + "Position":{ + "x":-6.78458, + "y":1.70539 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"IN-8", + "ID":751222821, + "Position":{ + "x":-6.77402, + "y":0.11088 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"CARRY", + "ID":833981293, + "Position":{ + "x":-6.67196, + "y":-1.87831 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "ADDER-8", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT-8", + "ID":749386852, + "Position":{ + "x":8.97043, + "y":0.49102 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + } + ], + "Size": { + "x": 1.44, + "y": 1.38 + }, + "SubChips":[ + { + "Name":"ADDER-4", + "ID":305140686, + "Label":null, + "Position":{ + "x":0.37383, + "y":-0.6228 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1319151723},{"PinColour":0,"PinID":146298398}], + "InternalData":null + }, + { + "Name":"8-4BIT", + "ID":1221915178, + "Label":null, + "Position":{ + "x":-3.82788, + "y":1.71595 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"8-4BIT", + "ID":1849231948, + "Label":null, + "Position":{ + "x":-3.93347, + "y":0.10032 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"4-8BIT", + "ID":536193666, + "Label":null, + "Position":{ + "x":5.82, + "y":0.445 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"ADDER-4", + "ID":776611734, + "Label":"", + "Position":{ + "x":3.21594, + "y":1.44721 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1319151723},{"PinColour":0,"PinID":146298398}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1729060963 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1221915178 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":751222821 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1849231948 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1849231948 + }, + "TargetPinAddress":{ + "PinID":21685109, + "PinOwnerID":305140686 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1221915178 + }, + "TargetPinAddress":{ + "PinID":1102331041, + "PinOwnerID":305140686 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":536193666 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":749386852 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":146298398, + "PinOwnerID":305140686 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":536193666 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":833981293 + }, + "TargetPinAddress":{ + "PinID":601345531, + "PinOwnerID":305140686 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1221915178 + }, + "TargetPinAddress":{ + "PinID":1102331041, + "PinOwnerID":776611734 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1849231948 + }, + "TargetPinAddress":{ + "PinID":21685109, + "PinOwnerID":776611734 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":146298398, + "PinOwnerID":776611734 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":536193666 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1319151723, + "PinOwnerID":305140686 + }, + "TargetPinAddress":{ + "PinID":601345531, + "PinOwnerID":776611734 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ADDER.json b/TestData/Projects/MainTest/Chips/ADDER.json new file mode 100644 index 00000000..c9159b1b --- /dev/null +++ b/TestData/Projects/MainTest/Chips/ADDER.json @@ -0,0 +1,302 @@ +{ + "Name": "ADDER", + "NameLocation": 0, + "Size": { + "x": 1.14, + "y": 0.88 + }, + "Colour": { + "r": 0.37956363, + "g": 0.7938405, + "b": 0.106996849, + "a": 1 + }, + "InputPins":[ + { + "Name":"A", + "ID":1807442703, + "Position":{ + "x":-7.83871, + "y":0.33871 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"B", + "ID":1488754317, + "Position":{ + "x":-7.83871, + "y":-0.16129 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"CARRY", + "ID":1514297445, + "Position":{ + "x":-7.83871, + "y":-0.66129 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"SUM", + "ID":1109549932, + "Position":{ + "x":7.46774, + "y":0.24194 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"CARRY", + "ID":2093446574, + "Position":{ + "x":7.46774, + "y":-0.25806 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"XOR", + "ID":2030673966, + "Label":null, + "Position":{ + "x":-2.64516, + "y":2.74194 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"XOR", + "ID":1565222035, + "Label":null, + "Position":{ + "x":0.5, + "y":2.30613 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND", + "ID":1883614759, + "Label":null, + "Position":{ + "x":-3.08064, + "y":-1.93548 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND", + "ID":1164280754, + "Label":null, + "Position":{ + "x":-1.0, + "y":0.66097 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"OR", + "ID":1898954727, + "Label":null, + "Position":{ + "x":2.16129, + "y":-0.87097 + }, + "OutputPinColourInfo":null, + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1807442703 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":2030673966 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.07471,"y":0.33871},{"x":-2.90349,"y":2.90194}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1488754317 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":2030673966 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.07471,"y":-0.16129},{"x":-2.90349,"y":2.58194}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":2030673966 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":1565222035 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.38683,"y":2.74194},{"x":0.24167,"y":2.46613}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1514297445 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":1565222035 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.07471,"y":-0.66129},{"x":0.24167,"y":2.14613}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":2030673966 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1164280754 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.38683,"y":2.74194},{"x":-1.45333,"y":0.82097}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1514297445 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1164280754 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.07471,"y":-0.66129},{"x":-1.45333,"y":0.50097}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1164280754 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1898954727 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-0.54667,"y":0.66097},{"x":1.90296,"y":-0.71097}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":1565222035 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1109549932 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.75833,"y":2.30613},{"x":6.70374,"y":0.24194}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1898954727 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2093446574 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":2.41962,"y":-0.87097},{"x":6.70374,"y":-0.25806}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1883614759 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1898954727 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.62731,"y":-1.93548},{"x":1.90296,"y":-1.03097}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1807442703 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1883614759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.07471,"y":0.33871},{"x":-3.53398,"y":-1.77548}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1488754317 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1883614759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-7.07471,"y":-0.16129},{"x":-3.53398,"y":-2.09548}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ALU-8.json b/TestData/Projects/MainTest/Chips/ALU-8.json new file mode 100644 index 00000000..7a48b2ed --- /dev/null +++ b/TestData/Projects/MainTest/Chips/ALU-8.json @@ -0,0 +1,1076 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.364388466, + "g": 0.661146164, + "b": 0.09356893, + "a": 1 + }, + "Displays":[], + "InputPins":[ + { + "Name":"IN-8", + "ID":1327939519, + "Position":{ + "x":-7.13983, + "y":0.73219 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":2 + }, + { + "Name":"IN-8", + "ID":297829662, + "Position":{ + "x":-6.94087, + "y":-0.89107 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":2 + }, + { + "Name":"OP 2", + "ID":441446737, + "Position":{ + "x":-6.17506, + "y":-4.02652 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OP 1", + "ID":1047676952, + "Position":{ + "x":-6.2717, + "y":-4.82089 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OP 0", + "ID":967634411, + "Position":{ + "x":-6.25442, + "y":-5.5296 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUTPUT", + "ID":1427344851, + "Position":{ + "x":-6.24714, + "y":-7.036 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "ALU-8", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT-8", + "ID":1627170817, + "Position":{ + "x":12.15107, + "y":0.1688 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":2 + }, + { + "Name":"ZERO", + "ID":333324187, + "Position":{ + "x":16.30136, + "y":-2.59547 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.13875, + "y": 2.66 + }, + "SubChips":[ + { + "Name":"ADDER-8", + "ID":210509603, + "Label":null, + "Position":{ + "x":1.06422, + "y":0.86066 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":749386852}], + "InternalData":null + }, + { + "Name":"BUF-8", + "ID":750183646, + "Label":null, + "Position":{ + "x":8.91298, + "y":0.09473 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + }, + { + "Name":"MUX-8", + "ID":2144426446, + "Label":null, + "Position":{ + "x":-1.13757, + "y":-0.25926 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1454394007}], + "InternalData":null + }, + { + "Name":"NOT-8", + "ID":653394963, + "Label":null, + "Position":{ + "x":-2.94709, + "y":-0.90476 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1110230845, + "Label":null, + "Position":{ + "x":11.54812, + "y":-2.14092 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":908121143, + "Label":null, + "Position":{ + "x":11.57409, + "y":-3.3617 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":2122404623, + "Label":null, + "Position":{ + "x":12.3663, + "y":-2.6604 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":269828490, + "Label":null, + "Position":{ + "x":10.48318, + "y":-1.11495 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1087573095, + "Label":null, + "Position":{ + "x":10.56111, + "y":-2.2578 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":547399141, + "Label":null, + "Position":{ + "x":10.61305, + "y":-3.30975 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1687291062, + "Label":null, + "Position":{ + "x":10.56993, + "y":-4.28461 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":254341203, + "Label":null, + "Position":{ + "x":13.63903, + "y":-2.62144 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"AND-8", + "ID":1205822799, + "Label":null, + "Position":{ + "x":1.13087, + "y":2.45763 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], + "InternalData":null + }, + { + "Name":"OR-8", + "ID":1405759006, + "Label":null, + "Position":{ + "x":1.11216, + "y":4.05083 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], + "InternalData":null + }, + { + "Name":"LSHIFT-8", + "ID":808664680, + "Label":null, + "Position":{ + "x":1.19729, + "y":5.57412 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], + "InternalData":null + }, + { + "Name":"DECODE-3", + "ID":1966580722, + "Label":null, + "Position":{ + "x":-3.23646, + "y":-3.99524 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":548795871},{"PinColour":0,"PinID":419649701},{"PinColour":0,"PinID":2005481858},{"PinColour":0,"PinID":263290457},{"PinColour":0,"PinID":1713538532},{"PinColour":0,"PinID":1298532213},{"PinColour":0,"PinID":376244540},{"PinColour":0,"PinID":1524048856}], + "InternalData":null + }, + { + "Name":"OR", + "ID":39935939, + "Label":null, + "Position":{ + "x":2.55163, + "y":-1.3228 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"BUF-8", + "ID":395509802, + "Label":null, + "Position":{ + "x":4.20147, + "y":5.40327 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + }, + { + "Name":"BUF-8", + "ID":1018612812, + "Label":null, + "Position":{ + "x":4.33976, + "y":3.77841 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + }, + { + "Name":"BUF-8", + "ID":947471480, + "Label":null, + "Position":{ + "x":4.35704, + "y":2.18813 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + }, + { + "Name":"BUF-8", + "ID":1797610677, + "Label":null, + "Position":{ + "x":4.13233, + "y":0.71884 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + }, + { + "Name":"BUS-8", + "ID":1609842756, + "Label":null, + "Position":{ + "x":6.23773, + "y":7.04196 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], + "InternalData":[145739087] + }, + { + "Name":"BUS-TERMINUS-8", + "ID":145739087, + "Label":null, + "Position":{ + "x":7.5307, + "y":-1.2863 + }, + "OutputPinColourInfo":[], + "InternalData":[1609842756] + }, + { + "Name":"8-1BIT", + "ID":66370649, + "Label":"", + "Position":{ + "x":8.21079, + "y":-2.93836 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":750183646 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1627170817 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2004659665, + "PinOwnerID":653394963 + }, + "TargetPinAddress":{ + "PinID":1796221764, + "PinOwnerID":2144426446 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1454394007, + "PinOwnerID":2144426446 + }, + "TargetPinAddress":{ + "PinID":751222821, + "PinOwnerID":210509603 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":908121143 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":2122404623 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1110230845 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":2122404623 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":269828490 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1110230845 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1087573095 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1110230845 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":547399141 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":908121143 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1687291062 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":908121143 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":2122404623 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":254341203 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":254341203 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":333324187 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":967634411 + }, + "TargetPinAddress":{ + "PinID":2056213031, + "PinOwnerID":1966580722 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1047676952 + }, + "TargetPinAddress":{ + "PinID":596982594, + "PinOwnerID":1966580722 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":441446737 + }, + "TargetPinAddress":{ + "PinID":1280552766, + "PinOwnerID":1966580722 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1327939519 + }, + "TargetPinAddress":{ + "PinID":1888645677, + "PinOwnerID":808664680 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-5.28838,"y":0.73219},{"x":-5.28838,"y":5.64527},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1327939519 + }, + "TargetPinAddress":{ + "PinID":1888645677, + "PinOwnerID":1405759006 + }, + "ConnectionType":1, + "ConnectedWireIndex":14, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-5.28838,"y":4.29698},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1327939519 + }, + "TargetPinAddress":{ + "PinID":1888645677, + "PinOwnerID":1205822799 + }, + "ConnectionType":1, + "ConnectedWireIndex":14, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-5.28838,"y":2.67213},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":297829662 + }, + "TargetPinAddress":{ + "PinID":1888645677, + "PinOwnerID":653394963 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":297829662 + }, + "TargetPinAddress":{ + "PinID":955458786, + "PinOwnerID":1405759006 + }, + "ConnectionType":1, + "ConnectedWireIndex":17, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.70105,"y":-0.89774},{"x":-4.70105,"y":3.74384},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":297829662 + }, + "TargetPinAddress":{ + "PinID":955458786, + "PinOwnerID":1205822799 + }, + "ConnectionType":1, + "ConnectedWireIndex":18, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.70105,"y":2.17263},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2004659665, + "PinOwnerID":808664680 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":395509802 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2004659665, + "PinOwnerID":1405759006 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":1018612812 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2004659665, + "PinOwnerID":1205822799 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":947471480 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":749386852, + "PinOwnerID":210509603 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":1797610677 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":39935939 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":1797610677 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1609842756 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":145739087 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.92224,"y":7.07999},{"x":6.61802,"y":-1.36236},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1609842756 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":750183646 + }, + "ConnectionType":1, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":6.68056,"y":0.37322},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":395509802 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1609842756 + }, + "ConnectionType":2, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.0,"y":0.0},{"x":6.85848,"y":5.31053}] + }, + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":1018612812 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1609842756 + }, + "ConnectionType":2, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.0,"y":0.0},{"x":6.79887,"y":3.65638}] + }, + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":947471480 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1609842756 + }, + "ConnectionType":2, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.0,"y":0.0},{"x":6.74542,"y":2.17313}] + }, + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":1797610677 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1609842756 + }, + "ConnectionType":2, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.0,"y":0.0},{"x":6.69542,"y":0.78552}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1327939519 + }, + "TargetPinAddress":{ + "PinID":1729060963, + "PinOwnerID":210509603 + }, + "ConnectionType":1, + "ConnectedWireIndex":14, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-5.28838,"y":1.35669},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":297829662 + }, + "TargetPinAddress":{ + "PinID":480667918, + "PinOwnerID":2144426446 + }, + "ConnectionType":1, + "ConnectedWireIndex":18, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.70105,"y":0.32468},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1427344851 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":750183646 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.46577,"y":-7.036},{"x":4.46577,"y":0.08487},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1524048856, + "PinOwnerID":1966580722 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":39935939 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.59575,"y":-5.11524},{"x":1.59575,"y":-1.47525},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":376244540, + "PinOwnerID":1966580722 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":39935939 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.33082,"y":-4.79524},{"x":1.33082,"y":-1.18089},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":376244540, + "PinOwnerID":1966580722 + }, + "TargetPinAddress":{ + "PinID":833981293, + "PinOwnerID":210509603 + }, + "ConnectionType":1, + "ConnectedWireIndex":35, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.03961,"y":-4.7921},{"x":-2.03961,"y":-1.04842},{"x":-0.12627,"y":-1.04842},{"x":-0.12627,"y":0.33507},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":376244540, + "PinOwnerID":1966580722 + }, + "TargetPinAddress":{ + "PinID":1880005784, + "PinOwnerID":2144426446 + }, + "ConnectionType":1, + "ConnectedWireIndex":36, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.84828,"y":-1.04842},{"x":-1.84828,"y":-0.81294},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1298532213, + "PinOwnerID":1966580722 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":947471480 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.09533,"y":-4.47524},{"x":1.09533,"y":-0.87181},{"x":2.87622,"y":-0.87181},{"x":2.87622,"y":1.9099},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1713538532, + "PinOwnerID":1966580722 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":1018612812 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.83041,"y":-4.15524},{"x":0.83041,"y":-0.4597},{"x":2.49355,"y":-0.4597},{"x":2.49355,"y":3.47002},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":263290457, + "PinOwnerID":1966580722 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":395509802 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.5802,"y":-3.83524},{"x":0.5802,"y":-0.10647},{"x":2.24334,"y":-0.10647},{"x":2.24334,"y":5.089},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1609842756 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":66370649 + }, + "ConnectionType":1, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":6.63959,"y":-0.76367},{"x":5.63429,"y":-0.86014},{"x":5.57353,"y":-2.91405},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":66370649 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":269828490 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":66370649 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":269828490 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":66370649 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1087573095 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":66370649 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1087573095 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":66370649 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":547399141 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":66370649 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":547399141 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":66370649 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1687291062 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":66370649 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1687291062 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/ALU.json b/TestData/Projects/MainTest/Chips/ALU.json new file mode 100644 index 00000000..6caba37d --- /dev/null +++ b/TestData/Projects/MainTest/Chips/ALU.json @@ -0,0 +1,383 @@ +{ + "Name": "ALU", + "NameLocation": 0, + "Size": { + "x": 1.13875, + "y": 1.0 + }, + "Colour": { + "r": 0.253999025, + "g": 0.522814035, + "b": 0.291864455, + "a": 1 + }, + "InputPins":[ + { + "Name":"A", + "ID":320227374, + "Position":{ + "x":-12.54107, + "y":2.37772 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"B", + "ID":1514224661, + "Position":{ + "x":-12.45704, + "y":0.1089 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"SUBTRACT", + "ID":2015026118, + "Position":{ + "x":-13.87825, + "y":-3.23053 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT-4", + "ID":683281904, + "Position":{ + "x":1.89023, + "y":-0.09559 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":1 + } + ], + "SubChips":[ + { + "Name":"ADDER-4", + "ID":855181434, + "Label":"", + "Position":{ + "x":-2.11552, + "y":1.45849 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1319151723},{"PinColour":0,"PinID":146298398}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":1346654530, + "Label":"", + "Position":{ + "x":-7.9433, + "y":-0.5377 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":60757665, + "Label":"", + "Position":{ + "x":-7.9433, + "y":-1.59607 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":913414415, + "Label":"", + "Position":{ + "x":-7.9433, + "y":-2.68124 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":1934334688, + "Label":"", + "Position":{ + "x":-7.87631, + "y":-3.67264 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"4-1BIT", + "ID":1825881766, + "Label":"", + "Position":{ + "x":-10.328, + "y":0.09197 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4}], + "InternalData":null + }, + { + "Name":"1-4BIT", + "ID":793825698, + "Label":"", + "Position":{ + "x":-4.86195, + "y":0.56087 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":320227374 + }, + "TargetPinAddress":{ + "PinID":1102331041, + "PinOwnerID":855181434 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1514224661 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1825881766 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1825881766 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":1346654530 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1825881766 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":60757665 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":1825881766 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":913414415 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1825881766 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":1934334688 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2015026118 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":1934334688 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2015026118 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":1346654530 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-8.80112,"y":-3.76965},{"x":-8.81412,"y":-0.5109},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2015026118 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":60757665 + }, + "ConnectionType":1, + "ConnectedWireIndex":7, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-8.81011,"y":-1.51557},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2015026118 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":913414415 + }, + "ConnectionType":1, + "ConnectedWireIndex":7, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-8.80471,"y":-2.86877},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":1346654530 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":793825698 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":60757665 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":793825698 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":913414415 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":793825698 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":1934334688 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":793825698 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":793825698 + }, + "TargetPinAddress":{ + "PinID":21685109, + "PinOwnerID":855181434 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":146298398, + "PinOwnerID":855181434 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":683281904 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2015026118 + }, + "TargetPinAddress":{ + "PinID":601345531, + "PinOwnerID":855181434 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-9.30733,"y":-3.70637},{"x":-9.32321,"y":-4.40948},{"x":-4.21888,"y":-4.43628},{"x":-3.52223,"y":0.86901},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AMFsdf.json b/TestData/Projects/MainTest/Chips/AMFsdf.json new file mode 100644 index 00000000..97484b2f --- /dev/null +++ b/TestData/Projects/MainTest/Chips/AMFsdf.json @@ -0,0 +1,33 @@ +{ + "Name": "AMFsdf", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.025, + "y": 0.375 + }, + "Colour": { + "r": 0.739096463, + "g": 0.53381747, + "b": 0.150521308, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"SDFS", + "ID":1021676828, + "Label":"", + "Position":{ + "x":-2.02778, + "y":-1.61806 + }, + "OutputPinColourInfo":[], + "InternalData":null + } + ], + "Wires":[], + "Displays": null, + "Notes": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AND(8,1).json b/TestData/Projects/MainTest/Chips/AND(8,1).json new file mode 100644 index 00000000..8befc5a3 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/AND(8,1).json @@ -0,0 +1,531 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.136593089, + "g": 0.3923463, + "b": 0.439328521, + "a": 1 + }, + "Displays":[], + "InputPins":[ + { + "Name":"IN-8", + "ID":1888645677, + "Position":{ + "x":-8.15344, + "y":0.4709 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":1465123542, + "Position":{ + "x":-7.63492, + "y":-2.65079 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "AND(8,1)", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT-8", + "ID":2004659665, + "Position":{ + "x":7.21164, + "y":-0.42857 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.59, + "y": 0.81 + }, + "SubChips":[ + { + "Name":"AND", + "ID":1470138075, + "Label":null, + "Position":{ + "x":-0.53439, + "y":2.03704 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":193892730, + "Label":null, + "Position":{ + "x":-0.53439, + "y":1.32704 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1489292450, + "Label":null, + "Position":{ + "x":-0.53439, + "y":0.61704 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1216737037, + "Label":null, + "Position":{ + "x":-0.53439, + "y":-0.09296 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1112718096, + "Label":null, + "Position":{ + "x":-0.53439, + "y":-0.80296 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":236554209, + "Label":null, + "Position":{ + "x":-0.53439, + "y":-1.51296 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":642953999, + "Label":null, + "Position":{ + "x":-0.53439, + "y":-2.22296 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":849942283, + "Label":null, + "Position":{ + "x":-0.53439, + "y":-2.93296 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"1-8BIT", + "ID":2089889814, + "Label":"", + "Position":{ + "x":2.26479, + "y":-0.3948 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":979628192, + "Label":"", + "Position":{ + "x":-5.08946, + "y":0.45803 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1465123542 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":849942283 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1465123542 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1470138075 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.73787,"y":-3.00063},{"x":-1.55026,"y":1.86772},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1465123542 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":193892730 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.57721,"y":1.1683},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1465123542 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1489292450 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.60366,"y":0.48191},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1465123542 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1216737037 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.62936,"y":-0.18499},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1465123542 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1112718096 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.65547,"y":-0.86245},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1465123542 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":236554209 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.67506,"y":-1.37087},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1465123542 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":642953999 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.70028,"y":-2.02515},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":2089889814 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2004659665 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1470138075 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2089889814 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":193892730 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":2089889814 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1489292450 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":2089889814 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1216737037 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":2089889814 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1112718096 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":2089889814 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":236554209 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":2089889814 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":642953999 + }, + "TargetPinAddress":{ + "PinID":6, + "PinOwnerID":2089889814 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":849942283 + }, + "TargetPinAddress":{ + "PinID":7, + "PinOwnerID":2089889814 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1888645677 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":979628192 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":979628192 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1470138075 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":979628192 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":193892730 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":979628192 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1489292450 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":979628192 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1216737037 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":979628192 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1112718096 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":979628192 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":236554209 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":979628192 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":642953999 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":979628192 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":849942283 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AND-3.json b/TestData/Projects/MainTest/Chips/AND-3.json new file mode 100644 index 00000000..c0f07f98 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/AND-3.json @@ -0,0 +1,160 @@ +{ + "Name": "AND-3", + "NameLocation": 0, + "Size": { + "x": 1.14, + "y": 0.88 + }, + "Colour": { + "r": 0.122747, + "g": 0.026175959, + "b": 0.36796695, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":467491006, + "Position":{ + "x":-5.34238, + "y":0.9268 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":1468640844, + "Position":{ + "x":-5.31877, + "y":0.14758 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":1821303806, + "Position":{ + "x":-5.30697, + "y":-1.02125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":979024900, + "Position":{ + "x":6.16883, + "y":0.01771 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"AND", + "ID":1835869044, + "Label":null, + "Position":{ + "x":0.06493, + "y":0.84416 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND", + "ID":185473484, + "Label":null, + "Position":{ + "x":1.2928, + "y":-0.43093 + }, + "OutputPinColourInfo":null, + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":467491006 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1835869044 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-4.57838,"y":0.9268},{"x":-0.3884,"y":1.00416}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1468640844 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1835869044 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-4.55477,"y":0.14758},{"x":-0.3884,"y":0.68416}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1835869044 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":185473484 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.51827,"y":0.84416},{"x":0.83946,"y":-0.27093}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1821303806 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":185473484 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-4.54297,"y":-1.02125},{"x":0.83946,"y":-0.59093}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":185473484 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":979024900 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.74613,"y":-0.43093},{"x":5.40483,"y":0.01771}] + } + ], + "Displays": null, + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AND-8.json b/TestData/Projects/MainTest/Chips/AND-8.json new file mode 100644 index 00000000..50ed4a62 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/AND-8.json @@ -0,0 +1,556 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.581735969, + "g": 0.8893554, + "b": 0.9458656, + "a": 1 + }, + "Displays": null, + "InputPins":[ + { + "Name":"IN-8", + "ID":1888645677, + "Position":{ + "x":-8.25, + "y":0.4375 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN-8", + "ID":955458786, + "Position":{ + "x":-8.25, + "y":-2.625 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "AND-8", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT-8", + "ID":2004659665, + "Position":{ + "x":6.0, + "y":-0.4375 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.14, + "y": 1.06 + }, + "SubChips":[ + { + "Name":"AND", + "ID":1470138075, + "Label":null, + "Position":{ + "x":-0.64, + "y":1.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":193892730, + "Label":null, + "Position":{ + "x":-0.64, + "y":0.5625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1489292450, + "Label":null, + "Position":{ + "x":-0.64, + "y":-0.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1216737037, + "Label":null, + "Position":{ + "x":-0.64, + "y":-0.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1112718096, + "Label":null, + "Position":{ + "x":-0.64, + "y":-1.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":236554209, + "Label":null, + "Position":{ + "x":-0.64, + "y":-2.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":642953999, + "Label":null, + "Position":{ + "x":-0.64, + "y":-2.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":849942283, + "Label":null, + "Position":{ + "x":-0.64, + "y":-3.5625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":565348294, + "Label":"", + "Position":{ + "x":-4.9275, + "y":-2.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":160348200, + "Label":"", + "Position":{ + "x":-4.9275, + "y":0.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"1-8BIT", + "ID":1298006079, + "Label":"", + "Position":{ + "x":3.1975, + "y":-0.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":955458786 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":565348294 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.91959,"y":-2.65079},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":565348294 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":849942283 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":565348294 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":642953999 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":565348294 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":236554209 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":565348294 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1112718096 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":565348294 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1216737037 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":565348294 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1489292450 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":565348294 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":193892730 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":565348294 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1470138075 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1888645677 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":160348200 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":160348200 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1470138075 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":160348200 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":193892730 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":160348200 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1489292450 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":160348200 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1216737037 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":160348200 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1112718096 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":160348200 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":236554209 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":160348200 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":642953999 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":160348200 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":849942283 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1298006079 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2004659665 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1470138075 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1298006079 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":193892730 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1298006079 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1489292450 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":1298006079 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1216737037 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":1298006079 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1112718096 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":1298006079 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":236554209 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":1298006079 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":642953999 + }, + "TargetPinAddress":{ + "PinID":6, + "PinOwnerID":1298006079 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":849942283 + }, + "TargetPinAddress":{ + "PinID":7, + "PinOwnerID":1298006079 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/AND.json b/TestData/Projects/MainTest/Chips/AND.json new file mode 100644 index 00000000..9f343dfc --- /dev/null +++ b/TestData/Projects/MainTest/Chips/AND.json @@ -0,0 +1,149 @@ +{ + "Name": "AND", + "NameLocation": 0, + "Size": { + "x": 0.7, + "y": 0.5 + }, + "Colour": { + "r": 0.2440358, + "g": 0.57116735, + "b": 0.6800216, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":436332053, + "Position":{ + "x":-7.46774, + "y":1.25806 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":123456040, + "Position":{ + "x":-7.32258, + "y":-0.64516 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":1580367471, + "Position":{ + "x":5.43548, + "y":0.08065 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NAND", + "ID":910879205, + "Label":null, + "Position":{ + "x":-2.58065, + "y":0.08065 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1120748047, + "Label":null, + "Position":{ + "x":0.41935, + "y":-0.03226 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":436332053 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":910879205 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":123456040 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":910879205 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":910879205 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1120748047 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":910879205 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1120748047 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1120748047 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1580367471 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/BUF-8.json b/TestData/Projects/MainTest/Chips/BUF-8.json new file mode 100644 index 00000000..e84310e9 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/BUF-8.json @@ -0,0 +1,531 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.7371017, + "g": 0.401405752, + "b": 0.299559683, + "a": 1 + }, + "Displays":[], + "InputPins":[ + { + "Name":"IN-8", + "ID":581914641, + "Position":{ + "x":-6.11111, + "y":1.37037 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ENABLE", + "ID":1901197910, + "Position":{ + "x":-6.284, + "y":-2.52 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "BUF-8", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT-8", + "ID":158720235, + "Position":{ + "x":8.44974, + "y":0.41799 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.29, + "y": 0.81 + }, + "SubChips":[ + { + "Name":"3-STATE BUFFER", + "ID":2144949054, + "Label":null, + "Position":{ + "x":0.84, + "y":2.94 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":1311967221, + "Label":null, + "Position":{ + "x":0.84, + "y":2.1 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":477501529, + "Label":null, + "Position":{ + "x":0.84, + "y":1.38 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":1620998320, + "Label":null, + "Position":{ + "x":0.84, + "y":0.66 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":708409194, + "Label":null, + "Position":{ + "x":0.84, + "y":-0.06 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":284780235, + "Label":null, + "Position":{ + "x":0.84, + "y":-0.9 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":675217250, + "Label":null, + "Position":{ + "x":0.84, + "y":-1.62 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":1617427347, + "Label":null, + "Position":{ + "x":0.84, + "y":-2.34 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"1-8BIT", + "ID":726605413, + "Label":"", + "Position":{ + "x":3.93082, + "y":0.42727 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":723597622, + "Label":"", + "Position":{ + "x":-3.23156, + "y":1.42618 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1901197910 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1617427347 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1901197910 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":2144949054 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.44975,"y":-2.52678},{"x":-0.44974,"y":2.79894},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1901197910 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1311967221 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.44974,"y":1.91005},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1901197910 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":477501529 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.44974,"y":1.26455},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1901197910 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1620998320 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.44974,"y":0.51323},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1901197910 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":284780235 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.44975,"y":-1.06349},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1901197910 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":708409194 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.44975,"y":-0.21693},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1901197910 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":675217250 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.44975,"y":-1.91005},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":726605413 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":158720235 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":2144949054 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":726605413 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1311967221 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":726605413 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":477501529 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":726605413 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1620998320 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":726605413 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":708409194 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":726605413 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":284780235 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":726605413 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":675217250 + }, + "TargetPinAddress":{ + "PinID":6, + "PinOwnerID":726605413 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1617427347 + }, + "TargetPinAddress":{ + "PinID":7, + "PinOwnerID":726605413 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":581914641 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":723597622 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":723597622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2144949054 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":723597622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1311967221 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":723597622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":477501529 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":723597622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1620998320 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":723597622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":708409194 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":723597622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":284780235 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":723597622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":675217250 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":723597622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1617427347 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/BUS BUFFER.json b/TestData/Projects/MainTest/Chips/BUS BUFFER.json new file mode 100644 index 00000000..284319d9 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/BUS BUFFER.json @@ -0,0 +1,319 @@ +{ + "Name": "BUS BUFFER", + "NameLocation": 0, + "Size": { + "x": 1.3175, + "y": 0.625 + }, + "Colour": { + "r": 0.139160484, + "g": 0.139160484, + "b": 0.139160484, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN-4", + "ID":2012805953, + "Position":{ + "x":-6.49568, + "y":1.84125 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ENABLE", + "ID":731095980, + "Position":{ + "x":-6.42009, + "y":-0.89093 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT-4", + "ID":813273076, + "Position":{ + "x":7.35961, + "y":-0.19978 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"3-STATE BUFFER", + "ID":1500722116, + "Label":"", + "Position":{ + "x":0.81533, + "y":2.03564 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":212526182, + "Label":"", + "Position":{ + "x":0.81533, + "y":0.64255 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":646273101, + "Label":"", + "Position":{ + "x":0.81533, + "y":-0.80454 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":1425529248, + "Label":"", + "Position":{ + "x":0.76134, + "y":-2.33801 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"4-1BIT", + "ID":581313038, + "Label":"", + "Position":{ + "x":-4.00108, + "y":1.84125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4}], + "InternalData":null + }, + { + "Name":"1-4BIT", + "ID":1987940987, + "Label":"", + "Position":{ + "x":4.84341, + "y":-0.18898 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1987940987 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":813273076 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1500722116 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1987940987 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":212526182 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1987940987 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":646273101 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":1987940987 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1425529248 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":1987940987 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2012805953 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":581313038 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":581313038 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1500722116 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":581313038 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":212526182 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":581313038 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":646273101 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":581313038 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1425529248 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":731095980 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1500722116 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":731095980 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":212526182 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":731095980 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":646273101 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":731095980 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1425529248 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/CONTROL UNIT.json b/TestData/Projects/MainTest/Chips/CONTROL UNIT.json new file mode 100644 index 00000000..e33291d0 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/CONTROL UNIT.json @@ -0,0 +1,975 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.0240214523, + "g": 0.0374177881, + "b": 0.0440898, + "a": 1 + }, + "Displays":[], + "InputPins":[ + { + "Name":"IN-8", + "ID":2007797370, + "Position":{ + "x":-7.01889, + "y":0.06493 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ZERO FLAG", + "ID":1428445592, + "Position":{ + "x":-7.21818, + "y":-1.52893 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ENABLE", + "ID":1263555528, + "Position":{ + "x":-7.18525, + "y":-3.28538 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "CONTROL UNIT", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"HALT", + "ID":1151713402, + "Position":{ + "x":14.71855, + "y":6.97404 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ALU USECONST", + "ID":349361804, + "Position":{ + "x":14.71152, + "y":6.48187 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"PC STORE", + "ID":883528113, + "Position":{ + "x":14.7859, + "y":5.81726 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"DISP WRITE", + "ID":1590314579, + "Position":{ + "x":14.804, + "y":5.16 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"DISP REG STORE", + "ID":1175090400, + "Position":{ + "x":14.804, + "y":4.56 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"RAM IN", + "ID":805153383, + "Position":{ + "x":14.804, + "y":3.96 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"RAM ADDR IN", + "ID":1401872117, + "Position":{ + "x":14.804, + "y":3.24 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"B IN", + "ID":1118858130, + "Position":{ + "x":14.804, + "y":2.64 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"A IN", + "ID":742048505, + "Position":{ + "x":14.804, + "y":2.04 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"CONST OUT", + "ID":1476868706, + "Position":{ + "x":14.804, + "y":0.72 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"RAM OUT", + "ID":87848670, + "Position":{ + "x":14.804, + "y":0.12 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"B OUT", + "ID":288562873, + "Position":{ + "x":14.84395, + "y":-0.54739 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"A OUT", + "ID":1148046748, + "Position":{ + "x":14.84395, + "y":-1.14739 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ALU OUT", + "ID":1249996143, + "Position":{ + "x":14.804, + "y":-1.82484 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ALU OP 2", + "ID":1157119205, + "Position":{ + "x":7.69822, + "y":-6.09362 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ALU OP 1", + "ID":845055315, + "Position":{ + "x":7.69822, + "y":-6.62862 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ALU OP 0", + "ID":895153575, + "Position":{ + "x":7.69822, + "y":-7.16362 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.515, + "y": 5.68 + }, + "SubChips":[ + { + "Name":"ROM 256×16", + "ID":130543641, + "Label":null, + "Position":{ + "x":-3.80078, + "y":0.05949 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], + "InternalData":[576,4672,577,4673,65,4161,580,578,4674,579,4675,8,16,24,832,768,704,1344,1280,1152,1664,1856,2368,2176,2240,2688,2752,3072,32768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + }, + { + "Name":"BUF-8", + "ID":816138141, + "Label":null, + "Position":{ + "x":-1.0145, + "y":-2.8662 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + }, + { + "Name":"BUF-8", + "ID":1166732195, + "Label":null, + "Position":{ + "x":-1.08917, + "y":0.39476 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + }, + { + "Name":"OR", + "ID":272005737, + "Label":null, + "Position":{ + "x":15.02063, + "y":-4.68096 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"AND", + "ID":511212918, + "Label":null, + "Position":{ + "x":10.54101, + "y":-4.35941 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":4577975, + "Label":null, + "Position":{ + "x":10.25627, + "y":-3.29937 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"AND", + "ID":140163774, + "Label":null, + "Position":{ + "x":12.11958, + "y":-3.44645 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"DECODE-3", + "ID":976628967, + "Label":null, + "Position":{ + "x":6.70395, + "y":-3.50876 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":548795871},{"PinColour":0,"PinID":419649701},{"PinColour":0,"PinID":2005481858},{"PinColour":0,"PinID":263290457},{"PinColour":0,"PinID":1713538532},{"PinColour":0,"PinID":1298532213},{"PinColour":0,"PinID":376244540},{"PinColour":0,"PinID":1524048856}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1386501746, + "Label":null, + "Position":{ + "x":13.36598, + "y":-4.29898 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"DECODE-3", + "ID":2103494348, + "Label":null, + "Position":{ + "x":6.67403, + "y":-0.59526 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":548795871},{"PinColour":0,"PinID":419649701},{"PinColour":0,"PinID":2005481858},{"PinColour":0,"PinID":263290457},{"PinColour":0,"PinID":1713538532},{"PinColour":0,"PinID":1298532213},{"PinColour":0,"PinID":376244540},{"PinColour":0,"PinID":1524048856}], + "InternalData":null + }, + { + "Name":"DECODE-3", + "ID":1001127185, + "Label":null, + "Position":{ + "x":6.77682, + "y":2.34261 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":548795871},{"PinColour":0,"PinID":419649701},{"PinColour":0,"PinID":2005481858},{"PinColour":0,"PinID":263290457},{"PinColour":0,"PinID":1713538532},{"PinColour":0,"PinID":1298532213},{"PinColour":0,"PinID":376244540},{"PinColour":0,"PinID":1524048856}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":283466863, + "Label":"", + "Position":{ + "x":1.64181, + "y":-4.02907 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":1299497338, + "Label":"", + "Position":{ + "x":0.74495, + "y":0.52657 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2007797370 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":130543641 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":130543641 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":816138141 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":130543641 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":1166732195 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1263555528 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":816138141 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1263555528 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":1166732195 + }, + "ConnectionType":1, + "ConnectedWireIndex":3, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.13682,"y":-3.15985},{"x":-2.19808,"y":0.20574},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":4577975 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":140163774 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1428445592 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":4577975 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.92438,"y":-1.52893},{"x":-3.92438,"y":-7.8291},{"x":8.89459,"y":-7.8291},{"x":8.89459,"y":-3.3303},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":376244540, + "PinOwnerID":976628967 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":272005737 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":8.23976,"y":-4.30876},{"x":8.23976,"y":-4.77332},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1386501746 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":272005737 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":140163774 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1386501746 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":511212918 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1386501746 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1428445592 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":511212918 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":8.89459,"y":-4.5901},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1298532213, + "PinOwnerID":976628967 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":511212918 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1713538532, + "PinOwnerID":976628967 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":140163774 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":376244540, + "PinOwnerID":1001127185 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":742048505 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1298532213, + "PinOwnerID":1001127185 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1118858130 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1713538532, + "PinOwnerID":1001127185 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1401872117 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":263290457, + "PinOwnerID":1001127185 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":805153383 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2005481858, + "PinOwnerID":1001127185 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1175090400 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":419649701, + "PinOwnerID":1001127185 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1590314579 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":272005737 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":883528113 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":15.97975,"y":-4.68096},{"x":15.97975,"y":6.23293},{"x":12.52865,"y":6.23293},{"x":12.52865,"y":5.83553},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":376244540, + "PinOwnerID":2103494348 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1249996143 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1298532213, + "PinOwnerID":2103494348 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1148046748 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1713538532, + "PinOwnerID":2103494348 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":288562873 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":263290457, + "PinOwnerID":2103494348 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":87848670 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2005481858, + "PinOwnerID":2103494348 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1476868706 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":816138141 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":283466863 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":283466863 + }, + "TargetPinAddress":{ + "PinID":596982594, + "PinOwnerID":2103494348 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":283466863 + }, + "TargetPinAddress":{ + "PinID":2056213031, + "PinOwnerID":2103494348 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":283466863 + }, + "TargetPinAddress":{ + "PinID":1280552766, + "PinOwnerID":976628967 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":283466863 + }, + "TargetPinAddress":{ + "PinID":596982594, + "PinOwnerID":976628967 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":283466863 + }, + "TargetPinAddress":{ + "PinID":2056213031, + "PinOwnerID":976628967 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":283466863 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1157119205 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":283466863 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":845055315 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":283466863 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":895153575 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":1166732195 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1299497338 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1299497338 + }, + "TargetPinAddress":{ + "PinID":1280552766, + "PinOwnerID":2103494348 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":1299497338 + }, + "TargetPinAddress":{ + "PinID":2056213031, + "PinOwnerID":1001127185 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":1299497338 + }, + "TargetPinAddress":{ + "PinID":596982594, + "PinOwnerID":1001127185 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":1299497338 + }, + "TargetPinAddress":{ + "PinID":1280552766, + "PinOwnerID":1001127185 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1299497338 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":349361804 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.69921,"y":3.49361},{"x":6.11321,"y":6.00524},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1299497338 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1151713402 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":2.49757,"y":2.11359},{"x":3.67058,"y":6.54344},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/D-LATCH.json b/TestData/Projects/MainTest/Chips/D-LATCH.json new file mode 100644 index 00000000..a25899ac --- /dev/null +++ b/TestData/Projects/MainTest/Chips/D-LATCH.json @@ -0,0 +1,266 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.8017309, + "g": 0.425566971, + "b": 0.11274536, + "a": 1 + }, + "Displays":[], + "InputPins":[ + { + "Name":"DATA", + "ID":1709633590, + "Position":{ + "x":-6.375, + "y":0.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"STORE", + "ID":1820713789, + "Position":{ + "x":-6.375, + "y":-0.25 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + } + ], + "Name": "D-LATCH", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT", + "ID":1677203907, + "Position":{ + "x":2.375, + "y":0.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.29, + "y": 0.5 + }, + "SubChips":[ + { + "Name":"NAND", + "ID":114480724, + "Label":"", + "Position":{ + "x":-0.125, + "y":0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":242969089, + "Label":"", + "Position":{ + "x":-0.125, + "y":-0.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":630167622, + "Label":"", + "Position":{ + "x":-2.125, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":736914670, + "Label":"", + "Position":{ + "x":-2.25, + "y":-0.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1748511812, + "Label":"", + "Position":{ + "x":-3.75, + "y":-0.9375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":114480724 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1677203907 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":0.875},{"x":0.75,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":242969089 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":114480724 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":-0.6875},{"x":0.75,"y":-0.375},{"x":-0.9679,"y":0.57151},{"x":-0.9679,"y":0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":114480724 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":242969089 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.75,"y":0.36127},{"x":-0.94879,"y":-0.25672},{"x":-0.94879,"y":-0.5625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":630167622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":114480724 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":736914670 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":242969089 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1748511812 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":736914670 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1709633590 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1748511812 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.5,"y":0.5},{"x":-4.5,"y":-1.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1709633590 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1748511812 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-4.5,"y":-0.8125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1820713789 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":736914670 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.9375,"y":-0.25},{"x":-2.9375,"y":-0.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1820713789 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":630167622 + }, + "ConnectionType":1, + "ConnectedWireIndex":8, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.9375,"y":-0.25},{"x":-2.9375,"y":0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1709633590 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":630167622 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-4.5,"y":0.49506},{"x":-4.5,"y":1.125},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DABBLE.json b/TestData/Projects/MainTest/Chips/DABBLE.json new file mode 100644 index 00000000..1956d895 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/DABBLE.json @@ -0,0 +1,519 @@ +{ + "Name": "DABBLE", + "NameLocation": 0, + "Size": { + "x": 1.29, + "y": 1.0 + }, + "Colour": { + "r": 0.311216146, + "g": 0.5528956, + "b": 0.3318369, + "a": 1 + }, + "InputPins":[ + { + "Name":"A", + "ID":1840387208, + "Position":{ + "x":-2.0, + "y":1.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"B", + "ID":536256266, + "Position":{ + "x":-2.0, + "y":0.625 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"C", + "ID":1476251295, + "Position":{ + "x":-2.0, + "y":0.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"D", + "ID":1508054775, + "Position":{ + "x":-2.0, + "y":-0.375 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"A", + "ID":1118936726, + "Position":{ + "x":7.875, + "y":0.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"B", + "ID":2478898, + "Position":{ + "x":7.875, + "y":0.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"C", + "ID":683934649, + "Position":{ + "x":7.875, + "y":-0.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"D", + "ID":1546194494, + "Position":{ + "x":7.875, + "y":-0.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NOR", + "ID":1031537183, + "Label":null, + "Position":{ + "x":1.10457, + "y":-0.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"NOR", + "ID":560040010, + "Label":null, + "Position":{ + "x":2.60457, + "y":0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"NOR", + "ID":1879765020, + "Label":null, + "Position":{ + "x":4.10457, + "y":0.75 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"NOR", + "ID":701534357, + "Label":null, + "Position":{ + "x":5.60457, + "y":0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":2079646770, + "Label":null, + "Position":{ + "x":1.11, + "y":-1.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":1118497715, + "Label":null, + "Position":{ + "x":1.11, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"XOR", + "ID":115088339, + "Label":null, + "Position":{ + "x":5.61, + "y":-1.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"AND", + "ID":516092855, + "Label":null, + "Position":{ + "x":5.61, + "y":-0.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"OR", + "ID":2124497676, + "Label":null, + "Position":{ + "x":4.11, + "y":-0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":701534357 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2478898 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1879765020 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1118936726 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":2124497676 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":516092855 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1031537183 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":2124497676 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":1118497715 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":560040010 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":560040010 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1879765020 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1840387208 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":1118497715 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":516092855 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":683934649 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.375,"y":-0.5},{"x":6.375,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":115088339 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1546194494 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.5,"y":-1.25},{"x":6.5,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1879765020 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":115088339 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":4.875,"y":0.75},{"x":4.875,"y":-1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":2124497676 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":701534357 + }, + "ConnectionType":1, + "ConnectedWireIndex":2, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":5.0,"y":-0.375},{"x":5.0,"y":0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":2079646770 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":516092855 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.75,"y":-1.375},{"x":4.75,"y":-0.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1508054775 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":115088339 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-0.625,"y":-0.375},{"x":-0.625,"y":-1.75},{"x":4.875,"y":-1.75},{"x":4.875,"y":-1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1508054775 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":1118497715 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-0.625,"y":-0.375},{"x":-0.625,"y":0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1476251295 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":701534357 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1476251295 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":2079646770 + }, + "ConnectionType":1, + "ConnectedWireIndex":14, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.5,"y":0.125},{"x":0.5,"y":-1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1840387208 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1031537183 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.375,"y":1.125},{"x":0.375,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1840387208 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":2079646770 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.25,"y":1.125},{"x":0.25,"y":-1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":536256266 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1031537183 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.125,"y":0.625},{"x":0.125,"y":-0.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":2079646770 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":560040010 + }, + "ConnectionType":1, + "ConnectedWireIndex":11, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":2.0,"y":-1.375},{"x":2.0,"y":0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":1118497715 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":2124497676 + }, + "ConnectionType":1, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.875,"y":1.0},{"x":1.875,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1031537183 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1879765020 + }, + "ConnectionType":1, + "ConnectedWireIndex":3, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":3.5,"y":-0.5},{"x":3.5,"y":0.625},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DECIMAL-4.json b/TestData/Projects/MainTest/Chips/DECIMAL-4.json new file mode 100644 index 00000000..786e1e5a --- /dev/null +++ b/TestData/Projects/MainTest/Chips/DECIMAL-4.json @@ -0,0 +1,302 @@ +{ + "Name": "DECIMAL-4", + "NameLocation": 2, + "Size": { + "x": 1.7, + "y": 1.25 + }, + "Colour": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN-4", + "ID":47750177, + "Position":{ + "x":-9.52703, + "y":-3.08354 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[], + "SubChips":[ + { + "Name":"DOUBLE DABBLE", + "ID":688996848, + "Label":"", + "Position":{ + "x":-5.41616, + "y":0.37998 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":667009293},{"PinColour":0,"PinID":1206036699},{"PinColour":0,"PinID":646028192},{"PinColour":0,"PinID":346863069},{"PinColour":0,"PinID":1038955236},{"PinColour":0,"PinID":948566781},{"PinColour":0,"PinID":1915399096},{"PinColour":0,"PinID":1157959689},{"PinColour":0,"PinID":1401031050},{"PinColour":0,"PinID":550056922},{"PinColour":0,"PinID":1950268701},{"PinColour":0,"PinID":510485307}], + "InternalData":null + }, + { + "Name":"DISP-7", + "ID":595678759, + "Label":"", + "Position":{ + "x":0.83233, + "y":0.39204 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1537529931}], + "InternalData":null + }, + { + "Name":"DISP-7", + "ID":1164094140, + "Label":"", + "Position":{ + "x":3.05187, + "y":0.39204 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1537529931}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":83814227, + "Label":"", + "Position":{ + "x":-5.46896, + "y":-3.95475 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"4-1BIT", + "ID":1971227245, + "Label":"", + "Position":{ + "x":-8.01597, + "y":-0.68796 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1038955236, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":558947442, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.25573,"y":-0.91074},{"x":-0.60314,"y":-0.99517},{"x":-0.5187,"y":1.13993},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":948566781, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":1161439921, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.38842,"y":-1.15199},{"x":-0.39807,"y":-1.20024},{"x":-0.28951,"y":0.62123},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1915399096, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":785271935, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.5573,"y":-1.45356},{"x":-0.21713,"y":-1.47768},{"x":-0.15682,"y":0.15078},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1157959689, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":432543011, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.70205,"y":-1.71894},{"x":-0.02413,"y":-1.83957},{"x":-0.01206,"y":-0.47648},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1401031050, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":558947442, + "PinOwnerID":1164094140 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.78649,"y":-2.04463},{"x":1.7491,"y":-2.14113},{"x":1.65259,"y":1.28468},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":550056922, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":1161439921, + "PinOwnerID":1164094140 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.95537,"y":-2.26176},{"x":1.85766,"y":-2.55127},{"x":1.86972,"y":0.74186},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1950268701, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":785271935, + "PinOwnerID":1164094140 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.14837,"y":-2.51508},{"x":2.07479,"y":-2.80458},{"x":2.05066,"y":0.15078},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":510485307, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":432543011, + "PinOwnerID":1164094140 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.41375,"y":-2.75633},{"x":2.25573,"y":-3.02171},{"x":2.20748,"y":-0.45235},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":83814227 + }, + "TargetPinAddress":{ + "PinID":477159319, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":47750177 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1971227245 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1971227245 + }, + "TargetPinAddress":{ + "PinID":1913189227, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":1971227245 + }, + "TargetPinAddress":{ + "PinID":261218530, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1971227245 + }, + "TargetPinAddress":{ + "PinID":1381237603, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1971227245 + }, + "TargetPinAddress":{ + "PinID":1957997324, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[ + { + "SubChipID":595678759, + "Position":{ + "x":-0.3125, + "y":0.01562 + }, + "Scale":0.625 + }, + { + "SubChipID":1164094140, + "Position":{ + "x":0.3125, + "y":0.01562 + }, + "Scale":0.625 + } + ], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DECIMAL-8.json b/TestData/Projects/MainTest/Chips/DECIMAL-8.json new file mode 100644 index 00000000..181a9966 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/DECIMAL-8.json @@ -0,0 +1,447 @@ +{ + "Name": "DECIMAL-8", + "NameLocation": 2, + "Size": { + "x": 2.2, + "y": 1.25 + }, + "Colour": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":39707143, + "Position":{ + "x":-10.125, + "y":0.0 + }, + "BitCount":8, + "Colour":2, + "ValueDisplayMode":0 + } + ], + "OutputPins":[], + "SubChips":[ + { + "Name":"DOUBLE DABBLE", + "ID":688996848, + "Label":"", + "Position":{ + "x":-5.73313, + "y":0.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":667009293},{"PinColour":0,"PinID":1206036699},{"PinColour":2,"PinID":646028192},{"PinColour":2,"PinID":346863069},{"PinColour":2,"PinID":1038955236},{"PinColour":2,"PinID":948566781},{"PinColour":2,"PinID":1915399096},{"PinColour":2,"PinID":1157959689},{"PinColour":2,"PinID":1401031050},{"PinColour":2,"PinID":550056922},{"PinColour":2,"PinID":1950268701},{"PinColour":2,"PinID":510485307}], + "InternalData":null + }, + { + "Name":"DISP-7", + "ID":595678759, + "Label":"TENS", + "Position":{ + "x":-0.22062, + "y":0.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1537529931}], + "InternalData":null + }, + { + "Name":"DISP-7", + "ID":1164094140, + "Label":"ONES", + "Position":{ + "x":2.15438, + "y":0.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1537529931}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":83814227, + "Label":"RIPPLE BLANK", + "Position":{ + "x":-5.64, + "y":-2.0 + }, + "OutputPinColourInfo":[{"PinColour":5,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":571646500, + "Label":"", + "Position":{ + "x":-7.6775, + "y":0.0 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":1},{"PinColour":2,"PinID":2},{"PinColour":2,"PinID":3},{"PinColour":2,"PinID":4},{"PinColour":2,"PinID":5},{"PinColour":2,"PinID":6},{"PinColour":2,"PinID":7},{"PinColour":2,"PinID":8}], + "InternalData":null + }, + { + "Name":"DISP-7", + "ID":1408888375, + "Label":"HUNDREDS", + "Position":{ + "x":-2.59562, + "y":0.5 + }, + "OutputPinColourInfo":[{"PinColour":5,"PinID":1537529931}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":571646500 + }, + "TargetPinAddress":{ + "PinID":834835854, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":571646500 + }, + "TargetPinAddress":{ + "PinID":579679359, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":571646500 + }, + "TargetPinAddress":{ + "PinID":897490227, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":571646500 + }, + "TargetPinAddress":{ + "PinID":590808572, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":571646500 + }, + "TargetPinAddress":{ + "PinID":1957997324, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":571646500 + }, + "TargetPinAddress":{ + "PinID":1381237603, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":571646500 + }, + "TargetPinAddress":{ + "PinID":261218530, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":571646500 + }, + "TargetPinAddress":{ + "PinID":1913189227, + "PinOwnerID":688996848 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":39707143 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":571646500 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":667009293, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":558947442, + "PinOwnerID":1408888375 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1206036699, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":1161439921, + "PinOwnerID":1408888375 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.5,"y":1.125},{"x":-3.5,"y":0.9375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":646028192, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":785271935, + "PinOwnerID":1408888375 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.625,"y":0.875},{"x":-3.625,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":346863069, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":432543011, + "PinOwnerID":1408888375 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.75,"y":0.625},{"x":-3.75,"y":0.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1038955236, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":558947442, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.875,"y":0.375},{"x":-3.875,"y":-1.0},{"x":-1.5,"y":-1.0},{"x":-1.5,"y":1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":948566781, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":1161439921, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.0,"y":0.125},{"x":-4.0,"y":-1.125},{"x":-1.375,"y":-1.125},{"x":-1.375,"y":0.9375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1915399096, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":785271935, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.125,"y":-0.125},{"x":-4.125,"y":-1.25},{"x":-1.25,"y":-1.25},{"x":-1.25,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1157959689, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":432543011, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":-0.375},{"x":-4.25,"y":-1.375},{"x":-1.125,"y":-1.375},{"x":-1.125,"y":0.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1537529931, + "PinOwnerID":1408888375 + }, + "TargetPinAddress":{ + "PinID":477159319, + "PinOwnerID":595678759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-1.75,"y":0.5},{"x":-1.75,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1401031050, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":558947442, + "PinOwnerID":1164094140 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.375,"y":-0.625},{"x":-4.375,"y":-1.5},{"x":0.875,"y":-1.5},{"x":0.875,"y":1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":550056922, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":1161439921, + "PinOwnerID":1164094140 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.5,"y":-0.875},{"x":-4.5,"y":-1.625},{"x":1.0,"y":-1.625},{"x":1.0,"y":0.9375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1950268701, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":785271935, + "PinOwnerID":1164094140 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.625,"y":-1.125},{"x":-4.625,"y":-1.75},{"x":1.125,"y":-1.75},{"x":1.125,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":510485307, + "PinOwnerID":688996848 + }, + "TargetPinAddress":{ + "PinID":432543011, + "PinOwnerID":1164094140 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.75,"y":-1.375},{"x":-4.75,"y":-1.875},{"x":1.25,"y":-1.875},{"x":1.25,"y":0.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":83814227 + }, + "TargetPinAddress":{ + "PinID":477159319, + "PinOwnerID":1408888375 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.75,"y":-2.0},{"x":-3.75,"y":-0.375},{"x":0.0,"y":0.0}] + } + ], + "Displays":[ + { + "SubChipID":1164094140, + "Position":{ + "x":0.625, + "y":0.01562 + }, + "Scale":0.625 + }, + { + "SubChipID":595678759, + "Position":{ + "x":0.0, + "y":0.01562 + }, + "Scale":0.625 + }, + { + "SubChipID":1408888375, + "Position":{ + "x":-0.625, + "y":0.01562 + }, + "Scale":0.625 + } + ], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DECODE-3.json b/TestData/Projects/MainTest/Chips/DECODE-3.json new file mode 100644 index 00000000..1073c4b4 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/DECODE-3.json @@ -0,0 +1,756 @@ +{ + "Name": "DECODE-3", + "NameLocation": 0, + "Size": { + "x": 1.44, + "y": 2.48 + }, + "Colour": { + "r": 0.227245063, + "g": 0.476252764, + "b": 0.4583765, + "a": 1 + }, + "InputPins":[ + { + "Name":"C", + "ID":1280552766, + "Position":{ + "x":-5.9209, + "y":1.78867 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"B", + "ID":596982594, + "Position":{ + "x":-5.9327, + "y":0.97403 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"A", + "ID":2056213031, + "Position":{ + "x":-5.9209, + "y":0.10035 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"7", + "ID":548795871, + "Position":{ + "x":6.22645, + "y":4.10272 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"6", + "ID":419649701, + "Position":{ + "x":6.20283, + "y":3.28808 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"5", + "ID":2005481858, + "Position":{ + "x":6.23967, + "y":2.61511 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"4", + "ID":263290457, + "Position":{ + "x":6.23967, + "y":2.08011 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"3", + "ID":1713538532, + "Position":{ + "x":6.23967, + "y":1.54511 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"2", + "ID":1298532213, + "Position":{ + "x":6.23967, + "y":1.01011 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"1", + "ID":376244540, + "Position":{ + "x":6.23967, + "y":0.47511 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"0", + "ID":1524048856, + "Position":{ + "x":6.23967, + "y":-0.05989 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"AND-3", + "ID":549883333, + "Label":null, + "Position":{ + "x":0.5301, + "y":-0.76269 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND-3", + "ID":461349718, + "Label":null, + "Position":{ + "x":0.54191, + "y":-1.96979 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND-3", + "ID":1391154642, + "Label":null, + "Position":{ + "x":0.5301, + "y":-3.33037 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"NOT", + "ID":767240414, + "Label":null, + "Position":{ + "x":-3.32349, + "y":-0.30106 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"NOT", + "ID":1280457044, + "Label":null, + "Position":{ + "x":-3.32349, + "y":-0.87606 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"NOT", + "ID":1041637034, + "Label":null, + "Position":{ + "x":-3.32349, + "y":-1.45106 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND-3", + "ID":1307433408, + "Label":null, + "Position":{ + "x":0.50649, + "y":0.55962 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND-3", + "ID":1823565403, + "Label":null, + "Position":{ + "x":0.58914, + "y":2.09445 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND-3", + "ID":811475044, + "Label":null, + "Position":{ + "x":0.57733, + "y":3.36954 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND-3", + "ID":229179887, + "Label":null, + "Position":{ + "x":0.58324, + "y":4.53837 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND-3", + "ID":2088888138, + "Label":null, + "Position":{ + "x":0.72609, + "y":5.82409 + }, + "OutputPinColourInfo":null, + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1280552766 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":767240414 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":1.78867},{"x":-4.268,"y":1.78867},{"x":-4.268,"y":-0.25384},{"x":-3.85183,"y":-0.30106}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":596982594 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1280457044 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1687,"y":0.97403},{"x":-4.51594,"y":0.97403},{"x":-4.51594,"y":-0.66706},{"x":-3.85183,"y":-0.87606}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2056213031 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1041637034 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":0.10035},{"x":-4.65762,"y":0.10035},{"x":-4.65762,"y":-1.43447},{"x":-3.85183,"y":-1.45106}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1280457044 + }, + "TargetPinAddress":{ + "PinID":1468640844, + "PinOwnerID":1391154642 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-0.87606},{"x":-0.09823,"y":-3.33037}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":767240414 + }, + "TargetPinAddress":{ + "PinID":467491006, + "PinOwnerID":1391154642 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-0.30106},{"x":-0.09823,"y":-3.01037}] + }, + { + "SourcePinAddress":{ + "PinID":979024900, + "PinOwnerID":1391154642 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1524048856 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.15843,"y":-3.33037},{"x":5.47567,"y":-0.05989}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1041637034 + }, + "TargetPinAddress":{ + "PinID":1821303806, + "PinOwnerID":1391154642 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-1.45106},{"x":-0.09823,"y":-3.65037}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":767240414 + }, + "TargetPinAddress":{ + "PinID":467491006, + "PinOwnerID":461349718 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-0.30106},{"x":-0.08642,"y":-1.64979}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1280457044 + }, + "TargetPinAddress":{ + "PinID":1468640844, + "PinOwnerID":461349718 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-0.87606},{"x":-0.08642,"y":-1.96979}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2056213031 + }, + "TargetPinAddress":{ + "PinID":1821303806, + "PinOwnerID":461349718 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":0.10035},{"x":-0.08642,"y":-2.28979}] + }, + { + "SourcePinAddress":{ + "PinID":979024900, + "PinOwnerID":461349718 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":376244540 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.17024,"y":-1.96979},{"x":5.47567,"y":0.47511}] + }, + { + "SourcePinAddress":{ + "PinID":979024900, + "PinOwnerID":549883333 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1298532213 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.15844,"y":-0.76269},{"x":5.47567,"y":1.01011}] + }, + { + "SourcePinAddress":{ + "PinID":979024900, + "PinOwnerID":1307433408 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1713538532 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.13483,"y":0.55962},{"x":5.47567,"y":1.54511}] + }, + { + "SourcePinAddress":{ + "PinID":979024900, + "PinOwnerID":1823565403 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":263290457 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.21747,"y":2.09445},{"x":5.47567,"y":2.08011}] + }, + { + "SourcePinAddress":{ + "PinID":979024900, + "PinOwnerID":811475044 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2005481858 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.20567,"y":3.36954},{"x":5.47567,"y":2.61511}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":596982594 + }, + "TargetPinAddress":{ + "PinID":1821303806, + "PinOwnerID":549883333 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1687,"y":0.97403},{"x":-0.09823,"y":-1.08269}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":596982594 + }, + "TargetPinAddress":{ + "PinID":1468640844, + "PinOwnerID":1307433408 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1687,"y":0.97403},{"x":-0.12184,"y":0.55962}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2056213031 + }, + "TargetPinAddress":{ + "PinID":1821303806, + "PinOwnerID":1307433408 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":0.10035},{"x":-0.12184,"y":0.23962}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1280552766 + }, + "TargetPinAddress":{ + "PinID":1821303806, + "PinOwnerID":1823565403 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":1.78867},{"x":-0.03919,"y":1.77445}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1280552766 + }, + "TargetPinAddress":{ + "PinID":1468640844, + "PinOwnerID":811475044 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":1.78867},{"x":-0.051,"y":3.36954}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2056213031 + }, + "TargetPinAddress":{ + "PinID":1821303806, + "PinOwnerID":811475044 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":0.10035},{"x":-0.051,"y":3.04954}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":767240414 + }, + "TargetPinAddress":{ + "PinID":467491006, + "PinOwnerID":549883333 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-0.30106},{"x":-0.09823,"y":-0.44269}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1041637034 + }, + "TargetPinAddress":{ + "PinID":1468640844, + "PinOwnerID":549883333 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-1.45106},{"x":-0.09823,"y":-0.76269}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":767240414 + }, + "TargetPinAddress":{ + "PinID":467491006, + "PinOwnerID":1307433408 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-0.30106},{"x":-0.12184,"y":0.87962}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1280457044 + }, + "TargetPinAddress":{ + "PinID":467491006, + "PinOwnerID":1823565403 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-0.87606},{"x":-0.03919,"y":2.41445}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1041637034 + }, + "TargetPinAddress":{ + "PinID":1468640844, + "PinOwnerID":1823565403 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-1.45106},{"x":-0.03919,"y":2.09445}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1280457044 + }, + "TargetPinAddress":{ + "PinID":467491006, + "PinOwnerID":811475044 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-0.87606},{"x":-0.051,"y":3.68954}] + }, + { + "SourcePinAddress":{ + "PinID":979024900, + "PinOwnerID":2088888138 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":548795871 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.35443,"y":5.82409},{"x":5.46245,"y":4.10272}] + }, + { + "SourcePinAddress":{ + "PinID":979024900, + "PinOwnerID":229179887 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":419649701 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.21157,"y":4.53837},{"x":5.43883,"y":3.28808}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1280552766 + }, + "TargetPinAddress":{ + "PinID":1468640844, + "PinOwnerID":229179887 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":1.78867},{"x":-0.0451,"y":4.53837}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":596982594 + }, + "TargetPinAddress":{ + "PinID":1821303806, + "PinOwnerID":229179887 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1687,"y":0.97403},{"x":-0.0451,"y":4.21837}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1041637034 + }, + "TargetPinAddress":{ + "PinID":467491006, + "PinOwnerID":229179887 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.79516,"y":-1.45106},{"x":-0.0451,"y":4.85837}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1280552766 + }, + "TargetPinAddress":{ + "PinID":467491006, + "PinOwnerID":2088888138 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":1.78867},{"x":0.09776,"y":6.14409}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":596982594 + }, + "TargetPinAddress":{ + "PinID":1468640844, + "PinOwnerID":2088888138 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1687,"y":0.97403},{"x":0.09776,"y":5.82409}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2056213031 + }, + "TargetPinAddress":{ + "PinID":1821303806, + "PinOwnerID":2088888138 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.1569,"y":0.10035},{"x":0.09776,"y":5.50409}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DECODER-2.json b/TestData/Projects/MainTest/Chips/DECODER-2.json new file mode 100644 index 00000000..3e7ff847 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/DECODER-2.json @@ -0,0 +1,352 @@ +{ + "Name": "DECODER-2", + "NameLocation": 0, + "Size": { + "x": 1.475, + "y": 1.0 + }, + "Colour": { + "r": 0.8097011, + "g": 0.809307158, + "b": 0.801633835, + "a": 1 + }, + "InputPins":[ + { + "Name":"B", + "ID":192060771, + "Position":{ + "x":-6.375, + "y":1.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"A", + "ID":1480848655, + "Position":{ + "x":-6.375, + "y":0.625 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"3", + "ID":1868926879, + "Position":{ + "x":2.375, + "y":1.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"2", + "ID":18957384, + "Position":{ + "x":2.375, + "y":0.375 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"1", + "ID":199145797, + "Position":{ + "x":2.375, + "y":-0.375 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"0", + "ID":1076039863, + "Position":{ + "x":2.375, + "y":-1.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"AND", + "ID":1124838394, + "Label":"", + "Position":{ + "x":-0.265, + "y":1.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1547859984, + "Label":"", + "Position":{ + "x":-0.265, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1232041989, + "Label":"", + "Position":{ + "x":-0.265, + "y":-0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1068531987, + "Label":"", + "Position":{ + "x":-0.265, + "y":-1.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":564197126, + "Label":"", + "Position":{ + "x":-3.765, + "y":-0.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1808213522, + "Label":"", + "Position":{ + "x":-3.765, + "y":-1.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1124838394 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1868926879 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1547859984 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":18957384 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1232041989 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":199145797 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1068531987 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1076039863 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1480848655 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1808213522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.875,"y":0.625},{"x":-4.875,"y":-1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":192060771 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":564197126 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.5,"y":1.25},{"x":-4.5,"y":-0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1808213522 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1068531987 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":564197126 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1068531987 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":-0.5},{"x":-2.375,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":192060771 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1124838394 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1480848655 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1124838394 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":0.625},{"x":-2.375,"y":1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1808213522 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1547859984 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.375,"y":-1.25},{"x":-1.375,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":192060771 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1547859984 + }, + "ConnectionType":1, + "ConnectedWireIndex":8, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.375,"y":1.25},{"x":-1.375,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1480848655 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1232041989 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-1.875,"y":1.0},{"x":-1.875,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":564197126 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1232041989 + }, + "ConnectionType":1, + "ConnectedWireIndex":7, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-1.875,"y":-1.0},{"x":-1.875,"y":-0.5},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DISP-7.json b/TestData/Projects/MainTest/Chips/DISP-7.json new file mode 100644 index 00000000..8d6d3e3c --- /dev/null +++ b/TestData/Projects/MainTest/Chips/DISP-7.json @@ -0,0 +1,768 @@ +{ + "Name": "DISP-7", + "NameLocation": 0, + "Size": { + "x": 1.28875, + "y": 2.0 + }, + "Colour": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":558947442, + "Position":{ + "x":-4.5, + "y":1.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":1161439921, + "Position":{ + "x":-4.5, + "y":1.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":785271935, + "Position":{ + "x":-4.5, + "y":0.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":432543011, + "Position":{ + "x":-4.5, + "y":0.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"BLANK", + "ID":477159319, + "Position":{ + "x":-4.5, + "y":-2.5 + }, + "BitCount":1, + "Colour":5, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"BLANK OUT", + "ID":1537529931, + "Position":{ + "x":7.75, + "y":-2.25 + }, + "BitCount":1, + "Colour":5, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"7-SEGMENT DRIVER", + "ID":1806927845, + "Label":"", + "Position":{ + "x":2.485, + "y":0.75 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1625764615},{"PinColour":0,"PinID":876832376},{"PinColour":0,"PinID":2063837745},{"PinColour":0,"PinID":795836234},{"PinColour":0,"PinID":1275013740},{"PinColour":0,"PinID":1041680072},{"PinColour":0,"PinID":1553234055}], + "InternalData":null + }, + { + "Name":"7-SEGMENT", + "ID":507183861, + "Label":"", + "Position":{ + "x":7.135, + "y":0.5 + }, + "OutputPinColourInfo":[], + "InternalData":null + }, + { + "Name":"OR", + "ID":1709402173, + "Label":"", + "Position":{ + "x":-2.14, + "y":-2.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":911313465, + "Label":"", + "Position":{ + "x":-1.015, + "y":-1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":203193853, + "Label":"", + "Position":{ + "x":0.11, + "y":-1.75 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1000868379, + "Label":"IS ZERO", + "Position":{ + "x":1.235, + "y":-1.75 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"AND", + "ID":559255206, + "Label":"", + "Position":{ + "x":2.485, + "y":-1.875 + }, + "OutputPinColourInfo":[{"PinColour":5,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1700072761, + "Label":"", + "Position":{ + "x":3.86, + "y":-1.875 + }, + "OutputPinColourInfo":[{"PinColour":5,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1238227162, + "Label":"", + "Position":{ + "x":5.235, + "y":1.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":475603102, + "Label":"", + "Position":{ + "x":5.235, + "y":0.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":240869570, + "Label":"", + "Position":{ + "x":5.235, + "y":0.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":740891884, + "Label":"", + "Position":{ + "x":5.235, + "y":-0.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":302814323, + "Label":"", + "Position":{ + "x":5.235, + "y":-1.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":122687566, + "Label":"", + "Position":{ + "x":5.235, + "y":1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1172725389, + "Label":"", + "Position":{ + "x":5.235, + "y":2.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":558947442 + }, + "TargetPinAddress":{ + "PinID":282827618, + "PinOwnerID":1806927845 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1161439921 + }, + "TargetPinAddress":{ + "PinID":1252376139, + "PinOwnerID":1806927845 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":785271935 + }, + "TargetPinAddress":{ + "PinID":149630521, + "PinOwnerID":1806927845 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":432543011 + }, + "TargetPinAddress":{ + "PinID":617512258, + "PinOwnerID":1806927845 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1709402173 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":911313465 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":911313465 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":203193853 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":203193853 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1000868379 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1000868379 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":559255206 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":559255206 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1700072761 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":475603102 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":507183861 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":795836234, + "PinOwnerID":1806927845 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":475603102 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1238227162 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":507183861 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.0,"y":1.25},{"x":6.0,"y":0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":122687566 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":507183861 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.125,"y":1.875},{"x":6.125,"y":1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1172725389 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":507183861 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.25,"y":2.5},{"x":6.25,"y":1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":240869570 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":507183861 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.0,"y":0.0},{"x":6.0,"y":0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":740891884 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":507183861 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.125,"y":-0.625},{"x":6.125,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":302814323 + }, + "TargetPinAddress":{ + "PinID":6, + "PinOwnerID":507183861 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.25,"y":-1.25},{"x":6.25,"y":-0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1625764615, + "PinOwnerID":1806927845 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1172725389 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.75,"y":1.5},{"x":3.75,"y":2.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":876832376, + "PinOwnerID":1806927845 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":122687566 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.875,"y":1.25},{"x":3.875,"y":2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2063837745, + "PinOwnerID":1806927845 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1238227162 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.0,"y":1.0},{"x":4.0,"y":1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1275013740, + "PinOwnerID":1806927845 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":240869570 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.0,"y":0.5},{"x":4.0,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1041680072, + "PinOwnerID":1806927845 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":740891884 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.875,"y":0.25},{"x":3.875,"y":-0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1553234055, + "PinOwnerID":1806927845 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":302814323 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.75,"y":0.0},{"x":3.75,"y":-1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1700072761 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1172725389 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.625,"y":-1.875},{"x":4.625,"y":2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1700072761 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":122687566 + }, + "ConnectionType":1, + "ConnectedWireIndex":23, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":4.625,"y":1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1700072761 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1238227162 + }, + "ConnectionType":1, + "ConnectedWireIndex":23, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":4.625,"y":1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1700072761 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":475603102 + }, + "ConnectionType":1, + "ConnectedWireIndex":23, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":4.625,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1700072761 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":240869570 + }, + "ConnectionType":1, + "ConnectedWireIndex":23, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":4.625,"y":-0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1700072761 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":740891884 + }, + "ConnectionType":1, + "ConnectedWireIndex":23, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":4.625,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1700072761 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":302814323 + }, + "ConnectionType":1, + "ConnectedWireIndex":23, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":4.625,"y":-1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":558947442 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":203193853 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.5,"y":1.5},{"x":-0.5,"y":-1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1161439921 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":911313465 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.625,"y":1.0},{"x":-1.625,"y":-1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":785271935 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1709402173 + }, + "ConnectionType":1, + "ConnectedWireIndex":2, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.75,"y":0.5},{"x":-2.75,"y":-1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":432543011 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1709402173 + }, + "ConnectionType":1, + "ConnectedWireIndex":3, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.875,"y":0.0},{"x":-2.875,"y":-2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":477159319 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":559255206 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.875,"y":-2.5},{"x":1.875,"y":-2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":559255206 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1537529931 + }, + "ConnectionType":1, + "ConnectedWireIndex":8, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":3.125,"y":-1.875},{"x":3.125,"y":-2.25},{"x":0.0,"y":0.0}] + } + ], + "Displays":[ + { + "SubChipID":507183861, + "Position":{ + "x":0.0, + "y":0.0 + }, + "Scale":1.0 + } + ], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/DOUBLE DABBLE.json b/TestData/Projects/MainTest/Chips/DOUBLE DABBLE.json new file mode 100644 index 00000000..70c6fda9 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/DOUBLE DABBLE.json @@ -0,0 +1,825 @@ +{ + "Name": "DOUBLE DABBLE", + "NameLocation": 0, + "Size": { + "x": 1.51375, + "y": 3.0 + }, + "Colour": { + "r": 0.206960842, + "g": 0.7538684, + "b": 0.4113267, + "a": 1 + }, + "InputPins":[ + { + "Name":"A", + "ID":834835854, + "Position":{ + "x":-4.5, + "y":1.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"B", + "ID":579679359, + "Position":{ + "x":-4.5, + "y":0.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"C", + "ID":897490227, + "Position":{ + "x":-4.5, + "y":0.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"D", + "ID":590808572, + "Position":{ + "x":-4.5, + "y":-0.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"E", + "ID":1957997324, + "Position":{ + "x":-4.5, + "y":-0.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"F", + "ID":1381237603, + "Position":{ + "x":-4.5, + "y":-1.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"G", + "ID":261218530, + "Position":{ + "x":-4.5, + "y":-1.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"H", + "ID":1913189227, + "Position":{ + "x":-4.5, + "y":-2.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"HUNDREDS 3", + "ID":667009293, + "Position":{ + "x":8.625, + "y":3.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"HUNDREDS 2", + "ID":1206036699, + "Position":{ + "x":8.625, + "y":3.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"HUNDREDS 1", + "ID":646028192, + "Position":{ + "x":8.625, + "y":2.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"HUNDREDS 0", + "ID":346863069, + "Position":{ + "x":8.625, + "y":2.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"TENS 3", + "ID":1038955236, + "Position":{ + "x":8.625, + "y":1.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"TENS 2", + "ID":948566781, + "Position":{ + "x":8.625, + "y":1.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"TENS 1", + "ID":1915399096, + "Position":{ + "x":8.625, + "y":0.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"TENS 0", + "ID":1157959689, + "Position":{ + "x":8.625, + "y":0.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ONES 3", + "ID":1401031050, + "Position":{ + "x":8.625, + "y":-0.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ONES 2", + "ID":550056922, + "Position":{ + "x":8.625, + "y":-1.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ONES 1", + "ID":1950268701, + "Position":{ + "x":8.625, + "y":-1.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"ONES 0", + "ID":510485307, + "Position":{ + "x":8.625, + "y":-2.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"DABBLE", + "ID":2116503194, + "Label":"T", + "Position":{ + "x":-2.095, + "y":2.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], + "InternalData":null + }, + { + "Name":"DABBLE", + "ID":23857049, + "Label":"U", + "Position":{ + "x":-0.345, + "y":1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], + "InternalData":null + }, + { + "Name":"DABBLE", + "ID":735358462, + "Label":"V", + "Position":{ + "x":1.405, + "y":1.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], + "InternalData":null + }, + { + "Name":"DABBLE", + "ID":2047797415, + "Label":"W", + "Position":{ + "x":3.405, + "y":2.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], + "InternalData":null + }, + { + "Name":"DABBLE", + "ID":1248075745, + "Label":"X", + "Position":{ + "x":3.405, + "y":-1.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], + "InternalData":null + }, + { + "Name":"DABBLE", + "ID":861761765, + "Label":"Y", + "Position":{ + "x":5.405, + "y":0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], + "InternalData":null + }, + { + "Name":"DABBLE", + "ID":1284127487, + "Label":"Z", + "Position":{ + "x":5.405, + "y":-1.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1118936726},{"PinColour":0,"PinID":2478898},{"PinColour":0,"PinID":683934649},{"PinColour":0,"PinID":1546194494}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":2478898, + "PinOwnerID":2116503194 + }, + "TargetPinAddress":{ + "PinID":1840387208, + "PinOwnerID":23857049 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":683934649, + "PinOwnerID":2116503194 + }, + "TargetPinAddress":{ + "PinID":536256266, + "PinOwnerID":23857049 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1546194494, + "PinOwnerID":2116503194 + }, + "TargetPinAddress":{ + "PinID":1476251295, + "PinOwnerID":23857049 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2478898, + "PinOwnerID":23857049 + }, + "TargetPinAddress":{ + "PinID":1840387208, + "PinOwnerID":735358462 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":683934649, + "PinOwnerID":23857049 + }, + "TargetPinAddress":{ + "PinID":536256266, + "PinOwnerID":735358462 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1546194494, + "PinOwnerID":23857049 + }, + "TargetPinAddress":{ + "PinID":1476251295, + "PinOwnerID":735358462 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2478898, + "PinOwnerID":1248075745 + }, + "TargetPinAddress":{ + "PinID":1840387208, + "PinOwnerID":1284127487 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":683934649, + "PinOwnerID":1248075745 + }, + "TargetPinAddress":{ + "PinID":536256266, + "PinOwnerID":1284127487 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1546194494, + "PinOwnerID":1248075745 + }, + "TargetPinAddress":{ + "PinID":1476251295, + "PinOwnerID":1284127487 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":261218530 + }, + "TargetPinAddress":{ + "PinID":1508054775, + "PinOwnerID":1284127487 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1913189227 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":510485307 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1546194494, + "PinOwnerID":1284127487 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1950268701 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1546194494, + "PinOwnerID":861761765 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1915399096 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1118936726, + "PinOwnerID":2116503194 + }, + "TargetPinAddress":{ + "PinID":536256266, + "PinOwnerID":2047797415 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1118936726, + "PinOwnerID":23857049 + }, + "TargetPinAddress":{ + "PinID":1476251295, + "PinOwnerID":2047797415 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1118936726, + "PinOwnerID":735358462 + }, + "TargetPinAddress":{ + "PinID":1508054775, + "PinOwnerID":2047797415 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":683934649, + "PinOwnerID":1284127487 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":550056922 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.75,"y":-1.5},{"x":6.75,"y":-1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2478898, + "PinOwnerID":1284127487 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1401031050 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.625,"y":-1.25},{"x":6.625,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1118936726, + "PinOwnerID":1284127487 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1157959689 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.5,"y":-1.0},{"x":6.5,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":683934649, + "PinOwnerID":861761765 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":948566781 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.75,"y":0.75},{"x":6.75,"y":1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2478898, + "PinOwnerID":861761765 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1038955236 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.625,"y":1.0},{"x":6.625,"y":1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1118936726, + "PinOwnerID":861761765 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":346863069 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.25,"y":1.25},{"x":6.25,"y":2.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1118936726, + "PinOwnerID":2047797415 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":646028192 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2478898, + "PinOwnerID":2047797415 + }, + "TargetPinAddress":{ + "PinID":1840387208, + "PinOwnerID":861761765 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.5,"y":2.5},{"x":4.5,"y":1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":683934649, + "PinOwnerID":2047797415 + }, + "TargetPinAddress":{ + "PinID":536256266, + "PinOwnerID":861761765 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.375,"y":2.25},{"x":4.375,"y":1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1546194494, + "PinOwnerID":2047797415 + }, + "TargetPinAddress":{ + "PinID":1476251295, + "PinOwnerID":861761765 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.25,"y":2.0},{"x":4.25,"y":0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1118936726, + "PinOwnerID":1248075745 + }, + "TargetPinAddress":{ + "PinID":1508054775, + "PinOwnerID":861761765 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.25,"y":-0.75},{"x":4.25,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2478898, + "PinOwnerID":735358462 + }, + "TargetPinAddress":{ + "PinID":1840387208, + "PinOwnerID":1248075745 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":2.5,"y":1.75},{"x":2.5,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":683934649, + "PinOwnerID":735358462 + }, + "TargetPinAddress":{ + "PinID":536256266, + "PinOwnerID":1248075745 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":2.375,"y":1.5},{"x":2.375,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1546194494, + "PinOwnerID":735358462 + }, + "TargetPinAddress":{ + "PinID":1476251295, + "PinOwnerID":1248075745 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":2.25,"y":1.25},{"x":2.25,"y":-1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1381237603 + }, + "TargetPinAddress":{ + "PinID":1508054775, + "PinOwnerID":1248075745 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":2.125,"y":-1.25},{"x":2.125,"y":-1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1957997324 + }, + "TargetPinAddress":{ + "PinID":1508054775, + "PinOwnerID":735358462 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.5,"y":-0.75},{"x":0.5,"y":1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":590808572 + }, + "TargetPinAddress":{ + "PinID":1508054775, + "PinOwnerID":23857049 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-1.25,"y":-0.25},{"x":-1.25,"y":1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":834835854 + }, + "TargetPinAddress":{ + "PinID":536256266, + "PinOwnerID":2116503194 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.25,"y":1.25},{"x":-3.25,"y":2.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":579679359 + }, + "TargetPinAddress":{ + "PinID":1476251295, + "PinOwnerID":2116503194 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.125,"y":0.75},{"x":-3.125,"y":2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":897490227 + }, + "TargetPinAddress":{ + "PinID":1508054775, + "PinOwnerID":2116503194 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.0,"y":0.25},{"x":-3.0,"y":1.75},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/EQUALS-8.json b/TestData/Projects/MainTest/Chips/EQUALS-8.json new file mode 100644 index 00000000..5c777b2c --- /dev/null +++ b/TestData/Projects/MainTest/Chips/EQUALS-8.json @@ -0,0 +1,706 @@ +{ + "Name": "EQUALS-8", + "NameLocation": 0, + "Size": { + "x": 1.45, + "y": 1.0 + }, + "Colour": { + "r": 0.322117865, + "g": 0.8169334, + "b": 0.2998035, + "a": 1 + }, + "InputPins":[ + { + "Name":"B", + "ID":427606127, + "Position":{ + "x":-7.875, + "y":0.875 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"A", + "ID":1445895175, + "Position":{ + "x":-7.875, + "y":-1.4375 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":1960274563, + "Position":{ + "x":7.375, + "y":1.0 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"XNOR", + "ID":427763668, + "Label":"", + "Position":{ + "x":-2.64, + "y":1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], + "InternalData":null + }, + { + "Name":"XNOR", + "ID":318175282, + "Label":"", + "Position":{ + "x":-2.64, + "y":1.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], + "InternalData":null + }, + { + "Name":"XNOR", + "ID":345295526, + "Label":"", + "Position":{ + "x":-2.64, + "y":0.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], + "InternalData":null + }, + { + "Name":"XNOR", + "ID":591045515, + "Label":"", + "Position":{ + "x":-2.64, + "y":0.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], + "InternalData":null + }, + { + "Name":"XNOR", + "ID":803641220, + "Label":"", + "Position":{ + "x":-2.64, + "y":-0.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], + "InternalData":null + }, + { + "Name":"XNOR", + "ID":937088444, + "Label":"", + "Position":{ + "x":-2.64, + "y":-1.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], + "InternalData":null + }, + { + "Name":"XNOR", + "ID":826317906, + "Label":"", + "Position":{ + "x":-2.64, + "y":-1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], + "InternalData":null + }, + { + "Name":"XNOR", + "ID":1213321161, + "Label":"", + "Position":{ + "x":-2.64, + "y":-2.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2132693630}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":1508825634, + "Label":"", + "Position":{ + "x":-5.3025, + "y":0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":1225631437, + "Label":"", + "Position":{ + "x":-5.3025, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1225484485, + "Label":"", + "Position":{ + "x":-1.39, + "y":1.75 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1552722044, + "Label":"", + "Position":{ + "x":-0.265, + "y":1.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1362107608, + "Label":"", + "Position":{ + "x":0.86, + "y":1.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1199059719, + "Label":"", + "Position":{ + "x":1.985, + "y":1.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":97130088, + "Label":"", + "Position":{ + "x":3.11, + "y":1.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":377256245, + "Label":"", + "Position":{ + "x":4.235, + "y":1.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":637885360, + "Label":"", + "Position":{ + "x":5.36, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":427606127 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1508825634 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1445895175 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1225631437 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1508825634 + }, + "TargetPinAddress":{ + "PinID":128924098, + "PinOwnerID":427763668 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1508825634 + }, + "TargetPinAddress":{ + "PinID":128924098, + "PinOwnerID":318175282 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":1508825634 + }, + "TargetPinAddress":{ + "PinID":128924098, + "PinOwnerID":345295526 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1508825634 + }, + "TargetPinAddress":{ + "PinID":128924098, + "PinOwnerID":591045515 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":1508825634 + }, + "TargetPinAddress":{ + "PinID":128924098, + "PinOwnerID":803641220 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":1508825634 + }, + "TargetPinAddress":{ + "PinID":128924098, + "PinOwnerID":937088444 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":1508825634 + }, + "TargetPinAddress":{ + "PinID":128924098, + "PinOwnerID":826317906 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1508825634 + }, + "TargetPinAddress":{ + "PinID":128924098, + "PinOwnerID":1213321161 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1225631437 + }, + "TargetPinAddress":{ + "PinID":1606082193, + "PinOwnerID":427763668 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1225631437 + }, + "TargetPinAddress":{ + "PinID":1606082193, + "PinOwnerID":318175282 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":1225631437 + }, + "TargetPinAddress":{ + "PinID":1606082193, + "PinOwnerID":345295526 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1225631437 + }, + "TargetPinAddress":{ + "PinID":1606082193, + "PinOwnerID":591045515 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":1225631437 + }, + "TargetPinAddress":{ + "PinID":1606082193, + "PinOwnerID":803641220 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":1225631437 + }, + "TargetPinAddress":{ + "PinID":1606082193, + "PinOwnerID":937088444 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":1225631437 + }, + "TargetPinAddress":{ + "PinID":1606082193, + "PinOwnerID":826317906 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1225631437 + }, + "TargetPinAddress":{ + "PinID":1606082193, + "PinOwnerID":1213321161 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1225484485 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1552722044 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2132693630, + "PinOwnerID":427763668 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1225484485 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2132693630, + "PinOwnerID":591045515 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1362107608 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2132693630, + "PinOwnerID":803641220 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1199059719 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2132693630, + "PinOwnerID":937088444 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":97130088 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2132693630, + "PinOwnerID":826317906 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":377256245 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2132693630, + "PinOwnerID":1213321161 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":637885360 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":377256245 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":637885360 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":97130088 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":377256245 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1199059719 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":97130088 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1362107608 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1199059719 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1552722044 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1362107608 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":637885360 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1960274563 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2132693630, + "PinOwnerID":318175282 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1225484485 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2132693630, + "PinOwnerID":345295526 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1552722044 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/FLAGS.json b/TestData/Projects/MainTest/Chips/FLAGS.json new file mode 100644 index 00000000..19c9e423 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/FLAGS.json @@ -0,0 +1,135 @@ +{ + "Name": "FLAGS", + "NameLocation": 0, + "Size": { + "x": 1.14, + "y": 0.88 + }, + "Colour": { + "r": 0.5022173, + "g": 0.319064438, + "b": 0.4171181, + "a": 1 + }, + "InputPins":[ + { + "Name":"ZERO", + "ID":792064669, + "Position":{ + "x":-6.65289, + "y":0.71429 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"STORE", + "ID":227439812, + "Position":{ + "x":-6.73412, + "y":-0.26564 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":977455228, + "Position":{ + "x":-6.89941, + "y":-1.34002 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"ZERO", + "ID":605802866, + "Position":{ + "x":5.61393, + "y":0.04132 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"REGISTER-1", + "ID":364273569, + "Label":null, + "Position":{ + "x":-0.13577, + "y":0.12397 + }, + "OutputPinColourInfo":null, + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":977455228 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":364273569 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-6.13541,"y":-1.34002},{"x":-0.7641,"y":-0.19603}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":227439812 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":364273569 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.97012,"y":-0.26564},{"x":-0.7641,"y":0.12397}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":792064669 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":364273569 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.88889,"y":0.71429},{"x":-0.7641,"y":0.44397}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":364273569 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":605802866 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.49256,"y":0.12397},{"x":4.84993,"y":0.04132}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/FLIP-FLOP.json b/TestData/Projects/MainTest/Chips/FLIP-FLOP.json new file mode 100644 index 00000000..5f43b6dd --- /dev/null +++ b/TestData/Projects/MainTest/Chips/FLIP-FLOP.json @@ -0,0 +1,174 @@ +{ + "Name": "FLIP-FLOP", + "NameLocation": 0, + "Size": { + "x": 1.59, + "y": 0.56 + }, + "Colour": { + "r": 0.763959, + "g": 0.3430992, + "b": 0.267745525, + "a": 1 + }, + "InputPins":[ + { + "Name":"DATA", + "ID":1732460994, + "Position":{ + "x":-7.875, + "y":0.375 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":2143575788, + "Position":{ + "x":-7.875, + "y":-0.1875 + }, + "BitCount":1, + "Colour":5, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":1920302974, + "Position":{ + "x":1.375, + "y":-0.4375 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"D-LATCH", + "ID":1435657029, + "Label":null, + "Position":{ + "x":-3.22, + "y":0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1677203907}], + "InternalData":null + }, + { + "Name":"D-LATCH", + "ID":1262867679, + "Label":null, + "Position":{ + "x":-0.97, + "y":-0.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1677203907}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":687615599, + "Label":null, + "Position":{ + "x":-5.14, + "y":-0.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1677203907, + "PinOwnerID":1262867679 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1920302974 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2143575788 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":687615599 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1732460994 + }, + "TargetPinAddress":{ + "PinID":1709633590, + "PinOwnerID":1435657029 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":687615599 + }, + "TargetPinAddress":{ + "PinID":1820713789, + "PinOwnerID":1435657029 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":-0.1875},{"x":-4.25,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2143575788 + }, + "TargetPinAddress":{ + "PinID":1820713789, + "PinOwnerID":1262867679 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-5.96018,"y":-0.1875},{"x":-5.96018,"y":-0.5625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1677203907, + "PinOwnerID":1435657029 + }, + "TargetPinAddress":{ + "PinID":1709633590, + "PinOwnerID":1262867679 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.0,"y":0.25},{"x":-2.0,"y":-0.3125},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/KeyTest.json b/TestData/Projects/MainTest/Chips/KeyTest.json new file mode 100644 index 00000000..505341d4 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/KeyTest.json @@ -0,0 +1,32 @@ +{ + "Name": "KeyTest", + "NameLocation": 0, + "Size": { + "x": 1.44, + "y": 0.5675 + }, + "Colour": { + "r": 0.185919926, + "g": 0.454911739, + "b": 0.384076327, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"KEY", + "ID":1584306565, + "Label":null, + "Position":{ + "x":-1.06366, + "y":-0.62112 + }, + "OutputPinColourInfo":null, + "InternalData":[69] + } + ], + "Wires":[], + "Displays": null, + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/LSB.json b/TestData/Projects/MainTest/Chips/LSB.json new file mode 100644 index 00000000..f7efeede --- /dev/null +++ b/TestData/Projects/MainTest/Chips/LSB.json @@ -0,0 +1,85 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.268787533, + "g": 0.0914283544, + "b": 0.468588352, + "a": 1 + }, + "Displays": null, + "InputPins":[ + { + "Name":"IN-8", + "ID":1285607522, + "Position":{ + "x":-7.31405, + "y":-0.07674 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "LSB", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT", + "ID":1222614200, + "Position":{ + "x":6.35773, + "y":-0.30106 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 0.84, + "y": 0.5275 + }, + "SubChips":[ + { + "Name":"8-1BIT", + "ID":1718871322, + "Label":"", + "Position":{ + "x":-1.9588699999999999, + "y":-0.03884 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1285607522 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1718871322 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1718871322 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1222614200 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/LSHIFT-8.json b/TestData/Projects/MainTest/Chips/LSHIFT-8.json new file mode 100644 index 00000000..68f79a73 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/LSHIFT-8.json @@ -0,0 +1,194 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.228995532, + "g": 0.175464317, + "b": 0.350601465, + "a": 1 + }, + "Displays":[], + "InputPins":[ + { + "Name":"IN-8", + "ID":1888645677, + "Position":{ + "x":-8.15344, + "y":0.4709 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "LSHIFT-8", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT-8", + "ID":2004659665, + "Position":{ + "x":7.21164, + "y":-0.42857 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.63, + "y": 0.77125 + }, + "SubChips":[ + { + "Name":"8-1BIT", + "ID":2106702773, + "Label":"", + "Position":{ + "x":-4.96763, + "y":0.36759 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"1-8BIT", + "ID":783985744, + "Label":"", + "Position":{ + "x":3.18407, + "y":-0.33018 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1888645677 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2106702773 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":783985744 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2004659665 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":2106702773 + }, + "TargetPinAddress":{ + "PinID":6, + "PinOwnerID":783985744 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":2106702773 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":783985744 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":2106702773 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":783985744 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":2106702773 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":783985744 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":2106702773 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":783985744 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":2106702773 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":783985744 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":2106702773 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":783985744 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/MEM-1.json b/TestData/Projects/MainTest/Chips/MEM-1.json new file mode 100644 index 00000000..a09046ed --- /dev/null +++ b/TestData/Projects/MainTest/Chips/MEM-1.json @@ -0,0 +1,249 @@ +{ + "Name": "MEM-1", + "NameLocation": 0, + "Size": { + "x": 1.015, + "y": 1.0 + }, + "Colour": { + "r": 0.7492096, + "g": 0.489632368, + "b": 0.149908349, + "a": 1 + }, + "InputPins":[ + { + "Name":"DATA", + "ID":1453644181, + "Position":{ + "x":-6.875, + "y":0.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"STORE", + "ID":870941495, + "Position":{ + "x":-6.875, + "y":-0.5 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + }, + { + "Name":"ROW", + "ID":1413611334, + "Position":{ + "x":-6.875, + "y":-1.375 + }, + "BitCount":1, + "Colour":2, + "ValueDisplayMode":0 + }, + { + "Name":"COLUMN", + "ID":1709778081, + "Position":{ + "x":-6.875, + "y":-2.0 + }, + "BitCount":1, + "Colour":3, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":1923212434, + "Position":{ + "x":4.125, + "y":-0.1875 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"D-LATCH", + "ID":782972032, + "Label":null, + "Position":{ + "x":-0.72, + "y":0.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1677203907}], + "InternalData":null + }, + { + "Name":"AND", + "ID":936394086, + "Label":null, + "Position":{ + "x":-4.015, + "y":-1.5 + }, + "OutputPinColourInfo":[{"PinColour":4,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"3-STATE BUFFER", + "ID":364195663, + "Label":null, + "Position":{ + "x":1.5, + "y":-0.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"AND", + "ID":957057383, + "Label":null, + "Position":{ + "x":-2.64, + "y":-0.625 + }, + "OutputPinColourInfo":[{"PinColour":1,"PinID":1580367471}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1413611334 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":936394086 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":364195663 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1923212434 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1677203907, + "PinOwnerID":782972032 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":364195663 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1453644181 + }, + "TargetPinAddress":{ + "PinID":1709633590, + "PinOwnerID":782972032 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":870941495 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":957057383 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":936394086 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":364195663 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":-1.5},{"x":0.25,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":957057383 + }, + "TargetPinAddress":{ + "PinID":1820713789, + "PinOwnerID":782972032 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-1.875,"y":-0.625},{"x":-1.875,"y":-0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":936394086 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":957057383 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.25,"y":-1.5},{"x":-3.25,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1709778081 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":936394086 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.75,"y":-2.0},{"x":-4.75,"y":-1.625},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/MEM-16.json b/TestData/Projects/MainTest/Chips/MEM-16.json new file mode 100644 index 00000000..67be2eb4 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/MEM-16.json @@ -0,0 +1,1656 @@ +{ + "Name": "MEM-16", + "NameLocation": 0, + "Size": { + "x": 1.2, + "y": 1.375 + }, + "Colour": { + "r": 0.828141, + "g": 0.446045637, + "b": 0.176697254, + "a": 1 + }, + "InputPins":[ + { + "Name":"DATA", + "ID":1841003398, + "Position":{ + "x":-11.5, + "y":4.375 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"STORE", + "ID":1875743195, + "Position":{ + "x":-11.5, + "y":3.75 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + }, + { + "Name":"ROW", + "ID":1052884450, + "Position":{ + "x":-11.5, + "y":2.875 + }, + "BitCount":1, + "Colour":2, + "ValueDisplayMode":0 + }, + { + "Name":"COLUMN", + "ID":1707980435, + "Position":{ + "x":-11.5, + "y":2.25 + }, + "BitCount":1, + "Colour":3, + "ValueDisplayMode":0 + }, + { + "Name":"ADDR", + "ID":522472268, + "Position":{ + "x":-11.5, + "y":1.0 + }, + "BitCount":4, + "Colour":2, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":350543267, + "Position":{ + "x":5.75, + "y":-1.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"4-1BIT", + "ID":1693845699, + "Label":null, + "Position":{ + "x":-9.0525, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":3,"PinID":1},{"PinColour":3,"PinID":2},{"PinColour":2,"PinID":3},{"PinColour":2,"PinID":4}], + "InternalData":null + }, + { + "Name":"DECODER-2", + "ID":148960258, + "Label":"COLUMN", + "Position":{ + "x":-7.265, + "y":2.875 + }, + "OutputPinColourInfo":[{"PinColour":3,"PinID":1868926879},{"PinColour":3,"PinID":18957384},{"PinColour":3,"PinID":199145797},{"PinColour":3,"PinID":1076039863}], + "InternalData":null + }, + { + "Name":"DECODER-2", + "ID":1225817006, + "Label":"ROW", + "Position":{ + "x":-7.265, + "y":-0.625 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":1868926879},{"PinColour":2,"PinID":18957384},{"PinColour":2,"PinID":199145797},{"PinColour":2,"PinID":1076039863}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":100866357, + "Label":"", + "Position":{ + "x":-5.1075, + "y":1.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":600579192, + "Label":"", + "Position":{ + "x":-5.1075, + "y":0.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":267273814, + "Label":"", + "Position":{ + "x":-5.1075, + "y":-1.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":1498518742, + "Label":"", + "Position":{ + "x":-5.1075, + "y":-2.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":1038408772, + "Label":"", + "Position":{ + "x":-2.4825, + "y":1.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":2094839483, + "Label":"", + "Position":{ + "x":-2.4825, + "y":0.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":2101761236, + "Label":"", + "Position":{ + "x":-2.4825, + "y":-1.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":551489447, + "Label":"", + "Position":{ + "x":-2.4825, + "y":-2.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":627338687, + "Label":"", + "Position":{ + "x":0.1425, + "y":1.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":574781497, + "Label":"", + "Position":{ + "x":0.1425, + "y":0.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":844162557, + "Label":"", + "Position":{ + "x":0.1425, + "y":-1.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":172825662, + "Label":"", + "Position":{ + "x":0.1425, + "y":-2.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":580734989, + "Label":"", + "Position":{ + "x":2.7675, + "y":1.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":181927659, + "Label":"", + "Position":{ + "x":2.7675, + "y":0.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":788454371, + "Label":"", + "Position":{ + "x":2.7675, + "y":-1.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"MEM-1", + "ID":452514110, + "Label":"", + "Position":{ + "x":2.7675, + "y":-2.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1923212434}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1048288960, + "Label":"", + "Position":{ + "x":-9.015, + "y":2.75 + }, + "OutputPinColourInfo":[{"PinColour":4,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":52524135, + "Label":"", + "Position":{ + "x":-7.265, + "y":4.0 + }, + "OutputPinColourInfo":[{"PinColour":1,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"BUS-1", + "ID":1367944743, + "Label":"", + "Position":{ + "x":-4.74, + "y":0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], + "InternalData":[833997787,0] + }, + { + "Name":"BUS-TERMINUS-1", + "ID":833997787, + "Label":"", + "Position":{ + "x":-4.74, + "y":-2.125 + }, + "OutputPinColourInfo":[], + "InternalData":[1367944743,1] + }, + { + "Name":"3-STATE BUFFER", + "ID":109387279, + "Label":"", + "Position":{ + "x":4.875, + "y":-0.5625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":522472268 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1693845699 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1693845699 + }, + "TargetPinAddress":{ + "PinID":192060771, + "PinOwnerID":148960258 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-8.25,"y":1.375},{"x":-8.25,"y":3.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1693845699 + }, + "TargetPinAddress":{ + "PinID":1480848655, + "PinOwnerID":148960258 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-8.125,"y":1.125},{"x":-8.125,"y":2.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":1693845699 + }, + "TargetPinAddress":{ + "PinID":192060771, + "PinOwnerID":1225817006 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-8.125,"y":0.875},{"x":-8.125,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1693845699 + }, + "TargetPinAddress":{ + "PinID":1480848655, + "PinOwnerID":1225817006 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-8.25,"y":0.625},{"x":-8.25,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":452514110 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.375,"y":-1.0},{"x":-6.375,"y":-3.625},{"x":1.75,"y":-3.625},{"x":1.75,"y":-3.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":172825662 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-0.875,"y":-3.625},{"x":-0.875,"y":-3.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":551489447 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-3.5,"y":-3.625},{"x":-3.5,"y":-3.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":1498518742 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-6.125,"y":-3.625},{"x":-6.125,"y":-3.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":788454371 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.75,"y":-0.75},{"x":1.75,"y":-1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":844162557 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.875,"y":-0.75},{"x":-0.875,"y":-1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":2101761236 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.5,"y":-0.75},{"x":-3.5,"y":-1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":267273814 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-6.125,"y":-0.75},{"x":-6.125,"y":-1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":181927659 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.75,"y":-0.5},{"x":1.75,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":574781497 + }, + "ConnectionType":1, + "ConnectedWireIndex":13, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.875,"y":-0.5},{"x":-0.875,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":2094839483 + }, + "ConnectionType":1, + "ConnectedWireIndex":13, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.5,"y":-0.5},{"x":-3.5,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":600579192 + }, + "ConnectionType":1, + "ConnectedWireIndex":13, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-6.125,"y":-0.5},{"x":-6.125,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":580734989 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.375,"y":-0.25},{"x":-6.375,"y":2.375},{"x":1.75,"y":2.375},{"x":1.75,"y":1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":627338687 + }, + "ConnectionType":1, + "ConnectedWireIndex":17, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-0.875,"y":2.375},{"x":-0.875,"y":1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":1038408772 + }, + "ConnectionType":1, + "ConnectedWireIndex":17, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-3.5,"y":2.375},{"x":-3.5,"y":1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":1225817006 + }, + "TargetPinAddress":{ + "PinID":1413611334, + "PinOwnerID":100866357 + }, + "ConnectionType":1, + "ConnectedWireIndex":17, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-6.125,"y":2.375},{"x":-6.125,"y":1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":1498518742 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.25,"y":2.5},{"x":-6.25,"y":-3.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":267273814 + }, + "ConnectionType":1, + "ConnectedWireIndex":21, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-6.25,"y":-1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":600579192 + }, + "ConnectionType":1, + "ConnectedWireIndex":21, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-6.25,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":100866357 + }, + "ConnectionType":1, + "ConnectedWireIndex":21, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-6.25,"y":1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":551489447 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.625,"y":2.75},{"x":-3.625,"y":-3.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":2101761236 + }, + "ConnectionType":1, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-3.625,"y":-1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":2094839483 + }, + "ConnectionType":1, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-3.625,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":1038408772 + }, + "ConnectionType":1, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-3.625,"y":1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":172825662 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-1.0,"y":3.0},{"x":-1.0,"y":-3.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":844162557 + }, + "ConnectionType":1, + "ConnectedWireIndex":29, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.0,"y":-1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":574781497 + }, + "ConnectionType":1, + "ConnectedWireIndex":29, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.0,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":627338687 + }, + "ConnectionType":1, + "ConnectedWireIndex":29, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.0,"y":1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":452514110 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.625,"y":3.25},{"x":1.625,"y":-3.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":788454371 + }, + "ConnectionType":1, + "ConnectedWireIndex":33, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":1.625,"y":-1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":181927659 + }, + "ConnectionType":1, + "ConnectedWireIndex":33, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":1.625,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":148960258 + }, + "TargetPinAddress":{ + "PinID":1709778081, + "PinOwnerID":580734989 + }, + "ConnectionType":1, + "ConnectedWireIndex":33, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":1.625,"y":1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":452514110 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":2.0,"y":4.375},{"x":2.0,"y":-2.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":788454371 + }, + "ConnectionType":1, + "ConnectedWireIndex":37, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":2.0,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":181927659 + }, + "ConnectionType":1, + "ConnectedWireIndex":37, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":2.0,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":580734989 + }, + "ConnectionType":1, + "ConnectedWireIndex":37, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":2.0,"y":2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":172825662 + }, + "ConnectionType":1, + "ConnectedWireIndex":37, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.625,"y":4.375},{"x":-0.625,"y":-2.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":844162557 + }, + "ConnectionType":1, + "ConnectedWireIndex":41, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.625,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":574781497 + }, + "ConnectionType":1, + "ConnectedWireIndex":41, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.625,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":627338687 + }, + "ConnectionType":1, + "ConnectedWireIndex":41, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.625,"y":2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":551489447 + }, + "ConnectionType":1, + "ConnectedWireIndex":37, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.25,"y":4.375},{"x":-3.25,"y":-2.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":2101761236 + }, + "ConnectionType":1, + "ConnectedWireIndex":45, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.25,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":2094839483 + }, + "ConnectionType":1, + "ConnectedWireIndex":45, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.25,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":1038408772 + }, + "ConnectionType":1, + "ConnectedWireIndex":45, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.25,"y":2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":1498518742 + }, + "ConnectionType":1, + "ConnectedWireIndex":37, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-5.875,"y":4.375},{"x":-5.875,"y":-2.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":267273814 + }, + "ConnectionType":1, + "ConnectedWireIndex":49, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-5.875,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":600579192 + }, + "ConnectionType":1, + "ConnectedWireIndex":49, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-5.875,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1841003398 + }, + "TargetPinAddress":{ + "PinID":1453644181, + "PinOwnerID":100866357 + }, + "ConnectionType":1, + "ConnectedWireIndex":49, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-5.875,"y":2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1707980435 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1048288960 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-9.625,"y":2.25},{"x":-9.625,"y":2.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1052884450 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1048288960 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1048288960 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":52524135 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-8.375,"y":2.75},{"x":-8.375,"y":3.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1875743195 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":52524135 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-8.625,"y":3.75},{"x":-8.625,"y":4.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":452514110 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.875,"y":4.0},{"x":1.875,"y":-2.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":788454371 + }, + "ConnectionType":1, + "ConnectedWireIndex":57, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":1.875,"y":-1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":181927659 + }, + "ConnectionType":1, + "ConnectedWireIndex":57, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":1.875,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":580734989 + }, + "ConnectionType":1, + "ConnectedWireIndex":57, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":1.875,"y":1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":172825662 + }, + "ConnectionType":1, + "ConnectedWireIndex":57, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.75,"y":4.0},{"x":-0.75,"y":-2.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":844162557 + }, + "ConnectionType":1, + "ConnectedWireIndex":61, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.75,"y":-1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":574781497 + }, + "ConnectionType":1, + "ConnectedWireIndex":61, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.75,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":627338687 + }, + "ConnectionType":1, + "ConnectedWireIndex":61, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-0.75,"y":1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":551489447 + }, + "ConnectionType":1, + "ConnectedWireIndex":57, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.375,"y":4.0},{"x":-3.375,"y":-2.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":2101761236 + }, + "ConnectionType":1, + "ConnectedWireIndex":65, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.375,"y":-1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":2094839483 + }, + "ConnectionType":1, + "ConnectedWireIndex":65, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.375,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":1038408772 + }, + "ConnectionType":1, + "ConnectedWireIndex":65, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.375,"y":1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":1498518742 + }, + "ConnectionType":1, + "ConnectedWireIndex":57, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-6.0,"y":4.0},{"x":-6.0,"y":-2.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":267273814 + }, + "ConnectionType":1, + "ConnectedWireIndex":69, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-6.0,"y":-1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":600579192 + }, + "ConnectionType":1, + "ConnectedWireIndex":69, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-6.0,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":52524135 + }, + "TargetPinAddress":{ + "PinID":870941495, + "PinOwnerID":100866357 + }, + "ConnectionType":1, + "ConnectedWireIndex":69, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-6.0,"y":1.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1367944743 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":833997787 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.625,"y":0.875},{"x":3.625,"y":-2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":100866357 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":1.625},{"x":-4.25,"y":0.875}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":600579192 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":0.125},{"x":-4.25,"y":0.875}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":1038408772 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":1.625},{"x":-1.625,"y":0.875}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":2094839483 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":0.125},{"x":-1.625,"y":0.875}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":627338687 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":1.625},{"x":1.0,"y":0.875}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":574781497 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":0.125},{"x":1.0,"y":0.875}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":580734989 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":1.625},{"x":3.5,"y":0.875}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":181927659 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.0,"y":0.0},{"x":3.625,"y":0.125}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":788454371 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.0,"y":0.0},{"x":3.625,"y":-1.375}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":452514110 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":-2.875},{"x":3.5,"y":-2.125}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":172825662 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":-2.875},{"x":1.0,"y":-2.125}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":844162557 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":-1.375},{"x":1.0,"y":-2.125}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":2101761236 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":-1.375},{"x":-1.625,"y":-2.125}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":551489447 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":-2.875},{"x":-1.625,"y":-2.125}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":267273814 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":-1.375},{"x":-4.25,"y":-2.125}] + }, + { + "SourcePinAddress":{ + "PinID":1923212434, + "PinOwnerID":1498518742 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1367944743 + }, + "ConnectionType":2, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":-2.875},{"x":-4.25,"y":-2.125}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1367944743 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":109387279 + }, + "ConnectionType":1, + "ConnectedWireIndex":73, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":3.625,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1048288960 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":109387279 + }, + "ConnectionType":1, + "ConnectedWireIndex":55, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-8.375,"y":3.625},{"x":3.875,"y":3.625},{"x":3.875,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":109387279 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":350543267 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.875,"y":-0.5625},{"x":5.875,"y":-1.125},{"x":4.125,"y":-1.125},{"x":4.125,"y":-1.5},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/MEM-256.json b/TestData/Projects/MainTest/Chips/MEM-256.json new file mode 100644 index 00000000..6035a59c --- /dev/null +++ b/TestData/Projects/MainTest/Chips/MEM-256.json @@ -0,0 +1,1766 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.819403052, + "g": 0.490690053, + "b": 0.106813826, + "a": 1 + }, + "Displays":[], + "InputPins":[ + { + "Name":"DATA", + "ID":50697977, + "Position":{ + "x":-11.875, + "y":4.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"STORE", + "ID":1274086089, + "Position":{ + "x":-11.875, + "y":3.5625 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + }, + { + "Name":"ADDR", + "ID":882163141, + "Position":{ + "x":-11.875, + "y":2.6875 + }, + "BitCount":8, + "Colour":2, + "ValueDisplayMode":0 + } + ], + "Name": "MEM-256", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT", + "ID":888145750, + "Position":{ + "x":7.25, + "y":-1.1875 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.36327, + "y": 1.0 + }, + "SubChips":[ + { + "Name":"MEM-16", + "ID":641159173, + "Label":"", + "Position":{ + "x":-3.265, + "y":1.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":1109383114, + "Label":"", + "Position":{ + "x":-3.265, + "y":-0.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":2135605371, + "Label":"", + "Position":{ + "x":-3.265, + "y":-2.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":1039278762, + "Label":"", + "Position":{ + "x":-3.265, + "y":-4.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":1119351010, + "Label":"", + "Position":{ + "x":-0.64, + "y":1.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":2000888510, + "Label":"", + "Position":{ + "x":-0.64, + "y":-0.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":1928097403, + "Label":"", + "Position":{ + "x":-0.64, + "y":-2.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":76640043, + "Label":"", + "Position":{ + "x":-0.64, + "y":-4.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":510436228, + "Label":"", + "Position":{ + "x":1.985, + "y":1.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":684417203, + "Label":"", + "Position":{ + "x":1.985, + "y":-0.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":1600798356, + "Label":"", + "Position":{ + "x":1.985, + "y":-2.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":1490309237, + "Label":"", + "Position":{ + "x":1.985, + "y":-4.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":265465071, + "Label":"", + "Position":{ + "x":4.61, + "y":1.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":93777886, + "Label":"", + "Position":{ + "x":4.61, + "y":-0.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":992845923, + "Label":"", + "Position":{ + "x":4.61, + "y":-2.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"MEM-16", + "ID":349962702, + "Label":"", + "Position":{ + "x":4.61, + "y":-4.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":350543267}], + "InternalData":null + }, + { + "Name":"8-4BIT", + "ID":171647764, + "Label":"", + "Position":{ + "x":-9.4275, + "y":1.6875 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":1},{"PinColour":6,"PinID":2}], + "InternalData":null + }, + { + "Name":"4-1BIT", + "ID":808479528, + "Label":"", + "Position":{ + "x":-7.6775, + "y":1.875 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":1},{"PinColour":2,"PinID":2},{"PinColour":3,"PinID":3},{"PinColour":3,"PinID":4}], + "InternalData":null + }, + { + "Name":"DECODER-2", + "ID":570339773, + "Label":"COLUMN", + "Position":{ + "x":-5.8775, + "y":3.25 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":1868926879},{"PinColour":2,"PinID":18957384},{"PinColour":2,"PinID":199145797},{"PinColour":2,"PinID":1076039863}], + "InternalData":null + }, + { + "Name":"DECODER-2", + "ID":2072605531, + "Label":"ROW", + "Position":{ + "x":-5.8775, + "y":-1.1875 + }, + "OutputPinColourInfo":[{"PinColour":3,"PinID":1868926879},{"PinColour":3,"PinID":18957384},{"PinColour":3,"PinID":199145797},{"PinColour":3,"PinID":1076039863}], + "InternalData":null + }, + { + "Name":"BUS-1", + "ID":1103306126, + "Label":"", + "Position":{ + "x":-2.865, + "y":0.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], + "InternalData":[383283908,0] + }, + { + "Name":"BUS-TERMINUS-1", + "ID":383283908, + "Label":"", + "Position":{ + "x":-2.865, + "y":-3.1875 + }, + "OutputPinColourInfo":[], + "InternalData":[1103306126,1] + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":882163141 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":171647764 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-10.375,"y":2.6875},{"x":-10.375,"y":1.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":265465071 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-8.5,"y":1.5},{"x":-8.5,"y":-5.375},{"x":3.125,"y":-5.375},{"x":3.125,"y":1.3125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":93777886 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":3.125,"y":-0.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":992845923 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":3.125,"y":-2.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":349962702 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":3.125,"y":-4.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":510436228 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.5,"y":-5.375},{"x":0.5,"y":1.3125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":684417203 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.5,"y":-0.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":1600798356 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.5,"y":-2.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":1490309237 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.5,"y":-4.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":1119351010 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-2.125,"y":-5.375},{"x":-2.125,"y":1.3125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":2000888510 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.125,"y":-0.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":1928097403 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.125,"y":-2.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":76640043 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.125,"y":-4.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":641159173 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-4.75,"y":-5.375},{"x":-4.75,"y":1.3125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":1109383114 + }, + "ConnectionType":1, + "ConnectedWireIndex":13, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.75,"y":-0.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":2135605371 + }, + "ConnectionType":1, + "ConnectedWireIndex":13, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.75,"y":-2.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":522472268, + "PinOwnerID":1039278762 + }, + "ConnectionType":1, + "ConnectedWireIndex":13, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.75,"y":-4.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":171647764 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":808479528 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":808479528 + }, + "TargetPinAddress":{ + "PinID":1480848655, + "PinOwnerID":2072605531 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.9375,"y":1.5},{"x":-6.9375,"y":-1.5625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":808479528 + }, + "TargetPinAddress":{ + "PinID":192060771, + "PinOwnerID":2072605531 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.8125,"y":1.75},{"x":-6.8125,"y":-0.8125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":808479528 + }, + "TargetPinAddress":{ + "PinID":1480848655, + "PinOwnerID":570339773 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.8125,"y":2.0},{"x":-6.8125,"y":2.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":808479528 + }, + "TargetPinAddress":{ + "PinID":192060771, + "PinOwnerID":570339773 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.9375,"y":2.25},{"x":-6.9375,"y":3.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":349962702 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.375,"y":3.625},{"x":3.375,"y":-4.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":992845923 + }, + "ConnectionType":1, + "ConnectedWireIndex":22, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":3.375,"y":-2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":93777886 + }, + "ConnectionType":1, + "ConnectedWireIndex":22, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":3.375,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":265465071 + }, + "ConnectionType":1, + "ConnectedWireIndex":22, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":3.375,"y":1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":1490309237 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":3.375},{"x":0.75,"y":-4.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":1600798356 + }, + "ConnectionType":1, + "ConnectedWireIndex":26, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.75,"y":-2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":684417203 + }, + "ConnectionType":1, + "ConnectedWireIndex":26, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.75,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":510436228 + }, + "ConnectionType":1, + "ConnectedWireIndex":26, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.75,"y":1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":76640043 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-1.875,"y":3.125},{"x":-1.875,"y":-4.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":1928097403 + }, + "ConnectionType":1, + "ConnectedWireIndex":30, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.875,"y":-2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":2000888510 + }, + "ConnectionType":1, + "ConnectedWireIndex":30, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.875,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":1119351010 + }, + "ConnectionType":1, + "ConnectedWireIndex":30, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.875,"y":1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":1039278762 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.5,"y":2.875},{"x":-4.5,"y":-4.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":2135605371 + }, + "ConnectionType":1, + "ConnectedWireIndex":34, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-4.5,"y":-2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":1109383114 + }, + "ConnectionType":1, + "ConnectedWireIndex":34, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-4.5,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":570339773 + }, + "TargetPinAddress":{ + "PinID":1707980435, + "PinOwnerID":641159173 + }, + "ConnectionType":1, + "ConnectedWireIndex":34, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-4.5,"y":1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":265465071 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.9375,"y":-0.8125},{"x":-4.9375,"y":2.6875},{"x":3.5,"y":2.6875},{"x":3.5,"y":1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":510436228 + }, + "ConnectionType":1, + "ConnectedWireIndex":38, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.875,"y":2.6875},{"x":0.875,"y":1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":1119351010 + }, + "ConnectionType":1, + "ConnectedWireIndex":38, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-1.75,"y":2.6875},{"x":-1.75,"y":1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1868926879, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":641159173 + }, + "ConnectionType":1, + "ConnectedWireIndex":38, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-4.375,"y":2.6875},{"x":-4.375,"y":1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":93777886 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":-1.0625},{"x":3.5,"y":-0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":684417203 + }, + "ConnectionType":1, + "ConnectedWireIndex":42, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.875,"y":-1.0625},{"x":0.875,"y":-0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":2000888510 + }, + "ConnectionType":1, + "ConnectedWireIndex":42, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.75,"y":-1.0625},{"x":-1.75,"y":-0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":18957384, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":1109383114 + }, + "ConnectionType":1, + "ConnectedWireIndex":42, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.375,"y":-1.0625},{"x":-4.375,"y":-0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":992845923 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":-1.3125},{"x":3.5,"y":-2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":1600798356 + }, + "ConnectionType":1, + "ConnectedWireIndex":46, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.875,"y":-1.3125},{"x":0.875,"y":-2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":1928097403 + }, + "ConnectionType":1, + "ConnectedWireIndex":46, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.75,"y":-1.3125},{"x":-1.75,"y":-2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":199145797, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":2135605371 + }, + "ConnectionType":1, + "ConnectedWireIndex":46, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.375,"y":-1.3125},{"x":-4.375,"y":-2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":349962702 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.9375,"y":-1.5625},{"x":-4.9375,"y":-5.125},{"x":3.5,"y":-5.125},{"x":3.5,"y":-4.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":1490309237 + }, + "ConnectionType":1, + "ConnectedWireIndex":50, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.875,"y":-5.125},{"x":0.875,"y":-4.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":76640043 + }, + "ConnectionType":1, + "ConnectedWireIndex":50, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-1.75,"y":-5.125},{"x":-1.75,"y":-4.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1076039863, + "PinOwnerID":2072605531 + }, + "TargetPinAddress":{ + "PinID":1052884450, + "PinOwnerID":1039278762 + }, + "ConnectionType":1, + "ConnectedWireIndex":50, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-4.375,"y":-5.125},{"x":-4.375,"y":-4.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":349962702 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.75,"y":4.125},{"x":3.75,"y":-3.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":992845923 + }, + "ConnectionType":1, + "ConnectedWireIndex":54, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":3.75,"y":-1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":93777886 + }, + "ConnectionType":1, + "ConnectedWireIndex":54, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":3.75,"y":0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":265465071 + }, + "ConnectionType":1, + "ConnectedWireIndex":54, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":3.75,"y":2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":1490309237 + }, + "ConnectionType":1, + "ConnectedWireIndex":54, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.125,"y":4.125},{"x":1.125,"y":-3.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":1600798356 + }, + "ConnectionType":1, + "ConnectedWireIndex":58, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.125,"y":-1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":684417203 + }, + "ConnectionType":1, + "ConnectedWireIndex":58, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.125,"y":0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":510436228 + }, + "ConnectionType":1, + "ConnectedWireIndex":58, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.125,"y":2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":76640043 + }, + "ConnectionType":1, + "ConnectedWireIndex":54, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.5,"y":4.125},{"x":-1.5,"y":-3.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":1928097403 + }, + "ConnectionType":1, + "ConnectedWireIndex":62, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.5,"y":-1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":2000888510 + }, + "ConnectionType":1, + "ConnectedWireIndex":62, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.5,"y":0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":1119351010 + }, + "ConnectionType":1, + "ConnectedWireIndex":62, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.5,"y":2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":1039278762 + }, + "ConnectionType":1, + "ConnectedWireIndex":54, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.125,"y":4.125},{"x":-4.125,"y":-3.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":2135605371 + }, + "ConnectionType":1, + "ConnectedWireIndex":66, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.125,"y":-1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":1109383114 + }, + "ConnectionType":1, + "ConnectedWireIndex":66, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.125,"y":0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":50697977 + }, + "TargetPinAddress":{ + "PinID":1841003398, + "PinOwnerID":641159173 + }, + "ConnectionType":1, + "ConnectedWireIndex":66, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.125,"y":2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":349962702 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-9.5625,"y":3.5625},{"x":-9.5625,"y":4.0},{"x":3.625,"y":4.0},{"x":3.625,"y":-3.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":992845923 + }, + "ConnectionType":1, + "ConnectedWireIndex":70, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":3.625,"y":-1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":93777886 + }, + "ConnectionType":1, + "ConnectedWireIndex":70, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":3.625,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":265465071 + }, + "ConnectionType":1, + "ConnectedWireIndex":70, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":3.625,"y":2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":1490309237 + }, + "ConnectionType":1, + "ConnectedWireIndex":70, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":1.0,"y":4.0},{"x":1.0,"y":-3.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":1600798356 + }, + "ConnectionType":1, + "ConnectedWireIndex":74, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.0,"y":-1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":684417203 + }, + "ConnectionType":1, + "ConnectedWireIndex":74, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.0,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":510436228 + }, + "ConnectionType":1, + "ConnectedWireIndex":74, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.0,"y":2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":76640043 + }, + "ConnectionType":1, + "ConnectedWireIndex":70, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-1.625,"y":4.0},{"x":-1.625,"y":-3.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":1928097403 + }, + "ConnectionType":1, + "ConnectedWireIndex":78, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.625,"y":-1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":2000888510 + }, + "ConnectionType":1, + "ConnectedWireIndex":78, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.625,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":1119351010 + }, + "ConnectionType":1, + "ConnectedWireIndex":78, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.625,"y":2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":1039278762 + }, + "ConnectionType":1, + "ConnectedWireIndex":70, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-4.25,"y":4.0},{"x":-4.25,"y":-3.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":2135605371 + }, + "ConnectionType":1, + "ConnectedWireIndex":82, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.25,"y":-1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":1109383114 + }, + "ConnectionType":1, + "ConnectedWireIndex":82, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.25,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1274086089 + }, + "TargetPinAddress":{ + "PinID":1875743195, + "PinOwnerID":641159173 + }, + "ConnectionType":1, + "ConnectedWireIndex":82, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.25,"y":2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1103306126 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":383283908 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.75,"y":0.8125},{"x":5.75,"y":-3.1875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1103306126 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":888145750 + }, + "ConnectionType":1, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":5.75,"y":-1.1875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":641159173 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":1.8125},{"x":-2.375,"y":0.8125}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":1109383114 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":-0.1875},{"x":-2.375,"y":0.8125}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":1119351010 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":1.8125},{"x":0.25,"y":0.8125}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":2000888510 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":-0.1875},{"x":0.25,"y":0.8125}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":510436228 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":2.875,"y":1.8125},{"x":2.875,"y":0.8125}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":684417203 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":2.875,"y":-0.1875},{"x":2.875,"y":0.8125}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":265465071 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":1.8125},{"x":5.5,"y":0.8125}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":93777886 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":-0.1875},{"x":5.5,"y":0.8125}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":992845923 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":-2.1875},{"x":5.5,"y":-3.1875}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":349962702 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":5.5,"y":-4.1875},{"x":5.5,"y":-3.1875}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":1600798356 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":2.875,"y":-2.1875},{"x":2.875,"y":-3.1875}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":1490309237 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":2.875,"y":-4.1875},{"x":2.875,"y":-3.1875}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":1928097403 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":-2.1875},{"x":0.25,"y":-3.1875}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":76640043 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":-4.1875},{"x":0.25,"y":-3.1875}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":2135605371 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":-2.1875},{"x":-2.375,"y":-3.1875}] + }, + { + "SourcePinAddress":{ + "PinID":350543267, + "PinOwnerID":1039278762 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1103306126 + }, + "ConnectionType":2, + "ConnectedWireIndex":86, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":-2.375,"y":-4.1875},{"x":-2.375,"y":-3.1875}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/MUX-8.json b/TestData/Projects/MainTest/Chips/MUX-8.json new file mode 100644 index 00000000..39a91afc --- /dev/null +++ b/TestData/Projects/MainTest/Chips/MUX-8.json @@ -0,0 +1,224 @@ +{ + "Name": "MUX-8", + "NameLocation": 0, + "Size": { + "x": 0.95, + "y": 1.25 + }, + "Colour": { + "r": 0.228413224, + "g": 0.443671256, + "b": 0.387848169, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN-8", + "ID":480667918, + "Position":{ + "x":-6.86243, + "y":2.0582 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN-8", + "ID":1796221764, + "Position":{ + "x":-6.82011, + "y":0.7672 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":1880005784, + "Position":{ + "x":-6.71429, + "y":-1.08466 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT-8", + "ID":1454394007, + "Position":{ + "x":6.1746, + "y":0.42857 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"AND(8,1)", + "ID":658830639, + "Label":null, + "Position":{ + "x":-0.81031, + "y":1.32927 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":396985423, + "Label":null, + "Position":{ + "x":-3.62538, + "y":-1.12454 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"AND(8,1)", + "ID":241193890, + "Label":null, + "Position":{ + "x":-0.67196, + "y":-0.51323 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], + "InternalData":null + }, + { + "Name":"OR-8", + "ID":73748522, + "Label":null, + "Position":{ + "x":2.1746, + "y":0.41799 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1880005784 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":396985423 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":480667918 + }, + "TargetPinAddress":{ + "PinID":1888645677, + "PinOwnerID":658830639 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1796221764 + }, + "TargetPinAddress":{ + "PinID":1888645677, + "PinOwnerID":241193890 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2004659665, + "PinOwnerID":658830639 + }, + "TargetPinAddress":{ + "PinID":1888645677, + "PinOwnerID":73748522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2004659665, + "PinOwnerID":241193890 + }, + "TargetPinAddress":{ + "PinID":955458786, + "PinOwnerID":73748522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2004659665, + "PinOwnerID":73748522 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1454394007 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":396985423 + }, + "TargetPinAddress":{ + "PinID":1465123542, + "PinOwnerID":658830639 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1880005784 + }, + "TargetPinAddress":{ + "PinID":1465123542, + "PinOwnerID":241193890 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.72783,"y":-1.11126},{"x":-4.76387,"y":-1.95395},{"x":-2.39079,"y":-2.10744},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/NOR.json b/TestData/Projects/MainTest/Chips/NOR.json new file mode 100644 index 00000000..a6b3e961 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/NOR.json @@ -0,0 +1,227 @@ +{ + "Name": "NOR", + "NameLocation": 0, + "Size": { + "x": 0.68914, + "y": 0.5 + }, + "Colour": { + "r": 0.5507216, + "g": 0.33768934, + "b": 0.860487044, + "a": 1 + }, + "InputPins":[ + { + "Name":"B", + "ID":2119183610, + "Position":{ + "x":-5.125, + "y":-0.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"A", + "ID":115927082, + "Position":{ + "x":-5.125, + "y":-1.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":356855654, + "Position":{ + "x":3.0, + "y":-0.625 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NAND", + "ID":25157768, + "Label":null, + "Position":{ + "x":-0.875, + "y":-0.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":675789592, + "Label":"", + "Position":{ + "x":0.75, + "y":-0.625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1513462588, + "Label":"", + "Position":{ + "x":-2.75, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1846003621, + "Label":"", + "Position":{ + "x":-2.75, + "y":-1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":675789592 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":356855654 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":25157768 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":675789592 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":-0.625},{"x":0.0,"y":-0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":25157768 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":675789592 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":-0.625},{"x":0.0,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2119183610 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1513462588 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2119183610 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1513462588 + }, + "ConnectionType":1, + "ConnectedWireIndex":3, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.625,"y":-0.125},{"x":-3.625,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":115927082 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1846003621 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":115927082 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1846003621 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.625,"y":-1.125},{"x":-3.625,"y":-0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1513462588 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":25157768 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-1.75,"y":-0.25},{"x":-1.75,"y":-0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1846003621 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":25157768 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-1.75,"y":-1.0},{"x":-1.75,"y":-0.75},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/NOT-8.json b/TestData/Projects/MainTest/Chips/NOT-8.json new file mode 100644 index 00000000..f3008553 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/NOT-8.json @@ -0,0 +1,408 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.581735969, + "g": 0.8893554, + "b": 0.9458656, + "a": 1 + }, + "Displays": null, + "InputPins":[ + { + "Name":"IN-8", + "ID":1888645677, + "Position":{ + "x":-8.15344, + "y":0.4709 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "NOT-8", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT-8", + "ID":2004659665, + "Position":{ + "x":7.25, + "y":-0.25 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.14, + "y": 1.06 + }, + "SubChips":[ + { + "Name":"NOT", + "ID":1232575724, + "Label":null, + "Position":{ + "x":-1.265, + "y":1.9375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":144616815, + "Label":null, + "Position":{ + "x":-1.265, + "y":1.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1320117519, + "Label":null, + "Position":{ + "x":-1.265, + "y":0.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1018796979, + "Label":null, + "Position":{ + "x":-1.265, + "y":0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1652402405, + "Label":null, + "Position":{ + "x":-1.265, + "y":-0.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1233333987, + "Label":null, + "Position":{ + "x":-1.265, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":526472203, + "Label":null, + "Position":{ + "x":-1.265, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":601342476, + "Label":null, + "Position":{ + "x":-1.265, + "y":-2.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":17125604, + "Label":"", + "Position":{ + "x":-4.87902, + "y":0.42697 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"1-8BIT", + "ID":1813651453, + "Label":"", + "Position":{ + "x":2.1975, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1888645677 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":17125604 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":17125604 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1232575724 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":17125604 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":144616815 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":17125604 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1320117519 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":17125604 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1018796979 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":17125604 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1652402405 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":17125604 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1233333987 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":17125604 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":526472203 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":17125604 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":601342476 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1813651453 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2004659665 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1232575724 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1813651453 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":144616815 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1813651453 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1320117519 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":1813651453 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1018796979 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":1813651453 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1652402405 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":1813651453 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1233333987 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":1813651453 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":526472203 + }, + "TargetPinAddress":{ + "PinID":6, + "PinOwnerID":1813651453 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":601342476 + }, + "TargetPinAddress":{ + "PinID":7, + "PinOwnerID":1813651453 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/NOT.json b/TestData/Projects/MainTest/Chips/NOT.json new file mode 100644 index 00000000..496ff9be --- /dev/null +++ b/TestData/Projects/MainTest/Chips/NOT.json @@ -0,0 +1,99 @@ +{ + "Name": "NOT", + "NameLocation": 0, + "Size": { + "x": 0.95, + "y": 0.375 + }, + "Colour": { + "r": 0.61706847, + "g": 0.148353323, + "b": 0.102315307, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":913380392, + "Position":{ + "x":-6.83871, + "y":-0.70968 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":2001814538, + "Position":{ + "x":4.90323, + "y":-0.82258 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NAND", + "ID":1990789974, + "Label":null, + "Position":{ + "x":-1.98387, + "y":-0.25806 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":913380392 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1990789974 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":913380392 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1990789974 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1990789974 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2001814538 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/OR-8.json b/TestData/Projects/MainTest/Chips/OR-8.json new file mode 100644 index 00000000..df8d4052 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/OR-8.json @@ -0,0 +1,556 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.581735969, + "g": 0.8893554, + "b": 0.9458656, + "a": 1 + }, + "Displays": null, + "InputPins":[ + { + "Name":"IN-8", + "ID":1888645677, + "Position":{ + "x":-8.15344, + "y":0.4709 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN-8", + "ID":955458786, + "Position":{ + "x":-8.19278, + "y":-2.65079 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Name": "OR-8", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT-8", + "ID":2004659665, + "Position":{ + "x":7.21164, + "y":-0.42857 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.14, + "y": 1.06 + }, + "SubChips":[ + { + "Name":"OR", + "ID":1514715763, + "Label":null, + "Position":{ + "x":-0.78836, + "y":1.61376 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":521432609, + "Label":null, + "Position":{ + "x":-0.78836, + "y":0.90376 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1299591218, + "Label":null, + "Position":{ + "x":-0.78836, + "y":0.19376 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":2048311878, + "Label":null, + "Position":{ + "x":-0.78836, + "y":-0.51624 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":75564828, + "Label":null, + "Position":{ + "x":-0.78836, + "y":-1.22624 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":814774284, + "Label":null, + "Position":{ + "x":-0.78836, + "y":-1.93624 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":913923563, + "Label":null, + "Position":{ + "x":-0.78836, + "y":-2.64624 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1589421104, + "Label":null, + "Position":{ + "x":-0.78836, + "y":-3.35624 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":133364796, + "Label":"", + "Position":{ + "x":-4.31023, + "y":-2.63635 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":670864341, + "Label":"", + "Position":{ + "x":-4.17698, + "y":0.38384 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"1-8BIT", + "ID":615299522, + "Label":"", + "Position":{ + "x":2.1521, + "y":-0.42672 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":615299522 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2004659665 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1514715763 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":615299522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":521432609 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":615299522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1299591218 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":615299522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":2048311878 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":615299522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":75564828 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":615299522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":814774284 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":615299522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":913923563 + }, + "TargetPinAddress":{ + "PinID":6, + "PinOwnerID":615299522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1589421104 + }, + "TargetPinAddress":{ + "PinID":7, + "PinOwnerID":615299522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1888645677 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":670864341 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":670864341 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1514715763 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":670864341 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":521432609 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":670864341 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1299591218 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":670864341 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":2048311878 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":670864341 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":75564828 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":670864341 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":814774284 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":670864341 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":913923563 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":670864341 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1589421104 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":955458786 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":133364796 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":133364796 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1589421104 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":133364796 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":913923563 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":133364796 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":814774284 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":133364796 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":75564828 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":133364796 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":2048311878 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":133364796 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1299591218 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":133364796 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":521432609 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":133364796 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1514715763 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/OR.json b/TestData/Projects/MainTest/Chips/OR.json new file mode 100644 index 00000000..e2f170e0 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/OR.json @@ -0,0 +1,160 @@ +{ + "Name": "OR", + "NameLocation": 0, + "Size": { + "x": 0.7, + "y": 0.5 + }, + "Colour": { + "r": 0.6263048, + "g": 0.301900476, + "b": 0.9402276, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":2119183610, + "Position":{ + "x":-7.35484, + "y":-0.19355 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":115927082, + "Position":{ + "x":-7.35484, + "y":-0.69355 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":356855654, + "Position":{ + "x":3.06452, + "y":-0.80645 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NOT", + "ID":9409912, + "Label":null, + "Position":{ + "x":-3.66129, + "y":-0.27419 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":645027765, + "Label":null, + "Position":{ + "x":-3.66129, + "y":-0.84919 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":25157768, + "Label":null, + "Position":{ + "x":-0.91935, + "y":-0.58065 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2119183610 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":9409912 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":115927082 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":645027765 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":9409912 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":25157768 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":645027765 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":25157768 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":25157768 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":356855654 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/PC.json b/TestData/Projects/MainTest/Chips/PC.json new file mode 100644 index 00000000..af5862e6 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/PC.json @@ -0,0 +1,391 @@ +{ + "Name": "PC", + "NameLocation": 0, + "Size": { + "x": 0.91, + "y": 2.09 + }, + "Colour": { + "r": 0.307888329, + "g": 0.156660333, + "b": 0.102064058, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN-8", + "ID":1305525690, + "Position":{ + "x":-6.53439, + "y":1.24339 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"STORE", + "ID":1847613819, + "Position":{ + "x":-6.44974, + "y":-0.41799 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":1506181664, + "Position":{ + "x":-6.52381, + "y":-1.79365 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"INCREMENT", + "ID":572135790, + "Position":{ + "x":-6.74603, + "y":-3.66667 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"RESET", + "ID":939662745, + "Position":{ + "x":-6.75088, + "y":-4.5889 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT-8", + "ID":1994428648, + "Position":{ + "x":6.18982, + "y":1.13845 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + } + ], + "SubChips":[ + { + "Name":"MUX-8", + "ID":1043788059, + "Label":null, + "Position":{ + "x":-2.13228, + "y":1.37037 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1454394007}], + "InternalData":null + }, + { + "Name":"REG-8", + "ID":776688162, + "Label":null, + "Position":{ + "x":0.7037, + "y":-1.06349 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], + "InternalData":null + }, + { + "Name":"ADDER-8", + "ID":1377545368, + "Label":null, + "Position":{ + "x":5.97355, + "y":-0.31217 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":749386852}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1851679904, + "Label":null, + "Position":{ + "x":-2.03704, + "y":-1.14815 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"AND(8,1)", + "ID":597423727, + "Label":null, + "Position":{ + "x":0.04911, + "y":1.56824 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2004659665}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1251472047, + "Label":null, + "Position":{ + "x":-3.70803, + "y":-4.61747 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1827821226, + "Label":null, + "Position":{ + "x":-0.43093, + "y":-2.42621 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1506181664 + }, + "TargetPinAddress":{ + "PinID":1027672421, + "PinOwnerID":776688162 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":776688162 + }, + "TargetPinAddress":{ + "PinID":1729060963, + "PinOwnerID":1377545368 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":749386852, + "PinOwnerID":1377545368 + }, + "TargetPinAddress":{ + "PinID":480667918, + "PinOwnerID":1043788059 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":7.59259,"y":-0.2381},{"x":7.22222,"y":2.77778},{"x":-4.04762,"y":3.06349},{"x":-4.25926,"y":1.70899},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1305525690 + }, + "TargetPinAddress":{ + "PinID":1796221764, + "PinOwnerID":1043788059 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1847613819 + }, + "TargetPinAddress":{ + "PinID":1880005784, + "PinOwnerID":1043788059 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":572135790 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1851679904 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.03161,"y":-3.74639},{"x":-2.96825,"y":-1.32804},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1847613819 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1851679904 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1454394007, + "PinOwnerID":1043788059 + }, + "TargetPinAddress":{ + "PinID":1888645677, + "PinOwnerID":597423727 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2004659665, + "PinOwnerID":597423727 + }, + "TargetPinAddress":{ + "PinID":248954118, + "PinOwnerID":776688162 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.5634,"y":1.72538},{"x":-0.60803,"y":-0.51747},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":939662745 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1251472047 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1251472047 + }, + "TargetPinAddress":{ + "PinID":1465123542, + "PinOwnerID":597423727 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.15088,"y":-4.61747},{"x":-1.16517,"y":1.1111},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1851679904 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1827821226 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":939662745 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1827821226 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-4.75242,"y":-4.60863},{"x":-2.39079,"y":-2.7804},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1827821226 + }, + "TargetPinAddress":{ + "PinID":1830871312, + "PinOwnerID":776688162 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-0.0059,"y":-2.44982},{"x":-0.33648,"y":-1.21015},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":776688162 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1994428648 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":3.08802,"y":-0.31653},{"x":3.24962,"y":1.30313},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":572135790 + }, + "TargetPinAddress":{ + "PinID":833981293, + "PinOwnerID":1377545368 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.65278,"y":-3.67924},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git "a/TestData/Projects/MainTest/Chips/RAM-256\303\2278 (async).json" "b/TestData/Projects/MainTest/Chips/RAM-256\303\2278 (async).json" new file mode 100644 index 00000000..91ca927c --- /dev/null +++ "b/TestData/Projects/MainTest/Chips/RAM-256\303\2278 (async).json" @@ -0,0 +1,679 @@ +{ + "Name": "RAM-256×8 (async)", + "NameLocation": 0, + "Size": { + "x": 1.7278, + "y": 1.25 + }, + "Colour": { + "r": 0.7656969, + "g": 0.454501241, + "b": 0.229379833, + "a": 1 + }, + "InputPins":[ + { + "Name":"STORE", + "ID":1925084150, + "Position":{ + "x":-7.125, + "y":2.5 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + }, + { + "Name":"ADDR", + "ID":1622111906, + "Position":{ + "x":-7.125, + "y":1.625 + }, + "BitCount":8, + "Colour":2, + "ValueDisplayMode":1 + }, + { + "Name":"DATA", + "ID":1231977344, + "Position":{ + "x":-7.125, + "y":0.6875 + }, + "BitCount":8, + "Colour":4, + "ValueDisplayMode":1 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":1280023136, + "Position":{ + "x":7.25, + "y":2.0 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + } + ], + "SubChips":[ + { + "Name":"MEM-256", + "ID":1716858917, + "Label":"", + "Position":{ + "x":-1.18336, + "y":1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], + "InternalData":null + }, + { + "Name":"MEM-256", + "ID":455184846, + "Label":"", + "Position":{ + "x":-1.18336, + "y":0.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], + "InternalData":null + }, + { + "Name":"MEM-256", + "ID":173685817, + "Label":"", + "Position":{ + "x":-1.18336, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], + "InternalData":null + }, + { + "Name":"MEM-256", + "ID":1511496036, + "Label":"", + "Position":{ + "x":-1.18336, + "y":-2.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], + "InternalData":null + }, + { + "Name":"MEM-256", + "ID":2011167740, + "Label":"", + "Position":{ + "x":2.44164, + "y":1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], + "InternalData":null + }, + { + "Name":"MEM-256", + "ID":1451048781, + "Label":"", + "Position":{ + "x":2.44164, + "y":0.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], + "InternalData":null + }, + { + "Name":"MEM-256", + "ID":1777680199, + "Label":"", + "Position":{ + "x":2.44164, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], + "InternalData":null + }, + { + "Name":"MEM-256", + "ID":1472069271, + "Label":"", + "Position":{ + "x":2.44164, + "y":-2.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":888145750}], + "InternalData":null + }, + { + "Name":"1-8BIT", + "ID":1996454512, + "Label":"", + "Position":{ + "x":4.5725, + "y":2.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"DECIMAL-8", + "ID":101208108, + "Label":"", + "Position":{ + "x":5.86, + "y":-0.25 + }, + "OutputPinColourInfo":[], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":1651323147, + "Label":"", + "Position":{ + "x":-4.3025, + "y":-2.875 + }, + "OutputPinColourInfo":[{"PinColour":4,"PinID":1},{"PinColour":4,"PinID":2},{"PinColour":4,"PinID":3},{"PinColour":4,"PinID":4},{"PinColour":4,"PinID":5},{"PinColour":4,"PinID":6},{"PinColour":4,"PinID":7},{"PinColour":4,"PinID":8}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1996454512 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1280023136 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":888145750, + "PinOwnerID":1472069271 + }, + "TargetPinAddress":{ + "PinID":7, + "PinOwnerID":1996454512 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.625,"y":-2.25},{"x":3.625,"y":1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":888145750, + "PinOwnerID":1777680199 + }, + "TargetPinAddress":{ + "PinID":6, + "PinOwnerID":1996454512 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.5,"y":-0.875},{"x":3.5,"y":1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":888145750, + "PinOwnerID":1451048781 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":1996454512 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.375,"y":0.5},{"x":3.375,"y":1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":888145750, + "PinOwnerID":2011167740 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":1996454512 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":888145750, + "PinOwnerID":1511496036 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":1996454512 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.125,"y":-2.25},{"x":0.125,"y":2.5},{"x":3.375,"y":2.5},{"x":3.375,"y":2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":888145750, + "PinOwnerID":173685817 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":1996454512 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":-0.875},{"x":0.0,"y":2.625},{"x":3.5,"y":2.625},{"x":3.5,"y":2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":888145750, + "PinOwnerID":455184846 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1996454512 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-0.125,"y":0.5},{"x":-0.125,"y":2.75},{"x":3.625,"y":2.75},{"x":3.625,"y":2.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":888145750, + "PinOwnerID":1716858917 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1996454512 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-0.25,"y":1.875},{"x":-0.25,"y":2.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1996454512 + }, + "TargetPinAddress":{ + "PinID":39707143, + "PinOwnerID":101208108 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":5.625,"y":2.0},{"x":5.625,"y":0.625},{"x":4.1875,"y":0.625},{"x":4.1875,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1231977344 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1651323147 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-5.25,"y":0.6875},{"x":-5.25,"y":-2.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1651323147 + }, + "TargetPinAddress":{ + "PinID":50697977, + "PinOwnerID":1472069271 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.875,"y":-3.75},{"x":0.875,"y":-1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":1651323147 + }, + "TargetPinAddress":{ + "PinID":50697977, + "PinOwnerID":1777680199 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.0,"y":-3.5},{"x":-3.0,"y":-3.625},{"x":0.75,"y":-3.625},{"x":0.75,"y":-0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":1651323147 + }, + "TargetPinAddress":{ + "PinID":50697977, + "PinOwnerID":1451048781 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.875,"y":-3.25},{"x":-2.875,"y":-3.5},{"x":0.625,"y":-3.5},{"x":0.625,"y":0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":1651323147 + }, + "TargetPinAddress":{ + "PinID":50697977, + "PinOwnerID":2011167740 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.75,"y":-3.0},{"x":-2.75,"y":-3.375},{"x":0.5,"y":-3.375},{"x":0.5,"y":2.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1651323147 + }, + "TargetPinAddress":{ + "PinID":50697977, + "PinOwnerID":1511496036 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.75,"y":-2.75},{"x":-2.75,"y":-1.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":1651323147 + }, + "TargetPinAddress":{ + "PinID":50697977, + "PinOwnerID":173685817 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.875,"y":-2.5},{"x":-2.875,"y":-0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1651323147 + }, + "TargetPinAddress":{ + "PinID":50697977, + "PinOwnerID":455184846 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.0,"y":-2.25},{"x":-3.0,"y":0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1651323147 + }, + "TargetPinAddress":{ + "PinID":50697977, + "PinOwnerID":1716858917 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.125,"y":-2.0},{"x":-3.125,"y":2.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":882163141, + "PinOwnerID":1716858917 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":882163141, + "PinOwnerID":2011167740 + }, + "ConnectionType":1, + "ConnectedWireIndex":19, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.25,"y":1.625},{"x":-2.25,"y":-3.0625},{"x":1.3125,"y":-3.0625},{"x":1.3125,"y":1.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":882163141, + "PinOwnerID":1451048781 + }, + "ConnectionType":1, + "ConnectedWireIndex":20, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":1.3125,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":882163141, + "PinOwnerID":1777680199 + }, + "ConnectionType":1, + "ConnectedWireIndex":20, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":1.3125,"y":-1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":882163141, + "PinOwnerID":1472069271 + }, + "ConnectionType":1, + "ConnectedWireIndex":20, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":1.3125,"y":-2.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":882163141, + "PinOwnerID":1511496036 + }, + "ConnectionType":1, + "ConnectedWireIndex":20, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.25,"y":-2.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":882163141, + "PinOwnerID":173685817 + }, + "ConnectionType":1, + "ConnectedWireIndex":20, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.25,"y":-1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":882163141, + "PinOwnerID":455184846 + }, + "ConnectionType":1, + "ConnectedWireIndex":20, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.25,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":1274086089, + "PinOwnerID":1472069271 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-5.125,"y":2.5},{"x":-5.125,"y":3.0},{"x":1.0,"y":3.0},{"x":1.0,"y":-2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":1274086089, + "PinOwnerID":1777680199 + }, + "ConnectionType":1, + "ConnectedWireIndex":27, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":1.0,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":1274086089, + "PinOwnerID":1451048781 + }, + "ConnectionType":1, + "ConnectedWireIndex":27, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":1.0,"y":0.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":1274086089, + "PinOwnerID":2011167740 + }, + "ConnectionType":1, + "ConnectedWireIndex":27, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":1.0,"y":2.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":1274086089, + "PinOwnerID":1511496036 + }, + "ConnectionType":1, + "ConnectedWireIndex":27, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-2.625,"y":3.0},{"x":-2.625,"y":-2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":1274086089, + "PinOwnerID":173685817 + }, + "ConnectionType":1, + "ConnectedWireIndex":31, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.625,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":1274086089, + "PinOwnerID":455184846 + }, + "ConnectionType":1, + "ConnectedWireIndex":31, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.625,"y":0.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":1274086089, + "PinOwnerID":1716858917 + }, + "ConnectionType":1, + "ConnectedWireIndex":31, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.625,"y":2.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/RAM-sync.json b/TestData/Projects/MainTest/Chips/RAM-sync.json new file mode 100644 index 00000000..acc048d4 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/RAM-sync.json @@ -0,0 +1,366 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.502313733, + "g": 0.3239678, + "b": 0.28062588, + "a": 1 + }, + "Displays": null, + "InputPins":[ + { + "Name":"STORE", + "ID":1925084150, + "Position":{ + "x":-7.125, + "y":2.875 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":2039852248, + "Position":{ + "x":-7.125, + "y":2.375 + }, + "BitCount":1, + "Colour":6, + "ValueDisplayMode":0 + }, + { + "Name":"ADDR", + "ID":1622111906, + "Position":{ + "x":-7.125, + "y":1.625 + }, + "BitCount":8, + "Colour":2, + "ValueDisplayMode":1 + }, + { + "Name":"DATA", + "ID":1231977344, + "Position":{ + "x":-7.125, + "y":0.8125 + }, + "BitCount":8, + "Colour":4, + "ValueDisplayMode":1 + } + ], + "Name": "RAM-sync", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT", + "ID":1528719550, + "Position":{ + "x":6.125, + "y":0.125 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 2.675, + "y": 1.5 + }, + "SubChips":[ + { + "Name":"RAM-256×8 (async)", + "ID":989443350, + "Label":"", + "Position":{ + "x":3.3739, + "y":0.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1280023136}], + "InternalData":null + }, + { + "Name":"REGISTER-8", + "ID":5917977, + "Label":"ADDRESS", + "Position":{ + "x":-2.1775, + "y":1.375 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":10415736}], + "InternalData":null + }, + { + "Name":"REGISTER-8", + "ID":472885907, + "Label":"DATA", + "Position":{ + "x":-2.1775, + "y":-0.625 + }, + "OutputPinColourInfo":[{"PinColour":4,"PinID":10415736}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1068126646, + "Label":"", + "Position":{ + "x":-6.515, + "y":0.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"DECIMAL-8", + "ID":1076479372, + "Label":"", + "Position":{ + "x":5.11, + "y":2.25 + }, + "OutputPinColourInfo":[], + "InternalData":null + }, + { + "Name":"AND", + "ID":1935031734, + "Label":"", + "Position":{ + "x":1.61, + "y":1.25 + }, + "OutputPinColourInfo":[{"PinColour":1,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"EQUALS-8", + "ID":904871778, + "Label":"", + "Position":{ + "x":0.11, + "y":1.125 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":1960274563}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":10415736, + "PinOwnerID":472885907 + }, + "TargetPinAddress":{ + "PinID":1231977344, + "PinOwnerID":989443350 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-0.9375,"y":-0.625},{"x":-0.9375,"y":-0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1231977344 + }, + "TargetPinAddress":{ + "PinID":69098308, + "PinOwnerID":472885907 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.375,"y":0.8125},{"x":-4.375,"y":-0.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":69098308, + "PinOwnerID":5917977 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2039852248 + }, + "TargetPinAddress":{ + "PinID":81439827, + "PinOwnerID":472885907 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.375,"y":2.375},{"x":-3.375,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2039852248 + }, + "TargetPinAddress":{ + "PinID":81439827, + "PinOwnerID":5917977 + }, + "ConnectionType":1, + "ConnectedWireIndex":3, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-3.375,"y":1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1068126646 + }, + "TargetPinAddress":{ + "PinID":919078193, + "PinOwnerID":5917977 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.5,"y":0.0},{"x":-3.5,"y":1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1280023136, + "PinOwnerID":989443350 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1528719550 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1280023136, + "PinOwnerID":989443350 + }, + "TargetPinAddress":{ + "PinID":39707143, + "PinOwnerID":1076479372 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":4.625,"y":0.125},{"x":4.625,"y":1.0625},{"x":3.4375,"y":1.0625},{"x":3.4375,"y":2.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":1622111906, + "PinOwnerID":989443350 + }, + "ConnectionType":1, + "ConnectedWireIndex":2, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.8125,"y":1.625},{"x":-3.8125,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":919078193, + "PinOwnerID":472885907 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.25,"y":2.875},{"x":-3.25,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1925084150 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1935031734 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-0.5,"y":2.875},{"x":1.0,"y":2.875},{"x":1.0,"y":1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1935031734 + }, + "TargetPinAddress":{ + "PinID":1925084150, + "PinOwnerID":989443350 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":2.25,"y":1.25},{"x":2.25,"y":0.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1622111906 + }, + "TargetPinAddress":{ + "PinID":1445895175, + "PinOwnerID":904871778 + }, + "ConnectionType":1, + "ConnectedWireIndex":8, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.0625,"y":0.25},{"x":-1.0625,"y":0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":10415736, + "PinOwnerID":5917977 + }, + "TargetPinAddress":{ + "PinID":427606127, + "PinOwnerID":904871778 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1960274563, + "PinOwnerID":904871778 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1935031734 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/REG-8.json b/TestData/Projects/MainTest/Chips/REG-8.json new file mode 100644 index 00000000..7b913dc3 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/REG-8.json @@ -0,0 +1,327 @@ +{ + "Name": "REG-8", + "NameLocation": 0, + "Size": { + "x": 1.14, + "y": 1.25 + }, + "Colour": { + "r": 0.607355, + "g": 0.3229908, + "b": 0.082576625, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN-8", + "ID":248954118, + "Position":{ + "x":-5.97355, + "y":1.13757 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"STORE", + "ID":1830871312, + "Position":{ + "x":-6.0956, + "y":-0.54702 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT ENABLE", + "ID":455764185, + "Position":{ + "x":-6.06339, + "y":-1.4866 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":1027672421, + "Position":{ + "x":-6.01727, + "y":-2.51649 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":128796038, + "Position":{ + "x":10.38769, + "y":-0.09384 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT-BUS", + "ID":632432616, + "Position":{ + "x":10.40129, + "y":-0.79517 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"REGISTER-4", + "ID":1502552159, + "Label":null, + "Position":{ + "x":0.74603, + "y":0.80952 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], + "InternalData":null + }, + { + "Name":"REGISTER-4", + "ID":538425792, + "Label":null, + "Position":{ + "x":0.75661, + "y":-1.43386 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], + "InternalData":null + }, + { + "Name":"8-4BIT", + "ID":1322908463, + "Label":null, + "Position":{ + "x":-2.96825, + "y":1.12698 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"4-8BIT", + "ID":196696826, + "Label":null, + "Position":{ + "x":4.46032, + "y":-0.12169 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"BUF-8", + "ID":1048756314, + "Label":null, + "Position":{ + "x":6.81689, + "y":-1.65946 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":248954118 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1322908463 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1322908463 + }, + "TargetPinAddress":{ + "PinID":634643294, + "PinOwnerID":1502552159 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1322908463 + }, + "TargetPinAddress":{ + "PinID":634643294, + "PinOwnerID":538425792 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1027672421 + }, + "TargetPinAddress":{ + "PinID":81439827, + "PinOwnerID":538425792 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1027672421 + }, + "TargetPinAddress":{ + "PinID":81439827, + "PinOwnerID":1502552159 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1830871312 + }, + "TargetPinAddress":{ + "PinID":919078193, + "PinOwnerID":538425792 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1830871312 + }, + "TargetPinAddress":{ + "PinID":919078193, + "PinOwnerID":1502552159 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":9902874, + "PinOwnerID":1502552159 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":196696826 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":9902874, + "PinOwnerID":538425792 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":196696826 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":196696826 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":128796038 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":455764185 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":1048756314 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.02618,"y":-2.83489},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":196696826 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":1048756314 + }, + "ConnectionType":1, + "ConnectedWireIndex":9, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":5.53762,"y":-0.11911},{"x":5.53775,"y":-1.4866},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":1048756314 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":632432616 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":8.32075,"y":-1.65946},{"x":8.28618,"y":-0.77789},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/REGISTER-1.json b/TestData/Projects/MainTest/Chips/REGISTER-1.json new file mode 100644 index 00000000..f2902726 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/REGISTER-1.json @@ -0,0 +1,263 @@ +{ + "Name": "REGISTER-1", + "NameLocation": 0, + "Size": { + "x": 1.95, + "y": 0.75 + }, + "Colour": { + "r": 0.7800823, + "g": 0.5258629, + "b": 0.186892092, + "a": 1 + }, + "InputPins":[ + { + "Name":"DATA", + "ID":2007348307, + "Position":{ + "x":-7.75, + "y":0.9375 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"STORE", + "ID":252188563, + "Position":{ + "x":-7.75, + "y":0.4375 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":389514335, + "Position":{ + "x":-7.75, + "y":-0.0625 + }, + "BitCount":1, + "Colour":5, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":1938418986, + "Position":{ + "x":3.125, + "y":0.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"FLIP-FLOP", + "ID":114037759, + "Label":null, + "Position":{ + "x":-0.32, + "y":0.095 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1920302974}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1299793771, + "Label":null, + "Position":{ + "x":-3.265, + "y":1.5625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"AND", + "ID":1141475335, + "Label":null, + "Position":{ + "x":-3.265, + "y":0.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"OR", + "ID":912527488, + "Label":null, + "Position":{ + "x":-1.89, + "y":0.9375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":2081481123, + "Label":null, + "Position":{ + "x":-4.89, + "y":1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":2081481123 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1299793771 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2007348307 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1141475335 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1141475335 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":912527488 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":389514335 + }, + "TargetPinAddress":{ + "PinID":2143575788, + "PinOwnerID":114037759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1920302974, + "PinOwnerID":114037759 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1938418986 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":1299793771 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":912527488 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.5,"y":1.5625},{"x":-2.5,"y":1.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":912527488 + }, + "TargetPinAddress":{ + "PinID":1732460994, + "PinOwnerID":114037759 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-1.3125,"y":0.9375},{"x":-1.3125,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":252188563 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":1141475335 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.125,"y":0.4375},{"x":-4.125,"y":0.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1920302974, + "PinOwnerID":114037759 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":1299793771 + }, + "ConnectionType":1, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.85422,"y":0.10086},{"x":0.85422,"y":2.0},{"x":-4.125,"y":2.0},{"x":-4.125,"y":1.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":252188563 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":2081481123 + }, + "ConnectionType":1, + "ConnectedWireIndex":7, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-5.8125,"y":0.4375},{"x":-5.8125,"y":1.4375},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/REGISTER-4.json b/TestData/Projects/MainTest/Chips/REGISTER-4.json new file mode 100644 index 00000000..1d1e2aaf --- /dev/null +++ b/TestData/Projects/MainTest/Chips/REGISTER-4.json @@ -0,0 +1,420 @@ +{ + "Name": "REGISTER-4", + "NameLocation": 1, + "Size": { + "x": 1.625, + "y": 1.125 + }, + "Colour": { + "r": 0.8732669, + "g": 0.5192768, + "b": 0.127885342, + "a": 1 + }, + "InputPins":[ + { + "Name":"DATA", + "ID":634643294, + "Position":{ + "x":-7.25, + "y":1.0 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"STORE", + "ID":919078193, + "Position":{ + "x":-7.25, + "y":0.0625 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":81439827, + "Position":{ + "x":-7.25, + "y":-0.5 + }, + "BitCount":1, + "Colour":5, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":9902874, + "Position":{ + "x":4.625, + "y":-0.3125 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"REGISTER-1", + "ID":1240946790, + "Label":null, + "Position":{ + "x":-1.14, + "y":1.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":631727069, + "Label":null, + "Position":{ + "x":-1.14, + "y":0.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":142511461, + "Label":null, + "Position":{ + "x":-1.14, + "y":-0.75 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":74143113, + "Label":null, + "Position":{ + "x":-1.14, + "y":-1.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"4-1BIT", + "ID":2091459543, + "Label":null, + "Position":{ + "x":-4.6775, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":4}], + "InternalData":null + }, + { + "Name":"1-4BIT", + "ID":640874672, + "Label":null, + "Position":{ + "x":1.4475, + "y":-0.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], + "InternalData":null + }, + { + "Name":"DECIMAL-4", + "ID":470739589, + "Label":"", + "Position":{ + "x":3.99536, + "y":1.11625 + }, + "OutputPinColourInfo":[], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":634643294 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2091459543 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":640874672 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":9902874 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":2091459543 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":1240946790 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":2091459543 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":631727069 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.75,"y":1.125},{"x":-2.75,"y":0.4375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":2091459543 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":142511461 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.9375,"y":0.875},{"x":-2.9375,"y":-0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":2091459543 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":74143113 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.125,"y":0.625},{"x":-3.125,"y":-1.4375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":1240946790 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.0,"y":0.0625},{"x":-4.0,"y":-2.375},{"x":-2.5625,"y":-2.375},{"x":-2.5625,"y":1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":631727069 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":-2.5625,"y":0.1875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":142511461 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":-2.5625,"y":-0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":74143113 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":-2.5625,"y":-1.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":1240946790 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.1875,"y":-0.5},{"x":-4.1875,"y":-2.5625},{"x":-2.375,"y":-2.5625},{"x":-2.375,"y":0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":631727069 + }, + "ConnectionType":1, + "ConnectedWireIndex":10, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":-2.375,"y":-0.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":142511461 + }, + "ConnectionType":1, + "ConnectedWireIndex":10, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":-2.375,"y":-1.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":74143113 + }, + "ConnectionType":1, + "ConnectedWireIndex":10, + "ConnectedWireSegmentIndex":3, + "Points":[{"x":-2.375,"y":-1.9375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":74143113 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":640874672 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.5,"y":-1.6875},{"x":0.5,"y":-0.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":1240946790 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":640874672 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.5,"y":1.125},{"x":0.5,"y":0.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":631727069 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":640874672 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.1875,"y":0.1875},{"x":0.1875,"y":-0.1875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":142511461 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":640874672 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.1875,"y":-0.75},{"x":0.1875,"y":-0.4375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":640874672 + }, + "TargetPinAddress":{ + "PinID":47750177, + "PinOwnerID":470739589 + }, + "ConnectionType":1, + "ConnectedWireIndex":1, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":2.59618,"y":-0.3125},{"x":2.59618,"y":1.125},{"x":0.0,"y":0.0}] + } + ], + "Displays":[ + { + "SubChipID":470739589, + "Position":{ + "x":-0.0044, + "y":-0.15723 + }, + "Scale":0.696772158 + } + ], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/REGISTER-8.json b/TestData/Projects/MainTest/Chips/REGISTER-8.json new file mode 100644 index 00000000..28adeb01 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/REGISTER-8.json @@ -0,0 +1,688 @@ +{ + "Name": "REGISTER-8", + "NameLocation": 1, + "Size": { + "x": 1.625, + "y": 1.0 + }, + "Colour": { + "r": 0.8732669, + "g": 0.5192768, + "b": 0.127885342, + "a": 1 + }, + "InputPins":[ + { + "Name":"DATA", + "ID":69098308, + "Position":{ + "x":-7.625, + "y":1.375 + }, + "BitCount":8, + "Colour":4, + "ValueDisplayMode":1 + }, + { + "Name":"STORE", + "ID":919078193, + "Position":{ + "x":-7.625, + "y":-0.4375 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":81439827, + "Position":{ + "x":-7.625, + "y":-1.625 + }, + "BitCount":1, + "Colour":5, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":10415736, + "Position":{ + "x":5.75, + "y":-0.9375 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"REGISTER-1", + "ID":1240946790, + "Label":null, + "Position":{ + "x":-0.64, + "y":2.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":631727069, + "Label":null, + "Position":{ + "x":-0.64, + "y":1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":142511461, + "Label":null, + "Position":{ + "x":-0.64, + "y":0.5 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":74143113, + "Label":null, + "Position":{ + "x":-0.64, + "y":-0.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"8-1BIT", + "ID":224870780, + "Label":"", + "Position":{ + "x":-4.9275, + "y":1.375 + }, + "OutputPinColourInfo":[{"PinColour":4,"PinID":1},{"PinColour":4,"PinID":2},{"PinColour":4,"PinID":3},{"PinColour":4,"PinID":4},{"PinColour":4,"PinID":5},{"PinColour":4,"PinID":6},{"PinColour":4,"PinID":7},{"PinColour":4,"PinID":8}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":2089722478, + "Label":"", + "Position":{ + "x":-0.64, + "y":-1.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":1995156153, + "Label":"", + "Position":{ + "x":-0.64, + "y":-2.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":706131724, + "Label":"", + "Position":{ + "x":-0.64, + "y":-3.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":2134894443, + "Label":"", + "Position":{ + "x":-0.64, + "y":-4.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"1-8BIT", + "ID":1106997725, + "Label":"", + "Position":{ + "x":2.1975, + "y":-0.9375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":8}], + "InternalData":null + }, + { + "Name":"DECIMAL-8", + "ID":2080136468, + "Label":"", + "Position":{ + "x":4.86, + "y":0.3125 + }, + "OutputPinColourInfo":[], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":69098308 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":224870780 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":224870780 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":1240946790 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.125,"y":2.25},{"x":-4.125,"y":3.375},{"x":-1.875,"y":3.375},{"x":-1.875,"y":2.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":224870780 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":631727069 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.0,"y":2.0},{"x":-4.0,"y":3.25},{"x":-2.0,"y":3.25},{"x":-2.0,"y":1.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":224870780 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":142511461 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.875,"y":1.75},{"x":-3.875,"y":3.125},{"x":-2.125,"y":3.125},{"x":-2.125,"y":0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":224870780 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":74143113 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.75,"y":1.5},{"x":-3.75,"y":3.0},{"x":-2.25,"y":3.0},{"x":-2.25,"y":-0.1875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":224870780 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":2089722478 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.625,"y":1.25},{"x":-3.625,"y":2.875},{"x":-2.375,"y":2.875},{"x":-2.375,"y":-1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":224870780 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":1995156153 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.5,"y":1.0},{"x":-3.5,"y":2.75},{"x":-2.5,"y":2.75},{"x":-2.5,"y":-2.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":224870780 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":706131724 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.375,"y":0.75},{"x":-3.375,"y":2.625},{"x":-2.625,"y":2.625},{"x":-2.625,"y":-3.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":224870780 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":2134894443 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.25,"y":0.5},{"x":-3.25,"y":2.5},{"x":-2.75,"y":2.5},{"x":-2.75,"y":-3.9375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":1240946790 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1106997725 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.125,"y":2.375},{"x":1.125,"y":-0.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":631727069 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1106997725 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":1.4375},{"x":1.0,"y":-0.3125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":142511461 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":1106997725 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.875,"y":0.5},{"x":0.875,"y":-0.5625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":74143113 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":1106997725 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":-0.4375},{"x":0.75,"y":-0.8125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":2089722478 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":1106997725 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":-1.375},{"x":0.75,"y":-1.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":1995156153 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":1106997725 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.875,"y":-2.3125},{"x":0.875,"y":-1.3125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":706131724 + }, + "TargetPinAddress":{ + "PinID":6, + "PinOwnerID":1106997725 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.0,"y":-3.25},{"x":1.0,"y":-1.5625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":2134894443 + }, + "TargetPinAddress":{ + "PinID":7, + "PinOwnerID":1106997725 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.125,"y":-4.1875},{"x":1.125,"y":-1.8125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1106997725 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":10415736 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":8, + "PinOwnerID":1106997725 + }, + "TargetPinAddress":{ + "PinID":39707143, + "PinOwnerID":2080136468 + }, + "ConnectionType":1, + "ConnectedWireIndex":17, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":3.25,"y":-0.9375},{"x":3.25,"y":0.3125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":2089722478 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":74143113 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":1240946790 + }, + "ConnectionType":1, + "ConnectedWireIndex":20, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.875,"y":-0.4375},{"x":-2.875,"y":2.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":631727069 + }, + "ConnectionType":1, + "ConnectedWireIndex":21, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.875,"y":1.4375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":142511461 + }, + "ConnectionType":1, + "ConnectedWireIndex":21, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.875,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":2134894443 + }, + "ConnectionType":1, + "ConnectedWireIndex":20, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.875,"y":-0.4375},{"x":-2.875,"y":-4.1875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":706131724 + }, + "ConnectionType":1, + "ConnectedWireIndex":24, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.875,"y":-3.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":1995156153 + }, + "ConnectionType":1, + "ConnectedWireIndex":24, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.875,"y":-2.3125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":919078193 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":2089722478 + }, + "ConnectionType":1, + "ConnectedWireIndex":24, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.875,"y":-1.375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":2134894443 + }, + "ConnectionType":1, + "ConnectedWireIndex":19, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.0,"y":-1.625},{"x":-3.0,"y":-4.4375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":706131724 + }, + "ConnectionType":1, + "ConnectedWireIndex":28, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.0,"y":-3.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":1995156153 + }, + "ConnectionType":1, + "ConnectedWireIndex":28, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.0,"y":-2.5625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":1240946790 + }, + "ConnectionType":1, + "ConnectedWireIndex":19, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.0,"y":-1.625},{"x":-3.0,"y":2.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":631727069 + }, + "ConnectionType":1, + "ConnectedWireIndex":31, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.0,"y":1.1875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":142511461 + }, + "ConnectionType":1, + "ConnectedWireIndex":31, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.0,"y":0.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":81439827 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":74143113 + }, + "ConnectionType":1, + "ConnectedWireIndex":31, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.0,"y":-0.6875},{"x":0.0,"y":0.0}] + } + ], + "Displays":[ + { + "SubChipID":2080136468, + "Position":{ + "x":-0.00155, + "y":-0.15883 + }, + "Scale":0.618453562 + } + ], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/TOGGLE.json b/TestData/Projects/MainTest/Chips/TOGGLE.json new file mode 100644 index 00000000..7b99b03f --- /dev/null +++ b/TestData/Projects/MainTest/Chips/TOGGLE.json @@ -0,0 +1,199 @@ +{ + "Name": "TOGGLE", + "NameLocation": 0, + "Size": { + "x": 1.29, + "y": 0.56 + }, + "Colour": { + "r": 0.197379187, + "g": 0.4479455, + "b": 0.645889342, + "a": 1 + }, + "InputPins":[ + { + "Name":"RESET", + "ID":2114093876, + "Position":{ + "x":-6.5806, + "y":0.1122 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":2141785414, + "Position":{ + "x":-6.4404, + "y":-0.974 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":1782291836, + "Position":{ + "x":6.2869, + "y":-0.8914 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"FLIP-FLOP", + "ID":1409885951, + "Label":null, + "Position":{ + "x":0.9622, + "y":-0.6553 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"NOT", + "ID":1958903897, + "Label":null, + "Position":{ + "x":3.477, + "y":-0.0413 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"AND", + "ID":529164248, + "Label":null, + "Position":{ + "x":-1.1275, + "y":0.4545 + }, + "OutputPinColourInfo":null, + "InternalData":null + }, + { + "Name":"NOT", + "ID":360071104, + "Label":null, + "Position":{ + "x":-2.6505, + "y":0.2656 + }, + "OutputPinColourInfo":null, + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1920302974, + "PinOwnerID":1409885951 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1958903897 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.8156,"y":-0.6553},{"x":2.9486,"y":-0.0413}] + }, + { + "SourcePinAddress":{ + "PinID":1920302974, + "PinOwnerID":1409885951 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1782291836 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":1.8156,"y":-0.6553},{"x":5.5229,"y":-0.8914}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2141785414 + }, + "TargetPinAddress":{ + "PinID":2143575788, + "PinOwnerID":1409885951 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.6764,"y":-0.974},{"x":0.1089,"y":-0.8153}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1958903897 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":529164248 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":4.0053,"y":-0.0413},{"x":4.7403,"y":-0.0059},{"x":4.8229,"y":1.588},{"x":-2.2019,"y":1.6234},{"x":-2.2373,"y":0.6907},{"x":-1.5808,"y":0.6145}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":360071104 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":529164248 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-2.1222,"y":0.2656},{"x":-1.5808,"y":0.2945}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2114093876 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":360071104 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-5.8166,"y":0.1122},{"x":-3.1789,"y":0.2656}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":529164248 + }, + "TargetPinAddress":{ + "PinID":1732460994, + "PinOwnerID":1409885951 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":-0.6742,"y":0.4545},{"x":-0.1948,"y":0.4427},{"x":-0.3601,"y":-0.3601},{"x":0.1089,"y":-0.4953}] + } + ], + "Displays": null, + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/WIP2.json b/TestData/Projects/MainTest/Chips/WIP2.json new file mode 100644 index 00000000..65dd1d8b --- /dev/null +++ b/TestData/Projects/MainTest/Chips/WIP2.json @@ -0,0 +1,1548 @@ +{ + "Name": "WIP2", + "NameLocation": 0, + "Size": { + "x": 0.99, + "y": 5.29 + }, + "Colour": { + "r": 0.223280087, + "g": 0.415004134, + "b": 0.3977041, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":109466336, + "Position":{ + "x":-6.07331, + "y":-1.66224 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT-8", + "ID":733867237, + "Position":{ + "x":-1.50295, + "y":7.39811 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"A", + "ID":1661183643, + "Position":{ + "x":1.6467, + "y":2.99376 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"B", + "ID":296720068, + "Position":{ + "x":4.11785, + "y":-0.46966 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + } + ], + "SubChips":[ + { + "Name":"PC", + "ID":1255067638, + "Label":null, + "Position":{ + "x":-4.22323, + "y":6.48452 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1994428648}], + "InternalData":null + }, + { + "Name":"KEY", + "ID":1661333381, + "Label":null, + "Position":{ + "x":-10.30913, + "y":1.30694 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":[75] + }, + { + "Name":"REG-8", + "ID":2007842624, + "Label":null, + "Position":{ + "x":-0.54797, + "y":1.82081 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], + "InternalData":null + }, + { + "Name":"REG-8", + "ID":1237918361, + "Label":null, + "Position":{ + "x":-0.52274, + "y":0.06068 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], + "InternalData":null + }, + { + "Name":"dev.RAM-8", + "ID":247733947, + "Label":null, + "Position":{ + "x":7.47288, + "y":5.30698 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":5}], + "InternalData":null + }, + { + "Name":"ALU-8", + "ID":301021643, + "Label":null, + "Position":{ + "x":4.04441, + "y":1.33358 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1627170817},{"PinColour":0,"PinID":333324187}], + "InternalData":null + }, + { + "Name":"BUF-8", + "ID":172301081, + "Label":null, + "Position":{ + "x":2.43397, + "y":4.82993 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + }, + { + "Name":"BUF-8", + "ID":153832190, + "Label":null, + "Position":{ + "x":9.29044, + "y":5.14383 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":158720235}], + "InternalData":null + }, + { + "Name":"ROM 256\u00d716", + "ID":917070333, + "Label":null, + "Position":{ + "x":0.10546, + "y":6.17454 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], + "InternalData":[5376,5633,5377,5633,5378,5633,5379,5632,5380,5632,5381,5633,5382,5633,5383,5632,5384,5632,5385,5632,5386,5633,5387,5633,5388,5633,5389,5633,5390,5633,5391,5632,5408,5632,5409,5632,5410,5632,5411,5633,5412,5633,5413,5633,5414,5633,5415,5632,5416,5632,5417,5632,5416,3840,5120,4608,769,2063,5120,3840,1536,2304,1536,4864,5416,3840,257,2063,5120,3840,2304,288,5120,4608,5416,3840,272,5120,6144,6656,5417,4608,5416,3840,6912,257,2063,5888,3487,4096,257,5417,5888,1296,3232,5392,3840,5376,5888,5393,3840,5377,5888,5394,3840,5378,5888,5395,3840,5379,5888,5396,3840,5380,5888,5397,3840,5381,5888,5398,3840,5382,5888,5399,3840,5383,5888,5400,3840,5384,5888,5401,3840,5385,5888,5402,3840,5386,5888,5403,3840,5387,5888,5404,3840,5388,5888,5405,3840,5389,5888,5406,3840,5390,5888,5407,3840,5391,5888,2868,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + }, + { + "Name":"KEY", + "ID":2111501455, + "Label":null, + "Position":{ + "x":-10.35449, + "y":1.88111 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":[82] + }, + { + "Name":"NOT", + "ID":437704005, + "Label":null, + "Position":{ + "x":-6.29996, + "y":-0.34476 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"CONTROL UNIT", + "ID":518660003, + "Label":null, + "Position":{ + "x":-9.20893, + "y":5.13451 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":1151713402},{"PinColour":2,"PinID":349361804},{"PinColour":2,"PinID":883528113},{"PinColour":2,"PinID":1590314579},{"PinColour":2,"PinID":1175090400},{"PinColour":2,"PinID":805153383},{"PinColour":2,"PinID":1401872117},{"PinColour":2,"PinID":1118858130},{"PinColour":2,"PinID":742048505},{"PinColour":2,"PinID":1476868706},{"PinColour":2,"PinID":87848670},{"PinColour":0,"PinID":288562873},{"PinColour":0,"PinID":1148046748},{"PinColour":0,"PinID":1249996143},{"PinColour":0,"PinID":1157119205},{"PinColour":0,"PinID":845055315},{"PinColour":0,"PinID":895153575}], + "InternalData":null + }, + { + "Name":"REG-8", + "ID":609414526, + "Label":null, + "Position":{ + "x":-2.20417, + "y":5.98531 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], + "InternalData":null + }, + { + "Name":"AND", + "ID":2092373440, + "Label":null, + "Position":{ + "x":-8.16773, + "y":-0.35528 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1100513352, + "Label":null, + "Position":{ + "x":-11.46016, + "y":-0.06158 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"TOGGLE", + "ID":1424033922, + "Label":null, + "Position":{ + "x":-4.96168, + "y":0.70267 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1782291836}], + "InternalData":null + }, + { + "Name":"FLAGS", + "ID":687931053, + "Label":null, + "Position":{ + "x":7.04437, + "y":0.63864 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":605802866}], + "InternalData":null + }, + { + "Name":"OR", + "ID":1805959142, + "Label":null, + "Position":{ + "x":-9.44244, + "y":-0.2815 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"BUS-8", + "ID":76195595, + "Label":null, + "Position":{ + "x":0.00754, + "y":3.93489 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], + "InternalData":[1275120978] + }, + { + "Name":"BUS-TERMINUS-8", + "ID":1275120978, + "Label":null, + "Position":{ + "x":-3.46073, + "y":-2.69268 + }, + "OutputPinColourInfo":[], + "InternalData":[76195595] + }, + { + "Name":"NOT", + "ID":1867709155, + "Label":null, + "Position":{ + "x":-4.13737, + "y":4.77385 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"DOT DISPLAY", + "ID":2085911674, + "Label":null, + "Position":{ + "x":12.75586, + "y":-1.4854 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":6}], + "InternalData":null + }, + { + "Name":"LSB", + "ID":1189702948, + "Label":null, + "Position":{ + "x":6.98436, + "y":1.59642 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1222614200}], + "InternalData":null + }, + { + "Name":"8-4BIT", + "ID":657752229, + "Label":null, + "Position":{ + "x":7.0552, + "y":-0.62319 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"REGISTER-1", + "ID":602363710, + "Label":null, + "Position":{ + "x":9.12522, + "y":0.9806 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], + "InternalData":null + }, + { + "Name":"8-4BIT", + "ID":1049240007, + "Label":null, + "Position":{ + "x":7.0925, + "y":-1.44374 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"CLOCK", + "ID":719592481, + "Label":null, + "Position":{ + "x":-12.81953, + "y":-2.40551 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":null + }, + { + "Name":"AND", + "ID":503002167, + "Label":null, + "Position":{ + "x":-11.58111, + "y":-1.49484 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + }, + { + "Name":"KEY", + "ID":1717614320, + "Label":null, + "Position":{ + "x":-12.96951, + "y":-1.24071 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":[67] + }, + { + "Name":"OR", + "ID":720620420, + "Label":null, + "Position":{ + "x":-9.17539, + "y":0.53817 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":1493304698, + "Label":null, + "Position":{ + "x":9.59097, + "y":-4.01915 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + }, + { + "Name":"REG-8", + "ID":1137372670, + "Label":null, + "Position":{ + "x":5.56148, + "y":6.51579 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], + "InternalData":null + }, + { + "Name":"MUX-8", + "ID":1460479845, + "Label":null, + "Position":{ + "x":2.64782, + "y":1.72201 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1454394007}], + "InternalData":null + }, + { + "Name":"4-8BIT", + "ID":769198515, + "Label":"", + "Position":{ + "x":9.07547, + "y":-0.88058 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1994428648, + "PinOwnerID":1255067638 + }, + "TargetPinAddress":{ + "PinID":248954118, + "PinOwnerID":609414526 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":609414526 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":917070333 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":333324187, + "PinOwnerID":301021643 + }, + "TargetPinAddress":{ + "PinID":792064669, + "PinOwnerID":687931053 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1100513352 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":1805959142 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":76195595 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1275120978 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.73811,"y":3.9955599999999998},{"x":5.73811,"y":-1.84911},{"x":-4.28421,"y":-1.84911},{"x":-4.28421,"y":-2.71276},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":632432616, + "PinOwnerID":1237918361 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":76195595 + }, + "ConnectionType":2, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":0.75708,"y":-0.41932},{"x":0.75708,"y":-1.84911}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":2007842624 + }, + "TargetPinAddress":{ + "PinID":1327939519, + "PinOwnerID":301021643 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1627170817, + "PinOwnerID":301021643 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":76195595 + }, + "ConnectionType":2, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.0,"y":0.0},{"x":5.73811,"y":2.28978}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":917070333 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":172301081 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.23784,"y":5.88339},{"x":1.2602,"y":5.01362},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":247733947 + }, + "TargetPinAddress":{ + "PinID":581914641, + "PinOwnerID":153832190 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":153832190 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":76195595 + }, + "ConnectionType":2, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.0,"y":0.0},{"x":10.19621,"y":5.18547},{"x":10.19621,"y":3.13893},{"x":5.73811,"y":3.12331}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":917070333 + }, + "TargetPinAddress":{ + "PinID":1305525690, + "PinOwnerID":1255067638 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.87054,"y":5.9101},{"x":3.87055,"y":8.5756},{"x":-5.43935,"y":8.5756},{"x":-5.43935,"y":7.28566},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":437704005 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":437704005 + }, + "TargetPinAddress":{ + "PinID":2141785414, + "PinOwnerID":1424033922 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1867709155 + }, + "TargetPinAddress":{ + "PinID":1830871312, + "PinOwnerID":609414526 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.46736,"y":4.74964},{"x":-3.46736,"y":5.97817},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":1506181664, + "PinOwnerID":1255067638 + }, + "ConnectionType":1, + "ConnectedWireIndex":12, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-7.14197,"y":-0.34843},{"x":-7.32057,"y":2.72294},{"x":-5.72798,"y":2.72294},{"x":-5.72798,"y":6.37857},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":247733947 + }, + "ConnectionType":1, + "ConnectedWireIndex":15, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-5.72798,"y":5.10441},{"x":-0.72235,"y":5.10441},{"x":-0.72235,"y":4.33081},{"x":5.52711,"y":4.33081},{"x":5.52711,"y":4.58868},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":1027672421, + "PinOwnerID":609414526 + }, + "ConnectionType":1, + "ConnectedWireIndex":16, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.13415,"y":5.10441},{"x":-3.13415,"y":5.33194},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":605802866, + "PinOwnerID":687931053 + }, + "TargetPinAddress":{ + "PinID":1428445592, + "PinOwnerID":518660003 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":8.0906,"y":0.63864},{"x":8.0906,"y":-2.26752},{"x":-10.70327,"y":-2.26752},{"x":-10.70327,"y":4.54317},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":76195595 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":247733947 + }, + "ConnectionType":1, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":5.05626,"y":3.98817},{"x":5.05627,"y":5.40778},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":158720235, + "PinOwnerID":172301081 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":76195595 + }, + "ConnectionType":2, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":3.85857,"y":4.82993},{"x":3.85865,"y":3.97518}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":76195595 + }, + "TargetPinAddress":{ + "PinID":248954118, + "PinOwnerID":2007842624 + }, + "ConnectionType":1, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-1.89033,"y":-1.84911},{"x":-1.89033,"y":2.31339},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":76195595 + }, + "TargetPinAddress":{ + "PinID":248954118, + "PinOwnerID":1237918361 + }, + "ConnectionType":1, + "ConnectedWireIndex":21, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.89033,"y":0.5235},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":632432616, + "PinOwnerID":2007842624 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":76195595 + }, + "ConnectionType":2, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":1.37092,"y":1.34081},{"x":1.37092,"y":-1.84911}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":1805959142 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":2092373440 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2111501455 + }, + "TargetPinAddress":{ + "PinID":2114093876, + "PinOwnerID":1424033922 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-8.42798,"y":1.88111},{"x":-8.42798,"y":0.87237},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2111501455 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":1805959142 + }, + "ConnectionType":1, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-9.97518,"y":1.88111},{"x":-9.97518,"y":0.08361},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1782291836, + "PinOwnerID":1424033922 + }, + "TargetPinAddress":{ + "PinID":1263555528, + "PinOwnerID":518660003 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.00913,"y":0.75109},{"x":-4.00913,"y":1.25578},{"x":-8.19458,"y":1.25578},{"x":-8.19458,"y":2.10659},{"x":-10.19811,"y":2.10659},{"x":-10.19811,"y":3.02602},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1782291836, + "PinOwnerID":1424033922 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1867709155 + }, + "ConnectionType":1, + "ConnectedWireIndex":27, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-5.10695,"y":1.25578},{"x":-5.10695,"y":4.79626},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":977455228, + "PinOwnerID":687931053 + }, + "ConnectionType":1, + "ConnectedWireIndex":12, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-7.44021,"y":-0.3515},{"x":-7.4402,"y":-1.17057},{"x":4.71352,"y":-1.17057},{"x":4.71352,"y":0.27946},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":1027672421, + "PinOwnerID":2007842624 + }, + "ConnectionType":1, + "ConnectedWireIndex":29, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.54796,"y":-1.17057},{"x":-1.54796,"y":1.16265},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":1027672421, + "PinOwnerID":1237918361 + }, + "ConnectionType":1, + "ConnectedWireIndex":30, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.54796,"y":-0.55101},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2111501455 + }, + "TargetPinAddress":{ + "PinID":939662745, + "PinOwnerID":1255067638 + }, + "ConnectionType":1, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-6.06223,"y":0.86},{"x":-6.00002,"y":2.45656},{"x":-5.28537,"y":2.45656},{"x":-5.28537,"y":5.55538},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1782291836, + "PinOwnerID":1424033922 + }, + "TargetPinAddress":{ + "PinID":572135790, + "PinOwnerID":1255067638 + }, + "ConnectionType":1, + "ConnectedWireIndex":28, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-4.93394,"y":4.78826},{"x":-4.93398,"y":5.94273},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":1237918361 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":296720068 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.90142,"y":0.54068},{"x":1.90142,"y":-0.43051},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":76195595 + }, + "TargetPinAddress":{ + "PinID":1285607522, + "PinOwnerID":1189702948 + }, + "ConnectionType":1, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":5.73811,"y":1.59642},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1222614200, + "PinOwnerID":1189702948 + }, + "TargetPinAddress":{ + "PinID":2007348307, + "PinOwnerID":602363710 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":389514335, + "PinOwnerID":602363710 + }, + "ConnectionType":1, + "ConnectedWireIndex":29, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-6.53977,"y":-1.17057},{"x":-6.53977,"y":-3.23403},{"x":8.24873,"y":-3.23403},{"x":8.24873,"y":0.62628},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":2007842624 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":657752229 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.6297,"y":2.29716},{"x":1.62996,"y":2.95738},{"x":5.22762,"y":2.95738},{"x":5.22762,"y":-0.60454},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":1237918361 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1049240007 + }, + "ConnectionType":1, + "ConnectedWireIndex":34, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":2.37536,"y":-0.44751},{"x":2.37532,"y":-1.42509},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":719592481 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":503002167 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1717614320 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":503002167 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1661333381 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":720620420 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":720620420 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":2092373440 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":503002167 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":720620420 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":76195595 + }, + "TargetPinAddress":{ + "PinID":248954118, + "PinOwnerID":1137372670 + }, + "ConnectionType":1, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":4.36891,"y":3.98071},{"x":4.36892,"y":7.03436},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":1137372670 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":247733947 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":6.51219,"y":6.99579},{"x":6.51219,"y":5.85893},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":1027672421, + "PinOwnerID":1137372670 + }, + "ConnectionType":1, + "ConnectedWireIndex":16, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":4.69719,"y":4.33081},{"x":4.69719,"y":5.91079},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1151713402, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":1100513352 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-8.05927,"y":7.53451},{"x":-8.05927,"y":2.46435},{"x":-12.51155,"y":2.46435},{"x":-12.51155,"y":-0.11248},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":883528113, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":1847613819, + "PinOwnerID":1255067638 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.10758,"y":7.21451},{"x":-6.10758,"y":6.74892},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1590314579, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":2085911674 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-7.03358,"y":6.89451},{"x":-7.03358,"y":9.14334},{"x":11.96242,"y":9.14334},{"x":11.96242,"y":0.13674},{"x":9.36961,"y":0.13674},{"x":9.36961,"y":-1.46184},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1175090400, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":252188563, + "PinOwnerID":602363710 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.88907,"y":6.57451},{"x":-6.88907,"y":8.98738},{"x":11.72848,"y":8.98738},{"x":11.72848,"y":1.91077},{"x":8.02446,"y":1.91077},{"x":8.02446,"y":0.93603},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":805153383, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":247733947 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.08978,"y":6.25451},{"x":-6.08978,"y":3.45086},{"x":6.48437,"y":3.45086},{"x":6.48437,"y":5.04943},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1401872117, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":1830871312, + "PinOwnerID":1137372670 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.59665,"y":5.93451},{"x":-6.59665,"y":8.85092},{"x":4.74934,"y":8.85092},{"x":4.74934,"y":6.53104},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1118858130, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":1830871312, + "PinOwnerID":1237918361 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.36271,"y":5.61451},{"x":-6.36271,"y":2.04723},{"x":-2.85364,"y":2.04723},{"x":-2.85364,"y":0.09775},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":742048505, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":1830871312, + "PinOwnerID":2007842624 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.55766,"y":5.29451},{"x":-6.55766,"y":1.7938},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1476868706, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":172301081 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.55795,"y":4.97451},{"x":0.55795,"y":4.50358},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":87848670, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":1901197910, + "PinOwnerID":153832190 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-6.92806,"y":4.65451},{"x":-6.92806,"y":4.23065},{"x":8.2584,"y":4.23065},{"x":8.2584,"y":4.87398},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":288562873, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":455764185, + "PinOwnerID":1237918361 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-7.18149,"y":4.33451},{"x":-7.18149,"y":-0.89649},{"x":-2.69768,"y":-0.89649},{"x":-2.69768,"y":-0.42861},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1148046748, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":455764185, + "PinOwnerID":2007842624 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-7.5129,"y":4.01451},{"x":-7.5129,"y":0.17573},{"x":-3.36051,"y":0.17573},{"x":-3.36051,"y":1.46239},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1249996143, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":1427344851, + "PinOwnerID":301021643 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-7.72735,"y":3.69451},{"x":-7.72735,"y":-4.11313},{"x":2.91682,"y":-4.11313},{"x":2.91682,"y":0.09775},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":895153575, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":967634411, + "PinOwnerID":301021643 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-7.94179,"y":2.73451},{"x":-7.94179,"y":-4.32757},{"x":2.68288,"y":-4.32757},{"x":2.68288,"y":0.44866},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":845055315, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":1047676952, + "PinOwnerID":301021643 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-7.84431,"y":3.05451},{"x":-7.84431,"y":-4.48353},{"x":2.52693,"y":-4.48353},{"x":2.52693,"y":0.85805},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1157119205, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":441446737, + "PinOwnerID":301021643 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-7.41543,"y":3.37451},{"x":-7.41543,"y":-4.58101},{"x":2.35147,"y":-4.58101},{"x":2.35147,"y":1.24794},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":917070333 + }, + "TargetPinAddress":{ + "PinID":2007797370, + "PinOwnerID":518660003 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":1.55219,"y":6.46954},{"x":1.55219,"y":8.1686},{"x":-10.55409,"y":8.1686},{"x":-10.55409,"y":7.44729},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1249996143, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":227439812, + "PinOwnerID":687931053 + }, + "ConnectionType":1, + "ConnectedWireIndex":60, + "ConnectedWireSegmentIndex":4, + "Points":[{"x":3.21705,"y":0.11463},{"x":3.22904,"y":-0.08855},{"x":6.1216,"y":-0.06494},{"x":6.1098,"y":0.57261},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1454394007, + "PinOwnerID":1460479845 + }, + "TargetPinAddress":{ + "PinID":297829662, + "PinOwnerID":301021643 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":1237918361 + }, + "TargetPinAddress":{ + "PinID":480667918, + "PinOwnerID":1460479845 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":917070333 + }, + "TargetPinAddress":{ + "PinID":1796221764, + "PinOwnerID":1460479845 + }, + "ConnectionType":1, + "ConnectedWireIndex":8, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":1.25178,"y":5.34118},{"x":1.76496,"y":1.50094},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":349361804, + "PinOwnerID":518660003 + }, + "TargetPinAddress":{ + "PinID":1880005784, + "PinOwnerID":1460479845 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1994428648, + "PinOwnerID":1255067638 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":733867237 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-3.28326,"y":6.42395},{"x":-3.23163,"y":7.3711},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":128796038, + "PinOwnerID":2007842624 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1661183643 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.39123,"y":2.2186},{"x":-0.01634,"y":2.99506},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2111501455 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":2085911674 + }, + "ConnectionType":1, + "ConnectedWireIndex":25, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-6.93894,"y":0.86458},{"x":-6.93908,"y":-3.70234},{"x":9.74005,"y":-3.60917},{"x":9.77077,"y":-2.85651},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":1493304698 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":2085911674 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":769198515 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2085911674 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1938418986, + "PinOwnerID":602363710 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":2085911674 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":2092373440 + }, + "TargetPinAddress":{ + "PinID":5, + "PinOwnerID":2085911674 + }, + "ConnectionType":1, + "ConnectedWireIndex":37, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":8.22771,"y":-3.23403},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":657752229 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":769198515 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1049240007 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":769198515 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays": null, + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/XNOR.json b/TestData/Projects/MainTest/Chips/XNOR.json new file mode 100644 index 00000000..e4e80fb1 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/XNOR.json @@ -0,0 +1,135 @@ +{ + "Name": "XNOR", + "NameLocation": 0, + "Size": { + "x": 0.95, + "y": 0.5 + }, + "Colour": { + "r": 0.435261548, + "g": 0.164612457, + "b": 0.709067047, + "a": 1 + }, + "InputPins":[ + { + "Name":"B", + "ID":128924098, + "Position":{ + "x":-4.5, + "y":0.625 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"A", + "ID":1606082193, + "Position":{ + "x":-4.5, + "y":-0.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":2132693630, + "Position":{ + "x":2.5, + "y":0.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"XOR", + "ID":909017048, + "Label":"", + "Position":{ + "x":-1.39777, + "y":0.25732 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":977613743}], + "InternalData":null + }, + { + "Name":"NOT", + "ID":650858276, + "Label":"", + "Position":{ + "x":-0.02494, + "y":0.2538 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2001814538}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1606082193 + }, + "TargetPinAddress":{ + "PinID":2129479289, + "PinOwnerID":909017048 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":128924098 + }, + "TargetPinAddress":{ + "PinID":2008317865, + "PinOwnerID":909017048 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":977613743, + "PinOwnerID":909017048 + }, + "TargetPinAddress":{ + "PinID":913380392, + "PinOwnerID":650858276 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2001814538, + "PinOwnerID":650858276 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2132693630 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/XOR.json b/TestData/Projects/MainTest/Chips/XOR.json new file mode 100644 index 00000000..93bda63b --- /dev/null +++ b/TestData/Projects/MainTest/Chips/XOR.json @@ -0,0 +1,188 @@ +{ + "Name": "XOR", + "NameLocation": 0, + "Size": { + "x": 0.7, + "y": 0.5 + }, + "Colour": { + "r": 0.6834233, + "g": 0.346940726, + "b": 0.7363925, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":2008317865, + "Position":{ + "x":-7.40323, + "y":-0.24194 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":2129479289, + "Position":{ + "x":-7.40323, + "y":-0.74194 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":977613743, + "Position":{ + "x":6.41935, + "y":-0.59677 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NAND", + "ID":366730522, + "Label":null, + "Position":{ + "x":-4.0, + "y":-2.14516 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"OR", + "ID":277097586, + "Label":null, + "Position":{ + "x":-3.62903, + "y":1.48387 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":356855654}], + "InternalData":null + }, + { + "Name":"AND", + "ID":252315131, + "Label":null, + "Position":{ + "x":0.96774, + "y":-0.62637 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1580367471}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2129479289 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":366730522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2008317865 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":366730522 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2008317865 + }, + "TargetPinAddress":{ + "PinID":2119183610, + "PinOwnerID":277097586 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2129479289 + }, + "TargetPinAddress":{ + "PinID":115927082, + "PinOwnerID":277097586 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":356855654, + "PinOwnerID":277097586 + }, + "TargetPinAddress":{ + "PinID":436332053, + "PinOwnerID":252315131 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":366730522 + }, + "TargetPinAddress":{ + "PinID":123456040, + "PinOwnerID":252315131 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1580367471, + "PinOwnerID":252315131 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":977613743 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[], + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/demo.json b/TestData/Projects/MainTest/Chips/demo.json new file mode 100644 index 00000000..4d5b2434 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/demo.json @@ -0,0 +1,529 @@ +{ + "Name": "demo", + "NameLocation": 0, + "Size": { + "x": 0.98875, + "y": 2.375 + }, + "Colour": { + "r": 0.5283218, + "g": 0.79503417, + "b": 0.788752854, + "a": 1 + }, + "InputPins":[ + { + "Name":"DATA", + "ID":1946922510, + "Position":{ + "x":-6.0, + "y":2.8125 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"OUTPUT DATA", + "ID":989966914, + "Position":{ + "x":-6.0, + "y":1.9375 + }, + "BitCount":1, + "Colour":3, + "ValueDisplayMode":0 + }, + { + "Name":"OUTPUT REG A", + "ID":1746917069, + "Position":{ + "x":-6.0, + "y":1.375 + }, + "BitCount":1, + "Colour":3, + "ValueDisplayMode":0 + }, + { + "Name":"OUTPUT ALU", + "ID":1922880267, + "Position":{ + "x":-6.0, + "y":0.8125 + }, + "BitCount":1, + "Colour":3, + "ValueDisplayMode":0 + }, + { + "Name":"OUTPUT REG B", + "ID":387726791, + "Position":{ + "x":-6.0, + "y":0.25 + }, + "BitCount":1, + "Colour":3, + "ValueDisplayMode":0 + }, + { + "Name":"STORE REG A", + "ID":1247859556, + "Position":{ + "x":-6.0, + "y":-0.4375 + }, + "BitCount":1, + "Colour":4, + "ValueDisplayMode":0 + }, + { + "Name":"SUBTRACT", + "ID":819342643, + "Position":{ + "x":-6.0, + "y":-1.0 + }, + "BitCount":1, + "Colour":4, + "ValueDisplayMode":0 + }, + { + "Name":"STORE REG B", + "ID":1740381118, + "Position":{ + "x":-6.0, + "y":-1.5625 + }, + "BitCount":1, + "Colour":4, + "ValueDisplayMode":0 + }, + { + "Name":"CLOCK", + "ID":1370591207, + "Position":{ + "x":-6.0, + "y":-2.125 + }, + "BitCount":1, + "Colour":5, + "ValueDisplayMode":0 + } + ], + "OutputPins":[], + "SubChips":[ + { + "Name":"REGISTER-4", + "ID":1477900478, + "Label":"", + "Position":{ + "x":-0.06852, + "y":1.5625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], + "InternalData":null + }, + { + "Name":"REGISTER-4", + "ID":1140491228, + "Label":"", + "Position":{ + "x":-0.06852, + "y":-1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], + "InternalData":null + }, + { + "Name":"ALU", + "ID":1130446836, + "Label":"", + "Position":{ + "x":2.45438, + "y":0.1875 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":683281904}], + "InternalData":null + }, + { + "Name":"BUS-4", + "ID":91787565, + "Label":"", + "Position":{ + "x":-2.115, + "y":2.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1}], + "InternalData":[126656166,0] + }, + { + "Name":"BUS-TERMINUS-4", + "ID":126656166, + "Label":"", + "Position":{ + "x":-2.135, + "y":-2.4375 + }, + "OutputPinColourInfo":[], + "InternalData":[91787565,1] + }, + { + "Name":"BUS BUFFER", + "ID":1677123653, + "Label":"", + "Position":{ + "x":2.54375, + "y":1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":813273076}], + "InternalData":null + }, + { + "Name":"BUS BUFFER", + "ID":1255591016, + "Label":"", + "Position":{ + "x":2.54375, + "y":-1.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":813273076}], + "InternalData":null + }, + { + "Name":"BUS BUFFER", + "ID":828151909, + "Label":"", + "Position":{ + "x":4.29375, + "y":0.0625 + }, + "OutputPinColourInfo":[{"PinColour":2,"PinID":813273076}], + "InternalData":null + }, + { + "Name":"BUS BUFFER", + "ID":1017276518, + "Label":"", + "Position":{ + "x":-2.59066, + "y":2.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":813273076}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":683281904, + "PinOwnerID":1130446836 + }, + "TargetPinAddress":{ + "PinID":2012805953, + "PinOwnerID":828151909 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":989966914 + }, + "TargetPinAddress":{ + "PinID":731095980, + "PinOwnerID":1017276518 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1946922510 + }, + "TargetPinAddress":{ + "PinID":2012805953, + "PinOwnerID":1017276518 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.0115,"y":2.8125},{"x":-4.0115,"y":2.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":9902874, + "PinOwnerID":1477900478 + }, + "TargetPinAddress":{ + "PinID":2012805953, + "PinOwnerID":1677123653 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":9902874, + "PinOwnerID":1140491228 + }, + "TargetPinAddress":{ + "PinID":2012805953, + "PinOwnerID":1255591016 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":91787565 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":126656166 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.375,"y":2.8125},{"x":5.375,"y":-2.4375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":813273076, + "PinOwnerID":1255591016 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":91787565 + }, + "ConnectionType":2, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":0.0,"y":0.0},{"x":4.0,"y":-1.125},{"x":4.0,"y":-2.4375}] + }, + { + "SourcePinAddress":{ + "PinID":813273076, + "PinOwnerID":828151909 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":91787565 + }, + "ConnectionType":2, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.0,"y":0.0},{"x":5.375,"y":0.0625}] + }, + { + "SourcePinAddress":{ + "PinID":813273076, + "PinOwnerID":1677123653 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":91787565 + }, + "ConnectionType":2, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":4.0,"y":1.4375},{"x":4.0,"y":2.8125}] + }, + { + "SourcePinAddress":{ + "PinID":813273076, + "PinOwnerID":1017276518 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":91787565 + }, + "ConnectionType":2, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":-1.625,"y":2.125},{"x":-1.625,"y":2.8125}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":91787565 + }, + "TargetPinAddress":{ + "PinID":634643294, + "PinOwnerID":1477900478 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-1.3125,"y":2.8125},{"x":-1.3125,"y":1.9375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":9902874, + "PinOwnerID":1140491228 + }, + "TargetPinAddress":{ + "PinID":1514224661, + "PinOwnerID":1130446836 + }, + "ConnectionType":1, + "ConnectedWireIndex":4, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.25,"y":-1.0},{"x":1.25,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":9902874, + "PinOwnerID":1477900478 + }, + "TargetPinAddress":{ + "PinID":320227374, + "PinOwnerID":1130446836 + }, + "ConnectionType":1, + "ConnectedWireIndex":3, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":1.25,"y":1.5625},{"x":1.25,"y":0.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":91787565 + }, + "TargetPinAddress":{ + "PinID":634643294, + "PinOwnerID":1140491228 + }, + "ConnectionType":1, + "ConnectedWireIndex":5, + "ConnectedWireSegmentIndex":2, + "Points":[{"x":-1.3125,"y":-2.4375},{"x":-1.3125,"y":-0.625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1247859556 + }, + "TargetPinAddress":{ + "PinID":919078193, + "PinOwnerID":1477900478 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.8125,"y":-0.4375},{"x":-2.8125,"y":1.5},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1740381118 + }, + "TargetPinAddress":{ + "PinID":919078193, + "PinOwnerID":1140491228 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.8125,"y":-1.5625},{"x":-2.8125,"y":-1.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":819342643 + }, + "TargetPinAddress":{ + "PinID":2015026118, + "PinOwnerID":1130446836 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.0625,"y":-1.0},{"x":-3.0625,"y":-0.6875},{"x":-2.4375,"y":-0.6875},{"x":-2.4375,"y":-0.1875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1370591207 + }, + "TargetPinAddress":{ + "PinID":81439827, + "PinOwnerID":1477900478 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-1.74596,"y":-2.125},{"x":-1.74596,"y":1.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1370591207 + }, + "TargetPinAddress":{ + "PinID":81439827, + "PinOwnerID":1140491228 + }, + "ConnectionType":1, + "ConnectedWireIndex":17, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-1.74596,"y":-1.4375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1746917069 + }, + "TargetPinAddress":{ + "PinID":731095980, + "PinOwnerID":1677123653 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.125,"y":1.375},{"x":-3.125,"y":0.875},{"x":1.5625,"y":0.875},{"x":1.5625,"y":1.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":387726791 + }, + "TargetPinAddress":{ + "PinID":731095980, + "PinOwnerID":1255591016 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.3125,"y":0.25},{"x":-3.3125,"y":-1.875},{"x":0.9375,"y":-1.875},{"x":0.9375,"y":-1.3125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1922880267 + }, + "TargetPinAddress":{ + "PinID":731095980, + "PinOwnerID":828151909 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-3.3125,"y":0.8125},{"x":-3.3125,"y":0.625},{"x":0.9375,"y":0.625},{"x":0.9375,"y":-0.5},{"x":3.3125,"y":-0.5},{"x":3.3125,"y":-0.125},{"x":0.0,"y":0.0}] + } + ], + "Displays": null, + "ChipType": 0 +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/test.json b/TestData/Projects/MainTest/Chips/test.json new file mode 100644 index 00000000..c3f30c19 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/test.json @@ -0,0 +1,162 @@ +{ + "Name": "test", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 0.725, + "y": 1.125 + }, + "Colour": { + "r": 0.5414247, + "g": 0.390782118, + "b": 0.6613721, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":1421188130, + "Position":{ + "x":-7.40141, + "y":3.912 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":379144233, + "Position":{ + "x":-3.83526, + "y":0.31532 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":2025946763, + "Position":{ + "x":8.50862, + "y":-3.78063 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":315547482, + "Position":{ + "x":8.06068, + "y":1.785 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":784653966, + "Position":{ + "x":7.97995, + "y":0.85658 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NAND", + "ID":240905991, + "Label":"", + "Position":{ + "x":-0.55341, + "y":0.2381 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"REGISTER-4", + "ID":149684545, + "Label":"", + "Position":{ + "x":-0.53703, + "y":2.27566 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":96791616, + "Label":"", + "Position":{ + "x":-0.63063, + "y":-1.35779 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"REGISTER-4", + "ID":31831749, + "Label":"", + "Position":{ + "x":2.74131, + "y":-0.26384 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], + "InternalData":null + }, + { + "Name":"ROM 256×16", + "ID":1318148087, + "Label":"", + "Position":{ + "x":3.94338, + "y":1.69081 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], + "InternalData":[49392,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1318148087 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":315547482 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1318148087 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":784653966 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json new file mode 100644 index 00000000..29998da7 --- /dev/null +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -0,0 +1,138 @@ +{ + "ProjectName": "MainTest", + "DLSVersion_LastSaved": "2.1.2", + "DLSVersion_EarliestCompatible": "2.0.0", + "CreationTime": "2025-03-14T18:23:30.404+01:00", + "LastSaveTime": "2025-04-20T15:18:17.676+02:00", + "Prefs_MainPinNamesDisplayMode": 0, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 1, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 20000, + "Prefs_SimStepsPerClockTick": 6, + "AllCustomChipNames":[ + "AND", + "D-LATCH", + "NOT", + "OR", + "NOR", + "FLIP-FLOP", + "XOR", + "ADDER", + "ADDER-4", + "REGISTER-1", + "REGISTER-4", + "MEM-1", + "MEM-16", + "ADDER-8", + "REG-8", + "AND-8", + "OR-8", + "NOT-8", + "AND(8,1)", + "MUX-8", + "PC", + "BUF-8", + "ALU-8", + "DECODE-3", + "AND-3", + "CONTROL UNIT", + "TOGGLE", + "FLAGS", + "7-SEGMENT DRIVER", + "DABBLE", + "WIP2", + "LSB", + "LSHIFT-8", + "DOUBLE DABBLE", + "DISP-7", + "DECIMAL-4", + "demo", + "ALU", + "BUS BUFFER", + "MEM-256", + "DECIMAL-8", + "REGISTER-8", + "XNOR", + "EQUALS-8", + "DECODER-2", + "RAM-256×8 (async)", + "RAM-sync", + "test" + ], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"MERGE/SPLIT", + "IsCollection":true + }, + { + "Name":"WIP2", + "IsCollection":false + }, + { + "Name":"RAM-sync", + "IsCollection":false + }, + { + "Name":"test", + "IsCollection":false + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","AND","NOT","NOR","XOR","OR","KEY","CLOCK","3-STATE BUFFER"], + "IsToggledOpen":false, + "Name":"BASICS" + }, + { + "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["1-4BIT","1-8BIT","4-8BIT","8-4BIT","8-1BIT","4-1BIT"], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["7-SEGMENT","DECIMAL-4","DECIMAL-8","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["REGISTER-4","REG-8"], + "IsToggledOpen":false, + "Name":"MEMORY" + }, + { + "Chips":["D-LATCH","FLIP-FLOP","OR-8","MEM-1","NOT-8","AND(8,1)","MUX-8","PC","BUF-8","ALU-8","DECODE-3","AND-3","CONTROL UNIT","TOGGLE","FLAGS","DISP-7","demo","7-SEGMENT DRIVER","DABBLE","LSB","LSHIFT-8","DOUBLE DABBLE","ALU","BUS BUFFER","MEM-256","REGISTER-8","XNOR","EQUALS-8","ADDER-4","DECODER-2","ADDER-8","ADDER","MEM-16","REGISTER-1","AND-8","RAM-256×8 (async)","ROM 256×16"], + "IsToggledOpen":false, + "Name":"KEEP" + }, + { + "Chips":["WIP2","RAM-sync"], + "IsToggledOpen":false, + "Name":"TEST" + }, + { + "Chips":[], + "IsToggledOpen":true, + "Name":"OTHER" + } + ] +} \ No newline at end of file From 94d2b2d06000c9e911b2051b6a6320528e1d6923 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Tue, 22 Apr 2025 21:40:00 +0300 Subject: [PATCH 025/124] Revert "Merge branch 'main' into notes" This reverts commit 8bf0f51407b231f565d8b5a9ece13ff6148b38d6, reversing changes made to 3a008dcf34c1dc8471a5de76ddccea0d1e4082cf. --- .../Description/Helpers/ChipTypeHelper.cs | 1 - .../Description/Types/SubTypes/ChipTypes.cs | 1 - .../Scripts/Game/Elements/DevPinInstance.cs | 2 +- Assets/Scripts/Game/Elements/PinInstance.cs | 10 +- Assets/Scripts/Game/Elements/WireInstance.cs | 3 +- .../Interaction/ChipInteractionController.cs | 50 +-- .../Game/Interaction/KeyboardShortcuts.cs | 7 +- .../Game/Interaction/UndoController.cs | 370 ------------------ .../Game/Interaction/UndoController.cs.meta | 2 - Assets/Scripts/Game/Main/Main.cs | 4 +- .../Game/Project/BuiltinChipCreator.cs | 13 +- .../Game/Project/BuiltinCollectionCreator.cs | 1 - .../Scripts/Game/Project/DevChipInstance.cs | 223 ++++------- Assets/Scripts/Game/Project/Project.cs | 31 +- .../Scripts/Graphics/UI/Menus/ContextMenu.cs | 12 +- .../Graphics/UI/Menus/PreferencesMenu.cs | 2 +- .../Graphics/UI/Menus/PulseEditMenu.cs | 68 ---- .../Graphics/UI/Menus/PulseEditMenu.cs.meta | 2 - Assets/Scripts/Graphics/UI/UIDrawer.cs | 3 - .../Scripts/SaveSystem/DescriptionCreator.cs | 9 +- Assets/Scripts/Simulation/SimChip.cs | 10 +- Assets/Scripts/Simulation/Simulator.cs | 56 +-- ProjectSettings/ProjectSettings.asset | 6 +- TestData/Projects/MainTest/Chips/test.json | 162 -------- .../Projects/MainTest/ProjectDescription.json | 13 +- 25 files changed, 116 insertions(+), 945 deletions(-) delete mode 100644 Assets/Scripts/Game/Interaction/UndoController.cs delete mode 100644 Assets/Scripts/Game/Interaction/UndoController.cs.meta delete mode 100644 Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs delete mode 100644 Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs.meta delete mode 100644 TestData/Projects/MainTest/Chips/test.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 4964d076..b0797c78 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -12,7 +12,6 @@ public static class ChipTypeHelper // ---- Basic Chips ---- { ChipType.Nand, "NAND" }, { ChipType.Clock, "CLOCK" }, - { ChipType.Pulse, "PULSE" }, { ChipType.TriStateBuffer, "3-STATE BUFFER" }, // ---- Memory ---- { ChipType.dev_Ram_8Bit, "dev.RAM-8" }, diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index 5b9d9ce7..c7d93f3d 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -8,7 +8,6 @@ public enum ChipType Nand, TriStateBuffer, Clock, - Pulse, // ---- Memory ---- dev_Ram_8Bit, diff --git a/Assets/Scripts/Game/Elements/DevPinInstance.cs b/Assets/Scripts/Game/Elements/DevPinInstance.cs index 8f296cb4..e71ff55c 100644 --- a/Assets/Scripts/Game/Elements/DevPinInstance.cs +++ b/Assets/Scripts/Game/Elements/DevPinInstance.cs @@ -118,7 +118,7 @@ Bounds2D CreateBoundingBox(float pad) public void ToggleState(int bitIndex) { - Pin.PlayerInputState.Toggle(bitIndex); + Pin.State.Toggle(bitIndex); } public bool PointIsInInteractionBounds(Vector2 point) => PointIsInHandleBounds(point) || PointIsInStateIndicatorBounds(point); diff --git a/Assets/Scripts/Game/Elements/PinInstance.cs b/Assets/Scripts/Game/Elements/PinInstance.cs index e9c91cf9..a2981ac8 100644 --- a/Assets/Scripts/Game/Elements/PinInstance.cs +++ b/Assets/Scripts/Game/Elements/PinInstance.cs @@ -16,8 +16,7 @@ public class PinInstance : IInteractable // Pin may be attached to a chip or a devPin as its parent public readonly IMoveable parent; - public readonly PinState State; // sim state - public PinState PlayerInputState; // dev input pins only + public readonly PinState State; public PinColour Colour; bool faceRight; public float LocalPosY; @@ -32,7 +31,6 @@ public PinInstance(PinDescription desc, PinAddress address, IMoveable parent, bo Address = address; IsSourcePin = isSourcePin; State = new PinState((int)bitCount); - PlayerInputState = new PinState((int)bitCount); Colour = desc.Colour; IsBusPin = parent is SubChipInstance subchip && subchip.IsBus; @@ -69,11 +67,9 @@ public void SetBusFlip(bool flipped) public Color GetColLow() => DrawSettings.ActiveTheme.StateLowCol[(int)Colour]; public Color GetColHigh() => DrawSettings.ActiveTheme.StateHighCol[(int)Colour]; - public Color GetStateCol(int bitIndex, bool hover = false, bool canUsePlayerState = true) + public Color GetStateCol(int bitIndex, bool hover = false) { - PinState pinState = (IsSourcePin && canUsePlayerState) ? PlayerInputState : State; // dev input pin uses player state (so it updates even when sim is paused) - - uint state = pinState.GetBit(bitIndex); + uint state = State.GetBit(bitIndex); int colIndex = (int)Colour; return state switch diff --git a/Assets/Scripts/Game/Elements/WireInstance.cs b/Assets/Scripts/Game/Elements/WireInstance.cs index afe28ec4..f2629247 100644 --- a/Assets/Scripts/Game/Elements/WireInstance.cs +++ b/Assets/Scripts/Game/Elements/WireInstance.cs @@ -312,7 +312,8 @@ public void RemoveConnectionDependency() public Color GetColour(int bitIndex) { - Color col = IsFullyConnected ? SourcePin.GetStateCol(bitIndex, false, false) : DrawSettings.ActiveTheme.StateDisconnectedCol; + Color col = IsFullyConnected ? SourcePin.GetStateCol(bitIndex) : DrawSettings.ActiveTheme.StateDisconnectedCol; + if (bitCount != PinBitCount.Bit1 && bitIndex % 2 == 0) { diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index 6e3fa235..caba5665 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -63,15 +63,12 @@ public void Update() HandleMouseInput(); } - public void Delete(IMoveable element, bool clearSelection = true, bool recordUndo = true) + public void Delete(IMoveable element, bool clearSelection = true) { if (!HasControl) return; - if (recordUndo) ActiveDevChip.UndoController.RecordDeleteElements(new List(new[] { element })); - if (element is SubChipInstance subChip) ActiveDevChip.DeleteSubChip(subChip); if (element is NoteInstance noteInstance) ActiveDevChip.DeleteNote(noteInstance); - else if (element is DevPinInstance devPin) ActiveDevChip.DeleteDevPin(devPin); - + if (element is DevPinInstance devPin) ActiveDevChip.DeleteDevPin(devPin); if (clearSelection) SelectedElements.Clear(); } @@ -132,11 +129,9 @@ void DeleteSelected() // Delete selected subchips/pins if (SelectedElements.Count > 0) { - ActiveDevChip.UndoController.RecordDeleteElements(SelectedElements); - foreach (IMoveable selectedElement in SelectedElements) { - Delete(selectedElement, false, false); + Delete(selectedElement, false); } SelectedElements.Clear(); @@ -172,7 +167,6 @@ public void DeleteWire(WireInstance wire) { if (HasControl) { - ActiveDevChip.UndoController.RecordDeleteWire(wire); ActiveDevChip.DeleteWire(wire); } } @@ -197,9 +191,6 @@ void HandleKeyboardInput() // Ignore shortcuts if don't have control if (!HasControl) return; - if (KeyboardShortcuts.UndoShortcutTriggered) ActiveDevChip.UndoController.TryUndo(); - else if (KeyboardShortcuts.RedoShortcutTriggered) ActiveDevChip.UndoController.TryRedo(); - if (KeyboardShortcuts.ToggleGridShortcutTriggered) { project.ToggleGridDisplay(); @@ -232,8 +223,7 @@ void HandleKeyboardInput() } else { - if (isPlacingNewElements) CancelPlacingItems(); - else DeleteSelected(); + DeleteSelected(); } } @@ -274,29 +264,6 @@ static bool CanDuplicate(IMoveable element) return true; } - public static void GetElementDescription(IMoveable element) - { - ChipDescription desc; - SubChipDescription subDesc; - - if (element is SubChipInstance subchip) - { - desc = subchip.Description; - subDesc = subchip.InitialSubChipDesc; - } - else - { - DevPinInstance devpin = (DevPinInstance)element; - ChipType pinType = ChipTypeHelper.GetPinType(devpin.IsInputPin, devpin.BitCount); - desc = BuiltinChipCreator.CreateInputOrOutputPin(pinType); - - // Copy pin description from duplicated pin - PinDescription pinDesc = DescriptionCreator.CreatePinDescription(devpin); - if (devpin.IsInputPin) desc.InputPins[0] = pinDesc; - else desc.OutputPins[0] = pinDesc; - } - } - void DuplicateSelectedElements() { IMoveable[] elementsToDuplicate = SelectedElements.Where(CanDuplicate).ToArray(); @@ -571,8 +538,6 @@ void StartPlacingWire(WireInstance.ConnectionInfo connectionInfo) void FinishMovingElements() { // -- If any elements are in invalid position, cancel the movement -- - bool hasMoved = false; - foreach (IMoveable element in SelectedElements) { if (!element.IsValidMovePos) @@ -580,12 +545,8 @@ void FinishMovingElements() CancelMovingSelectedItems(); return; } - - hasMoved |= (element.MoveStartPosition != element.Position); } - if (hasMoved) ActiveDevChip.UndoController.RecordMoveElements(SelectedElements); - // -- Apply movement -- IsMovingSelection = false; @@ -619,8 +580,6 @@ void FinishPlacingNewElements() ActiveDevChip.AddWire(wire, false); } - ActiveDevChip.UndoController.RecordAddElements(SelectedElements); - DuplicatedWires.Clear(); // When elements are placed, there are two cases where we automatically start placing new elements: @@ -897,7 +856,6 @@ void CompleteConnection(WireInstance.ConnectionInfo info) { WireToPlace.FinishPlacingWire(info); ActiveDevChip.AddWire(WireToPlace, false); - ActiveDevChip.UndoController.RecordAddWire(WireToPlace); } } diff --git a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs index 051db2f6..c3984b92 100644 --- a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs +++ b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs @@ -25,12 +25,10 @@ public static class KeyboardShortcuts public static bool DuplicateShortcutTriggered => MultiModeHeld && InputHelper.IsKeyDownThisFrame(KeyCode.D); public static bool ToggleGridShortcutTriggered => CtrlShortcutTriggered(KeyCode.G); public static bool ResetCameraShortcutTriggered => CtrlShortcutTriggered(KeyCode.R); - public static bool UndoShortcutTriggered => CtrlShortcutTriggered(KeyCode.Z); - public static bool RedoShortcutTriggered => CtrlShiftShortcutTriggered(KeyCode.Z); // ---- Single key shortcuts ---- public static bool CancelShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Escape); - public static bool ConfirmShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Return) || InputHelper.IsKeyDownThisFrame(KeyCode.KeypadEnter); + public static bool ConfirmShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Return); public static bool DeleteShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Backspace) || InputHelper.IsKeyDownThisFrame(KeyCode.Delete); public static bool SimNextStepShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Tab); @@ -43,13 +41,12 @@ public static class KeyboardShortcuts // In "Multi-mode", placed chips will be duplicated once placed to allow placing again; selecting a chip will add it to the current selection; etc. public static bool MultiModeHeld => InputHelper.AltIsHeld || InputHelper.ShiftIsHeld; public static bool StraightLineModeHeld => InputHelper.ShiftIsHeld; - public static bool StraightLineModeTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.LeftShift); + public static bool StraightLineModeTriggered=> InputHelper.IsKeyDownThisFrame(KeyCode.LeftShift); public static bool CameraActionKeyHeld => InputHelper.AltIsHeld; public static bool TakeFirstFromCollectionModifierHeld => InputHelper.CtrlIsHeld || InputHelper.AltIsHeld || InputHelper.ShiftIsHeld; // ---- Helpers ---- static bool CtrlShortcutTriggered(KeyCode key) => InputHelper.IsKeyDownThisFrame(key) && InputHelper.CtrlIsHeld && !(InputHelper.AltIsHeld || InputHelper.ShiftIsHeld); - static bool CtrlShiftShortcutTriggered(KeyCode key) => InputHelper.IsKeyDownThisFrame(key) && InputHelper.CtrlIsHeld && InputHelper.ShiftIsHeld && !(InputHelper.AltIsHeld); static bool ShiftShortcutTriggered(KeyCode key) => InputHelper.IsKeyDownThisFrame(key) && InputHelper.ShiftIsHeld && !(InputHelper.AltIsHeld || InputHelper.CtrlIsHeld); } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Interaction/UndoController.cs b/Assets/Scripts/Game/Interaction/UndoController.cs deleted file mode 100644 index 1fba8e4b..00000000 --- a/Assets/Scripts/Game/Interaction/UndoController.cs +++ /dev/null @@ -1,370 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using DLS.Description; -using DLS.SaveSystem; -using UnityEngine; - -namespace DLS.Game -{ - public class UndoController - { - readonly List undoHistory = new(); - int undoIndex = -1; - readonly DevChipInstance devChip; - - public UndoController(DevChipInstance devChip) - { - this.devChip = devChip; - } - - public void Clear() - { - undoHistory.Clear(); - undoIndex = -1; - } - - public void TryUndo() - { - if (undoIndex == -1) return; - - UndoAction action = undoHistory[undoIndex]; - undoIndex--; - - UndoRedo(action, true); - } - - public void TryRedo() - { - if (undoIndex == undoHistory.Count - 1) return; - - UndoAction action = undoHistory[undoIndex + 1]; - undoIndex++; - - UndoRedo(action, false); - } - - public void RecordAddWire(WireInstance wire) => RecordAddOrDeleteWire(wire, false); - - public void RecordDeleteWire(WireInstance wire) => RecordAddOrDeleteWire(wire, true); - - void RecordAddOrDeleteWire(WireInstance wire, bool delete) - { - DescriptionCreator.UpdateWireIndicesForDescriptionCreation(devChip); - int wireIndex = wire.descriptionCreator_wireIndex; - WireDescription wireDesc = DescriptionCreator.CreateWireDescription(wire); - - FullWireState stateBeforeDelete = null; - if (delete) stateBeforeDelete = CreateFullWireState(devChip, new HashSet(new[] { wire })); - - WireExistenceAction action = new() - { - wireDescription = wireDesc, - wireIndex = wireIndex, - fullWireStateBeforeDelete = stateBeforeDelete, - isDeleteAction = delete - }; - - RecordUndoAction(action); - } - - - public void RecordMoveElements(List movedElements) - { - int count = movedElements.Count; - MoveUndoAction moveUndoAction = new() - { - subChipIDs = new int[count], - originalPositions = new Vector2[count], - newPositions = new Vector2[count] - }; - - // Selected elements - for (int i = 0; i < count; i++) - { - IMoveable element = movedElements[i]; - moveUndoAction.subChipIDs[i] = element.ID; - moveUndoAction.originalPositions[i] = element.MoveStartPosition; - moveUndoAction.newPositions[i] = element.Position; - } - - // Wire move offsets - int wireCount = devChip.Wires.Count; - moveUndoAction.wireMoveOffsets = new Vector2[wireCount]; - for (int i = 0; i < wireCount; i++) - { - moveUndoAction.wireMoveOffsets[i] = devChip.Wires[i].MoveOffset; - } - - RecordUndoAction(moveUndoAction); - } - - public void RecordDeleteElements(List deletedElements) - { - RecordAddOrDeleteElements(deletedElements, true); - } - - public void RecordAddElements(List addedElements) - { - RecordAddOrDeleteElements(addedElements, false); - } - - void RecordAddOrDeleteElements(List elements, bool delete) - { - List subchips = elements.OfType().ToList(); - DevPinInstance[] devPins = elements.OfType().ToArray(); - - // ---- Bus handling ---- - if (!delete) - { - // Ignore bus origin when placing (it's not a 'complete' element on its own, it requires the corresponding bus terminus) - subchips = subchips.Where(s => !ChipTypeHelper.IsBusOriginType(s.ChipType)).ToList(); - if (subchips.Count == 0 && devPins.Length == 0) return; - } - - // Ensure that if we have one part of the bus, the linked pair is included as well - SubChipInstance[] buses = subchips.Where(s => s.IsBus).ToArray(); - if (buses.Length > 0) - { - HashSet busIDsInOriginalList = subchips.Where(s => s.IsBus).Select(b => b.ID).ToHashSet(); - - foreach (SubChipInstance bus in buses) - { - if (busIDsInOriginalList.Contains(bus.LinkedBusPairID)) continue; - - bool foundPair = devChip.TryGetSubChipByID(bus.LinkedBusPairID, out SubChipInstance linkedBus); - if (!foundPair) throw new Exception("Failed to find bus pair when creating undo/redo action"); - - subchips.Add(linkedBus); - } - } - - // When deleting elements, store full state of ALL wires, not just those affected by the deletion. - // This is because other wires may be connected to the deleted wires (in which case their points are modified), - // and we want their original state to be restored as well. It's a bit of a pain to specially handle those, so just do a full state backup. - FullWireState wireStateBeforeDelete = null; - if (delete) - { - HashSet wiresThatWillBeDeletedAutomatically = new(); - foreach (IMoveable element in elements) - { - devChip.GetWiresAttachedToElement(element.ID, wiresThatWillBeDeletedAutomatically); - } - - wireStateBeforeDelete = CreateFullWireState(devChip, wiresThatWillBeDeletedAutomatically); - } - - ElementExistenceAction deleteAction = new() - { - chipNames = subchips.Select(s => s.Description.Name).ToArray(), - subchipDescriptions = subchips.Select(DescriptionCreator.CreateSubChipDescription).ToArray(), - pinDescriptions = devPins.Select(DescriptionCreator.CreatePinDescription).ToArray(), - pinInInputFlags = devPins.Select(p => p.IsInputPin).ToArray(), - wireStateBeforeDelete = wireStateBeforeDelete, - isDeleteAction = delete - }; - - RecordUndoAction(deleteAction); - } - - static FullWireState CreateFullWireState(DevChipInstance devChip, HashSet wiresThatWillBeDeleted) - { - DescriptionCreator.UpdateWireIndicesForDescriptionCreation(devChip); - WireDescription[] wireDescriptions = new WireDescription[devChip.Wires.Count]; - bool[] willDeleteWireFlags = new bool[devChip.Wires.Count]; - - for (int i = 0; i < wireDescriptions.Length; i++) - { - wireDescriptions[i] = DescriptionCreator.CreateWireDescription(devChip.Wires[i]); - willDeleteWireFlags[i] = wiresThatWillBeDeleted.Contains(devChip.Wires[i]); - //Debug.Log($"Full wire state: {i} Will delete: {willDeleteWireFlags[i]}"); - } - - FullWireState wireStateBeforeDelete = new() - { - wireDescriptions = wireDescriptions, - createFlags = willDeleteWireFlags, - }; - - return wireStateBeforeDelete; - } - - void RecordUndoAction(UndoAction action) - { - if (undoIndex != undoHistory.Count) - { - undoHistory.RemoveRange(undoIndex + 1, undoHistory.Count - (undoIndex + 1)); - } - - undoHistory.Add(action); - undoIndex = undoHistory.Count - 1; - } - - void UndoRedo(UndoAction action, bool undo) - { - Project.ActiveProject.controller.CancelEverything(); - - try - { - if (action is MoveUndoAction move) - { - move.Trigger(undo, devChip); - } - else if (action is ElementExistenceAction elementExistence) - { - elementExistence.Trigger(undo, devChip); - } - else if (action is WireExistenceAction wireExistence) - { - wireExistence.Trigger(undo, devChip); - } - } - catch (Exception e) - { - if (Application.isEditor) Debug.Log($"Undo/redo action failed. Reason: {e.Message} Stack trace: {e.StackTrace}"); - } - } - - - class MoveUndoAction : UndoAction - { - public int[] subChipIDs; - public Vector2[] originalPositions; - public Vector2[] newPositions; - public Vector2[] wireMoveOffsets; - - - public void Trigger(bool undo, DevChipInstance devChip) - { - Dictionary elementLookupByID = devChip.Elements.ToDictionary(element => element.ID, element => element); - for (int i = 0; i < subChipIDs.Length; i++) - { - IMoveable element = elementLookupByID[subChipIDs[i]]; - element.Position = undo ? originalPositions[i] : newPositions[i]; - Project.ActiveProject.controller.Select(element, true); - } - - for (int i = 0; i < devChip.Wires.Count; i++) - { - devChip.Wires[i].MoveOffset = wireMoveOffsets[i] * (undo ? -1 : 1); - devChip.Wires[i].ApplyMoveOffset(); - } - } - } - - class WireExistenceAction : UndoAction - { - public WireDescription wireDescription; - public int wireIndex; - public bool isDeleteAction; - public FullWireState fullWireStateBeforeDelete; - - - public void Trigger(bool undo, DevChipInstance devChip) - { - if (!isDeleteAction) undo = !undo; - bool addWire = undo; - - if (addWire) - { - if (fullWireStateBeforeDelete != null) - { - fullWireStateBeforeDelete.Restore(devChip); - } - else - { - (WireInstance loadedWire, bool failed) = DevChipInstance.TryLoadWireFromDescription(wireDescription, wireIndex, devChip, devChip.Wires); - if (failed) throw new Exception("Failed to load wire in undo/redo action"); - else devChip.AddWire(loadedWire, false, wireIndex); - } - } - else - { - devChip.DeleteWire(devChip.Wires[wireIndex]); - } - } - } - - class FullWireState - { - public WireDescription[] wireDescriptions; - public bool[] createFlags; - - public void Restore(DevChipInstance devChip) - { - for (int i = 0; i < wireDescriptions.Length; i++) - { - //Debug.Log($"Restoring wire {i} | Create new = {createFlags[i]}"); - (WireInstance loadedWire, bool failed) res = DevChipInstance.TryLoadWireFromDescription(wireDescriptions[i], i, devChip, devChip.Wires); - if (res.failed) throw new Exception("Failed to load wire in undo/redo action"); - - if (createFlags[i]) devChip.AddWire(res.loadedWire, false, i); - else devChip.Wires[i] = res.loadedWire; - } - } - } - - class ElementExistenceAction : UndoAction - { - public string[] chipNames; - public SubChipDescription[] subchipDescriptions; - - public PinDescription[] pinDescriptions; - public bool[] pinInInputFlags; - public FullWireState wireStateBeforeDelete; - - public bool isDeleteAction; - - public void Trigger(bool undo, DevChipInstance devChip) - { - if (!isDeleteAction) undo = !undo; - bool addElement = undo; - - - // ---- Handle subchips ---- - for (int i = 0; i < chipNames.Length; i++) - { - ChipDescription description = Project.ActiveProject.chipLibrary.GetChipDescription(chipNames[i]); - - if (addElement) - { - SubChipInstance subchip = new(description, subchipDescriptions[i]); - devChip.AddNewSubChip(subchip, false); - Project.ActiveProject.controller.Select(subchip, true); - } - else if (!devChip.TryDeleteSubChipByID(subchipDescriptions[i].ID)) - { - // (bus pairs deleted automatically, so the other part is expected to fail) - if (!ChipTypeHelper.IsBusType(description.ChipType)) throw new Exception("Failed to delete subchip"); - } - } - - // ---- Handle dev pins ---- - for (int i = 0; i < pinDescriptions.Length; i++) - { - PinDescription pinDescription = pinDescriptions[i]; - - if (addElement) - { - DevPinInstance devPin = new(pinDescription, pinInInputFlags[i]); - devChip.AddNewDevPin(devPin, false); - Project.ActiveProject.controller.Select(devPin, true); - } - else - { - if (!devChip.TryDeleteDevPinByID(pinDescription.ID)) throw new Exception("Failed to delete dev pin"); - } - } - - if (addElement && wireStateBeforeDelete != null) - { - wireStateBeforeDelete.Restore(devChip); - } - } - } - - class UndoAction - { - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Game/Interaction/UndoController.cs.meta b/Assets/Scripts/Game/Interaction/UndoController.cs.meta deleted file mode 100644 index 3c25111c..00000000 --- a/Assets/Scripts/Game/Interaction/UndoController.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: bb865751ca8914b4bb6a84288f0bc068 \ No newline at end of file diff --git a/Assets/Scripts/Game/Main/Main.cs b/Assets/Scripts/Game/Main/Main.cs index dda3cdc5..7931d8e2 100644 --- a/Assets/Scripts/Game/Main/Main.cs +++ b/Assets/Scripts/Game/Main/Main.cs @@ -11,9 +11,9 @@ namespace DLS.Game { public static class Main { - public static readonly Version DLSVersion = new(2, 1, 3); + public static readonly Version DLSVersion = new(2, 1, 2); public static readonly Version DLSVersion_EarliestCompatible = new(2, 0, 0); - public static readonly string LastUpdatedString = "21 April 2025"; + public static readonly string LastUpdatedString = "18 April 2025"; public static AppSettings ActiveAppSettings; public static Project ActiveProject { get; private set; } diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 1bf17b7f..b9cf48ab 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -26,7 +26,6 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions() CreateNand(), CreateTristateBuffer(), CreateClock(), - CreatePulse(), // ---- Memory ---- dev_CreateRAM_8(), CreateROM_8(), @@ -131,16 +130,6 @@ static ChipDescription CreateClock() return CreateBuiltinChipDescription(ChipType.Clock, size, col, null, outputPins); } - static ChipDescription CreatePulse() - { - Vector2 size = new(GridHelper.SnapToGrid(1), GridSize * 3); - Color col = new(0.1f, 0.1f, 0.1f); - PinDescription[] inputPins = { CreatePinDescription("IN", 0) }; - PinDescription[] outputPins = { CreatePinDescription("PULSE", 1) }; - - return CreateBuiltinChipDescription(ChipType.Pulse, size, col, inputPins, outputPins); - } - static ChipDescription CreateBitConversionChip(ChipType chipType, PinBitCount bitCountIn, PinBitCount bitCountOut, int numIn, int numOut) { PinDescription[] inputPins = new PinDescription[numIn]; @@ -370,7 +359,7 @@ static ChipDescription CreateBusTerminus(PinBitCount bitCount) return CreateBuiltinChipDescription(type, BusChipSize(bitCount), busOrigin.Colour, inputs, hideName: true); } - + static ChipDescription CreateBuiltinChipDescription(ChipType type, Vector2 size, Color col, PinDescription[] inputs = null, PinDescription[] outputs = null, DisplayDescription[] displays = null, bool hideName = false) { string name = ChipTypeHelper.GetName(type); diff --git a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs index f7e6508a..3655d70d 100644 --- a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs @@ -21,7 +21,6 @@ public static ChipCollection[] CreateDefaultChipCollections() CreateChipCollection("BASIC", ChipType.Nand, ChipType.Clock, - ChipType.Pulse, ChipType.Key, ChipType.TriStateBuffer ), diff --git a/Assets/Scripts/Game/Project/DevChipInstance.cs b/Assets/Scripts/Game/Project/DevChipInstance.cs index 8cdbd85a..5f66812d 100644 --- a/Assets/Scripts/Game/Project/DevChipInstance.cs +++ b/Assets/Scripts/Game/Project/DevChipInstance.cs @@ -10,27 +10,16 @@ namespace DLS.Game { public class DevChipInstance { - public readonly List Elements = new(); - public readonly List Wires = new(); - - public readonly UndoController UndoController; - // Names of all the chips which contain this chip (either directly, or inside some other subchip) public readonly HashSet AllParentChipNames = new(ChipDescription.NameComparer); - - public ChipDescription LastSavedDescription; - DevPinInstance[] inputPins_cached = Array.Empty(); - bool elementsModifiedSinceLastArrayUpdate; - + public readonly List Elements = new(); public SimChip SimChip; bool hasSimChip; + public readonly List Wires = new(); - public string ChipName => LastSavedDescription == null ? string.Empty : LastSavedDescription.Name; - - public DevChipInstance() - { - UndoController = new UndoController(this); - } + bool elementsModifiedSinceLastArrayUpdate; + DevPinInstance[] inputPins_cached = Array.Empty(); + public ChipDescription LastSavedDescription; public void SetSimChip(SimChip simChip) { @@ -45,6 +34,7 @@ public void RebuildSimulation() SetSimChip(simChip); } + public string ChipName => LastSavedDescription == null ? string.Empty : LastSavedDescription.Name; public DevPinInstance[] GetInputPins() { @@ -111,78 +101,64 @@ public static (DevChipInstance devChip, bool anyElementFailedToLoad) LoadFromDes for (int i = 0; i < description.Wires.Length; i++) { WireDescription wireDescription = description.Wires[i]; - (WireInstance loadedWire, bool failed) = TryLoadWireFromDescription(wireDescription, i, instance, loadedWiresWithOriginalIndices); - - if (!failed) instance.AddWire(loadedWire, true); + instance.TryFindPin(wireDescription.SourcePinAddress, out PinInstance sourcePin); + instance.TryFindPin(wireDescription.TargetPinAddress, out PinInstance targetPin); - loadedWiresWithOriginalIndices[i] = loadedWire; - anyElementFailedToLoad |= failed; - } - - instance.RegenerateParentChipNamesHash(); - - return (instance, anyElementFailedToLoad); - } - - public static (WireInstance loadedWire, bool failed) TryLoadWireFromDescription(WireDescription wireDescription, int wireIndex, DevChipInstance instance, IList allWires) - { - bool failedToLoad = false; - WireInstance loadedWire = null; - WireInstance connectedWire = wireDescription.ConnectedWireIndex >= 0 ? allWires[wireDescription.ConnectedWireIndex] : null; + if (sourcePin != null && targetPin != null) + { + WireConnectionType connectionType = wireDescription.ConnectionType; - instance.TryFindPin(wireDescription.SourcePinAddress, out PinInstance sourcePin); - instance.TryFindPin(wireDescription.TargetPinAddress, out PinInstance targetPin); + if (connectionType is WireConnectionType.ToWireSource or WireConnectionType.ToWireTarget) + { + WireInstance wireConnectTarget = loadedWiresWithOriginalIndices[wireDescription.ConnectedWireIndex]; + bool wireConnectTargetFailedToLoad = wireConnectTarget == null; - if (sourcePin != null && targetPin != null) - { - WireConnectionType connectionType = wireDescription.ConnectionType; + if (!wireConnectTargetFailedToLoad) + { + // If wire connection target did load, double check that it connects to the same pin that this wire is expecting + // (this should always be the case, but a bug in a previous version could cause save files to contain bad connection data) + bool addressMismatch = false; + addressMismatch |= connectionType is WireConnectionType.ToWireSource && !PinAddress.Equals(wireConnectTarget.SourcePin.Address, wireDescription.SourcePinAddress); + addressMismatch |= connectionType is WireConnectionType.ToWireTarget && !PinAddress.Equals(wireConnectTarget.TargetPin_BusCorrected.Address, wireDescription.TargetPinAddress); + wireConnectTargetFailedToLoad = addressMismatch; + } - if (connectionType is WireConnectionType.ToWireSource or WireConnectionType.ToWireTarget) - { - WireInstance wireConnectTarget = connectedWire; - bool wireConnectTargetFailedToLoad = wireConnectTarget == null; + // If wire is connected to another wire, but the other wire failed to load, then fallback to pin connection type + // (Load failure could be due to a pin could being deleted from a subchip, or the whole subchip being deleted from the library for example) + if (wireConnectTargetFailedToLoad) + { + anyElementFailedToLoad = true; + connectionType = WireConnectionType.ToPins; + } + } - if (!wireConnectTargetFailedToLoad) + WireInstance.ConnectionInfo sourceConnection = new() { - // If wire connection target did load, double check that it connects to the same pin that this wire is expecting - // (this should always be the case, but a bug in a previous version could cause save files to contain bad connection data) - bool addressMismatch = false; - addressMismatch |= connectionType is WireConnectionType.ToWireSource && !PinAddress.Equals(wireConnectTarget.SourcePin.Address, wireDescription.SourcePinAddress); - addressMismatch |= connectionType is WireConnectionType.ToWireTarget && !PinAddress.Equals(wireConnectTarget.TargetPin_BusCorrected.Address, wireDescription.TargetPinAddress); - wireConnectTargetFailedToLoad = addressMismatch; - } + pin = sourcePin, + connectedWire = connectionType == WireConnectionType.ToWireSource ? loadedWiresWithOriginalIndices[wireDescription.ConnectedWireIndex] : null, + wireConnectionSegmentIndex = wireDescription.ConnectedWireSegmentIndex + }; - // If wire is connected to another wire, but the other wire failed to load, then fallback to pin connection type - // (Load failure could be due to a pin could being deleted from a subchip, or the whole subchip being deleted from the library for example) - if (wireConnectTargetFailedToLoad) + WireInstance.ConnectionInfo targetConnection = new() { - failedToLoad = true; - connectionType = WireConnectionType.ToPins; - } + pin = targetPin, + connectedWire = connectionType == WireConnectionType.ToWireTarget ? loadedWiresWithOriginalIndices[wireDescription.ConnectedWireIndex] : null, + wireConnectionSegmentIndex = wireDescription.ConnectedWireSegmentIndex + }; + + WireInstance loadedWire = new(sourceConnection, targetConnection, wireDescription.Points, i); + instance.AddWire(loadedWire, true); + loadedWiresWithOriginalIndices[i] = loadedWire; } - - WireInstance.ConnectionInfo sourceConnection = new() - { - pin = sourcePin, - connectedWire = connectionType == WireConnectionType.ToWireSource ? connectedWire : null, - wireConnectionSegmentIndex = wireDescription.ConnectedWireSegmentIndex - }; - - WireInstance.ConnectionInfo targetConnection = new() + else { - pin = targetPin, - connectedWire = connectionType == WireConnectionType.ToWireTarget ? connectedWire : null, - wireConnectionSegmentIndex = wireDescription.ConnectedWireSegmentIndex - }; - - loadedWire = new WireInstance(sourceConnection, targetConnection, wireDescription.Points, wireIndex); - } - else - { - failedToLoad = true; + anyElementFailedToLoad = true; + } } - return (loadedWire, failedToLoad); + instance.RegenerateParentChipNamesHash(); + + return (instance, anyElementFailedToLoad); } // Check if subchip can be added @@ -228,7 +204,7 @@ public void AddNewSubChip(SubChipInstance subChip, bool isLoading) AddElement(subChip); if (!isLoading) { - Simulator.AddSubChip(SimChip, subChip.Description, Project.ActiveProject.chipLibrary, subChip.ID, subChip.InternalData); + Simulator.AddSubChip(SimChip, subChip.Description, Project.ActiveProject.chipLibrary, subChip.InitialSubChipDesc); } } @@ -241,12 +217,9 @@ public void AddNewDevPin(DevPinInstance pin, bool isLoadingFromFile) } } - public void AddWire(WireInstance wire, bool isLoading, int insertIndex = -1) + public void AddWire(WireInstance wire, bool isLoading) { - bool insert = insertIndex != -1; - if (insert) Wires.Insert(insertIndex, wire); - else Wires.Add(wire); - + Wires.Add(wire); if (!isLoading) { Simulator.AddConnection(SimChip, wire.SourcePin.Address, wire.TargetPin.Address); @@ -309,6 +282,14 @@ public void DeleteWire(WireInstance wireToDelete) } + void DeleteWiresAttachedToPins(PinInstance[] pins) + { + foreach (PinInstance pin in pins) + { + DeleteWiresAttachedToPin(pin); + } + } + void DeleteWiresAttachedToPin(PinInstance pin) { for (int i = Wires.Count - 1; i >= 0; i--) @@ -322,16 +303,15 @@ void DeleteWiresAttachedToPin(PinInstance pin) } } - - public bool DeleteWiresAttachedToPinOfSubChip(int pinID) + public bool DeleteWiresAttachedToSubChip(int id) { bool anyDeleted = false; for (int i = Wires.Count - 1; i >= 0; i--) { WireInstance wire = Wires[i]; - bool sourceMatch = wire.SourcePin.parent is SubChipInstance && wire.SourcePin.Address.PinID == pinID; - bool targetMatch = wire.TargetPin.parent is SubChipInstance && wire.TargetPin.Address.PinID == pinID; + bool sourceMatch = wire.SourcePin.parent is SubChipInstance && wire.SourcePin.Address.PinID == id; + bool targetMatch = wire.TargetPin.parent is SubChipInstance && wire.TargetPin.Address.PinID == id; if (sourceMatch || targetMatch) { @@ -343,35 +323,6 @@ public bool DeleteWiresAttachedToPinOfSubChip(int pinID) return anyDeleted; } - public void GetWiresAttachedToElement(int elementID, HashSet set) - { - foreach (WireInstance wire in Wires) - { - bool sourceMatch = wire.SourcePin.Address.PinOwnerID == elementID; - bool targetMatch = wire.TargetPin.Address.PinOwnerID == elementID; - - if (sourceMatch || targetMatch) - { - set.Add(wire); - } - } - } - - public void DeleteWiresAttachedToElement(int elementID) - { - for (int i = Wires.Count - 1; i >= 0; i--) - { - WireInstance wire = Wires[i]; - bool sourceMatch = wire.SourcePin.Address.PinOwnerID == elementID; - bool targetMatch = wire.TargetPin.Address.PinOwnerID == elementID; - - if (sourceMatch || targetMatch) - { - DeleteWire(wire); - } - } - } - public void DeleteSubChip(SubChipInstance subChip) { @@ -379,7 +330,7 @@ public void DeleteSubChip(SubChipInstance subChip) // (required for buses, where one end of bus is deleted automatically when other end is deleted; but user may select both ends for deletion) if (!Elements.Contains(subChip)) return; - DeleteWiresAttachedToElement(subChip.ID); + DeleteWiresAttachedToPins(subChip.AllPins); RemoveElement(subChip); if (hasSimChip) Simulator.RemoveSubChip(SimChip, subChip.ID); @@ -401,48 +352,16 @@ public void DeleteNote(NoteInstance note) } // Delete subchip with given id (if it exists) - public bool TryDeleteSubChipByID(int id) + public void TryDeleteSubChipByID(int id) { for (int i = 0; i < Elements.Count; i++) { if (Elements[i] is SubChipInstance subchip && subchip.ID == id) { DeleteSubChip(subchip); - return true; + return; } } - - return false; - } - - // Delete devpin with given id (if it exists) - public bool TryDeleteDevPinByID(int id) - { - for (int i = 0; i < Elements.Count; i++) - { - if (Elements[i] is DevPinInstance devPin && devPin.ID == id) - { - DeleteDevPin(devPin); - return true; - } - } - - return false; - } - - public bool TryGetSubChipByID(int id, out SubChipInstance subchip) - { - foreach (IMoveable element in Elements) - { - if (element.ID == id) - { - subchip = (SubChipInstance)element; - return true; - } - } - - subchip = null; - return false; } // Update the currently viewed chip from the state of the corresponding simChip. @@ -509,7 +428,7 @@ PinInstance TryFindPinFromSimPinSource(SimChip simChip, SimPin simPin) } public bool TryFindPin(PinAddress address, out PinInstance pinInstance) => TryFindPin(Elements, address, out pinInstance); - + public static bool TryFindPin(List elements, PinAddress address, out PinInstance pinInstance) { foreach (IMoveable element in elements) @@ -539,7 +458,7 @@ public static bool TryFindPin(List elements, PinAddress address, out break; } } - + pinInstance = null; return false; } diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index 611788ad..bd6d23bd 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -226,14 +226,6 @@ public void NotifyKeyChipBindingChanged(SubChipInstance keyChip, char newKey) simChip.ChangeKeyBinding(newKey); } - // Chip's pulse width has been changed, so simulation must be updated - public void NotifyPulseWidthChanged(SubChipInstance chip, uint widthNew) - { - chip.InternalData[0] = widthNew; - SimChip simChip = rootSimChip.GetSubChipFromID(chip.ID); - simChip.InternalState[0] = widthNew; - } - // Rom has been edited, so simulation must be updated public void NotifyRomContentsEdited(SubChipInstance romChip) { @@ -249,13 +241,6 @@ public void DeleteChip(string chipToDeleteName) // restart the simulation in this case (this is not ideal though, since state of latches etc will be lost) bool simReloadRequired = ChipContainsSubchipIndirectly(ViewedChip, chipToDeleteName); - if (ChipContainsSubChipDirectly(ViewedChip, chipToDeleteName)) - { - // if deleted chip is a subchip of the current chip, clear undo history as it may now be invalid - // (Todo: maybe handle more gracefully...) - ViewedChip.UndoController.Clear(); - } - UpdateAndSaveAffectedChips(chipLibrary.GetChipDescription(chipToDeleteName), null, true); @@ -346,18 +331,6 @@ public void CreateBlankNote(Vector2 position, string text) ); controller.StartPlacingNote(noteDesc); - - bool ChipContainsSubChipDirectly(DevChipInstance chip, string targetName) - { - foreach (IMoveable element in chip.Elements) - { - if (element is SubChipInstance s && ChipDescription.NameMatch(s.Description.Name, targetName)) - { - return true; - } - } - - return false; } // Must be called prior to library being updated with the change @@ -398,12 +371,12 @@ void UpdateAndSaveAffectedChips(ChipDescription root_desc, ChipDescription root_ // Detect deleted dev pins, and remove any connections to the corresponding subchip pins in the affected chip foreach (PinDescription p in root_desc.InputPins) { - if (!newDesc_AllDevPinIDs.Contains(p.ID)) anyChanges |= devChip.DeleteWiresAttachedToPinOfSubChip(p.ID); + if (!newDesc_AllDevPinIDs.Contains(p.ID)) anyChanges |= devChip.DeleteWiresAttachedToSubChip(p.ID); } foreach (PinDescription p in root_desc.OutputPins) { - if (!newDesc_AllDevPinIDs.Contains(p.ID)) anyChanges |= devChip.DeleteWiresAttachedToPinOfSubChip(p.ID); + if (!newDesc_AllDevPinIDs.Contains(p.ID)) anyChanges |= devChip.DeleteWiresAttachedToSubChip(p.ID); } } diff --git a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs index 57d859e1..8b0eebe7 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs @@ -70,13 +70,6 @@ public static class ContextMenu labelChipEntry, deleteEntry }; - - static readonly MenuEntry[] entries_builtinPulseChip = - { - new(Format("EDIT"), OpenPulseEditMenu, CanEditCurrentChip), - labelChipEntry, - deleteEntry - }; static readonly MenuEntry[] entries_subChipOutput = pinColEntries; @@ -187,9 +180,8 @@ static void HandleOpenMenuInput() else // builtin type { headerName = ChipTypeHelper.IsBusType(subChip.ChipType) ? "BUS" : subChip.Description.Name; - if (subChip.ChipType is ChipType.Key) activeContextMenuEntries = entries_builtinKeySubchip; + if (subChip.ChipType == ChipType.Key) activeContextMenuEntries = entries_builtinKeySubchip; else if (ChipTypeHelper.IsRomType(subChip.ChipType)) activeContextMenuEntries = entries_builtinRomSubchip; - else if (subChip.ChipType is ChipType.Pulse) activeContextMenuEntries = entries_builtinPulseChip; else if (ChipTypeHelper.IsBusType(subChip.ChipType)) activeContextMenuEntries = entries_builtinBus; else activeContextMenuEntries = entries_builtinSubchip; } @@ -411,8 +403,6 @@ static void OpenKeyBindMenu() } static void OpenRomEditMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.RomEdit); - - static void OpenPulseEditMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.PulseEdit); static bool CanEditCurrentChip() => Project.ActiveProject.CanEditViewedChip; diff --git a/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs b/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs index 744a1a45..50e17b22 100644 --- a/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs @@ -65,7 +65,7 @@ public static class PreferencesMenu static readonly UIHandle ID_ClockSpeedInput = new("PREFS_ClockSpeed"); static readonly string showGridLabel = "Show grid" + UI.CreateColouredText(" (ctrl+G)", new Color(1, 1, 1, 0.35f)); - static readonly Func integerInputValidator = ValidateIntegerInput; + static readonly Func integerInputValidator; static double simAvgTicksPerSec_delayedRefreshForUI; static float lastSimAvgTicksPerSecRefreshTime; diff --git a/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs b/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs deleted file mode 100644 index 3d9946fa..00000000 --- a/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using DLS.Game; -using Seb.Helpers; -using Seb.Vis; -using Seb.Vis.UI; -using UnityEngine; - -namespace DLS.Graphics -{ - public static class PulseEditMenu - { - static SubChipInstance pulseChip; - static uint pulseWidth; - - static readonly UIHandle ID_PulseWidthInput = new("PulseChipEdit_PulseWidth"); - static readonly Func integerInputValidator = ValidatePulseWidthInput; - - public static void DrawMenu() - { - MenuHelper.DrawBackgroundOverlay(); - Draw.ID panelID = UI.ReservePanel(); - DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; - - Vector2 pos = UI.Centre + Vector2.up * (UI.HalfHeight * 0.25f); - - using (UI.BeginBoundsScope(true)) - { - UI.DrawText("Pulse Width (ticks)", theme.FontBold, theme.FontSizeRegular, pos, Anchor.TextCentre, Color.white * 0.8f); - - InputFieldTheme inputFieldTheme = DrawSettings.ActiveUITheme.ChipNameInputField; - inputFieldTheme.fontSize = DrawSettings.ActiveUITheme.FontSizeRegular; - - Vector2 size = new(5.6f, DrawSettings.SelectorWheelHeight); - Vector2 inputPos = UI.PrevBounds.CentreBottom + Vector2.down * DrawSettings.VerticalButtonSpacing; - InputFieldState state = UI.InputField(ID_PulseWidthInput, inputFieldTheme, inputPos, size, string.Empty, Anchor.CentreTop, 1, integerInputValidator, forceFocus: true); - uint.TryParse(state.text, out pulseWidth); - - MenuHelper.CancelConfirmResult result = MenuHelper.DrawCancelConfirmButtons(UI.GetCurrentBoundsScope().BottomLeft, UI.GetCurrentBoundsScope().Width, true); - MenuHelper.DrawReservedMenuPanel(panelID, UI.GetCurrentBoundsScope()); - - if (result == MenuHelper.CancelConfirmResult.Cancel) - { - UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); - } - else if (result == MenuHelper.CancelConfirmResult.Confirm) - { - Project.ActiveProject.NotifyPulseWidthChanged(pulseChip, pulseWidth); - UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); - } - } - } - - public static void OnMenuOpened() - { - pulseChip = (SubChipInstance)ContextMenu.interactionContext; - pulseWidth = pulseChip.InternalData[0]; - UI.GetInputFieldState(ID_PulseWidthInput).SetText(pulseWidth.ToString()); - } - - public static bool ValidatePulseWidthInput(string s) - { - if (s.Length > 4) return false; - if (string.IsNullOrEmpty(s)) return true; - if (s.Contains(" ")) return false; - return int.TryParse(s, out _); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs.meta b/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs.meta deleted file mode 100644 index 969aa1e2..00000000 --- a/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 20b616e4d4e05224caee5477888fe68d \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/UIDrawer.cs b/Assets/Scripts/Graphics/UI/UIDrawer.cs index 69fa4ee3..d53cc1f3 100644 --- a/Assets/Scripts/Graphics/UI/UIDrawer.cs +++ b/Assets/Scripts/Graphics/UI/UIDrawer.cs @@ -17,7 +17,6 @@ public enum MenuType MainMenu, RebindKeyChip, RomEdit, - PulseEdit, UnsavedChanges, Search, ChipLabelPopup, @@ -69,7 +68,6 @@ static void DrawProjectMenus(Project project) else if (menuToDraw == MenuType.Search) SearchPopup.DrawMenu(); else if (menuToDraw == MenuType.ChipLabelPopup) ChipLabelMenu.DrawMenu(); else if (menuToDraw == MenuType.NoteTextPopup) NoteTextMenu.DrawMenu(); - else if (menuToDraw == MenuType.PulseEdit) PulseEditMenu.DrawMenu(); else { bool showSimPausedBanner = project.simPaused; @@ -100,7 +98,6 @@ static void NotifyIfActiveMenuChanged() else if (ActiveMenu == MenuType.Search) SearchPopup.OnMenuOpened(); else if (ActiveMenu == MenuType.ChipLabelPopup) ChipLabelMenu.OnMenuOpened(); else if (ActiveMenu == MenuType.NoteTextPopup) NoteTextMenu.OnMenuOpened(); - else if (ActiveMenu == MenuType.PulseEdit) PulseEditMenu.OnMenuOpened(); if (InInputBlockingMenu() && Project.ActiveProject != null && Project.ActiveProject.controller != null) { diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index 26fec83e..1befd5bf 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -54,7 +54,7 @@ static IOrderedEnumerable OrderPins(IEnumerable } - public static SubChipDescription CreateSubChipDescription(SubChipInstance subChip) + static SubChipDescription CreateSubChipDescription(SubChipInstance subChip) { return new SubChipDescription ( @@ -62,7 +62,7 @@ public static SubChipDescription CreateSubChipDescription(SubChipInstance subChi subChip.ID, subChip.Label, subChip.Position, - // Don't save colour info for bus since it changes based on received input, so would just trigger unnecessary 'unsaved changes' warnings + // Don't save colour info for bus since it changes based on received input, so would just trigger unecessary 'unsaved changes' warnings subChip.IsBus ? null : subChip.OutputPins.Select(p => new OutputPinColourInfo(p.Colour, p.Address.PinID)).ToArray(), subChip.InternalData ); @@ -74,7 +74,6 @@ public static SubChipDescription CreateBuiltinSubChipDescriptionForPlacement(Chi { ChipType.Rom_256x16 => new uint[256], ChipType.Key => new uint[] { 'K' }, - ChipType.Pulse => new uint[] { 50, 0, 0 }, _ => ChipTypeHelper.IsBusType(type) ? new uint[2] : null }; @@ -89,7 +88,7 @@ public static SubChipDescription CreateBuiltinSubChipDescriptionForPlacement(Chi ); } - public static void UpdateWireIndicesForDescriptionCreation(DevChipInstance chip) + static void UpdateWireIndicesForDescriptionCreation(DevChipInstance chip) { // Store wire's current index in wire for convenient access for (int i = 0; i < chip.Wires.Count; i++) @@ -99,7 +98,7 @@ public static void UpdateWireIndicesForDescriptionCreation(DevChipInstance chip) } // Note: assumed that all wire indices have been set prior to calling this function - public static WireDescription CreateWireDescription(WireInstance wire) + static WireDescription CreateWireDescription(WireInstance wire) { // Get wire points Vector2[] wirePoints = new Vector2[wire.WirePointCount]; diff --git a/Assets/Scripts/Simulation/SimChip.cs b/Assets/Scripts/Simulation/SimChip.cs index e1af17d3..1736d3cd 100644 --- a/Assets/Scripts/Simulation/SimChip.cs +++ b/Assets/Scripts/Simulation/SimChip.cs @@ -26,10 +26,10 @@ public SimChip() ID = -1; } - public SimChip(ChipDescription desc, int id, uint[] internalState, SimChip[] subChips) + public SimChip(ChipDescription desc, SubChipDescription subChipDescription, SimChip[] subChips) { SubChips = subChips; - ID = id; + ID = subChipDescription.ID; ChipType = desc.ChipType; IsBuiltin = ChipType != ChipType.Custom; @@ -78,10 +78,10 @@ public SimChip(ChipDescription desc, int id, uint[] internalState, SimChip[] sub } } // Load in serialized persistent state (rom data, etc.) - else if (internalState is { Length: > 0 }) + else if (subChipDescription.InternalData is { Length: > 0 }) { - InternalState = new uint[internalState.Length]; - UpdateInternalState(internalState); + InternalState = new uint[subChipDescription.InternalData.Length]; + UpdateInternalState(subChipDescription.InternalData); } } diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 393773a9..ab102d2e 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -65,8 +65,7 @@ public static void RunSimulationStep(SimChip rootSimChip, DevPinInstance[] input try { SimPin simPin = rootSimChip.GetSimPinFromAddress(input.Pin.Address); - simPin.State.SetFromSource(input.Pin.PlayerInputState); - input.Pin.State.SetFromSource(input.Pin.PlayerInputState); + simPin.State.SetFromSource(input.Pin.State); } catch (Exception) { @@ -214,36 +213,6 @@ static void ProcessBuiltinChip(SimChip chip) chip.OutputPins[0].State.SetBit(0, high ? PinState.LogicHigh : PinState.LogicLow); break; } - case ChipType.Pulse: - const int pulseDurationIndex = 0; - const int pulseTicksRemainingIndex = 1; - const int pulseInputOldIndex = 2; - - uint pulseInputState = chip.InputPins[0].State.GetBit(0); - bool pulseInputHigh = pulseInputState == PinState.LogicHigh; - uint pulseTicksRemaining = chip.InternalState[pulseTicksRemainingIndex]; - - if (pulseTicksRemaining == 0) - { - bool isRisingEdge = pulseInputHigh && chip.InternalState[pulseInputOldIndex] == 0; - if (isRisingEdge) - { - pulseTicksRemaining = chip.InternalState[pulseDurationIndex]; - chip.InternalState[pulseTicksRemainingIndex] = pulseTicksRemaining; - } - } - - uint pulseOutput = pulseInputState == PinState.LogicDisconnected ? PinState.LogicDisconnected : PinState.LogicLow; - if (pulseTicksRemaining > 0) - { - chip.InternalState[1]--; - pulseOutput = PinState.LogicHigh; - } - - chip.OutputPins[0].State.SetBit(0, pulseOutput); - chip.InternalState[pulseInputOldIndex] = pulseInputHigh ? 1u : 0; - - break; case ChipType.Split_4To1Bit: { SimPin in4 = chip.InputPins[0]; @@ -482,17 +451,18 @@ static void ProcessBuiltinChip(SimChip chip) public static SimChip BuildSimChip(ChipDescription chipDesc, ChipLibrary library) { - return BuildSimChip(chipDesc, library, -1, null); + SubChipDescription subChipDescription = new(chipDesc.Name, -1, string.Empty, Vector2.zero, null); + return BuildSimChip(chipDesc, library, subChipDescription); } - public static SimChip BuildSimChip(ChipDescription chipDesc, ChipLibrary library, int subChipID, uint[] internalState) + public static SimChip BuildSimChip(ChipDescription chipDesc, ChipLibrary library, SubChipDescription selfSubChip) { - SimChip simChip = BuildSimChipRecursive(chipDesc, library, subChipID, internalState); + SimChip simChip = BuildSimChipRecursive(chipDesc, library, selfSubChip); return simChip; } // Recursively build full representation of chip from its description for simulation. - static SimChip BuildSimChipRecursive(ChipDescription chipDesc, ChipLibrary library, int subChipID, uint[] internalState) + static SimChip BuildSimChipRecursive(ChipDescription chipDesc, ChipLibrary library, SubChipDescription selfSubChip) { // Recursively create subchips SimChip[] subchips = chipDesc.SubChips.Length == 0 ? Array.Empty() : new SimChip[chipDesc.SubChips.Length]; @@ -501,11 +471,11 @@ static SimChip BuildSimChipRecursive(ChipDescription chipDesc, ChipLibrary libra { SubChipDescription subchipDesc = chipDesc.SubChips[i]; ChipDescription subchipFullDesc = library.GetChipDescription(subchipDesc.Name); - SimChip subChip = BuildSimChipRecursive(subchipFullDesc, library, subchipDesc.ID, subchipDesc.InternalData); + SimChip subChip = BuildSimChipRecursive(subchipFullDesc, library, subchipDesc); subchips[i] = subChip; } - SimChip simChip = new(chipDesc, subChipID, internalState, subchips); + SimChip simChip = new(chipDesc, selfSubChip, subchips); // Create connections @@ -540,7 +510,7 @@ public static void RemovePin(SimChip simChip, int pinID) modificationQueue.Enqueue(command); } - public static void AddSubChip(SimChip simChip, ChipDescription desc, ChipLibrary chipLibrary, int subChipID, uint[] subChipInternalData) + public static void AddSubChip(SimChip simChip, ChipDescription desc, ChipLibrary chipLibrary, SubChipDescription subChipDesc) { SimModifyCommand command = new() { @@ -548,8 +518,7 @@ public static void AddSubChip(SimChip simChip, ChipDescription desc, ChipLibrary modifyTarget = simChip, chipDesc = desc, lib = chipLibrary, - subChipID = subChipID, - subChipInternalData = subChipInternalData + subChipDesc = subChipDesc }; modificationQueue.Enqueue(command); } @@ -600,7 +569,7 @@ public static void ApplyModifications() { if (cmd.type == SimModifyCommand.ModificationType.AddSubchip) { - SimChip newSubChip = BuildSimChip(cmd.chipDesc, cmd.lib, cmd.subChipID, cmd.subChipInternalData); + SimChip newSubChip = BuildSimChip(cmd.chipDesc, cmd.lib, cmd.subChipDesc); cmd.modifyTarget.AddSubChip(newSubChip); } else if (cmd.type == SimModifyCommand.ModificationType.RemoveSubChip) @@ -649,8 +618,7 @@ public enum ModificationType public SimChip modifyTarget; public ChipDescription chipDesc; public ChipLibrary lib; - public int subChipID; - public uint[] subChipInternalData; + public SubChipDescription subChipDesc; public PinAddress sourcePinAddress; public PinAddress targetPinAddress; public SimPin simPinToAdd; diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 780a431e..8dd3e55f 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -140,7 +140,7 @@ PlayerSettings: loadStoreDebugModeEnabled: 0 visionOSBundleVersion: 1.0 tvOSBundleVersion: 1.0 - bundleVersion: 2.1.3 + bundleVersion: 2.1.2 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -428,7 +428,7 @@ PlayerSettings: m_APIs: 10000000 m_Automatic: 1 - m_BuildTarget: WindowsStandaloneSupport - m_APIs: 1200000002000000150000000b000000 + m_APIs: 020000000b000000 m_Automatic: 1 m_BuildTargetVRSettings: [] m_DefaultShaderChunkSizeInMB: 16 @@ -718,7 +718,7 @@ PlayerSettings: additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: - Standalone: 0 + Standalone: 1 il2cppCompilerConfiguration: Standalone: 1 il2cppCodeGeneration: diff --git a/TestData/Projects/MainTest/Chips/test.json b/TestData/Projects/MainTest/Chips/test.json deleted file mode 100644 index c3f30c19..00000000 --- a/TestData/Projects/MainTest/Chips/test.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "Name": "test", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 0.725, - "y": 1.125 - }, - "Colour": { - "r": 0.5414247, - "g": 0.390782118, - "b": 0.6613721, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":1421188130, - "Position":{ - "x":-7.40141, - "y":3.912 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":379144233, - "Position":{ - "x":-3.83526, - "y":0.31532 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":2025946763, - "Position":{ - "x":8.50862, - "y":-3.78063 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":315547482, - "Position":{ - "x":8.06068, - "y":1.785 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OUT", - "ID":784653966, - "Position":{ - "x":7.97995, - "y":0.85658 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NAND", - "ID":240905991, - "Label":"", - "Position":{ - "x":-0.55341, - "y":0.2381 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"REGISTER-4", - "ID":149684545, - "Label":"", - "Position":{ - "x":-0.53703, - "y":2.27566 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":96791616, - "Label":"", - "Position":{ - "x":-0.63063, - "y":-1.35779 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"REGISTER-4", - "ID":31831749, - "Label":"", - "Position":{ - "x":2.74131, - "y":-0.26384 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], - "InternalData":null - }, - { - "Name":"ROM 256×16", - "ID":1318148087, - "Label":"", - "Position":{ - "x":3.94338, - "y":1.69081 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":[49392,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1318148087 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":315547482 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1318148087 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":784653966 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays": null -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 29998da7..3e38f91d 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.2", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-04-20T15:18:17.676+02:00", + "LastSaveTime": "2025-04-18T13:32:20.434+02:00", "Prefs_MainPinNamesDisplayMode": 0, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -59,8 +59,7 @@ "EQUALS-8", "DECODER-2", "RAM-256×8 (async)", - "RAM-sync", - "test" + "RAM-sync" ], "StarredList":[ { @@ -78,14 +77,6 @@ { "Name":"RAM-sync", "IsCollection":false - }, - { - "Name":"test", - "IsCollection":false - }, - { - "Name":"NAND", - "IsCollection":false } ], "ChipCollections":[ From 897278b1163b747aa763ba4e9fee63842cbc6edc Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Tue, 22 Apr 2025 21:41:45 +0300 Subject: [PATCH 026/124] removed debug --- Assets/Scripts/Seb/SebVis/UI/UI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index 206cdbc3..863744b5 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -703,7 +703,7 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 bool showDefaultText = (state.lines.Count == 0 || (state.lines.Count == 1 && string.IsNullOrEmpty(state.lines[0]))) || !Application.isPlaying; string[] lines = showDefaultText ? new[] { "Enter something..." } : state.lines.ToArray(); - Debug.Log($"Lines: {string.Join(", ", lines).Replace("\n", "\\n")}"); + // Debug.Log($"Lines: {string.Join(", ", lines).Replace("\n", "\\n")}"); Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; for (int i = 0; i < lines.Length; i++) { From 24a44dcf49b6a2a8294a50be6b7c765bf189b369 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat <48175036+UkrainianBanderasCat@users.noreply.github.com> Date: Wed, 23 Apr 2025 18:29:20 +0300 Subject: [PATCH 027/124] Delete TestData/Deleted Projects/MainTest/Chips directory --- .../Deleted Projects/MainTest/Chips/AND.json | 149 ------------------ 1 file changed, 149 deletions(-) delete mode 100644 TestData/Deleted Projects/MainTest/Chips/AND.json diff --git a/TestData/Deleted Projects/MainTest/Chips/AND.json b/TestData/Deleted Projects/MainTest/Chips/AND.json deleted file mode 100644 index 9f343dfc..00000000 --- a/TestData/Deleted Projects/MainTest/Chips/AND.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "Name": "AND", - "NameLocation": 0, - "Size": { - "x": 0.7, - "y": 0.5 - }, - "Colour": { - "r": 0.2440358, - "g": 0.57116735, - "b": 0.6800216, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":436332053, - "Position":{ - "x":-7.46774, - "y":1.25806 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":123456040, - "Position":{ - "x":-7.32258, - "y":-0.64516 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"OUT", - "ID":1580367471, - "Position":{ - "x":5.43548, - "y":0.08065 - }, - "BitCount":1, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"NAND", - "ID":910879205, - "Label":null, - "Position":{ - "x":-2.58065, - "y":0.08065 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1120748047, - "Label":null, - "Position":{ - "x":0.41935, - "y":-0.03226 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":436332053 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":910879205 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":123456040 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":910879205 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":910879205 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1120748047 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":910879205 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1120748047 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1120748047 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1580367471 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays":[], - "ChipType": 0 -} \ No newline at end of file From 6bc5237b0ddc73c5f5d8e8a2bc1b810e1af09bcf Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Wed, 23 Apr 2025 19:00:34 +0300 Subject: [PATCH 028/124] Reapply "Merge branch 'main' into notes" This reverts commit 94d2b2d06000c9e911b2051b6a6320528e1d6923. --- .../Description/Helpers/ChipTypeHelper.cs | 1 + .../Description/Types/SubTypes/ChipTypes.cs | 1 + .../Scripts/Game/Elements/DevPinInstance.cs | 2 +- Assets/Scripts/Game/Elements/PinInstance.cs | 10 +- Assets/Scripts/Game/Elements/WireInstance.cs | 3 +- .../Interaction/ChipInteractionController.cs | 50 ++- .../Game/Interaction/KeyboardShortcuts.cs | 7 +- .../Game/Interaction/UndoController.cs | 370 ++++++++++++++++++ .../Game/Interaction/UndoController.cs.meta | 2 + Assets/Scripts/Game/Main/Main.cs | 4 +- .../Game/Project/BuiltinChipCreator.cs | 13 +- .../Game/Project/BuiltinCollectionCreator.cs | 1 + .../Scripts/Game/Project/DevChipInstance.cs | 223 +++++++---- Assets/Scripts/Game/Project/Project.cs | 31 +- .../Scripts/Graphics/UI/Menus/ContextMenu.cs | 12 +- .../Graphics/UI/Menus/PreferencesMenu.cs | 2 +- .../Graphics/UI/Menus/PulseEditMenu.cs | 68 ++++ .../Graphics/UI/Menus/PulseEditMenu.cs.meta | 2 + Assets/Scripts/Graphics/UI/UIDrawer.cs | 3 + .../Scripts/SaveSystem/DescriptionCreator.cs | 9 +- Assets/Scripts/Simulation/SimChip.cs | 10 +- Assets/Scripts/Simulation/Simulator.cs | 56 ++- ProjectSettings/ProjectSettings.asset | 6 +- TestData/Projects/MainTest/Chips/test.json | 162 ++++++++ .../Projects/MainTest/ProjectDescription.json | 13 +- 25 files changed, 945 insertions(+), 116 deletions(-) create mode 100644 Assets/Scripts/Game/Interaction/UndoController.cs create mode 100644 Assets/Scripts/Game/Interaction/UndoController.cs.meta create mode 100644 Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs create mode 100644 Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs.meta create mode 100644 TestData/Projects/MainTest/Chips/test.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index b0797c78..4964d076 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -12,6 +12,7 @@ public static class ChipTypeHelper // ---- Basic Chips ---- { ChipType.Nand, "NAND" }, { ChipType.Clock, "CLOCK" }, + { ChipType.Pulse, "PULSE" }, { ChipType.TriStateBuffer, "3-STATE BUFFER" }, // ---- Memory ---- { ChipType.dev_Ram_8Bit, "dev.RAM-8" }, diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index c7d93f3d..5b9d9ce7 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -8,6 +8,7 @@ public enum ChipType Nand, TriStateBuffer, Clock, + Pulse, // ---- Memory ---- dev_Ram_8Bit, diff --git a/Assets/Scripts/Game/Elements/DevPinInstance.cs b/Assets/Scripts/Game/Elements/DevPinInstance.cs index e71ff55c..8f296cb4 100644 --- a/Assets/Scripts/Game/Elements/DevPinInstance.cs +++ b/Assets/Scripts/Game/Elements/DevPinInstance.cs @@ -118,7 +118,7 @@ Bounds2D CreateBoundingBox(float pad) public void ToggleState(int bitIndex) { - Pin.State.Toggle(bitIndex); + Pin.PlayerInputState.Toggle(bitIndex); } public bool PointIsInInteractionBounds(Vector2 point) => PointIsInHandleBounds(point) || PointIsInStateIndicatorBounds(point); diff --git a/Assets/Scripts/Game/Elements/PinInstance.cs b/Assets/Scripts/Game/Elements/PinInstance.cs index a2981ac8..e9c91cf9 100644 --- a/Assets/Scripts/Game/Elements/PinInstance.cs +++ b/Assets/Scripts/Game/Elements/PinInstance.cs @@ -16,7 +16,8 @@ public class PinInstance : IInteractable // Pin may be attached to a chip or a devPin as its parent public readonly IMoveable parent; - public readonly PinState State; + public readonly PinState State; // sim state + public PinState PlayerInputState; // dev input pins only public PinColour Colour; bool faceRight; public float LocalPosY; @@ -31,6 +32,7 @@ public PinInstance(PinDescription desc, PinAddress address, IMoveable parent, bo Address = address; IsSourcePin = isSourcePin; State = new PinState((int)bitCount); + PlayerInputState = new PinState((int)bitCount); Colour = desc.Colour; IsBusPin = parent is SubChipInstance subchip && subchip.IsBus; @@ -67,9 +69,11 @@ public void SetBusFlip(bool flipped) public Color GetColLow() => DrawSettings.ActiveTheme.StateLowCol[(int)Colour]; public Color GetColHigh() => DrawSettings.ActiveTheme.StateHighCol[(int)Colour]; - public Color GetStateCol(int bitIndex, bool hover = false) + public Color GetStateCol(int bitIndex, bool hover = false, bool canUsePlayerState = true) { - uint state = State.GetBit(bitIndex); + PinState pinState = (IsSourcePin && canUsePlayerState) ? PlayerInputState : State; // dev input pin uses player state (so it updates even when sim is paused) + + uint state = pinState.GetBit(bitIndex); int colIndex = (int)Colour; return state switch diff --git a/Assets/Scripts/Game/Elements/WireInstance.cs b/Assets/Scripts/Game/Elements/WireInstance.cs index f2629247..afe28ec4 100644 --- a/Assets/Scripts/Game/Elements/WireInstance.cs +++ b/Assets/Scripts/Game/Elements/WireInstance.cs @@ -312,8 +312,7 @@ public void RemoveConnectionDependency() public Color GetColour(int bitIndex) { - Color col = IsFullyConnected ? SourcePin.GetStateCol(bitIndex) : DrawSettings.ActiveTheme.StateDisconnectedCol; - + Color col = IsFullyConnected ? SourcePin.GetStateCol(bitIndex, false, false) : DrawSettings.ActiveTheme.StateDisconnectedCol; if (bitCount != PinBitCount.Bit1 && bitIndex % 2 == 0) { diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index caba5665..6e3fa235 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -63,12 +63,15 @@ public void Update() HandleMouseInput(); } - public void Delete(IMoveable element, bool clearSelection = true) + public void Delete(IMoveable element, bool clearSelection = true, bool recordUndo = true) { if (!HasControl) return; + if (recordUndo) ActiveDevChip.UndoController.RecordDeleteElements(new List(new[] { element })); + if (element is SubChipInstance subChip) ActiveDevChip.DeleteSubChip(subChip); if (element is NoteInstance noteInstance) ActiveDevChip.DeleteNote(noteInstance); - if (element is DevPinInstance devPin) ActiveDevChip.DeleteDevPin(devPin); + else if (element is DevPinInstance devPin) ActiveDevChip.DeleteDevPin(devPin); + if (clearSelection) SelectedElements.Clear(); } @@ -129,9 +132,11 @@ void DeleteSelected() // Delete selected subchips/pins if (SelectedElements.Count > 0) { + ActiveDevChip.UndoController.RecordDeleteElements(SelectedElements); + foreach (IMoveable selectedElement in SelectedElements) { - Delete(selectedElement, false); + Delete(selectedElement, false, false); } SelectedElements.Clear(); @@ -167,6 +172,7 @@ public void DeleteWire(WireInstance wire) { if (HasControl) { + ActiveDevChip.UndoController.RecordDeleteWire(wire); ActiveDevChip.DeleteWire(wire); } } @@ -191,6 +197,9 @@ void HandleKeyboardInput() // Ignore shortcuts if don't have control if (!HasControl) return; + if (KeyboardShortcuts.UndoShortcutTriggered) ActiveDevChip.UndoController.TryUndo(); + else if (KeyboardShortcuts.RedoShortcutTriggered) ActiveDevChip.UndoController.TryRedo(); + if (KeyboardShortcuts.ToggleGridShortcutTriggered) { project.ToggleGridDisplay(); @@ -223,7 +232,8 @@ void HandleKeyboardInput() } else { - DeleteSelected(); + if (isPlacingNewElements) CancelPlacingItems(); + else DeleteSelected(); } } @@ -264,6 +274,29 @@ static bool CanDuplicate(IMoveable element) return true; } + public static void GetElementDescription(IMoveable element) + { + ChipDescription desc; + SubChipDescription subDesc; + + if (element is SubChipInstance subchip) + { + desc = subchip.Description; + subDesc = subchip.InitialSubChipDesc; + } + else + { + DevPinInstance devpin = (DevPinInstance)element; + ChipType pinType = ChipTypeHelper.GetPinType(devpin.IsInputPin, devpin.BitCount); + desc = BuiltinChipCreator.CreateInputOrOutputPin(pinType); + + // Copy pin description from duplicated pin + PinDescription pinDesc = DescriptionCreator.CreatePinDescription(devpin); + if (devpin.IsInputPin) desc.InputPins[0] = pinDesc; + else desc.OutputPins[0] = pinDesc; + } + } + void DuplicateSelectedElements() { IMoveable[] elementsToDuplicate = SelectedElements.Where(CanDuplicate).ToArray(); @@ -538,6 +571,8 @@ void StartPlacingWire(WireInstance.ConnectionInfo connectionInfo) void FinishMovingElements() { // -- If any elements are in invalid position, cancel the movement -- + bool hasMoved = false; + foreach (IMoveable element in SelectedElements) { if (!element.IsValidMovePos) @@ -545,8 +580,12 @@ void FinishMovingElements() CancelMovingSelectedItems(); return; } + + hasMoved |= (element.MoveStartPosition != element.Position); } + if (hasMoved) ActiveDevChip.UndoController.RecordMoveElements(SelectedElements); + // -- Apply movement -- IsMovingSelection = false; @@ -580,6 +619,8 @@ void FinishPlacingNewElements() ActiveDevChip.AddWire(wire, false); } + ActiveDevChip.UndoController.RecordAddElements(SelectedElements); + DuplicatedWires.Clear(); // When elements are placed, there are two cases where we automatically start placing new elements: @@ -856,6 +897,7 @@ void CompleteConnection(WireInstance.ConnectionInfo info) { WireToPlace.FinishPlacingWire(info); ActiveDevChip.AddWire(WireToPlace, false); + ActiveDevChip.UndoController.RecordAddWire(WireToPlace); } } diff --git a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs index c3984b92..051db2f6 100644 --- a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs +++ b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs @@ -25,10 +25,12 @@ public static class KeyboardShortcuts public static bool DuplicateShortcutTriggered => MultiModeHeld && InputHelper.IsKeyDownThisFrame(KeyCode.D); public static bool ToggleGridShortcutTriggered => CtrlShortcutTriggered(KeyCode.G); public static bool ResetCameraShortcutTriggered => CtrlShortcutTriggered(KeyCode.R); + public static bool UndoShortcutTriggered => CtrlShortcutTriggered(KeyCode.Z); + public static bool RedoShortcutTriggered => CtrlShiftShortcutTriggered(KeyCode.Z); // ---- Single key shortcuts ---- public static bool CancelShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Escape); - public static bool ConfirmShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Return); + public static bool ConfirmShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Return) || InputHelper.IsKeyDownThisFrame(KeyCode.KeypadEnter); public static bool DeleteShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Backspace) || InputHelper.IsKeyDownThisFrame(KeyCode.Delete); public static bool SimNextStepShortcutTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.Tab); @@ -41,12 +43,13 @@ public static class KeyboardShortcuts // In "Multi-mode", placed chips will be duplicated once placed to allow placing again; selecting a chip will add it to the current selection; etc. public static bool MultiModeHeld => InputHelper.AltIsHeld || InputHelper.ShiftIsHeld; public static bool StraightLineModeHeld => InputHelper.ShiftIsHeld; - public static bool StraightLineModeTriggered=> InputHelper.IsKeyDownThisFrame(KeyCode.LeftShift); + public static bool StraightLineModeTriggered => InputHelper.IsKeyDownThisFrame(KeyCode.LeftShift); public static bool CameraActionKeyHeld => InputHelper.AltIsHeld; public static bool TakeFirstFromCollectionModifierHeld => InputHelper.CtrlIsHeld || InputHelper.AltIsHeld || InputHelper.ShiftIsHeld; // ---- Helpers ---- static bool CtrlShortcutTriggered(KeyCode key) => InputHelper.IsKeyDownThisFrame(key) && InputHelper.CtrlIsHeld && !(InputHelper.AltIsHeld || InputHelper.ShiftIsHeld); + static bool CtrlShiftShortcutTriggered(KeyCode key) => InputHelper.IsKeyDownThisFrame(key) && InputHelper.CtrlIsHeld && InputHelper.ShiftIsHeld && !(InputHelper.AltIsHeld); static bool ShiftShortcutTriggered(KeyCode key) => InputHelper.IsKeyDownThisFrame(key) && InputHelper.ShiftIsHeld && !(InputHelper.AltIsHeld || InputHelper.CtrlIsHeld); } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Interaction/UndoController.cs b/Assets/Scripts/Game/Interaction/UndoController.cs new file mode 100644 index 00000000..1fba8e4b --- /dev/null +++ b/Assets/Scripts/Game/Interaction/UndoController.cs @@ -0,0 +1,370 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using DLS.Description; +using DLS.SaveSystem; +using UnityEngine; + +namespace DLS.Game +{ + public class UndoController + { + readonly List undoHistory = new(); + int undoIndex = -1; + readonly DevChipInstance devChip; + + public UndoController(DevChipInstance devChip) + { + this.devChip = devChip; + } + + public void Clear() + { + undoHistory.Clear(); + undoIndex = -1; + } + + public void TryUndo() + { + if (undoIndex == -1) return; + + UndoAction action = undoHistory[undoIndex]; + undoIndex--; + + UndoRedo(action, true); + } + + public void TryRedo() + { + if (undoIndex == undoHistory.Count - 1) return; + + UndoAction action = undoHistory[undoIndex + 1]; + undoIndex++; + + UndoRedo(action, false); + } + + public void RecordAddWire(WireInstance wire) => RecordAddOrDeleteWire(wire, false); + + public void RecordDeleteWire(WireInstance wire) => RecordAddOrDeleteWire(wire, true); + + void RecordAddOrDeleteWire(WireInstance wire, bool delete) + { + DescriptionCreator.UpdateWireIndicesForDescriptionCreation(devChip); + int wireIndex = wire.descriptionCreator_wireIndex; + WireDescription wireDesc = DescriptionCreator.CreateWireDescription(wire); + + FullWireState stateBeforeDelete = null; + if (delete) stateBeforeDelete = CreateFullWireState(devChip, new HashSet(new[] { wire })); + + WireExistenceAction action = new() + { + wireDescription = wireDesc, + wireIndex = wireIndex, + fullWireStateBeforeDelete = stateBeforeDelete, + isDeleteAction = delete + }; + + RecordUndoAction(action); + } + + + public void RecordMoveElements(List movedElements) + { + int count = movedElements.Count; + MoveUndoAction moveUndoAction = new() + { + subChipIDs = new int[count], + originalPositions = new Vector2[count], + newPositions = new Vector2[count] + }; + + // Selected elements + for (int i = 0; i < count; i++) + { + IMoveable element = movedElements[i]; + moveUndoAction.subChipIDs[i] = element.ID; + moveUndoAction.originalPositions[i] = element.MoveStartPosition; + moveUndoAction.newPositions[i] = element.Position; + } + + // Wire move offsets + int wireCount = devChip.Wires.Count; + moveUndoAction.wireMoveOffsets = new Vector2[wireCount]; + for (int i = 0; i < wireCount; i++) + { + moveUndoAction.wireMoveOffsets[i] = devChip.Wires[i].MoveOffset; + } + + RecordUndoAction(moveUndoAction); + } + + public void RecordDeleteElements(List deletedElements) + { + RecordAddOrDeleteElements(deletedElements, true); + } + + public void RecordAddElements(List addedElements) + { + RecordAddOrDeleteElements(addedElements, false); + } + + void RecordAddOrDeleteElements(List elements, bool delete) + { + List subchips = elements.OfType().ToList(); + DevPinInstance[] devPins = elements.OfType().ToArray(); + + // ---- Bus handling ---- + if (!delete) + { + // Ignore bus origin when placing (it's not a 'complete' element on its own, it requires the corresponding bus terminus) + subchips = subchips.Where(s => !ChipTypeHelper.IsBusOriginType(s.ChipType)).ToList(); + if (subchips.Count == 0 && devPins.Length == 0) return; + } + + // Ensure that if we have one part of the bus, the linked pair is included as well + SubChipInstance[] buses = subchips.Where(s => s.IsBus).ToArray(); + if (buses.Length > 0) + { + HashSet busIDsInOriginalList = subchips.Where(s => s.IsBus).Select(b => b.ID).ToHashSet(); + + foreach (SubChipInstance bus in buses) + { + if (busIDsInOriginalList.Contains(bus.LinkedBusPairID)) continue; + + bool foundPair = devChip.TryGetSubChipByID(bus.LinkedBusPairID, out SubChipInstance linkedBus); + if (!foundPair) throw new Exception("Failed to find bus pair when creating undo/redo action"); + + subchips.Add(linkedBus); + } + } + + // When deleting elements, store full state of ALL wires, not just those affected by the deletion. + // This is because other wires may be connected to the deleted wires (in which case their points are modified), + // and we want their original state to be restored as well. It's a bit of a pain to specially handle those, so just do a full state backup. + FullWireState wireStateBeforeDelete = null; + if (delete) + { + HashSet wiresThatWillBeDeletedAutomatically = new(); + foreach (IMoveable element in elements) + { + devChip.GetWiresAttachedToElement(element.ID, wiresThatWillBeDeletedAutomatically); + } + + wireStateBeforeDelete = CreateFullWireState(devChip, wiresThatWillBeDeletedAutomatically); + } + + ElementExistenceAction deleteAction = new() + { + chipNames = subchips.Select(s => s.Description.Name).ToArray(), + subchipDescriptions = subchips.Select(DescriptionCreator.CreateSubChipDescription).ToArray(), + pinDescriptions = devPins.Select(DescriptionCreator.CreatePinDescription).ToArray(), + pinInInputFlags = devPins.Select(p => p.IsInputPin).ToArray(), + wireStateBeforeDelete = wireStateBeforeDelete, + isDeleteAction = delete + }; + + RecordUndoAction(deleteAction); + } + + static FullWireState CreateFullWireState(DevChipInstance devChip, HashSet wiresThatWillBeDeleted) + { + DescriptionCreator.UpdateWireIndicesForDescriptionCreation(devChip); + WireDescription[] wireDescriptions = new WireDescription[devChip.Wires.Count]; + bool[] willDeleteWireFlags = new bool[devChip.Wires.Count]; + + for (int i = 0; i < wireDescriptions.Length; i++) + { + wireDescriptions[i] = DescriptionCreator.CreateWireDescription(devChip.Wires[i]); + willDeleteWireFlags[i] = wiresThatWillBeDeleted.Contains(devChip.Wires[i]); + //Debug.Log($"Full wire state: {i} Will delete: {willDeleteWireFlags[i]}"); + } + + FullWireState wireStateBeforeDelete = new() + { + wireDescriptions = wireDescriptions, + createFlags = willDeleteWireFlags, + }; + + return wireStateBeforeDelete; + } + + void RecordUndoAction(UndoAction action) + { + if (undoIndex != undoHistory.Count) + { + undoHistory.RemoveRange(undoIndex + 1, undoHistory.Count - (undoIndex + 1)); + } + + undoHistory.Add(action); + undoIndex = undoHistory.Count - 1; + } + + void UndoRedo(UndoAction action, bool undo) + { + Project.ActiveProject.controller.CancelEverything(); + + try + { + if (action is MoveUndoAction move) + { + move.Trigger(undo, devChip); + } + else if (action is ElementExistenceAction elementExistence) + { + elementExistence.Trigger(undo, devChip); + } + else if (action is WireExistenceAction wireExistence) + { + wireExistence.Trigger(undo, devChip); + } + } + catch (Exception e) + { + if (Application.isEditor) Debug.Log($"Undo/redo action failed. Reason: {e.Message} Stack trace: {e.StackTrace}"); + } + } + + + class MoveUndoAction : UndoAction + { + public int[] subChipIDs; + public Vector2[] originalPositions; + public Vector2[] newPositions; + public Vector2[] wireMoveOffsets; + + + public void Trigger(bool undo, DevChipInstance devChip) + { + Dictionary elementLookupByID = devChip.Elements.ToDictionary(element => element.ID, element => element); + for (int i = 0; i < subChipIDs.Length; i++) + { + IMoveable element = elementLookupByID[subChipIDs[i]]; + element.Position = undo ? originalPositions[i] : newPositions[i]; + Project.ActiveProject.controller.Select(element, true); + } + + for (int i = 0; i < devChip.Wires.Count; i++) + { + devChip.Wires[i].MoveOffset = wireMoveOffsets[i] * (undo ? -1 : 1); + devChip.Wires[i].ApplyMoveOffset(); + } + } + } + + class WireExistenceAction : UndoAction + { + public WireDescription wireDescription; + public int wireIndex; + public bool isDeleteAction; + public FullWireState fullWireStateBeforeDelete; + + + public void Trigger(bool undo, DevChipInstance devChip) + { + if (!isDeleteAction) undo = !undo; + bool addWire = undo; + + if (addWire) + { + if (fullWireStateBeforeDelete != null) + { + fullWireStateBeforeDelete.Restore(devChip); + } + else + { + (WireInstance loadedWire, bool failed) = DevChipInstance.TryLoadWireFromDescription(wireDescription, wireIndex, devChip, devChip.Wires); + if (failed) throw new Exception("Failed to load wire in undo/redo action"); + else devChip.AddWire(loadedWire, false, wireIndex); + } + } + else + { + devChip.DeleteWire(devChip.Wires[wireIndex]); + } + } + } + + class FullWireState + { + public WireDescription[] wireDescriptions; + public bool[] createFlags; + + public void Restore(DevChipInstance devChip) + { + for (int i = 0; i < wireDescriptions.Length; i++) + { + //Debug.Log($"Restoring wire {i} | Create new = {createFlags[i]}"); + (WireInstance loadedWire, bool failed) res = DevChipInstance.TryLoadWireFromDescription(wireDescriptions[i], i, devChip, devChip.Wires); + if (res.failed) throw new Exception("Failed to load wire in undo/redo action"); + + if (createFlags[i]) devChip.AddWire(res.loadedWire, false, i); + else devChip.Wires[i] = res.loadedWire; + } + } + } + + class ElementExistenceAction : UndoAction + { + public string[] chipNames; + public SubChipDescription[] subchipDescriptions; + + public PinDescription[] pinDescriptions; + public bool[] pinInInputFlags; + public FullWireState wireStateBeforeDelete; + + public bool isDeleteAction; + + public void Trigger(bool undo, DevChipInstance devChip) + { + if (!isDeleteAction) undo = !undo; + bool addElement = undo; + + + // ---- Handle subchips ---- + for (int i = 0; i < chipNames.Length; i++) + { + ChipDescription description = Project.ActiveProject.chipLibrary.GetChipDescription(chipNames[i]); + + if (addElement) + { + SubChipInstance subchip = new(description, subchipDescriptions[i]); + devChip.AddNewSubChip(subchip, false); + Project.ActiveProject.controller.Select(subchip, true); + } + else if (!devChip.TryDeleteSubChipByID(subchipDescriptions[i].ID)) + { + // (bus pairs deleted automatically, so the other part is expected to fail) + if (!ChipTypeHelper.IsBusType(description.ChipType)) throw new Exception("Failed to delete subchip"); + } + } + + // ---- Handle dev pins ---- + for (int i = 0; i < pinDescriptions.Length; i++) + { + PinDescription pinDescription = pinDescriptions[i]; + + if (addElement) + { + DevPinInstance devPin = new(pinDescription, pinInInputFlags[i]); + devChip.AddNewDevPin(devPin, false); + Project.ActiveProject.controller.Select(devPin, true); + } + else + { + if (!devChip.TryDeleteDevPinByID(pinDescription.ID)) throw new Exception("Failed to delete dev pin"); + } + } + + if (addElement && wireStateBeforeDelete != null) + { + wireStateBeforeDelete.Restore(devChip); + } + } + } + + class UndoAction + { + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Game/Interaction/UndoController.cs.meta b/Assets/Scripts/Game/Interaction/UndoController.cs.meta new file mode 100644 index 00000000..3c25111c --- /dev/null +++ b/Assets/Scripts/Game/Interaction/UndoController.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: bb865751ca8914b4bb6a84288f0bc068 \ No newline at end of file diff --git a/Assets/Scripts/Game/Main/Main.cs b/Assets/Scripts/Game/Main/Main.cs index 7931d8e2..dda3cdc5 100644 --- a/Assets/Scripts/Game/Main/Main.cs +++ b/Assets/Scripts/Game/Main/Main.cs @@ -11,9 +11,9 @@ namespace DLS.Game { public static class Main { - public static readonly Version DLSVersion = new(2, 1, 2); + public static readonly Version DLSVersion = new(2, 1, 3); public static readonly Version DLSVersion_EarliestCompatible = new(2, 0, 0); - public static readonly string LastUpdatedString = "18 April 2025"; + public static readonly string LastUpdatedString = "21 April 2025"; public static AppSettings ActiveAppSettings; public static Project ActiveProject { get; private set; } diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index b9cf48ab..1bf17b7f 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -26,6 +26,7 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions() CreateNand(), CreateTristateBuffer(), CreateClock(), + CreatePulse(), // ---- Memory ---- dev_CreateRAM_8(), CreateROM_8(), @@ -130,6 +131,16 @@ static ChipDescription CreateClock() return CreateBuiltinChipDescription(ChipType.Clock, size, col, null, outputPins); } + static ChipDescription CreatePulse() + { + Vector2 size = new(GridHelper.SnapToGrid(1), GridSize * 3); + Color col = new(0.1f, 0.1f, 0.1f); + PinDescription[] inputPins = { CreatePinDescription("IN", 0) }; + PinDescription[] outputPins = { CreatePinDescription("PULSE", 1) }; + + return CreateBuiltinChipDescription(ChipType.Pulse, size, col, inputPins, outputPins); + } + static ChipDescription CreateBitConversionChip(ChipType chipType, PinBitCount bitCountIn, PinBitCount bitCountOut, int numIn, int numOut) { PinDescription[] inputPins = new PinDescription[numIn]; @@ -359,7 +370,7 @@ static ChipDescription CreateBusTerminus(PinBitCount bitCount) return CreateBuiltinChipDescription(type, BusChipSize(bitCount), busOrigin.Colour, inputs, hideName: true); } - + static ChipDescription CreateBuiltinChipDescription(ChipType type, Vector2 size, Color col, PinDescription[] inputs = null, PinDescription[] outputs = null, DisplayDescription[] displays = null, bool hideName = false) { string name = ChipTypeHelper.GetName(type); diff --git a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs index 3655d70d..f7e6508a 100644 --- a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs @@ -21,6 +21,7 @@ public static ChipCollection[] CreateDefaultChipCollections() CreateChipCollection("BASIC", ChipType.Nand, ChipType.Clock, + ChipType.Pulse, ChipType.Key, ChipType.TriStateBuffer ), diff --git a/Assets/Scripts/Game/Project/DevChipInstance.cs b/Assets/Scripts/Game/Project/DevChipInstance.cs index 5f66812d..8cdbd85a 100644 --- a/Assets/Scripts/Game/Project/DevChipInstance.cs +++ b/Assets/Scripts/Game/Project/DevChipInstance.cs @@ -10,16 +10,27 @@ namespace DLS.Game { public class DevChipInstance { + public readonly List Elements = new(); + public readonly List Wires = new(); + + public readonly UndoController UndoController; + // Names of all the chips which contain this chip (either directly, or inside some other subchip) public readonly HashSet AllParentChipNames = new(ChipDescription.NameComparer); - public readonly List Elements = new(); + + public ChipDescription LastSavedDescription; + DevPinInstance[] inputPins_cached = Array.Empty(); + bool elementsModifiedSinceLastArrayUpdate; + public SimChip SimChip; bool hasSimChip; - public readonly List Wires = new(); - bool elementsModifiedSinceLastArrayUpdate; - DevPinInstance[] inputPins_cached = Array.Empty(); - public ChipDescription LastSavedDescription; + public string ChipName => LastSavedDescription == null ? string.Empty : LastSavedDescription.Name; + + public DevChipInstance() + { + UndoController = new UndoController(this); + } public void SetSimChip(SimChip simChip) { @@ -34,7 +45,6 @@ public void RebuildSimulation() SetSimChip(simChip); } - public string ChipName => LastSavedDescription == null ? string.Empty : LastSavedDescription.Name; public DevPinInstance[] GetInputPins() { @@ -101,64 +111,78 @@ public static (DevChipInstance devChip, bool anyElementFailedToLoad) LoadFromDes for (int i = 0; i < description.Wires.Length; i++) { WireDescription wireDescription = description.Wires[i]; - instance.TryFindPin(wireDescription.SourcePinAddress, out PinInstance sourcePin); - instance.TryFindPin(wireDescription.TargetPinAddress, out PinInstance targetPin); + (WireInstance loadedWire, bool failed) = TryLoadWireFromDescription(wireDescription, i, instance, loadedWiresWithOriginalIndices); - if (sourcePin != null && targetPin != null) - { - WireConnectionType connectionType = wireDescription.ConnectionType; + if (!failed) instance.AddWire(loadedWire, true); - if (connectionType is WireConnectionType.ToWireSource or WireConnectionType.ToWireTarget) - { - WireInstance wireConnectTarget = loadedWiresWithOriginalIndices[wireDescription.ConnectedWireIndex]; - bool wireConnectTargetFailedToLoad = wireConnectTarget == null; + loadedWiresWithOriginalIndices[i] = loadedWire; + anyElementFailedToLoad |= failed; + } - if (!wireConnectTargetFailedToLoad) - { - // If wire connection target did load, double check that it connects to the same pin that this wire is expecting - // (this should always be the case, but a bug in a previous version could cause save files to contain bad connection data) - bool addressMismatch = false; - addressMismatch |= connectionType is WireConnectionType.ToWireSource && !PinAddress.Equals(wireConnectTarget.SourcePin.Address, wireDescription.SourcePinAddress); - addressMismatch |= connectionType is WireConnectionType.ToWireTarget && !PinAddress.Equals(wireConnectTarget.TargetPin_BusCorrected.Address, wireDescription.TargetPinAddress); - wireConnectTargetFailedToLoad = addressMismatch; - } + instance.RegenerateParentChipNamesHash(); - // If wire is connected to another wire, but the other wire failed to load, then fallback to pin connection type - // (Load failure could be due to a pin could being deleted from a subchip, or the whole subchip being deleted from the library for example) - if (wireConnectTargetFailedToLoad) - { - anyElementFailedToLoad = true; - connectionType = WireConnectionType.ToPins; - } - } + return (instance, anyElementFailedToLoad); + } + + public static (WireInstance loadedWire, bool failed) TryLoadWireFromDescription(WireDescription wireDescription, int wireIndex, DevChipInstance instance, IList allWires) + { + bool failedToLoad = false; + WireInstance loadedWire = null; + WireInstance connectedWire = wireDescription.ConnectedWireIndex >= 0 ? allWires[wireDescription.ConnectedWireIndex] : null; + + instance.TryFindPin(wireDescription.SourcePinAddress, out PinInstance sourcePin); + instance.TryFindPin(wireDescription.TargetPinAddress, out PinInstance targetPin); - WireInstance.ConnectionInfo sourceConnection = new() + if (sourcePin != null && targetPin != null) + { + WireConnectionType connectionType = wireDescription.ConnectionType; + + if (connectionType is WireConnectionType.ToWireSource or WireConnectionType.ToWireTarget) + { + WireInstance wireConnectTarget = connectedWire; + bool wireConnectTargetFailedToLoad = wireConnectTarget == null; + + if (!wireConnectTargetFailedToLoad) { - pin = sourcePin, - connectedWire = connectionType == WireConnectionType.ToWireSource ? loadedWiresWithOriginalIndices[wireDescription.ConnectedWireIndex] : null, - wireConnectionSegmentIndex = wireDescription.ConnectedWireSegmentIndex - }; + // If wire connection target did load, double check that it connects to the same pin that this wire is expecting + // (this should always be the case, but a bug in a previous version could cause save files to contain bad connection data) + bool addressMismatch = false; + addressMismatch |= connectionType is WireConnectionType.ToWireSource && !PinAddress.Equals(wireConnectTarget.SourcePin.Address, wireDescription.SourcePinAddress); + addressMismatch |= connectionType is WireConnectionType.ToWireTarget && !PinAddress.Equals(wireConnectTarget.TargetPin_BusCorrected.Address, wireDescription.TargetPinAddress); + wireConnectTargetFailedToLoad = addressMismatch; + } - WireInstance.ConnectionInfo targetConnection = new() + // If wire is connected to another wire, but the other wire failed to load, then fallback to pin connection type + // (Load failure could be due to a pin could being deleted from a subchip, or the whole subchip being deleted from the library for example) + if (wireConnectTargetFailedToLoad) { - pin = targetPin, - connectedWire = connectionType == WireConnectionType.ToWireTarget ? loadedWiresWithOriginalIndices[wireDescription.ConnectedWireIndex] : null, - wireConnectionSegmentIndex = wireDescription.ConnectedWireSegmentIndex - }; - - WireInstance loadedWire = new(sourceConnection, targetConnection, wireDescription.Points, i); - instance.AddWire(loadedWire, true); - loadedWiresWithOriginalIndices[i] = loadedWire; + failedToLoad = true; + connectionType = WireConnectionType.ToPins; + } } - else + + WireInstance.ConnectionInfo sourceConnection = new() { - anyElementFailedToLoad = true; - } - } + pin = sourcePin, + connectedWire = connectionType == WireConnectionType.ToWireSource ? connectedWire : null, + wireConnectionSegmentIndex = wireDescription.ConnectedWireSegmentIndex + }; - instance.RegenerateParentChipNamesHash(); + WireInstance.ConnectionInfo targetConnection = new() + { + pin = targetPin, + connectedWire = connectionType == WireConnectionType.ToWireTarget ? connectedWire : null, + wireConnectionSegmentIndex = wireDescription.ConnectedWireSegmentIndex + }; - return (instance, anyElementFailedToLoad); + loadedWire = new WireInstance(sourceConnection, targetConnection, wireDescription.Points, wireIndex); + } + else + { + failedToLoad = true; + } + + return (loadedWire, failedToLoad); } // Check if subchip can be added @@ -204,7 +228,7 @@ public void AddNewSubChip(SubChipInstance subChip, bool isLoading) AddElement(subChip); if (!isLoading) { - Simulator.AddSubChip(SimChip, subChip.Description, Project.ActiveProject.chipLibrary, subChip.InitialSubChipDesc); + Simulator.AddSubChip(SimChip, subChip.Description, Project.ActiveProject.chipLibrary, subChip.ID, subChip.InternalData); } } @@ -217,9 +241,12 @@ public void AddNewDevPin(DevPinInstance pin, bool isLoadingFromFile) } } - public void AddWire(WireInstance wire, bool isLoading) + public void AddWire(WireInstance wire, bool isLoading, int insertIndex = -1) { - Wires.Add(wire); + bool insert = insertIndex != -1; + if (insert) Wires.Insert(insertIndex, wire); + else Wires.Add(wire); + if (!isLoading) { Simulator.AddConnection(SimChip, wire.SourcePin.Address, wire.TargetPin.Address); @@ -282,14 +309,6 @@ public void DeleteWire(WireInstance wireToDelete) } - void DeleteWiresAttachedToPins(PinInstance[] pins) - { - foreach (PinInstance pin in pins) - { - DeleteWiresAttachedToPin(pin); - } - } - void DeleteWiresAttachedToPin(PinInstance pin) { for (int i = Wires.Count - 1; i >= 0; i--) @@ -303,15 +322,16 @@ void DeleteWiresAttachedToPin(PinInstance pin) } } - public bool DeleteWiresAttachedToSubChip(int id) + + public bool DeleteWiresAttachedToPinOfSubChip(int pinID) { bool anyDeleted = false; for (int i = Wires.Count - 1; i >= 0; i--) { WireInstance wire = Wires[i]; - bool sourceMatch = wire.SourcePin.parent is SubChipInstance && wire.SourcePin.Address.PinID == id; - bool targetMatch = wire.TargetPin.parent is SubChipInstance && wire.TargetPin.Address.PinID == id; + bool sourceMatch = wire.SourcePin.parent is SubChipInstance && wire.SourcePin.Address.PinID == pinID; + bool targetMatch = wire.TargetPin.parent is SubChipInstance && wire.TargetPin.Address.PinID == pinID; if (sourceMatch || targetMatch) { @@ -323,6 +343,35 @@ public bool DeleteWiresAttachedToSubChip(int id) return anyDeleted; } + public void GetWiresAttachedToElement(int elementID, HashSet set) + { + foreach (WireInstance wire in Wires) + { + bool sourceMatch = wire.SourcePin.Address.PinOwnerID == elementID; + bool targetMatch = wire.TargetPin.Address.PinOwnerID == elementID; + + if (sourceMatch || targetMatch) + { + set.Add(wire); + } + } + } + + public void DeleteWiresAttachedToElement(int elementID) + { + for (int i = Wires.Count - 1; i >= 0; i--) + { + WireInstance wire = Wires[i]; + bool sourceMatch = wire.SourcePin.Address.PinOwnerID == elementID; + bool targetMatch = wire.TargetPin.Address.PinOwnerID == elementID; + + if (sourceMatch || targetMatch) + { + DeleteWire(wire); + } + } + } + public void DeleteSubChip(SubChipInstance subChip) { @@ -330,7 +379,7 @@ public void DeleteSubChip(SubChipInstance subChip) // (required for buses, where one end of bus is deleted automatically when other end is deleted; but user may select both ends for deletion) if (!Elements.Contains(subChip)) return; - DeleteWiresAttachedToPins(subChip.AllPins); + DeleteWiresAttachedToElement(subChip.ID); RemoveElement(subChip); if (hasSimChip) Simulator.RemoveSubChip(SimChip, subChip.ID); @@ -352,16 +401,48 @@ public void DeleteNote(NoteInstance note) } // Delete subchip with given id (if it exists) - public void TryDeleteSubChipByID(int id) + public bool TryDeleteSubChipByID(int id) { for (int i = 0; i < Elements.Count; i++) { if (Elements[i] is SubChipInstance subchip && subchip.ID == id) { DeleteSubChip(subchip); - return; + return true; } } + + return false; + } + + // Delete devpin with given id (if it exists) + public bool TryDeleteDevPinByID(int id) + { + for (int i = 0; i < Elements.Count; i++) + { + if (Elements[i] is DevPinInstance devPin && devPin.ID == id) + { + DeleteDevPin(devPin); + return true; + } + } + + return false; + } + + public bool TryGetSubChipByID(int id, out SubChipInstance subchip) + { + foreach (IMoveable element in Elements) + { + if (element.ID == id) + { + subchip = (SubChipInstance)element; + return true; + } + } + + subchip = null; + return false; } // Update the currently viewed chip from the state of the corresponding simChip. @@ -428,7 +509,7 @@ PinInstance TryFindPinFromSimPinSource(SimChip simChip, SimPin simPin) } public bool TryFindPin(PinAddress address, out PinInstance pinInstance) => TryFindPin(Elements, address, out pinInstance); - + public static bool TryFindPin(List elements, PinAddress address, out PinInstance pinInstance) { foreach (IMoveable element in elements) @@ -458,7 +539,7 @@ public static bool TryFindPin(List elements, PinAddress address, out break; } } - + pinInstance = null; return false; } diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index bd6d23bd..611788ad 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -226,6 +226,14 @@ public void NotifyKeyChipBindingChanged(SubChipInstance keyChip, char newKey) simChip.ChangeKeyBinding(newKey); } + // Chip's pulse width has been changed, so simulation must be updated + public void NotifyPulseWidthChanged(SubChipInstance chip, uint widthNew) + { + chip.InternalData[0] = widthNew; + SimChip simChip = rootSimChip.GetSubChipFromID(chip.ID); + simChip.InternalState[0] = widthNew; + } + // Rom has been edited, so simulation must be updated public void NotifyRomContentsEdited(SubChipInstance romChip) { @@ -241,6 +249,13 @@ public void DeleteChip(string chipToDeleteName) // restart the simulation in this case (this is not ideal though, since state of latches etc will be lost) bool simReloadRequired = ChipContainsSubchipIndirectly(ViewedChip, chipToDeleteName); + if (ChipContainsSubChipDirectly(ViewedChip, chipToDeleteName)) + { + // if deleted chip is a subchip of the current chip, clear undo history as it may now be invalid + // (Todo: maybe handle more gracefully...) + ViewedChip.UndoController.Clear(); + } + UpdateAndSaveAffectedChips(chipLibrary.GetChipDescription(chipToDeleteName), null, true); @@ -331,6 +346,18 @@ public void CreateBlankNote(Vector2 position, string text) ); controller.StartPlacingNote(noteDesc); + + bool ChipContainsSubChipDirectly(DevChipInstance chip, string targetName) + { + foreach (IMoveable element in chip.Elements) + { + if (element is SubChipInstance s && ChipDescription.NameMatch(s.Description.Name, targetName)) + { + return true; + } + } + + return false; } // Must be called prior to library being updated with the change @@ -371,12 +398,12 @@ void UpdateAndSaveAffectedChips(ChipDescription root_desc, ChipDescription root_ // Detect deleted dev pins, and remove any connections to the corresponding subchip pins in the affected chip foreach (PinDescription p in root_desc.InputPins) { - if (!newDesc_AllDevPinIDs.Contains(p.ID)) anyChanges |= devChip.DeleteWiresAttachedToSubChip(p.ID); + if (!newDesc_AllDevPinIDs.Contains(p.ID)) anyChanges |= devChip.DeleteWiresAttachedToPinOfSubChip(p.ID); } foreach (PinDescription p in root_desc.OutputPins) { - if (!newDesc_AllDevPinIDs.Contains(p.ID)) anyChanges |= devChip.DeleteWiresAttachedToSubChip(p.ID); + if (!newDesc_AllDevPinIDs.Contains(p.ID)) anyChanges |= devChip.DeleteWiresAttachedToPinOfSubChip(p.ID); } } diff --git a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs index 8b0eebe7..57d859e1 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs @@ -70,6 +70,13 @@ public static class ContextMenu labelChipEntry, deleteEntry }; + + static readonly MenuEntry[] entries_builtinPulseChip = + { + new(Format("EDIT"), OpenPulseEditMenu, CanEditCurrentChip), + labelChipEntry, + deleteEntry + }; static readonly MenuEntry[] entries_subChipOutput = pinColEntries; @@ -180,8 +187,9 @@ static void HandleOpenMenuInput() else // builtin type { headerName = ChipTypeHelper.IsBusType(subChip.ChipType) ? "BUS" : subChip.Description.Name; - if (subChip.ChipType == ChipType.Key) activeContextMenuEntries = entries_builtinKeySubchip; + if (subChip.ChipType is ChipType.Key) activeContextMenuEntries = entries_builtinKeySubchip; else if (ChipTypeHelper.IsRomType(subChip.ChipType)) activeContextMenuEntries = entries_builtinRomSubchip; + else if (subChip.ChipType is ChipType.Pulse) activeContextMenuEntries = entries_builtinPulseChip; else if (ChipTypeHelper.IsBusType(subChip.ChipType)) activeContextMenuEntries = entries_builtinBus; else activeContextMenuEntries = entries_builtinSubchip; } @@ -403,6 +411,8 @@ static void OpenKeyBindMenu() } static void OpenRomEditMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.RomEdit); + + static void OpenPulseEditMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.PulseEdit); static bool CanEditCurrentChip() => Project.ActiveProject.CanEditViewedChip; diff --git a/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs b/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs index 50e17b22..744a1a45 100644 --- a/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs @@ -65,7 +65,7 @@ public static class PreferencesMenu static readonly UIHandle ID_ClockSpeedInput = new("PREFS_ClockSpeed"); static readonly string showGridLabel = "Show grid" + UI.CreateColouredText(" (ctrl+G)", new Color(1, 1, 1, 0.35f)); - static readonly Func integerInputValidator; + static readonly Func integerInputValidator = ValidateIntegerInput; static double simAvgTicksPerSec_delayedRefreshForUI; static float lastSimAvgTicksPerSecRefreshTime; diff --git a/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs b/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs new file mode 100644 index 00000000..3d9946fa --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs @@ -0,0 +1,68 @@ +using System; +using DLS.Game; +using Seb.Helpers; +using Seb.Vis; +using Seb.Vis.UI; +using UnityEngine; + +namespace DLS.Graphics +{ + public static class PulseEditMenu + { + static SubChipInstance pulseChip; + static uint pulseWidth; + + static readonly UIHandle ID_PulseWidthInput = new("PulseChipEdit_PulseWidth"); + static readonly Func integerInputValidator = ValidatePulseWidthInput; + + public static void DrawMenu() + { + MenuHelper.DrawBackgroundOverlay(); + Draw.ID panelID = UI.ReservePanel(); + DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; + + Vector2 pos = UI.Centre + Vector2.up * (UI.HalfHeight * 0.25f); + + using (UI.BeginBoundsScope(true)) + { + UI.DrawText("Pulse Width (ticks)", theme.FontBold, theme.FontSizeRegular, pos, Anchor.TextCentre, Color.white * 0.8f); + + InputFieldTheme inputFieldTheme = DrawSettings.ActiveUITheme.ChipNameInputField; + inputFieldTheme.fontSize = DrawSettings.ActiveUITheme.FontSizeRegular; + + Vector2 size = new(5.6f, DrawSettings.SelectorWheelHeight); + Vector2 inputPos = UI.PrevBounds.CentreBottom + Vector2.down * DrawSettings.VerticalButtonSpacing; + InputFieldState state = UI.InputField(ID_PulseWidthInput, inputFieldTheme, inputPos, size, string.Empty, Anchor.CentreTop, 1, integerInputValidator, forceFocus: true); + uint.TryParse(state.text, out pulseWidth); + + MenuHelper.CancelConfirmResult result = MenuHelper.DrawCancelConfirmButtons(UI.GetCurrentBoundsScope().BottomLeft, UI.GetCurrentBoundsScope().Width, true); + MenuHelper.DrawReservedMenuPanel(panelID, UI.GetCurrentBoundsScope()); + + if (result == MenuHelper.CancelConfirmResult.Cancel) + { + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + else if (result == MenuHelper.CancelConfirmResult.Confirm) + { + Project.ActiveProject.NotifyPulseWidthChanged(pulseChip, pulseWidth); + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + } + } + + public static void OnMenuOpened() + { + pulseChip = (SubChipInstance)ContextMenu.interactionContext; + pulseWidth = pulseChip.InternalData[0]; + UI.GetInputFieldState(ID_PulseWidthInput).SetText(pulseWidth.ToString()); + } + + public static bool ValidatePulseWidthInput(string s) + { + if (s.Length > 4) return false; + if (string.IsNullOrEmpty(s)) return true; + if (s.Contains(" ")) return false; + return int.TryParse(s, out _); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs.meta b/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs.meta new file mode 100644 index 00000000..969aa1e2 --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/PulseEditMenu.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 20b616e4d4e05224caee5477888fe68d \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/UIDrawer.cs b/Assets/Scripts/Graphics/UI/UIDrawer.cs index d53cc1f3..69fa4ee3 100644 --- a/Assets/Scripts/Graphics/UI/UIDrawer.cs +++ b/Assets/Scripts/Graphics/UI/UIDrawer.cs @@ -17,6 +17,7 @@ public enum MenuType MainMenu, RebindKeyChip, RomEdit, + PulseEdit, UnsavedChanges, Search, ChipLabelPopup, @@ -68,6 +69,7 @@ static void DrawProjectMenus(Project project) else if (menuToDraw == MenuType.Search) SearchPopup.DrawMenu(); else if (menuToDraw == MenuType.ChipLabelPopup) ChipLabelMenu.DrawMenu(); else if (menuToDraw == MenuType.NoteTextPopup) NoteTextMenu.DrawMenu(); + else if (menuToDraw == MenuType.PulseEdit) PulseEditMenu.DrawMenu(); else { bool showSimPausedBanner = project.simPaused; @@ -98,6 +100,7 @@ static void NotifyIfActiveMenuChanged() else if (ActiveMenu == MenuType.Search) SearchPopup.OnMenuOpened(); else if (ActiveMenu == MenuType.ChipLabelPopup) ChipLabelMenu.OnMenuOpened(); else if (ActiveMenu == MenuType.NoteTextPopup) NoteTextMenu.OnMenuOpened(); + else if (ActiveMenu == MenuType.PulseEdit) PulseEditMenu.OnMenuOpened(); if (InInputBlockingMenu() && Project.ActiveProject != null && Project.ActiveProject.controller != null) { diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index 1befd5bf..26fec83e 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -54,7 +54,7 @@ static IOrderedEnumerable OrderPins(IEnumerable } - static SubChipDescription CreateSubChipDescription(SubChipInstance subChip) + public static SubChipDescription CreateSubChipDescription(SubChipInstance subChip) { return new SubChipDescription ( @@ -62,7 +62,7 @@ static SubChipDescription CreateSubChipDescription(SubChipInstance subChip) subChip.ID, subChip.Label, subChip.Position, - // Don't save colour info for bus since it changes based on received input, so would just trigger unecessary 'unsaved changes' warnings + // Don't save colour info for bus since it changes based on received input, so would just trigger unnecessary 'unsaved changes' warnings subChip.IsBus ? null : subChip.OutputPins.Select(p => new OutputPinColourInfo(p.Colour, p.Address.PinID)).ToArray(), subChip.InternalData ); @@ -74,6 +74,7 @@ public static SubChipDescription CreateBuiltinSubChipDescriptionForPlacement(Chi { ChipType.Rom_256x16 => new uint[256], ChipType.Key => new uint[] { 'K' }, + ChipType.Pulse => new uint[] { 50, 0, 0 }, _ => ChipTypeHelper.IsBusType(type) ? new uint[2] : null }; @@ -88,7 +89,7 @@ public static SubChipDescription CreateBuiltinSubChipDescriptionForPlacement(Chi ); } - static void UpdateWireIndicesForDescriptionCreation(DevChipInstance chip) + public static void UpdateWireIndicesForDescriptionCreation(DevChipInstance chip) { // Store wire's current index in wire for convenient access for (int i = 0; i < chip.Wires.Count; i++) @@ -98,7 +99,7 @@ static void UpdateWireIndicesForDescriptionCreation(DevChipInstance chip) } // Note: assumed that all wire indices have been set prior to calling this function - static WireDescription CreateWireDescription(WireInstance wire) + public static WireDescription CreateWireDescription(WireInstance wire) { // Get wire points Vector2[] wirePoints = new Vector2[wire.WirePointCount]; diff --git a/Assets/Scripts/Simulation/SimChip.cs b/Assets/Scripts/Simulation/SimChip.cs index 1736d3cd..e1af17d3 100644 --- a/Assets/Scripts/Simulation/SimChip.cs +++ b/Assets/Scripts/Simulation/SimChip.cs @@ -26,10 +26,10 @@ public SimChip() ID = -1; } - public SimChip(ChipDescription desc, SubChipDescription subChipDescription, SimChip[] subChips) + public SimChip(ChipDescription desc, int id, uint[] internalState, SimChip[] subChips) { SubChips = subChips; - ID = subChipDescription.ID; + ID = id; ChipType = desc.ChipType; IsBuiltin = ChipType != ChipType.Custom; @@ -78,10 +78,10 @@ public SimChip(ChipDescription desc, SubChipDescription subChipDescription, SimC } } // Load in serialized persistent state (rom data, etc.) - else if (subChipDescription.InternalData is { Length: > 0 }) + else if (internalState is { Length: > 0 }) { - InternalState = new uint[subChipDescription.InternalData.Length]; - UpdateInternalState(subChipDescription.InternalData); + InternalState = new uint[internalState.Length]; + UpdateInternalState(internalState); } } diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index ab102d2e..393773a9 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -65,7 +65,8 @@ public static void RunSimulationStep(SimChip rootSimChip, DevPinInstance[] input try { SimPin simPin = rootSimChip.GetSimPinFromAddress(input.Pin.Address); - simPin.State.SetFromSource(input.Pin.State); + simPin.State.SetFromSource(input.Pin.PlayerInputState); + input.Pin.State.SetFromSource(input.Pin.PlayerInputState); } catch (Exception) { @@ -213,6 +214,36 @@ static void ProcessBuiltinChip(SimChip chip) chip.OutputPins[0].State.SetBit(0, high ? PinState.LogicHigh : PinState.LogicLow); break; } + case ChipType.Pulse: + const int pulseDurationIndex = 0; + const int pulseTicksRemainingIndex = 1; + const int pulseInputOldIndex = 2; + + uint pulseInputState = chip.InputPins[0].State.GetBit(0); + bool pulseInputHigh = pulseInputState == PinState.LogicHigh; + uint pulseTicksRemaining = chip.InternalState[pulseTicksRemainingIndex]; + + if (pulseTicksRemaining == 0) + { + bool isRisingEdge = pulseInputHigh && chip.InternalState[pulseInputOldIndex] == 0; + if (isRisingEdge) + { + pulseTicksRemaining = chip.InternalState[pulseDurationIndex]; + chip.InternalState[pulseTicksRemainingIndex] = pulseTicksRemaining; + } + } + + uint pulseOutput = pulseInputState == PinState.LogicDisconnected ? PinState.LogicDisconnected : PinState.LogicLow; + if (pulseTicksRemaining > 0) + { + chip.InternalState[1]--; + pulseOutput = PinState.LogicHigh; + } + + chip.OutputPins[0].State.SetBit(0, pulseOutput); + chip.InternalState[pulseInputOldIndex] = pulseInputHigh ? 1u : 0; + + break; case ChipType.Split_4To1Bit: { SimPin in4 = chip.InputPins[0]; @@ -451,18 +482,17 @@ static void ProcessBuiltinChip(SimChip chip) public static SimChip BuildSimChip(ChipDescription chipDesc, ChipLibrary library) { - SubChipDescription subChipDescription = new(chipDesc.Name, -1, string.Empty, Vector2.zero, null); - return BuildSimChip(chipDesc, library, subChipDescription); + return BuildSimChip(chipDesc, library, -1, null); } - public static SimChip BuildSimChip(ChipDescription chipDesc, ChipLibrary library, SubChipDescription selfSubChip) + public static SimChip BuildSimChip(ChipDescription chipDesc, ChipLibrary library, int subChipID, uint[] internalState) { - SimChip simChip = BuildSimChipRecursive(chipDesc, library, selfSubChip); + SimChip simChip = BuildSimChipRecursive(chipDesc, library, subChipID, internalState); return simChip; } // Recursively build full representation of chip from its description for simulation. - static SimChip BuildSimChipRecursive(ChipDescription chipDesc, ChipLibrary library, SubChipDescription selfSubChip) + static SimChip BuildSimChipRecursive(ChipDescription chipDesc, ChipLibrary library, int subChipID, uint[] internalState) { // Recursively create subchips SimChip[] subchips = chipDesc.SubChips.Length == 0 ? Array.Empty() : new SimChip[chipDesc.SubChips.Length]; @@ -471,11 +501,11 @@ static SimChip BuildSimChipRecursive(ChipDescription chipDesc, ChipLibrary libra { SubChipDescription subchipDesc = chipDesc.SubChips[i]; ChipDescription subchipFullDesc = library.GetChipDescription(subchipDesc.Name); - SimChip subChip = BuildSimChipRecursive(subchipFullDesc, library, subchipDesc); + SimChip subChip = BuildSimChipRecursive(subchipFullDesc, library, subchipDesc.ID, subchipDesc.InternalData); subchips[i] = subChip; } - SimChip simChip = new(chipDesc, selfSubChip, subchips); + SimChip simChip = new(chipDesc, subChipID, internalState, subchips); // Create connections @@ -510,7 +540,7 @@ public static void RemovePin(SimChip simChip, int pinID) modificationQueue.Enqueue(command); } - public static void AddSubChip(SimChip simChip, ChipDescription desc, ChipLibrary chipLibrary, SubChipDescription subChipDesc) + public static void AddSubChip(SimChip simChip, ChipDescription desc, ChipLibrary chipLibrary, int subChipID, uint[] subChipInternalData) { SimModifyCommand command = new() { @@ -518,7 +548,8 @@ public static void AddSubChip(SimChip simChip, ChipDescription desc, ChipLibrary modifyTarget = simChip, chipDesc = desc, lib = chipLibrary, - subChipDesc = subChipDesc + subChipID = subChipID, + subChipInternalData = subChipInternalData }; modificationQueue.Enqueue(command); } @@ -569,7 +600,7 @@ public static void ApplyModifications() { if (cmd.type == SimModifyCommand.ModificationType.AddSubchip) { - SimChip newSubChip = BuildSimChip(cmd.chipDesc, cmd.lib, cmd.subChipDesc); + SimChip newSubChip = BuildSimChip(cmd.chipDesc, cmd.lib, cmd.subChipID, cmd.subChipInternalData); cmd.modifyTarget.AddSubChip(newSubChip); } else if (cmd.type == SimModifyCommand.ModificationType.RemoveSubChip) @@ -618,7 +649,8 @@ public enum ModificationType public SimChip modifyTarget; public ChipDescription chipDesc; public ChipLibrary lib; - public SubChipDescription subChipDesc; + public int subChipID; + public uint[] subChipInternalData; public PinAddress sourcePinAddress; public PinAddress targetPinAddress; public SimPin simPinToAdd; diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 8dd3e55f..780a431e 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -140,7 +140,7 @@ PlayerSettings: loadStoreDebugModeEnabled: 0 visionOSBundleVersion: 1.0 tvOSBundleVersion: 1.0 - bundleVersion: 2.1.2 + bundleVersion: 2.1.3 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -428,7 +428,7 @@ PlayerSettings: m_APIs: 10000000 m_Automatic: 1 - m_BuildTarget: WindowsStandaloneSupport - m_APIs: 020000000b000000 + m_APIs: 1200000002000000150000000b000000 m_Automatic: 1 m_BuildTargetVRSettings: [] m_DefaultShaderChunkSizeInMB: 16 @@ -718,7 +718,7 @@ PlayerSettings: additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: - Standalone: 1 + Standalone: 0 il2cppCompilerConfiguration: Standalone: 1 il2cppCodeGeneration: diff --git a/TestData/Projects/MainTest/Chips/test.json b/TestData/Projects/MainTest/Chips/test.json new file mode 100644 index 00000000..c3f30c19 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/test.json @@ -0,0 +1,162 @@ +{ + "Name": "test", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 0.725, + "y": 1.125 + }, + "Colour": { + "r": 0.5414247, + "g": 0.390782118, + "b": 0.6613721, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":1421188130, + "Position":{ + "x":-7.40141, + "y":3.912 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":379144233, + "Position":{ + "x":-3.83526, + "y":0.31532 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":2025946763, + "Position":{ + "x":8.50862, + "y":-3.78063 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":315547482, + "Position":{ + "x":8.06068, + "y":1.785 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":784653966, + "Position":{ + "x":7.97995, + "y":0.85658 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"NAND", + "ID":240905991, + "Label":"", + "Position":{ + "x":-0.55341, + "y":0.2381 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"REGISTER-4", + "ID":149684545, + "Label":"", + "Position":{ + "x":-0.53703, + "y":2.27566 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":96791616, + "Label":"", + "Position":{ + "x":-0.63063, + "y":-1.35779 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"REGISTER-4", + "ID":31831749, + "Label":"", + "Position":{ + "x":2.74131, + "y":-0.26384 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":9902874}], + "InternalData":null + }, + { + "Name":"ROM 256×16", + "ID":1318148087, + "Label":"", + "Position":{ + "x":3.94338, + "y":1.69081 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], + "InternalData":[49392,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1318148087 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":315547482 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1318148087 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":784653966 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 3e38f91d..29998da7 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.2", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-04-18T13:32:20.434+02:00", + "LastSaveTime": "2025-04-20T15:18:17.676+02:00", "Prefs_MainPinNamesDisplayMode": 0, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -59,7 +59,8 @@ "EQUALS-8", "DECODER-2", "RAM-256×8 (async)", - "RAM-sync" + "RAM-sync", + "test" ], "StarredList":[ { @@ -77,6 +78,14 @@ { "Name":"RAM-sync", "IsCollection":false + }, + { + "Name":"test", + "IsCollection":false + }, + { + "Name":"NAND", + "IsCollection":false } ], "ChipCollections":[ From 1ebbd92dbbbe9b493ebbeb08f9ebeed3cf7ed156 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Thu, 24 Apr 2025 00:19:02 +0300 Subject: [PATCH 029/124] Fixed --- Assets/Scripts/Seb/SebVis/UI/UI.cs | 2 +- Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index 863744b5..206cdbc3 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -703,7 +703,7 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 bool showDefaultText = (state.lines.Count == 0 || (state.lines.Count == 1 && string.IsNullOrEmpty(state.lines[0]))) || !Application.isPlaying; string[] lines = showDefaultText ? new[] { "Enter something..." } : state.lines.ToArray(); - // Debug.Log($"Lines: {string.Join(", ", lines).Replace("\n", "\\n")}"); + Debug.Log($"Lines: {string.Join(", ", lines).Replace("\n", "\\n")}"); Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; for (int i = 0; i < lines.Length; i++) { diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index a4c23c64..a57d966b 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -497,6 +497,18 @@ public void TryInsertText(string textToAdd, Func validation = null string currentLine = lines[cursorLineIndex]; + if (currentLine.Contains("\n")) + { + // Find the index of the newline character + int newlineIndex = currentLine.IndexOf('\n'); + + // If the cursor is positioned after the newline, move it before the newline + if (cursorBeforeCharIndex > newlineIndex) + { + cursorBeforeCharIndex = newlineIndex; + } + } + // Prevent adding text if maxLines is reached and the cursor is on the last line if (lines.Count == maxLines && cursorLineIndex == lines.Count - 1) { From 7d48e86457df656a2ff627d210815dd756d87d6d Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Thu, 24 Apr 2025 10:15:38 +0200 Subject: [PATCH 030/124] Fixed compile errors --- Assets/Scripts/Game/Project/Project.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index 611788ad..6370b5c2 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -125,7 +125,7 @@ public void SaveFromDescription(ChipDescription saveChipDescription, SaveMode sa // (same thing if saving a new version of it) if (ViewedChip.LastSavedDescription != null && saveMode != SaveMode.SaveAs) { - UpdateAndSaveAffectedChips(ViewedChip.LastSavedDescription, saveChipDescription, false); + UpdateAndSaveAffectedChips(ViewedChip.LastSavedDescription, saveChipDescription, false); } if (saveMode is SaveMode.Rename) @@ -265,7 +265,7 @@ public void DeleteChip(string chipToDeleteName) SetStarred(chipToDeleteName, false, false, false); // ensure removed from starred list EnsureChipRemovedFromCollections(chipToDeleteName); UpdateAndSaveProjectDescription(); - + // If has deleted the chip that's currently being edited, then open a blank chip if (ChipDescription.NameMatch(ViewedChip.ChipName, chipToDeleteName)) @@ -333,7 +333,7 @@ public void CreateBlankNote(Vector2 position, string text) { // Get all possible values of the NoteColour enum Array colours = Enum.GetValues(typeof(NoteColour)); - + // Select a random color NoteColour randomColour = (NoteColour)colours.GetValue(UnityEngine.Random.Range(0, colours.Length)); @@ -346,6 +346,7 @@ public void CreateBlankNote(Vector2 position, string text) ); controller.StartPlacingNote(noteDesc); + } bool ChipContainsSubChipDirectly(DevChipInstance chip, string targetName) { From 0fd44b6c9e42cfa714da6464e67ef3ecbfa53765 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Thu, 24 Apr 2025 11:27:47 +0300 Subject: [PATCH 031/124] Update UI.cs --- Assets/Scripts/Seb/SebVis/UI/UI.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index 206cdbc3..fb68557c 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -703,7 +703,6 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 bool showDefaultText = (state.lines.Count == 0 || (state.lines.Count == 1 && string.IsNullOrEmpty(state.lines[0]))) || !Application.isPlaying; string[] lines = showDefaultText ? new[] { "Enter something..." } : state.lines.ToArray(); - Debug.Log($"Lines: {string.Join(", ", lines).Replace("\n", "\\n")}"); Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; for (int i = 0; i < lines.Length; i++) { From 0ee95cc8d00f06f17e53d6a85d3122d8b68b1b0a Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Thu, 24 Apr 2025 12:17:05 +0300 Subject: [PATCH 032/124] Fixed not clearing text area --- Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs | 6 +++--- Assets/Scripts/Seb/SebVis/UI/UI.cs | 13 ++++--------- Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 14 ++++++++++++-- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs index fbdd71a0..85ab5ae9 100644 --- a/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/NoteTextMenu.cs @@ -23,9 +23,9 @@ public static void OnMenuOpened() { note = (NoteInstance)ContextMenu.interactionContext; - InputFieldState inputFieldState = UI.GetInputFieldState(ID_NameField); - inputFieldState.SetText(note.Text); - inputFieldState.SelectAll(); + TextAreaState textAreaState = UI.GetTextAreaState(ID_NameField); + textAreaState.SetText(note.Text); + textAreaState.SelectAll(); } public static void DrawMenu() diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index fb68557c..744beba9 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -680,14 +680,9 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 if (cutTriggered) { - if (state.isSelecting) - { - state.Delete(true, validation); - } - else - { - state.ClearText(); - } + if (state.isSelecting) state.Delete(true, validation); + else state.ClearText(); + } } @@ -702,7 +697,7 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 float fontSize_ss = theme.fontSize * scale; bool showDefaultText = (state.lines.Count == 0 || (state.lines.Count == 1 && string.IsNullOrEmpty(state.lines[0]))) || !Application.isPlaying; string[] lines = showDefaultText ? new[] { "Enter something..." } : state.lines.ToArray(); - + Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; for (int i = 0; i < lines.Length; i++) { diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index a57d966b..4bc3630b 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -480,11 +480,21 @@ public void UpdateLastInputTime() lastInputTime = Time.time; } - public void SetText(List newLines, bool focus = true) + public void SetText(string text, bool focus = true) { - lines = newLines ?? new List { string.Empty }; + // Clear the current lines + lines.Clear(); + lines.Add(string.Empty); // Ensure there's at least one line to start with + + + // Reset the cursor position cursorLineIndex = 0; cursorBeforeCharIndex = 0; + + // Insert the entire text using TryInsertText + TryInsertText(text); + + // Set focus if required SetFocus(focus); } From 101ffd4abc181b6961cbe732fca6f7add7713cde Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Wed, 30 Apr 2025 23:23:11 +0300 Subject: [PATCH 033/124] Fixed problem with opening textarea --- Assets/Scripts/Seb/SebVis/UI/UI.cs | 2 +- Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index 744beba9..b57133fa 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -834,7 +834,7 @@ Vector2Int CharIndexBeforeMouse(float textLeft, float textTop) Vector2 mousePos = InputHelper.MousePos; // Calculate the line index based on the vertical mouse position - float lineHeight = theme.fontSize * scale; // Line height with scaling + float lineHeight = theme.fontSize * 1.2f * scale; // Line height with scaling float adjustedTextTop = textTop + lineHeight / 3; // Adjust for the center of the first line int lineIndex = Mathf.FloorToInt((adjustedTextTop - mousePos.y) / lineHeight); lineIndex = Mathf.Clamp(lineIndex, 0, state.lines.Count - 1); // Clamp to valid line range diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index 4bc3630b..582e83c0 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -484,16 +484,30 @@ public void SetText(string text, bool focus = true) { // Clear the current lines lines.Clear(); - lines.Add(string.Empty); // Ensure there's at least one line to start with + // Split the input text into lines based on newline characters + string[] splitLines = text.Split('\n'); // Reset the cursor position cursorLineIndex = 0; cursorBeforeCharIndex = 0; - // Insert the entire text using TryInsertText - TryInsertText(text); - + lines.Add(string.Empty); // Add an empty line to start + + // Add each line to the lines list + foreach (string line in splitLines) + { + TryInsertText(line); + NewLine(); + } + + // Remove the extra new line added after the last line + if (lines.Count > 0 && string.IsNullOrEmpty(lines[^1])) + { + lines.RemoveAt(lines.Count - 1); + } + + // Set focus if required SetFocus(focus); } From 733ce326f26c2772ff033879586958eac6ac3dd7 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Thu, 1 May 2025 10:29:05 +0300 Subject: [PATCH 034/124] Fixed undo system with notes --- .../Interaction/ChipInteractionController.cs | 6 ++--- .../Game/Interaction/UndoController.cs | 23 ++++++++++++++++++- .../Scripts/Game/Project/DevChipInstance.cs | 18 +++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index e0c327ba..0f712485 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -67,7 +67,6 @@ public void Delete(IMoveable element, bool clearSelection = true, bool recordUnd { if (!HasControl) return; if (recordUndo) ActiveDevChip.UndoController.RecordDeleteElements(new List(new[] { element })); - if (element is SubChipInstance subChip) ActiveDevChip.DeleteSubChip(subChip); if (element is NoteInstance noteInstance) ActiveDevChip.DeleteNote(noteInstance); else if (element is DevPinInstance devPin) ActiveDevChip.DeleteDevPin(devPin); @@ -364,7 +363,6 @@ void DuplicateElements(List elements) else desc.OutputPins[0] = pinDesc; } - IMoveable duplicatedElement = StartPlacing(desc, element.Position, true); IMoveable duplicatedElement = CreateElementFromDuplicationSource(element); StartPlacing(duplicatedElement, element.Position, true); duplicatedElement.StraightLineReferencePoint = element.Position; @@ -655,7 +653,9 @@ void FinishPlacingNewElements() ActiveDevChip.AddWire(wire, false); } + ActiveDevChip.UndoController.RecordAddElements(SelectedElements, DuplicatedWires.Count > 0); + DuplicatedWires.Clear(); OnFinishedPlacingItems(); @@ -1051,7 +1051,7 @@ public IMoveable StartPlacingNote(NoteDescription noteDescription, Vector2 posit Select(elementToPlace); return elementToPlace; - } + } IMoveable CreateElementFromDuplicationSource(IMoveable duplicationSource) { diff --git a/Assets/Scripts/Game/Interaction/UndoController.cs b/Assets/Scripts/Game/Interaction/UndoController.cs index 96a75f35..5e19ab6a 100644 --- a/Assets/Scripts/Game/Interaction/UndoController.cs +++ b/Assets/Scripts/Game/Interaction/UndoController.cs @@ -89,6 +89,7 @@ public void RecordMoveElements(List movedElements) } // Wire move offsets + int wireCount = devChip.Wires.Count; moveUndoAction.wireMoveOffsets = new Vector2[wireCount]; for (int i = 0; i < wireCount; i++) @@ -113,6 +114,7 @@ public void RecordAddElements(List addedElements, bool hasWires) void RecordAddOrDeleteElements(List elements, bool delete, bool hasWires) { List subchips = elements.OfType().ToList(); + List notes = elements.OfType().ToList(); DevPinInstance[] devPins = elements.OfType().ToArray(); // When deleting elements, store full state of ALL wires, not just those affected by the deletion. @@ -130,11 +132,12 @@ void RecordAddOrDeleteElements(List elements, bool delete, bool hasWi wireState = CreateFullWireState(devChip, wiresThatWillBeDeletedAutomatically); } - ElementExistenceAction deleteAction = new() { chipNames = subchips.Select(s => s.Description.Name).ToArray(), + noteIDs = notes.Select(s => s.Description.ID).ToArray(), subchipDescriptions = subchips.Select(DescriptionCreator.CreateSubChipDescription).ToArray(), + noteDescriptions = notes.Select(DescriptionCreator.CreateNoteDescription).ToArray(), pinDescriptions = devPins.Select(DescriptionCreator.CreatePinDescription).ToArray(), pinInInputFlags = devPins.Select(p => p.IsInputPin).ToArray(), wireStateBeforeDelete = wireState, @@ -284,7 +287,9 @@ public void Restore(DevChipInstance devChip) class ElementExistenceAction : UndoAction { public string[] chipNames; + public int[] noteIDs; public SubChipDescription[] subchipDescriptions; + public NoteDescription[] noteDescriptions; public PinDescription[] pinDescriptions; public bool[] pinInInputFlags; @@ -333,6 +338,22 @@ public void Trigger(bool undo, DevChipInstance devChip) } } + // ---- Handle notes ---- + for (int i = 0; i < noteIDs.Length; i++) + { + NoteDescription description = Project.ActiveProject.ViewedChip.GetNoteByID(noteIDs[i]).Description; + + if (addElement) + { + NoteInstance note = new(description); + devChip.AddNote(note, false); + Project.ActiveProject.controller.Select(note, true); + } + else if (!devChip.TryDeleteNoteByID(noteDescriptions[i].ID)) + { + } + } + if (addElement && wireStateBeforeDelete != null) { wireStateBeforeDelete.Restore(devChip); diff --git a/Assets/Scripts/Game/Project/DevChipInstance.cs b/Assets/Scripts/Game/Project/DevChipInstance.cs index ff49afb2..6f5ecaf7 100644 --- a/Assets/Scripts/Game/Project/DevChipInstance.cs +++ b/Assets/Scripts/Game/Project/DevChipInstance.cs @@ -421,6 +421,20 @@ public bool TryDeleteDevPinByID(int id) return false; } + public bool TryDeleteNoteByID(int id) + { + for (int i = 0; i < Elements.Count; i++) + { + if (Elements[i] is NoteInstance note && note.ID == id) + { + DeleteNote(note); + return true; + } + } + + return false; + } + public bool TryGetSubChipByID(int id, out SubChipInstance subchip) { foreach (IMoveable element in Elements) @@ -548,6 +562,10 @@ public void NotifyConnectedWiresPointsInserted(WireInstance wire, int insertInde public IEnumerable GetSubchips() => Elements.OfType(); public IEnumerable GetNotes() => Elements.OfType(); + public NoteInstance GetNoteByID(int id) + { + return Elements.OfType().FirstOrDefault(n => n.ID == id); + } public IEnumerable GetOutputPins() { From b1348c60368de9ccd7e71a51f1b34a143dcb29d1 Mon Sep 17 00:00:00 2001 From: UkrainianBanderasCat Date: Sun, 4 May 2025 22:21:15 +0300 Subject: [PATCH 035/124] Fixed some problems --- Assets/Scripts/Seb/SebVis/UI/UI.cs | 10 ++++++++-- Assets/Scripts/Seb/SebVis/UI/UIStates.cs | 3 +-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Seb/SebVis/UI/UI.cs b/Assets/Scripts/Seb/SebVis/UI/UI.cs index b57133fa..b5197056 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UI.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UI.cs @@ -591,6 +591,8 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 bool invalidChar = char.IsControl(c) || char.IsSurrogate(c) || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.Format || char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.PrivateUse; if (invalidChar) continue; state.TryInsertText(c + "", validation); + state.UpdateLastInputTime(); // Reset caret blink timer + } // Paste from clipboard @@ -628,8 +630,12 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 bool downArrow = CanTrigger(ref state.arrowKeyTrigger, KeyCode.DownArrow); bool jumpToPrevWordStart = InputHelper.CtrlIsHeld && leftArrow; bool jumpToNextWordEnd = InputHelper.CtrlIsHeld && rightArrow; + bool jumpToStart = (state.isSelecting && leftArrow) || InputHelper.IsKeyDownThisFrame(KeyCode.UpArrow) || InputHelper.IsKeyDownThisFrame(KeyCode.PageUp) || InputHelper.IsKeyDownThisFrame(KeyCode.Home) || (jumpToPrevWordStart && InputHelper.AltIsHeld); + bool jumpToEnd = (state.isSelecting && rightArrow) || InputHelper.IsKeyDownThisFrame(KeyCode.DownArrow) || InputHelper.IsKeyDownThisFrame(KeyCode.PageDown) || InputHelper.IsKeyDownThisFrame(KeyCode.End) || (jumpToNextWordEnd && InputHelper.AltIsHeld); - if (jumpToNextWordEnd) state.SetCursorIndex(state.NextWordEndIndex(), state.cursorLineIndex, select); + if (jumpToStart) state.SetCursorIndex(0, 0, select); + else if (jumpToEnd) state.SetCursorIndex(state.lines[state.lines.Count - 1].Length, state.lines.Count, select); + else if (jumpToNextWordEnd) state.SetCursorIndex(state.NextWordEndIndex(), state.cursorLineIndex, select); else if (jumpToPrevWordStart) state.SetCursorIndex(state.PrevWordIndex(), state.cursorLineIndex, select); else if (leftArrow) state.DecrementCursor(select); else if (rightArrow) state.IncrementCursor(select); @@ -697,7 +703,7 @@ public static TextAreaState TextArea(UIHandle id, InputFieldTheme theme, Vector2 float fontSize_ss = theme.fontSize * scale; bool showDefaultText = (state.lines.Count == 0 || (state.lines.Count == 1 && string.IsNullOrEmpty(state.lines[0]))) || !Application.isPlaying; string[] lines = showDefaultText ? new[] { "Enter something..." } : state.lines.ToArray(); - + Debug.Log($"{String.Join(", ", lines).Replace("\n", "\\n")}"); Color textCol = showDefaultText ? theme.defaultTextCol : theme.textCol; for (int i = 0; i < lines.Length; i++) { diff --git a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs index 582e83c0..28d4244f 100644 --- a/Assets/Scripts/Seb/SebVis/UI/UIStates.cs +++ b/Assets/Scripts/Seb/SebVis/UI/UIStates.cs @@ -498,7 +498,7 @@ public void SetText(string text, bool focus = true) foreach (string line in splitLines) { TryInsertText(line); - NewLine(); + // NewLine(); } // Remove the extra new line added after the last line @@ -507,7 +507,6 @@ public void SetText(string text, bool focus = true) lines.RemoveAt(lines.Count - 1); } - // Set focus if required SetFocus(focus); } From cacfb64c95f988acefb2ce1a5581eacebdf6a0fd Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Mon, 19 May 2025 12:18:02 +0200 Subject: [PATCH 036/124] EEPROM 256x16 This is a chip that has similar capabilities to the ROM, + availability to be rewrote with its pins. It saves. --- .../Description/Helpers/ChipTypeHelper.cs | 3 +- .../Description/Types/SubTypes/ChipTypes.cs | 1 + .../Scripts/Game/Elements/SubChipInstance.cs | 6 + .../Game/Project/BuiltinChipCreator.cs | 26 ++- .../Game/Project/BuiltinCollectionCreator.cs | 3 +- Assets/Scripts/Game/Project/Project.cs | 8 + .../Scripts/SaveSystem/DescriptionCreator.cs | 1 + Assets/Scripts/Simulation/Simulator.cs | 27 ++- .../Projects/MainTest/Chips/EEPROM_test.json | 161 ++++++++++++++++++ .../Projects/MainTest/ProjectDescription.json | 29 ++-- .../Projects/test/ProjectDescription.json | 58 +++++++ 11 files changed, 306 insertions(+), 17 deletions(-) create mode 100644 TestData/Projects/MainTest/Chips/EEPROM_test.json create mode 100644 TestData/Projects/test/ProjectDescription.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 3d1e60d0..50230f3c 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -17,6 +17,7 @@ public static class ChipTypeHelper // ---- Memory ---- { ChipType.dev_Ram_8Bit, "dev.RAM-8" }, { ChipType.Rom_256x16, $"ROM 256{mulSymbol}16" }, + { ChipType.EEPROM_256x16, $"EEPROM 256{mulSymbol}16" }, // ---- Split / Merge ---- { ChipType.Split_4To1Bit, "4-1BIT" }, { ChipType.Split_8To1Bit, "8-1BIT" }, @@ -60,7 +61,7 @@ public static class ChipTypeHelper public static bool IsBusTerminusType(ChipType type) => type is ChipType.BusTerminus_1Bit or ChipType.BusTerminus_4Bit or ChipType.BusTerminus_8Bit; - public static bool IsRomType(ChipType type) => type == ChipType.Rom_256x16; + public static bool IsRomType(ChipType type) => type == ChipType.Rom_256x16 || type == ChipType.EEPROM_256x16; public static ChipType GetCorrespondingBusTerminusType(ChipType type) { diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index 610f0298..418073fb 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -13,6 +13,7 @@ public enum ChipType // ---- Memory ---- dev_Ram_8Bit, Rom_256x16, + EEPROM_256x16, // ---- Displays ---- SevenSegmentDisplay, diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index d85725ee..9274ffc2 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -378,6 +378,12 @@ public void FlipBus() } } + public void UpdateInternalData(uint[] data) + { + if (ChipType != ChipType.EEPROM_256x16) throw new Exception("Can only update internal data of EEPROM, not " + ChipTypeHelper.GetName(ChipType)); + Array.Copy(data, InternalData, data.Length); + } + void LoadOutputPinColours(OutputPinColourInfo[] cols) { if (cols == null) return; diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index c757f1e1..b92d0804 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -30,6 +30,8 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions() // ---- Memory ---- dev_CreateRAM_8(), CreateROM_8(), + CreateEEPROM_8(), + // ---- Merge / Split ---- CreateBitConversionChip(ChipType.Split_4To1Bit, PinBitCount.Bit4, PinBitCount.Bit1, 1, 4), CreateBitConversionChip(ChipType.Split_8To4Bit, PinBitCount.Bit8, PinBitCount.Bit4, 1, 2), @@ -118,7 +120,29 @@ static ChipDescription CreateROM_8() return CreateBuiltinChipDescription(ChipType.Rom_256x16, size, col, inputPins, outputPins); } - static ChipDescription CreateInputKeyChip() + static ChipDescription CreateEEPROM_8() + { + PinDescription[] inputPins = + { + CreatePinDescription("ADDRESS", 0, PinBitCount.Bit8), + CreatePinDescription("WRITE B", 1, PinBitCount.Bit8), + CreatePinDescription("WRITE A", 2, PinBitCount.Bit8), + CreatePinDescription("WRITE", 3, PinBitCount.Bit1), + + }; + PinDescription[] outputPins = + { + CreatePinDescription("OUT B", 4, PinBitCount.Bit8), + CreatePinDescription("OUT A", 5, PinBitCount.Bit8) + }; + + Color col = new(0.25f, 0.35f, 0.5f); + Vector2 size = new(GridSize * 12, SubChipInstance.MinChipHeightForPins(inputPins, outputPins)); + + return CreateBuiltinChipDescription(ChipType.EEPROM_256x16, size, col, inputPins, outputPins); + } + + static ChipDescription CreateInputKeyChip() { Color col = new(0.1f, 0.1f, 0.1f); Vector2 size = new Vector2(GridSize, GridSize) * 3; diff --git a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs index f7e6508a..128572c7 100644 --- a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs @@ -53,7 +53,8 @@ public static ChipCollection[] CreateDefaultChipCollections() ChipType.DisplayLED ), CreateChipCollection("MEMORY", - ChipType.Rom_256x16 + ChipType.Rom_256x16, + ChipType.EEPROM_256x16 ) }; } diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index e2a5be6e..ebbde3c4 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -296,6 +296,14 @@ public void NotifyRomContentsEdited(SubChipInstance romChip) simChip.UpdateInternalState(romChip.InternalData); } + public void NotifyRomContentsEditedRuntime(SimChip simChip) + { + bool foundChip = ViewedChip.TryGetSubChipByID(simChip.ID, out SubChipInstance instance); + if (foundChip) { + instance.UpdateInternalData(simChip.InternalState); + } + } + public void NotifyLEDColourChanged(SubChipInstance ledChip, uint colIndex) { SimChip simChip = rootSimChip.GetSubChipFromID(ledChip.ID); diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index 196e0ea1..b3cc8295 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -85,6 +85,7 @@ public static uint[] CreateDefaultInstanceData(ChipType type) return type switch { ChipType.Rom_256x16 => new uint[256], // ROM contents + ChipType.EEPROM_256x16 => new uint[256], // EEPROM contents ChipType.Key => new uint[] { 'K' }, // Key binding ChipType.Pulse => new uint[] { 50, 0, 0 }, // Pulse width, ticks remaining, input state old ChipType.DisplayLED => new uint[] { 0 }, // LED colour diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 1d777628..66e07495 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -493,13 +493,36 @@ static void ProcessBuiltinChip(SimChip chip) case ChipType.Rom_256x16: { const int ByteMask = 0b11111111; - uint address = PinState.GetBitStates(chip.InputPins[0].State); + uint address = PinState.GetBitStates(chip.InputPins[3].State); uint data = chip.InternalState[address]; chip.OutputPins[0].State = (ushort)((data >> 8) & ByteMask); chip.OutputPins[1].State = (ushort)(data & ByteMask); break; } - case ChipType.Buzzer: + + case ChipType.EEPROM_256x16: + { + const int ByteMask = 0b11111111; + + uint address = PinState.GetBitStates(chip.InputPins[0].State); + bool isWriting = PinState.FirstBitHigh(chip.InputPins[3].State); + + if (isWriting) + { + uint writeData = (ushort)(((PinState.GetBitStates(chip.InputPins[1].State) << 8) & (ByteMask<<8)) | (PinState.GetBitStates(chip.InputPins[2].State) & ByteMask)); + + chip.InternalState[address] = writeData; + + Project.ActiveProject.NotifyRomContentsEditedRuntime(chip); + + } + uint data = chip.InternalState[address]; + chip.OutputPins[0].State = (ushort)((data >> 8) & ByteMask); + chip.OutputPins[1].State = (ushort)(data & ByteMask); + break; + } + + case ChipType.Buzzer: { int freqIndex = PinState.GetBitStates(chip.InputPins[0].State); int volumeIndex = PinState.GetBitStates(chip.InputPins[1].State); diff --git a/TestData/Projects/MainTest/Chips/EEPROM_test.json b/TestData/Projects/MainTest/Chips/EEPROM_test.json new file mode 100644 index 00000000..36da14b6 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/EEPROM_test.json @@ -0,0 +1,161 @@ +{ + "DLSVersion": "2.1.6", + "Name": "EEPROM_test", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.775, + "y": 1.75 + }, + "Colour": { + "r": 0.806846559, + "g": 0.617581964, + "b": 0.627907336, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":544654036, + "Position":{ + "x":-4.0, + "y":0.5625 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":1542575473, + "Position":{ + "x":-4.0, + "y":0.0625 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":551362643, + "Position":{ + "x":-4.0, + "y":-0.4375 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":524361546, + "Position":{ + "x":-3.125, + "y":-0.9375 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"OUT", + "ID":310978193, + "Position":{ + "x":1.0, + "y":-0.8125 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"EEPROM 256×16", + "ID":129549989, + "Label":"", + "Position":{ + "x":-1.13688, + "y":-0.19005 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5}], + "InternalData":[51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":524361546 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":129549989 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":129549989 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":310978193 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":544654036 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":129549989 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1542575473 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":129549989 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":551362643 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":129549989 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 6d1823ff..dd316da0 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -1,9 +1,9 @@ { "ProjectName": "MainTest", - "DLSVersion_LastSaved": "2.1.5", + "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-04T09:15:41.061+02:00", + "LastSaveTime": "2025-05-19T11:50:38.729+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -62,7 +62,8 @@ "RAM-sync", "TEST MergeSplit", "#", - "BuzzTest" + "BuzzTest", + "EEPROM_test" ], "StarredList":[ { @@ -96,51 +97,55 @@ { "Name":"BuzzTest", "IsCollection":false + }, + { + "Name":"EEPROM_test", + "IsCollection":false } ], "ChipCollections":[ { "Chips":["NAND","AND","NOT","NOR","XOR","OR","KEY","CLOCK","3-STATE BUFFER"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"BASICS" }, { "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"IN/OUT" }, { "Chips":["1-4BIT","1-8BIT","4-8BIT","8-4BIT","8-1BIT","4-1BIT"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"MERGE/SPLIT" }, { "Chips":["7-SEGMENT","DECIMAL-4","DECIMAL-8","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"DISPLAY" }, { "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"BUS" }, { "Chips":["REGISTER-4","REG-8"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"MEMORY" }, { "Chips":["D-LATCH","FLIP-FLOP","OR-8","MEM-1","NOT-8","AND(8,1)","MUX-8","PC","BUF-8","ALU-8","DECODE-3","AND-3","CONTROL UNIT","TOGGLE","FLAGS","DISP-7","demo","7-SEGMENT DRIVER","DABBLE","LSB","LSHIFT-8","DOUBLE DABBLE","ALU","BUS BUFFER","MEM-256","REGISTER-8","XNOR","EQUALS-8","ADDER-4","DECODER-2","ADDER-8","ADDER","MEM-16","REGISTER-1","AND-8","RAM-256×8 (async)","ROM 256×16"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"KEEP" }, { "Chips":["WIP2","RAM-sync"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16"], "IsToggledOpen":true, "Name":"OTHER" } diff --git a/TestData/Projects/test/ProjectDescription.json b/TestData/Projects/test/ProjectDescription.json new file mode 100644 index 00000000..be60b7bb --- /dev/null +++ b/TestData/Projects/test/ProjectDescription.json @@ -0,0 +1,58 @@ +{ + "ProjectName": "test", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "CreationTime": "2025-05-19T11:48:01.969+02:00", + "LastSaveTime": "2025-05-19T11:48:01.969+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["1-4BIT","1-8BIT","4-8BIT","4-1BIT","8-4BIT","8-1BIT"], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + } + ] +} \ No newline at end of file From 102e3bbd95c3fe3eb4fb5b1d13393db51bffd7ce Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Mon, 19 May 2025 12:35:52 +0200 Subject: [PATCH 037/124] Updated README --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0f56dc0b..b1fd451a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ -# Digital-Logic-Sim -A minimalistic digital logic simulator, which I created as part of my video series: [Exploring How Computers Work](https://www.youtube.com/playlist?list=PLFt_AvWsXl0dPhqVsKt1Ni_46ARyiCGSq). -
You can find the latest builds over [here](https://sebastian.itch.io/digital-logic-sim).
+# Digital-Logic-Sim Community Edit +Our version of Sebastian Lagues Digital Logic Sim, which you can find on [itch.io](https://sebastian.itch.io/digital-logic-sim) and on [Github](https://github.com/SebLague/Digital-Logic-Sim). -Note: Pull requests are welcome, but please be aware that I'm far more likely to merge performance/ux improvements and bug fixes than new built-in chips or features. I do hope to provide some form of mod support in the future, but don't have any concrete plans for it right now. If you'd like to ask or discuss anything relating to development with me/others, check out [Discussions/Dev](https://github.com/SebLague/Digital-Logic-Sim/discussions/categories/dev). - -[![IMAGE ALT TEXT HERE](https://raw.githubusercontent.com/SebLague/Images/master/Exploring%20how%20computers%20work.jpg)](http://www.youtube.com/watch?v=QZwneRb-zqA) +Feel free to open a Pull Request and contribute to it, we would love to add your Features! +This Community Edit is made, so that you can have all the Festures that you love in one single repository or build. From a0886244d2d0e4b8286ba95e1d2d15e7df818323 Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Mon, 19 May 2025 12:54:56 +0200 Subject: [PATCH 038/124] Fixed a grammar mistake --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b1fd451a..fcb92730 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Digital-Logic-Sim Community Edit -Our version of Sebastian Lagues Digital Logic Sim, which you can find on [itch.io](https://sebastian.itch.io/digital-logic-sim) and on [Github](https://github.com/SebLague/Digital-Logic-Sim). +Our version of Sebastian Lague's Digital Logic Sim, which you can find on [itch.io](https://sebastian.itch.io/digital-logic-sim) and on [Github](https://github.com/SebLague/Digital-Logic-Sim). Feel free to open a Pull Request and contribute to it, we would love to add your Features! This Community Edit is made, so that you can have all the Festures that you love in one single repository or build. From f349512165447197a06eb9057367b750d291eddb Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Tue, 20 May 2025 15:40:38 +0200 Subject: [PATCH 039/124] Made EEPROM rising-edge Introduced CLOCK pin so that EEPROM chip is now rising-edge. It also reduces performance issue of copying an array to another each simulation cycle which is what was needed previously. --- .../Game/Project/BuiltinChipCreator.cs | 6 +- .../Scripts/SaveSystem/DescriptionCreator.cs | 2 +- Assets/Scripts/Simulation/Simulator.cs | 5 +- .../Projects/MainTest/Chips/EEPROM_test.json | 60 +++++++++++++++++-- .../Projects/MainTest/ProjectDescription.json | 4 +- 5 files changed, 65 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index b92d0804..f1816eb7 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -128,12 +128,12 @@ static ChipDescription CreateEEPROM_8() CreatePinDescription("WRITE B", 1, PinBitCount.Bit8), CreatePinDescription("WRITE A", 2, PinBitCount.Bit8), CreatePinDescription("WRITE", 3, PinBitCount.Bit1), - + CreatePinDescription("CLOCK", 4, PinBitCount.Bit1) }; PinDescription[] outputPins = { - CreatePinDescription("OUT B", 4, PinBitCount.Bit8), - CreatePinDescription("OUT A", 5, PinBitCount.Bit8) + CreatePinDescription("OUT B", 5, PinBitCount.Bit8), + CreatePinDescription("OUT A", 6, PinBitCount.Bit8) }; Color col = new(0.25f, 0.35f, 0.5f); diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index b3cc8295..525c538d 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -85,7 +85,7 @@ public static uint[] CreateDefaultInstanceData(ChipType type) return type switch { ChipType.Rom_256x16 => new uint[256], // ROM contents - ChipType.EEPROM_256x16 => new uint[256], // EEPROM contents + ChipType.EEPROM_256x16 => new uint[257], // EEPROM contents + Rising-Edge detection ChipType.Key => new uint[] { 'K' }, // Key binding ChipType.Pulse => new uint[] { 50, 0, 0 }, // Pulse width, ticks remaining, input state old ChipType.DisplayLED => new uint[] { 0 }, // LED colour diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 66e07495..92e17c39 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -506,8 +506,11 @@ static void ProcessBuiltinChip(SimChip chip) uint address = PinState.GetBitStates(chip.InputPins[0].State); bool isWriting = PinState.FirstBitHigh(chip.InputPins[3].State); + bool clockHigh = PinState.FirstBitHigh(chip.InputPins[4].State); + bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; + chip.InternalState[^1] = clockHigh ? 1u : 0; - if (isWriting) + if (isWriting && isRisingEdge) { uint writeData = (ushort)(((PinState.GetBitStates(chip.InputPins[1].State) << 8) & (ByteMask<<8)) | (PinState.GetBitStates(chip.InputPins[2].State) & ByteMask)); diff --git a/TestData/Projects/MainTest/Chips/EEPROM_test.json b/TestData/Projects/MainTest/Chips/EEPROM_test.json index 36da14b6..a9fc5561 100644 --- a/TestData/Projects/MainTest/Chips/EEPROM_test.json +++ b/TestData/Projects/MainTest/Chips/EEPROM_test.json @@ -5,7 +5,7 @@ "ChipType": 0, "Size": { "x": 1.775, - "y": 1.75 + "y": 2.0 }, "Colour": { "r": 0.806846559, @@ -57,6 +57,17 @@ "BitCount":1, "Colour":0, "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":420837064, + "Position":{ + "x":-3.125, + "y":-1.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 } ], "OutputPins":[ @@ -64,8 +75,19 @@ "Name":"OUT", "ID":310978193, "Position":{ - "x":1.0, - "y":-0.8125 + "x":1.34104, + "y":0.58048 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":837524785, + "Position":{ + "x":1.375, + "y":-0.9375 }, "BitCount":8, "Colour":0, @@ -81,8 +103,8 @@ "x":-1.13688, "y":-0.19005 }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":5}], - "InternalData":[51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + "OutputPinColourInfo":[{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":6}], + "InternalData":[816,890,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1] } ], "Wires":[ @@ -155,6 +177,34 @@ "ConnectedWireIndex":-1, "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":420837064 + }, + "TargetPinAddress":{ + "PinID":4, + "PinOwnerID":129549989 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":129549989 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":837524785 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] } ], "Displays": null diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index dd316da0..76f12014 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-19T11:50:38.729+02:00", + "LastSaveTime": "2025-05-20T15:36:58.616+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -145,7 +145,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16","EEPROM_test"], "IsToggledOpen":true, "Name":"OTHER" } From c7def292dbd9f3374b5af6211e2d8edab7f243d1 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 21 May 2025 16:22:45 +0200 Subject: [PATCH 040/124] Addition of Squircle to SebVis SebVis now natively supports squircles drawing. --- Assets/Scripts/Seb/SebVis/Draw.cs | 16 +++++++++- .../Seb/SebVis/Internal/Resources/Draw.shader | 30 +++++++++++++++++-- .../SebVis/Internal/ShapeTypes/ShapeData.cs | 8 +++-- .../Scripts/Seb/SebVis/_Dev/Mess/MyVisTest.cs | 9 ++++-- .../_Dev/Mess/TestTypes/SquircleVisTest.cs | 8 +++++ .../Mess/TestTypes/SquircleVisTest.cs.meta | 11 +++++++ .../Projects/MainTest/ProjectDescription.json | 2 +- 7 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 Assets/Scripts/Seb/SebVis/_Dev/Mess/TestTypes/SquircleVisTest.cs create mode 100644 Assets/Scripts/Seb/SebVis/_Dev/Mess/TestTypes/SquircleVisTest.cs.meta diff --git a/Assets/Scripts/Seb/SebVis/Draw.cs b/Assets/Scripts/Seb/SebVis/Draw.cs index 905fe682..2ed1c031 100644 --- a/Assets/Scripts/Seb/SebVis/Draw.cs +++ b/Assets/Scripts/Seb/SebVis/Draw.cs @@ -92,7 +92,21 @@ public static void Diamond(Vector2 pos, Vector2 size, Color col) shapeDrawer.AddToLayer(data); } - public static void SatValQuad(Vector2 centre, Vector2 size, float hue) + public static void Squircle(Vector2 centre, Vector2 size, float cornerRadius, Color col) + { + if (size.x == 0 || size.y == 0 || col.a == 0) return; + if (cornerRadius <= 0) + { + Quad(centre, size, col); + return; + } + + ShapeData data = ShapeData.CreateSquircle(centre, size, cornerRadius, col, activeMaskMin, activeMaskMax); + shapeDrawer.AddToLayer(data); + } + + + public static void SatValQuad(Vector2 centre, Vector2 size, float hue) { if (size.x == 0 || size.y == 0) return; diff --git a/Assets/Scripts/Seb/SebVis/Internal/Resources/Draw.shader b/Assets/Scripts/Seb/SebVis/Internal/Resources/Draw.shader index bd23ff92..16d536b6 100644 --- a/Assets/Scripts/Seb/SebVis/Internal/Resources/Draw.shader +++ b/Assets/Scripts/Seb/SebVis/Internal/Resources/Draw.shader @@ -12,7 +12,7 @@ Shader "Vis/Draw" Blend SrcAlpha OneMinusSrcAlpha Pass - { + { CGPROGRAM #pragma vertex vert #pragma fragment frag @@ -64,6 +64,7 @@ Shader "Vis/Draw" static const int HUE_TYPE = 5; static const int DIAMOND_TYPE = 6; static const int POINT_OUTLINE_TYPE = 7; + static const int SQUIRCLE_TYPE = 8; static const bool AA_Enabled = true; @@ -145,7 +146,7 @@ Shader "Vis/Draw" } } // Quad (2 = regular, 4 = saturation/value display, 5 = hue display) - else if (instance.type == QUAD_TYPE || instance.type == SATVAL_TYPE || instance.type == HUE_TYPE) + else if (instance.type == QUAD_TYPE || instance.type == SATVAL_TYPE || instance.type == HUE_TYPE || instance.type == SQUIRCLE_TYPE) { float3 worldCentre = float3(instance.a * LayerScale + LayerOffset, 0); float4 size = float4(instance.b.xy * LayerScale, 1, 1); @@ -154,7 +155,9 @@ Shader "Vis/Draw" o.posLocal = vertexLocal; o.sizeData = instance.b.xy; - if (instance.type == 4) o.col = instance.param; // Override col to store hue value + if (instance.type == SQUIRCLE_TYPE) o.lineEndPoints.x = instance.param; // Store corner radius in lineEndPoints if SQUIRCLE (to not make an even bigger v2f) + else if (instance.type == 4) o.col = instance.param; // Override col to store hue value + } // Triangle else if (instance.type == TRIANGLE_TYPE) @@ -215,6 +218,12 @@ Shader "Vis/Draw" return length(p - pointOnLineSeg); } + float squircleSdf(float2 position, float2 halfSize, float cornerRadius) + { + position = abs(position) - halfSize + cornerRadius; + return length(max(position, 0.0)) + min(max(position.x, position.y), 0.0) - cornerRadius; + } + // Alternate AA formulation which seems to work a bit better for very thin lines? float4 lineDraw_aa2(v2f i) { @@ -313,6 +322,19 @@ Shader "Vis/Draw" return i.col; } + float4 squircleDraw(v2f i) + { + float sdf = squircleSdf(i.posLocal, i.sizeData / 2, i.lineEndPoints.x); // LineEndPoints.x has been overwritten with the corner radius + float alpha = CalculateAlphaFromSDF(sdf, i); + float3 col = i.col.rgb; + + + return float4(col, alpha * i.col.a); + + } + + + float4 frag(v2f i) : SV_Target { // Mask @@ -326,6 +348,8 @@ Shader "Vis/Draw" if (i.shapeType == SATVAL_TYPE) return satValQuadDraw(i); if (i.shapeType == HUE_TYPE) return hueQuadDraw(i); if (i.shapeType == DIAMOND_TYPE) return diamondDraw(i); + if (i.shapeType == SQUIRCLE_TYPE) return squircleDraw(i); + return float4(0, 0, 0, 1); } ENDCG diff --git a/Assets/Scripts/Seb/SebVis/Internal/ShapeTypes/ShapeData.cs b/Assets/Scripts/Seb/SebVis/Internal/ShapeTypes/ShapeData.cs index 2dc01fbf..909eac6c 100644 --- a/Assets/Scripts/Seb/SebVis/Internal/ShapeTypes/ShapeData.cs +++ b/Assets/Scripts/Seb/SebVis/Internal/ShapeTypes/ShapeData.cs @@ -1,4 +1,5 @@ using System; +using Newtonsoft.Json.Linq; using UnityEngine; namespace Seb.Vis.Internal @@ -12,7 +13,8 @@ public enum ShapeType SatVal = 4, HueQuad = 5, Diamond = 6, - PointOutline = 7 + PointOutline = 7, + Squircle = 8 } public struct ShapeData @@ -64,7 +66,9 @@ public static ShapeData CreatePointOutline(Vector2 centre, float radius, float t public static ShapeData CreateSatVal(Vector2 centre, Vector2 size, float value, Vector2 maskMin, Vector2 maskMax) => new(ShapeType.SatVal, centre, size, value, Color.clear, maskMin, maskMax); - public static ShapeData CreateHueQuad(Vector2 centre, Vector2 size, Vector2 maskMin, Vector2 maskMax) => new(ShapeType.HueQuad, centre, size, 0, Color.clear, maskMin, maskMax); + public static ShapeData CreateSquircle(Vector2 centre, Vector2 size, float cornerRadius, Color col, Vector2 maskMin, Vector2 maskMax) => new(ShapeType.Squircle, centre, size, cornerRadius, col, maskMin, maskMax); + + public static ShapeData CreateHueQuad(Vector2 centre, Vector2 size, Vector2 maskMin, Vector2 maskMax) => new(ShapeType.HueQuad, centre, size, 0, Color.clear, maskMin, maskMax); public static ShapeData CreateDiamond(Vector2 centre, Vector2 size, Color col, Vector2 maskMin, Vector2 maskMax) => new(ShapeType.Diamond, centre, size, 0, col, maskMin, maskMax); diff --git a/Assets/Scripts/Seb/SebVis/_Dev/Mess/MyVisTest.cs b/Assets/Scripts/Seb/SebVis/_Dev/Mess/MyVisTest.cs index ca07d5d7..5761a7d2 100644 --- a/Assets/Scripts/Seb/SebVis/_Dev/Mess/MyVisTest.cs +++ b/Assets/Scripts/Seb/SebVis/_Dev/Mess/MyVisTest.cs @@ -169,8 +169,13 @@ void DrawSceneObjects() Vector2 c = tri.transform.position; Draw.Triangle(c + tri.offsetA, c + tri.offsetB, c + tri.offsetC, tri.col); } - } - // Seb.Vis.Draw.EndTransformState(); + else if (t.TryGetComponent(out SquircleVisTest s)) + { + Draw.Squircle(s.transform.position, s.size, s.radius, s.col); + } + + // Seb.Vis.Draw.EndTransformState(); + } } } \ No newline at end of file diff --git a/Assets/Scripts/Seb/SebVis/_Dev/Mess/TestTypes/SquircleVisTest.cs b/Assets/Scripts/Seb/SebVis/_Dev/Mess/TestTypes/SquircleVisTest.cs new file mode 100644 index 00000000..71423b95 --- /dev/null +++ b/Assets/Scripts/Seb/SebVis/_Dev/Mess/TestTypes/SquircleVisTest.cs @@ -0,0 +1,8 @@ +using UnityEngine; + +public class SquircleVisTest : MonoBehaviour +{ + public Vector2 size; + public float radius; + public Color col = Color.white; +} \ No newline at end of file diff --git a/Assets/Scripts/Seb/SebVis/_Dev/Mess/TestTypes/SquircleVisTest.cs.meta b/Assets/Scripts/Seb/SebVis/_Dev/Mess/TestTypes/SquircleVisTest.cs.meta new file mode 100644 index 00000000..8c8a01b7 --- /dev/null +++ b/Assets/Scripts/Seb/SebVis/_Dev/Mess/TestTypes/SquircleVisTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2e0a905fb2283fa4ca4bbb9f600e2138 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 76f12014..0b2aa843 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-20T15:36:58.616+02:00", + "LastSaveTime": "2025-05-21T16:21:23.641+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, From 54a5b0cb97c9d798327fba145a87134c96b247d3 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 12:01:22 +0200 Subject: [PATCH 041/124] TypeHelper.cs for Vector2 type conversion. --- Assets/Scripts/Seb/Helpers/TypeHelper.cs | 22 +++++++++++++++++++ Assets/Scripts/Seb/Helpers/TypeHelper.cs.meta | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 Assets/Scripts/Seb/Helpers/TypeHelper.cs create mode 100644 Assets/Scripts/Seb/Helpers/TypeHelper.cs.meta diff --git a/Assets/Scripts/Seb/Helpers/TypeHelper.cs b/Assets/Scripts/Seb/Helpers/TypeHelper.cs new file mode 100644 index 00000000..199c2fbf --- /dev/null +++ b/Assets/Scripts/Seb/Helpers/TypeHelper.cs @@ -0,0 +1,22 @@ +using System.Numerics; +using UnityEditor.PackageManager; +using UnityEngine; + +namespace Seb.Helpers +{ + + public static class TypeHelper + { + public static System.Numerics.Vector2 ToNumerics(this UnityEngine.Vector2 value) + { + return new System.Numerics.Vector2(value.x, value.y); + } + + public static System.Numerics.Vector2 ToUnity(this System.Numerics.Vector2 value) + { + return new System.Numerics.Vector2(value.X, value.Y); + } + + } + +} \ No newline at end of file diff --git a/Assets/Scripts/Seb/Helpers/TypeHelper.cs.meta b/Assets/Scripts/Seb/Helpers/TypeHelper.cs.meta new file mode 100644 index 00000000..1bcbd484 --- /dev/null +++ b/Assets/Scripts/Seb/Helpers/TypeHelper.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 50080f7945539d740adc7d8ee6b47324 \ No newline at end of file From a6bafd51202aee40fe65d28ec90bc41c81ddcc34 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 12:52:16 +0200 Subject: [PATCH 042/124] Clickable Displays --- .../Description/Helpers/ChipTypeHelper.cs | 6 ++++++ .../Game/Elements/ClickableDisplayInstance.cs | 17 +++++++++++++++ .../Elements/ClickableDisplayInstance.cs.meta | 2 ++ .../Interaction/ChipInteractionController.cs | 2 +- .../Game/Interaction/Interfaces/IClickable.cs | 11 ++++++++++ .../Interaction/Interfaces/IClickable.cs.meta | 11 ++++++++++ .../Scripts/Graphics/World/DevSceneDrawer.cs | 21 +++++++++++++++++++ 7 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs create mode 100644 Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs.meta create mode 100644 Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs create mode 100644 Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs.meta diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 50230f3c..42bd42b7 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -109,5 +109,11 @@ public static (bool isInput, bool isOutput, PinBitCount numBits) IsInputOrOutput _ => (false, false, PinBitCount.Bit1) }; } + + public static bool IsClickableDisplayType(ChipType type) { + // Return true for any chiptype that is a clickable display + + return false; + } } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs b/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs new file mode 100644 index 00000000..742d1b02 --- /dev/null +++ b/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using System.Numerics; +using DLS.Description; +using Seb.Types; +using Seb.Helpers; + +namespace DLS.Game +{ + public class ClickableDisplayInstance : DisplayInstance, IClickable + { + public UnityEngine.Vector2 Position { get; set; } + + public Bounds2D InteractionBoundingBox { get; set; } + + + } +} \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs.meta b/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs.meta new file mode 100644 index 00000000..2d74f0bd --- /dev/null +++ b/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 3d4efeee8971c6e46b47d83f3a0180d0 \ No newline at end of file diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index da9491d3..5288b205 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -448,7 +448,7 @@ void HandleLeftMouseDown() SelectionBoxStartPos = InputHelper.MousePosWorld; straightLineMoveState = StraightLineMoveState.None; - if (InteractionState.ElementUnderMouse == null) ExitWireEditMode(); + if (InteractionState.ElementUnderMouse == null || InteractionState.ElementUnderMouse is IClickable) ExitWireEditMode(); if (InteractionState.MouseIsOverUI) return; diff --git a/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs b/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs new file mode 100644 index 00000000..22534bdd --- /dev/null +++ b/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs @@ -0,0 +1,11 @@ +using System.Numerics; +using Seb.Types; + +namespace DLS.Game +{ + public interface IClickable : IInteractable + { + Vector2 Position { get; set; } + Bounds2D InteractionBoundingBox { get; set; } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs.meta b/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs.meta new file mode 100644 index 00000000..c2a4fa2e --- /dev/null +++ b/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a9bbc5b1a9f41364788a809974538188 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index eefb8307..bbcd91f3 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -441,6 +441,11 @@ public static Bounds2D DrawDisplay(DisplayInstance display, Vector2 posParent, f bounds = DrawDisplay_LED(posWorld, scaleWorld, col); } + else if (ChipTypeHelper.IsClickableDisplayType(display.DisplayType) && display is ClickableDisplayInstance clickableDisplay) + { + bounds = DrawClickableDisplay(clickableDisplay, posParent, parentScale, rootChip, sim); + } + display.LastDrawBounds = bounds; return bounds; } @@ -582,6 +587,22 @@ public static Bounds2D DrawDisplay_LED(Vector2 centre, float scale, Color col) return Bounds2D.CreateFromCentreAndSize(centre, Vector2.one * scale); } + public static Bounds2D DrawClickableDisplay(ClickableDisplayInstance clickableDisplay, Vector2 posParent, float parentScale, SubChipInstance rootChip, SimChip sim = null) + { + Bounds2D bounds = Bounds2D.CreateEmpty(); + Vector2 posLocal = clickableDisplay.Desc.Position; + Vector2 posWorld = posParent + posLocal * parentScale; + clickableDisplay.Position = posWorld; + + // Calls to draw functions for each clickable display -- must include isSelected == false and NotifyElementUnderMouse(clickableDisplay) in the mouse detection to work. + + + + clickableDisplay.InteractionBoundingBox = bounds; + clickableDisplay.LastDrawBounds = bounds; + return bounds; + } + public static void DrawDevPin(DevPinInstance devPin) { if (devPin.BitCount == PinBitCount.Bit1) From 66d25527c6835410d0cbf35fd1ede3a753a8045f Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 15:49:18 +0200 Subject: [PATCH 043/124] Buttons and interaction finish --- .../Description/Helpers/ChipTypeHelper.cs | 4 +- .../Description/Types/SubTypes/ChipTypes.cs | 2 + .../Game/Elements/ClickableDisplayInstance.cs | 17 -- .../Elements/ClickableDisplayInstance.cs.meta | 2 - .../Scripts/Game/Elements/DisplayInstance.cs | 2 +- .../Interaction/ChipInteractionController.cs | 2 +- .../Game/Interaction/Interfaces/IClickable.cs | 3 +- .../Game/Project/BuiltinChipCreator.cs | 24 ++- Assets/Scripts/Game/Project/Project.cs | 7 + .../Scripts/Graphics/UI/Menus/ContextMenu.cs | 21 +- .../Scripts/Graphics/World/DevSceneDrawer.cs | 55 ++++- .../Scripts/SaveSystem/DescriptionCreator.cs | 1 + .../Projects/MainTest/Chips/BUTTON_test.json | 201 ++++++++++++++++++ .../Projects/MainTest/Chips/BUTTON_test2.json | 144 +++++++++++++ .../Projects/MainTest/ProjectDescription.json | 18 +- 15 files changed, 460 insertions(+), 43 deletions(-) delete mode 100644 Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs delete mode 100644 Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs.meta create mode 100644 TestData/Projects/MainTest/Chips/BUTTON_test.json create mode 100644 TestData/Projects/MainTest/Chips/BUTTON_test2.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 42bd42b7..07daf918 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -44,6 +44,8 @@ public static class ChipTypeHelper { ChipType.Out_4Bit, "OUT-4" }, { ChipType.Out_8Bit, "OUT-8" }, { ChipType.Key, "KEY" }, + { ChipType.Button, "BUTTON" }, + // ---- Buses ---- { ChipType.Bus_1Bit, "BUS-1" }, { ChipType.Bus_4Bit, "BUS-4" }, @@ -113,7 +115,7 @@ public static (bool isInput, bool isOutput, PinBitCount numBits) IsInputOrOutput public static bool IsClickableDisplayType(ChipType type) { // Return true for any chiptype that is a clickable display - return false; + return type == ChipType.Button; } } } \ No newline at end of file diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index 418073fb..d08284b4 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -39,6 +39,8 @@ public enum ChipType Key, + Button, + // ---- Buses ---- Bus_1Bit, BusTerminus_1Bit, diff --git a/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs b/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs deleted file mode 100644 index 742d1b02..00000000 --- a/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; -using System.Numerics; -using DLS.Description; -using Seb.Types; -using Seb.Helpers; - -namespace DLS.Game -{ - public class ClickableDisplayInstance : DisplayInstance, IClickable - { - public UnityEngine.Vector2 Position { get; set; } - - public Bounds2D InteractionBoundingBox { get; set; } - - - } -} \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs.meta b/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs.meta deleted file mode 100644 index 2d74f0bd..00000000 --- a/Assets/Scripts/Game/Elements/ClickableDisplayInstance.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 3d4efeee8971c6e46b47d83f3a0180d0 \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/DisplayInstance.cs b/Assets/Scripts/Game/Elements/DisplayInstance.cs index 7ae4338e..f2f54a12 100644 --- a/Assets/Scripts/Game/Elements/DisplayInstance.cs +++ b/Assets/Scripts/Game/Elements/DisplayInstance.cs @@ -4,7 +4,7 @@ namespace DLS.Game { - public class DisplayInstance + public class DisplayInstance : IClickable { public List ChildDisplays; public DisplayDescription Desc; diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index 5288b205..36970069 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -50,7 +50,7 @@ public class ChipInteractionController public bool CanInteractWithPin => CanInteract; public bool CanInteractWithPinStateDisplay => CanInteract && !IsCreatingWire && Project.ActiveProject.CanEditViewedChip; public bool CanInteractWithPinHandle => CanInteractWithPinStateDisplay; - + public bool CanInteractWithButton => CanInteract; public ChipInteractionController(Project project) { diff --git a/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs b/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs index 22534bdd..b2f4e8b6 100644 --- a/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs +++ b/Assets/Scripts/Game/Interaction/Interfaces/IClickable.cs @@ -5,7 +5,6 @@ namespace DLS.Game { public interface IClickable : IInteractable { - Vector2 Position { get; set; } - Bounds2D InteractionBoundingBox { get; set; } + } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index f1816eb7..4899837a 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -22,6 +22,8 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions() CreateInputOrOutputPin(ChipType.In_8Bit), CreateInputOrOutputPin(ChipType.Out_8Bit), CreateInputKeyChip(), + CreateInputButtonChip(), + // ---- Basic Chips ---- CreateNand(), CreateTristateBuffer(), @@ -152,8 +154,28 @@ static ChipDescription CreateInputKeyChip() return CreateBuiltinChipDescription(ChipType.Key, size, col, null, outputPins, null, NameDisplayLocation.Hidden); } + static ChipDescription CreateInputButtonChip() + { + Color col = new(0.1f, 0.1f, 0.1f); + Vector2 size = new Vector2(GridSize, GridSize) * 3; + float displayWidth = size.x - GridSize *0.5f; + + PinDescription[] outputPins = { CreatePinDescription("OUT", 0) }; + DisplayDescription[] displays = + { + new() + { + Position = Vector2.zero, + Scale = displayWidth, + SubChipID = -1 + } + }; + + return CreateBuiltinChipDescription(ChipType.Button, size, col, null, outputPins, displays, NameDisplayLocation.Hidden); + } + - static ChipDescription CreateTristateBuffer() + static ChipDescription CreateTristateBuffer() { Color col = new(0.1f, 0.1f, 0.1f); Vector2 size = new(CalculateGridSnappedWidth(1.5f), GridSize * 5); diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index ebbde3c4..c346a1ac 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -311,6 +311,13 @@ public void NotifyLEDColourChanged(SubChipInstance ledChip, uint colIndex) ledChip.InternalData[0] = colIndex; } + public void NotifyButtonColourChanged(SubChipInstance buttonChip, uint colIndex) + { + SimChip simChip = rootSimChip.GetSubChipFromID(buttonChip.ID); + simChip.InternalState[0] = colIndex; + buttonChip.InternalData[0] = colIndex; + } + public void DeleteChip(string chipToDeleteName) { // If the current chip only contains the deleted chip directly as a subchip, it will be removed from the sim and everything is fine. diff --git a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs index 086fd726..84dfec06 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs @@ -49,6 +49,8 @@ public static class ContextMenu static readonly MenuEntry[] entries_builtinLED = entries_builtinSubchip.Concat(new[] { dividerMenuEntry }).Concat(pinColEntries).ToArray(); + static readonly MenuEntry[] entries_builtinButton = entries_builtinLED; + static readonly MenuEntry[] entries_builtinBus = { new(Format("FLIP"), FlipBus, CanFlipBus), @@ -184,7 +186,8 @@ static void HandleOpenMenuInput() else if (subChip.ChipType is ChipType.Pulse) activeContextMenuEntries = entries_builtinPulseChip; else if (ChipTypeHelper.IsBusType(subChip.ChipType)) activeContextMenuEntries = entries_builtinBus; else if (subChip.ChipType == ChipType.DisplayLED) activeContextMenuEntries = entries_builtinLED; - else activeContextMenuEntries = entries_builtinSubchip; + else if (subChip.ChipType == ChipType.Button) activeContextMenuEntries = entries_builtinButton; + else activeContextMenuEntries = entries_builtinSubchip; } Project.ActiveProject.controller.Select(interactionContext as IMoveable, false); @@ -345,7 +348,7 @@ static bool CanSetCol() { if (!Project.ActiveProject.CanEditViewedChip || UIDrawer.ActiveMenu == UIDrawer.MenuType.ChipCustomization) return false; if (interactionContext is PinInstance pin) return pin.IsSourcePin; - if (interactionContext is SubChipInstance subchip) return subchip.ChipType == ChipType.DisplayLED; + if (interactionContext is SubChipInstance subchip) return subchip.ChipType == ChipType.DisplayLED || subchip.ChipType == ChipType.Button; return false; } @@ -361,12 +364,20 @@ static void SetCol(PinColour col) { pin.Colour = col; } - else if (interactionContext is SubChipInstance subchip) + + if(!(interactionContext is SubChipInstance subchip)) { return; } + + else if (subchip.ChipType == ChipType.DisplayLED) { Project.ActiveProject.NotifyLEDColourChanged(subchip, (uint)col); } - - } + else if (subchip.ChipType == ChipType.Button) + { + Project.ActiveProject.NotifyLEDColourChanged(subchip, (uint)col); + subchip.OutputPins[0].Colour = col; + } + + } static void OpenChipLabelPopup() { diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index bbcd91f3..7d84624d 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -441,9 +441,9 @@ public static Bounds2D DrawDisplay(DisplayInstance display, Vector2 posParent, f bounds = DrawDisplay_LED(posWorld, scaleWorld, col); } - else if (ChipTypeHelper.IsClickableDisplayType(display.DisplayType) && display is ClickableDisplayInstance clickableDisplay) + else if (ChipTypeHelper.IsClickableDisplayType(display.DisplayType)) { - bounds = DrawClickableDisplay(clickableDisplay, posParent, parentScale, rootChip, sim); + bounds = DrawClickableDisplay(display, posParent, parentScale, rootChip, sim); } display.LastDrawBounds = bounds; @@ -587,23 +587,60 @@ public static Bounds2D DrawDisplay_LED(Vector2 centre, float scale, Color col) return Bounds2D.CreateFromCentreAndSize(centre, Vector2.one * scale); } - public static Bounds2D DrawClickableDisplay(ClickableDisplayInstance clickableDisplay, Vector2 posParent, float parentScale, SubChipInstance rootChip, SimChip sim = null) + public static Bounds2D DrawClickableDisplay(DisplayInstance display, Vector2 posParent, float parentScale, SubChipInstance rootChip, SimChip sim = null) { Bounds2D bounds = Bounds2D.CreateEmpty(); - Vector2 posLocal = clickableDisplay.Desc.Position; + Vector2 posLocal = display.Desc.Position; Vector2 posWorld = posParent + posLocal * parentScale; - clickableDisplay.Position = posWorld; + float scaleWorld = display.Desc.Scale * parentScale; - // Calls to draw functions for each clickable display -- must include isSelected == false and NotifyElementUnderMouse(clickableDisplay) in the mouse detection to work. + bool inBounds = false; + bool clicked = false; + + // Calls to draw functions for each clickable display -- must include isSelected == false in the mouse detection to work. + if (display.DisplayType == ChipType.Button) + { + (bounds, inBounds, clicked) = DrawInteractable_Button(posWorld, scaleWorld, sim); + } + if (inBounds) + { + InteractionState.NotifyElementUnderMouse(display); + } - clickableDisplay.InteractionBoundingBox = bounds; - clickableDisplay.LastDrawBounds = bounds; + rootChip.IsSelected = clicked ? false : rootChip.IsSelected; + + display.LastDrawBounds = bounds; return bounds; } - public static void DrawDevPin(DevPinInstance devPin) + public static (Bounds2D bounds, bool inBounds, bool clicked) DrawInteractable_Button(Vector2 centre, float scale, SimChip chipSource) + { + Bounds2D bounds = Bounds2D.CreateFromCentreAndSize(centre, Vector2.one * scale); + bool inBounds = false; + bool pressed = false; + + const float buttonSize = 0.875f; + Color col = ActiveTheme.StateDisconnectedCol; + + if (chipSource != null) + { + inBounds = bounds.PointInBounds(InputHelper.MousePosWorld); + pressed = inBounds && InputHelper.IsMouseHeld(MouseButton.Left) && controller.CanInteractWithButton; + uint displayColIndex = chipSource.InternalState[0]; + col = GetStateColour(pressed, displayColIndex); + chipSource.OutputPins[0].State = (uint)(pressed ? 1 : 0); + } + + Vector2 buttonDrawSize = Vector2.one * (scale * buttonSize); + Draw.Squircle(centre, Vector2.one * scale, 0.15f * scale, ActiveTheme.DevPinHandle); + Draw.Squircle(centre, buttonDrawSize, 0.15f * scale * buttonSize, col); + + return (bounds, inBounds, pressed); + } + + public static void DrawDevPin(DevPinInstance devPin) { if (devPin.BitCount == PinBitCount.Bit1) { diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index 525c538d..cab9af2f 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -89,6 +89,7 @@ public static uint[] CreateDefaultInstanceData(ChipType type) ChipType.Key => new uint[] { 'K' }, // Key binding ChipType.Pulse => new uint[] { 50, 0, 0 }, // Pulse width, ticks remaining, input state old ChipType.DisplayLED => new uint[] { 0 }, // LED colour + ChipType.Button => new uint[] {0}, // Button colour _ => ChipTypeHelper.IsBusType(type) ? new uint[2] : null }; } diff --git a/TestData/Projects/MainTest/Chips/BUTTON_test.json b/TestData/Projects/MainTest/Chips/BUTTON_test.json new file mode 100644 index 00000000..c13a79a6 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/BUTTON_test.json @@ -0,0 +1,201 @@ +{ + "DLSVersion": "2.1.6", + "Name": "BUTTON_test", + "NameLocation": 2, + "ChipType": 0, + "Size": { + "x": 1.775, + "y": 1.0 + }, + "Colour": { + "r": 0.182485923, + "g": 0.182485923, + "b": 0.182485923, + "a": 1 + }, + "InputPins":[], + "OutputPins":[ + { + "Name":"OUT", + "ID":1550572376, + "Position":{ + "x":-7.75, + "y":3.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":1499665694, + "Position":{ + "x":-7.75, + "y":2.375 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":587226579, + "Position":{ + "x":-7.75, + "y":1.5625 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":462089182, + "Position":{ + "x":-7.75, + "y":0.8125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"BUTTON", + "ID":31096828, + "Label":"A", + "Position":{ + "x":-9.1975, + "y":3.125 + }, + "OutputPinColourInfo":[{"PinColour":1,"PinID":0}], + "InternalData":[1] + }, + { + "Name":"BUTTON", + "ID":1194019505, + "Label":"B", + "Position":{ + "x":-9.1975, + "y":2.375 + }, + "OutputPinColourInfo":[{"PinColour":5,"PinID":0}], + "InternalData":[5] + }, + { + "Name":"BUTTON", + "ID":402429062, + "Label":"C", + "Position":{ + "x":-9.1975, + "y":1.5625 + }, + "OutputPinColourInfo":[{"PinColour":7,"PinID":0}], + "InternalData":[7] + }, + { + "Name":"BUTTON", + "ID":795484620, + "Label":"D", + "Position":{ + "x":-9.1975, + "y":0.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":[0] + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":31096828 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1550572376 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1194019505 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1499665694 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":402429062 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":587226579 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":795484620 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":462089182 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[ + { + "SubChipID":31096828, + "Position":{ + "x":-0.65625, + "y":0.28125 + }, + "Scale":1.0 + }, + { + "SubChipID":1194019505, + "Position":{ + "x":-0.28125, + "y":0.28125 + }, + "Scale":1.0 + }, + { + "SubChipID":402429062, + "Position":{ + "x":0.09375, + "y":0.28125 + }, + "Scale":1.0 + }, + { + "SubChipID":795484620, + "Position":{ + "x":0.46875, + "y":0.28125 + }, + "Scale":1.0 + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/BUTTON_test2.json b/TestData/Projects/MainTest/Chips/BUTTON_test2.json new file mode 100644 index 00000000..a5d5f48b --- /dev/null +++ b/TestData/Projects/MainTest/Chips/BUTTON_test2.json @@ -0,0 +1,144 @@ +{ + "DLSVersion": "2.1.6", + "Name": "BUTTON_test2", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 3.45, + "y": 1.5 + }, + "Colour": { + "r": 0.295296669, + "g": 0.143883049, + "b": 0.09285392, + "a": 1 + }, + "InputPins":[], + "OutputPins":[ + { + "Name":"OUT", + "ID":893831017, + "Position":{ + "x":-5.125, + "y":2.6875 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":1274421634, + "Position":{ + "x":-5.125, + "y":2.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":970537214, + "Position":{ + "x":-5.125, + "y":1.75 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":2132483942, + "Position":{ + "x":-5.125, + "y":1.25 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"BUTTON_test", + "ID":579194441, + "Label":"", + "Position":{ + "x":-7.5225, + "y":2.30401 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":1550572376},{"PinColour":0,"PinID":1499665694},{"PinColour":0,"PinID":587226579},{"PinColour":0,"PinID":462089182}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1550572376, + "PinOwnerID":579194441 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":893831017 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1499665694, + "PinOwnerID":579194441 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1274421634 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":587226579, + "PinOwnerID":579194441 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":970537214 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":462089182, + "PinOwnerID":579194441 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2132483942 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[ + { + "SubChipID":579194441, + "Position":{ + "x":-0.625, + "y":0.1087 + }, + "Scale":1.30434787 + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 0b2aa843..fb239679 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,10 +3,10 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-21T16:21:23.641+02:00", + "LastSaveTime": "2025-05-22T13:07:20.823+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 1, + "Prefs_GridDisplayMode": 0, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, @@ -63,7 +63,9 @@ "TEST MergeSplit", "#", "BuzzTest", - "EEPROM_test" + "EEPROM_test", + "BUTTON_test", + "BUTTON_test2" ], "StarredList":[ { @@ -101,6 +103,14 @@ { "Name":"EEPROM_test", "IsCollection":false + }, + { + "Name":"BUTTON_test", + "IsCollection":false + }, + { + "Name":"BUTTON_test2", + "IsCollection":false } ], "ChipCollections":[ @@ -145,7 +155,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16","EEPROM_test"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2"], "IsToggledOpen":true, "Name":"OTHER" } From 71bbdd5f3f99803b9c3086be344b5bc67934f72e Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 15:50:24 +0200 Subject: [PATCH 044/124] Remove unnecessary call --- Assets/Scripts/Game/Interaction/ChipInteractionController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index 36970069..72f8dee2 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -448,7 +448,7 @@ void HandleLeftMouseDown() SelectionBoxStartPos = InputHelper.MousePosWorld; straightLineMoveState = StraightLineMoveState.None; - if (InteractionState.ElementUnderMouse == null || InteractionState.ElementUnderMouse is IClickable) ExitWireEditMode(); + if (InteractionState.ElementUnderMouse == null) ExitWireEditMode(); if (InteractionState.MouseIsOverUI) return; From 1a8ac11ae48866a5a21e08851d7a1765ba6c9c1c Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 16:01:31 +0200 Subject: [PATCH 045/124] Adds Button to I/O collection Oops ! Forgot it before ! --- Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs index 128572c7..16f876c8 100644 --- a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs @@ -31,7 +31,8 @@ public static ChipCollection[] CreateDefaultChipCollections() ChipType.In_8Bit, ChipType.Out_1Bit, ChipType.Out_4Bit, - ChipType.Out_8Bit + ChipType.Out_8Bit, + ChipType.Button ), CreateChipCollection("MERGE/SPLIT", ChipType.Merge_1To4Bit, From b4d5db8ca13b40e02c484470635955048e918ca9 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 19:54:42 +0200 Subject: [PATCH 046/124] Dispwitch (saves defaults) --- .../Description/Helpers/ChipTypeHelper.cs | 7 +- .../Description/Types/SubTypes/ChipTypes.cs | 1 + .../Scripts/Game/Elements/SubChipInstance.cs | 2 +- .../Game/Project/BuiltinChipCreator.cs | 21 ++ Assets/Scripts/Game/Project/Project.cs | 12 +- .../Scripts/Graphics/World/DevSceneDrawer.cs | 50 +++++ .../Scripts/SaveSystem/DescriptionCreator.cs | 3 +- Assets/Scripts/Simulation/SimChip.cs | 1 + TestData/Projects/MainTest/Chips/4sw.json | 193 ++++++++++++++++++ .../Projects/MainTest/ProjectDescription.json | 15 +- 10 files changed, 296 insertions(+), 9 deletions(-) create mode 100644 TestData/Projects/MainTest/Chips/4sw.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 07daf918..92c021cf 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -45,6 +45,7 @@ public static class ChipTypeHelper { ChipType.Out_8Bit, "OUT-8" }, { ChipType.Key, "KEY" }, { ChipType.Button, "BUTTON" }, + { ChipType.Toggle, "DIPSWITCH" }, // ---- Buses ---- { ChipType.Bus_1Bit, "BUS-1" }, @@ -115,7 +116,11 @@ public static (bool isInput, bool isOutput, PinBitCount numBits) IsInputOrOutput public static bool IsClickableDisplayType(ChipType type) { // Return true for any chiptype that is a clickable display - return type == ChipType.Button; + return type == ChipType.Button || type == ChipType.Toggle; + } + + public static bool IsInternalDataModifiable(ChipType type) { + return type == ChipType.EEPROM_256x16 || type == ChipType.Toggle; } } } \ No newline at end of file diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index d08284b4..5ffc16ee 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -40,6 +40,7 @@ public enum ChipType Key, Button, + Toggle, // ---- Buses ---- Bus_1Bit, diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index 9274ffc2..4f76381e 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -380,7 +380,7 @@ public void FlipBus() public void UpdateInternalData(uint[] data) { - if (ChipType != ChipType.EEPROM_256x16) throw new Exception("Can only update internal data of EEPROM, not " + ChipTypeHelper.GetName(ChipType)); + if (!ChipTypeHelper.IsInternalDataModifiable(ChipType)) throw new Exception("Internal Data is not modifiable for the type of chip : " + ChipTypeHelper.GetName(ChipType)); Array.Copy(data, InternalData, data.Length); } diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 4899837a..a53d8189 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -23,6 +23,7 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions() CreateInputOrOutputPin(ChipType.Out_8Bit), CreateInputKeyChip(), CreateInputButtonChip(), + CreateInputToggleChip(), // ---- Basic Chips ---- CreateNand(), @@ -174,6 +175,26 @@ static ChipDescription CreateInputButtonChip() return CreateBuiltinChipDescription(ChipType.Button, size, col, null, outputPins, displays, NameDisplayLocation.Hidden); } + static ChipDescription CreateInputToggleChip() + { + Color col = new(70, 130, 180); + Vector2 size = new Vector2(1.5f, 3f) * GridSize; + float displayWidth = size.x - GridSize * 0.5f; + + PinDescription[] outputPins = { CreatePinDescription("OUT", 0) }; + DisplayDescription[] displays = + { + new() + { + Position = Vector2.zero, + Scale = displayWidth, + SubChipID = -1 + } + }; + + return CreateBuiltinChipDescription(ChipType.Toggle, size, col, null, outputPins, displays, NameDisplayLocation.Hidden); + } + static ChipDescription CreateTristateBuffer() { diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index c346a1ac..db9336bf 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -318,7 +318,17 @@ public void NotifyButtonColourChanged(SubChipInstance buttonChip, uint colIndex) buttonChip.InternalData[0] = colIndex; } - public void DeleteChip(string chipToDeleteName) + public void NotifyToggleStateChanged(SimChip simChip) + { + bool foundChip = ViewedChip.TryGetSubChipByID(simChip.ID, out SubChipInstance instance); + if (foundChip) + { + instance.UpdateInternalData(simChip.InternalState); + } + } + + + public void DeleteChip(string chipToDeleteName) { // If the current chip only contains the deleted chip directly as a subchip, it will be removed from the sim and everything is fine. // However, if it is contained indirectly somewhere within one of the chip's subchips (or their subchips, etc), then it's a bit tricky (and diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 7d84624d..f7449431 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -7,6 +7,7 @@ using Seb.Types; using Seb.Vis; using Seb.Vis.Text.Rendering; +using UnityEditor.Presets; using UnityEngine; using static DLS.Graphics.DrawSettings; using ChipTypeHelper = DLS.Description.ChipTypeHelper; @@ -603,6 +604,10 @@ public static Bounds2D DrawClickableDisplay(DisplayInstance display, Vector2 pos (bounds, inBounds, clicked) = DrawInteractable_Button(posWorld, scaleWorld, sim); } + else if (display.DisplayType == ChipType.Toggle) + { + (bounds, inBounds, clicked) = DrawInteractable_Toggle(posWorld, scaleWorld, sim); + } if (inBounds) { @@ -640,6 +645,51 @@ public static (Bounds2D bounds, bool inBounds, bool clicked) DrawInteractable_Bu return (bounds, inBounds, pressed); } + public static (Bounds2D bounds, bool inBounds, bool clicked) DrawInteractable_Toggle(Vector2 centre, float scale, SimChip chipSource) + { + Vector2 ratio = new Vector2(1f, 2.5f); + const float switchHorizontalDrawRatio = 0.875f; + Bounds2D bounds = Bounds2D.CreateFromCentreAndSize(centre, ratio * scale); + + bool inBounds = false; + bool gettingClicked = false; + + int switchHeadPos = 1; + + if (chipSource != null) + { + inBounds = bounds.PointInBounds(InputHelper.MousePosWorld); + gettingClicked = inBounds && InputHelper.IsMouseDownThisFrame(MouseButton.Left) && controller.CanInteractWithButton; + bool currentState = (chipSource.InternalState[0] & 1) == 1 ? true : false; + bool nextState = gettingClicked ? !currentState : currentState; + chipSource.OutputPins[0].State = (uint)(nextState ? 1 : 0); + + switchHeadPos = nextState ? -1 : 1; + + if (currentState != nextState) { + chipSource.InternalState[0] = (uint)(nextState ? 1 : 0); + Project.ActiveProject.NotifyToggleStateChanged(chipSource); + } + } + + const float toggleSize = 1f; + Color col = ActiveTheme.StateDisconnectedCol; + + Vector2 toggleDrawSize = ratio * (scale * toggleSize); + Vector2 switchDrawSize = switchHorizontalDrawRatio * scale * toggleSize * Vector2.one; + Vector2 innerSwitchDrawSize = switchDrawSize * 0.775f; + + float verticalOffset = (toggleDrawSize.y / 2 - (switchDrawSize.y/switchHorizontalDrawRatio) / 2 ) * switchHeadPos ; + + + Draw.Quad(centre, toggleDrawSize, col); + Draw.Quad(centre + Vector2.up * verticalOffset, switchDrawSize, ActiveTheme.BackgroundCol); + Draw.Quad(centre + Vector2.up * verticalOffset, innerSwitchDrawSize, ActiveTheme.DevPinHandleHighlighted); + + return (bounds, inBounds, gettingClicked); + } + + public static void DrawDevPin(DevPinInstance devPin) { if (devPin.BitCount == PinBitCount.Bit1) diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index cab9af2f..a947e7d1 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -89,7 +89,8 @@ public static uint[] CreateDefaultInstanceData(ChipType type) ChipType.Key => new uint[] { 'K' }, // Key binding ChipType.Pulse => new uint[] { 50, 0, 0 }, // Pulse width, ticks remaining, input state old ChipType.DisplayLED => new uint[] { 0 }, // LED colour - ChipType.Button => new uint[] {0}, // Button colour + ChipType.Button => new uint[] { 0 }, // Button colour + ChipType.Toggle => new uint[] { 0 }, // Toggle State _ => ChipTypeHelper.IsBusType(type) ? new uint[2] : null }; } diff --git a/Assets/Scripts/Simulation/SimChip.cs b/Assets/Scripts/Simulation/SimChip.cs index 5efec7c5..73710595 100644 --- a/Assets/Scripts/Simulation/SimChip.cs +++ b/Assets/Scripts/Simulation/SimChip.cs @@ -77,6 +77,7 @@ public SimChip(ChipDescription desc, int id, uint[] internalState, SimChip[] sub InternalState[i] = BitConverter.ToUInt32(randomBytes); } } + // Load in serialized persistent state (rom data, etc.) else if (internalState is { Length: > 0 }) { diff --git a/TestData/Projects/MainTest/Chips/4sw.json b/TestData/Projects/MainTest/Chips/4sw.json new file mode 100644 index 00000000..fec40058 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/4sw.json @@ -0,0 +1,193 @@ +{ + "DLSVersion": "2.1.6", + "Name": "4sw", + "NameLocation": 2, + "ChipType": 0, + "Size": { + "x": 1.2, + "y": 0.375 + }, + "Colour": { + "r": 0.0, + "g": 0.3282586, + "b": 0.389112562, + "a": 1 + }, + "InputPins":[], + "OutputPins":[ + { + "Name":"OUT", + "ID":419497571, + "Position":{ + "x":1.5, + "y":0.375 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"DIPSWITCH", + "ID":637918487, + "Label":"A", + "Position":{ + "x":-1.72875, + "y":1.33714 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":[0] + }, + { + "Name":"DIPSWITCH", + "ID":2003682645, + "Label":"B", + "Position":{ + "x":-1.72875, + "y":0.83714 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":[0] + }, + { + "Name":"DIPSWITCH", + "ID":1080690296, + "Label":"C", + "Position":{ + "x":-1.72875, + "y":0.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":[0] + }, + { + "Name":"DIPSWITCH", + "ID":357019424, + "Label":"D", + "Position":{ + "x":-1.72875, + "y":-0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":[0] + }, + { + "Name":"1-4BIT", + "ID":1676219068, + "Label":"", + "Position":{ + "x":-0.3025, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":637918487 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1676219068 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2003682645 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1676219068 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1080690296 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":1676219068 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":357019424 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":1676219068 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1676219068 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":419497571 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays":[ + { + "SubChipID":1080690296, + "Position":{ + "x":0.12223, + "y":0.00357 + }, + "Scale":1.0 + }, + { + "SubChipID":357019424, + "Position":{ + "x":0.38054, + "y":0.0008 + }, + "Scale":1.0 + }, + { + "SubChipID":637918487, + "Position":{ + "x":-0.37777, + "y":0.0008 + }, + "Scale":0.9999999 + }, + { + "SubChipID":2003682645, + "Position":{ + "x":-0.1222, + "y":-0.00203 + }, + "Scale":1.0 + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index fb239679..072835a1 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,14 +3,14 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-22T13:07:20.823+02:00", + "LastSaveTime": "2025-05-22T19:48:34.463+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, + "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 150, + "Prefs_SimTargetStepsPerSecond": 100, "Prefs_SimStepsPerClockTick": 6, "AllCustomChipNames":[ "AND", @@ -65,7 +65,8 @@ "BuzzTest", "EEPROM_test", "BUTTON_test", - "BUTTON_test2" + "BUTTON_test2", + "4sw" ], "StarredList":[ { @@ -111,6 +112,10 @@ { "Name":"BUTTON_test2", "IsCollection":false + }, + { + "Name":"4sw", + "IsCollection":false } ], "ChipCollections":[ @@ -155,7 +160,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw"], "IsToggledOpen":true, "Name":"OTHER" } From 5a581e7f239f275eb5035c4f98f0aaf3ea7416c7 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 20:18:25 +0200 Subject: [PATCH 047/124] Change appearance of the dipswitch. --- .../Game/Project/BuiltinChipCreator.cs | 4 +- .../Scripts/Graphics/World/DevSceneDrawer.cs | 42 +++++++++++-------- TestData/Projects/MainTest/Chips/4sw.json | 30 ++++++------- .../Projects/MainTest/ProjectDescription.json | 2 +- 4 files changed, 43 insertions(+), 35 deletions(-) diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index a53d8189..5e22d144 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -178,8 +178,8 @@ static ChipDescription CreateInputButtonChip() static ChipDescription CreateInputToggleChip() { Color col = new(70, 130, 180); - Vector2 size = new Vector2(1.5f, 3f) * GridSize; - float displayWidth = size.x - GridSize * 0.5f; + Vector2 size = new Vector2(1f, 2f) * GridSize; + float displayWidth = size.x; PinDescription[] outputPins = { CreatePinDescription("OUT", 0) }; DisplayDescription[] displays = diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index f7449431..09ee06a4 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -647,46 +647,54 @@ public static (Bounds2D bounds, bool inBounds, bool clicked) DrawInteractable_Bu public static (Bounds2D bounds, bool inBounds, bool clicked) DrawInteractable_Toggle(Vector2 centre, float scale, SimChip chipSource) { - Vector2 ratio = new Vector2(1f, 2.5f); - const float switchHorizontalDrawRatio = 0.875f; - Bounds2D bounds = Bounds2D.CreateFromCentreAndSize(centre, ratio * scale); + + Vector2 ratio = new Vector2(1f, 2f); + Bounds2D wholeBounds = Bounds2D.CreateFromCentreAndSize(centre, ratio * scale); + + const float switchHorizontalDrawRatio = 0.875f; bool inBounds = false; bool gettingClicked = false; - int switchHeadPos = 1; + int currentSwitchHeadPos = 1; + int nextSwitchHeadPos = 1; + + + const float toggleSize = 1f; + Color col = ActiveTheme.StateDisconnectedCol; + + Vector2 toggleDrawSize = ratio * (scale * toggleSize); + Vector2 switchDrawSize = switchHorizontalDrawRatio * scale * toggleSize * Vector2.one; + Vector2 innerSwitchDrawSize = switchDrawSize * 0.775f; + + float verticalOffset = (toggleDrawSize.y / 2 - (switchDrawSize.y / switchHorizontalDrawRatio) / 2); + if (chipSource != null) { + bool currentState = (chipSource.InternalState[0] & 1) == 1 ? true : false; + Bounds2D bounds = Bounds2D.CreateFromCentreAndSize(centre + Vector2.up * verticalOffset, switchDrawSize); inBounds = bounds.PointInBounds(InputHelper.MousePosWorld); gettingClicked = inBounds && InputHelper.IsMouseDownThisFrame(MouseButton.Left) && controller.CanInteractWithButton; - bool currentState = (chipSource.InternalState[0] & 1) == 1 ? true : false; bool nextState = gettingClicked ? !currentState : currentState; chipSource.OutputPins[0].State = (uint)(nextState ? 1 : 0); - switchHeadPos = nextState ? -1 : 1; + currentSwitchHeadPos = currentState ? -1 : 1; + nextSwitchHeadPos = nextState ? -1 : 1; if (currentState != nextState) { chipSource.InternalState[0] = (uint)(nextState ? 1 : 0); Project.ActiveProject.NotifyToggleStateChanged(chipSource); } } - - const float toggleSize = 1f; - Color col = ActiveTheme.StateDisconnectedCol; - - Vector2 toggleDrawSize = ratio * (scale * toggleSize); - Vector2 switchDrawSize = switchHorizontalDrawRatio * scale * toggleSize * Vector2.one; - Vector2 innerSwitchDrawSize = switchDrawSize * 0.775f; - - float verticalOffset = (toggleDrawSize.y / 2 - (switchDrawSize.y/switchHorizontalDrawRatio) / 2 ) * switchHeadPos ; - + verticalOffset *= nextSwitchHeadPos; Draw.Quad(centre, toggleDrawSize, col); Draw.Quad(centre + Vector2.up * verticalOffset, switchDrawSize, ActiveTheme.BackgroundCol); Draw.Quad(centre + Vector2.up * verticalOffset, innerSwitchDrawSize, ActiveTheme.DevPinHandleHighlighted); - return (bounds, inBounds, gettingClicked); + + return (wholeBounds, inBounds, gettingClicked); } diff --git a/TestData/Projects/MainTest/Chips/4sw.json b/TestData/Projects/MainTest/Chips/4sw.json index fec40058..afd17233 100644 --- a/TestData/Projects/MainTest/Chips/4sw.json +++ b/TestData/Projects/MainTest/Chips/4sw.json @@ -4,7 +4,7 @@ "NameLocation": 2, "ChipType": 0, "Size": { - "x": 1.2, + "x": 0.95, "y": 0.375 }, "Colour": { @@ -158,34 +158,34 @@ ], "Displays":[ { - "SubChipID":1080690296, + "SubChipID":2003682645, "Position":{ - "x":0.12223, - "y":0.00357 + "x":-0.125, + "y":0.0 }, "Scale":1.0 }, { - "SubChipID":357019424, + "SubChipID":637918487, "Position":{ - "x":0.38054, - "y":0.0008 + "x":-0.375, + "y":0.0 }, - "Scale":1.0 + "Scale":0.9999999 }, { - "SubChipID":637918487, + "SubChipID":1080690296, "Position":{ - "x":-0.37777, - "y":0.0008 + "x":0.125, + "y":0.0 }, - "Scale":0.9999999 + "Scale":1.0 }, { - "SubChipID":2003682645, + "SubChipID":357019424, "Position":{ - "x":-0.1222, - "y":-0.00203 + "x":0.375, + "y":0.0 }, "Scale":1.0 } diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 072835a1..70bf60bc 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-22T19:48:34.463+02:00", + "LastSaveTime": "2025-05-22T20:14:37.921+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, From 0938f513e38319726a0b4b68ca254801a9850cbd Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 21:48:47 +0200 Subject: [PATCH 048/124] Ready Build --- .../Scripts/Graphics/World/DevSceneDrawer.cs | 1 - Assets/Scripts/Seb/Helpers/TypeHelper.cs | 1 - Assets/Settings.meta | 8 ++++ Assets/Settings/Build Profiles.meta | 8 ++++ .../Build Profiles/New Linux Profile.asset | 42 +++++++++++++++++++ .../New Linux Profile.asset.meta | 8 ++++ Packages/manifest.json | 1 + Packages/packages-lock.json | 10 +++++ ProjectSettings/ProjectSettings.asset | 10 ++--- 9 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 Assets/Settings.meta create mode 100644 Assets/Settings/Build Profiles.meta create mode 100644 Assets/Settings/Build Profiles/New Linux Profile.asset create mode 100644 Assets/Settings/Build Profiles/New Linux Profile.asset.meta diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 09ee06a4..9e3d6795 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -7,7 +7,6 @@ using Seb.Types; using Seb.Vis; using Seb.Vis.Text.Rendering; -using UnityEditor.Presets; using UnityEngine; using static DLS.Graphics.DrawSettings; using ChipTypeHelper = DLS.Description.ChipTypeHelper; diff --git a/Assets/Scripts/Seb/Helpers/TypeHelper.cs b/Assets/Scripts/Seb/Helpers/TypeHelper.cs index 199c2fbf..61ad748b 100644 --- a/Assets/Scripts/Seb/Helpers/TypeHelper.cs +++ b/Assets/Scripts/Seb/Helpers/TypeHelper.cs @@ -1,5 +1,4 @@ using System.Numerics; -using UnityEditor.PackageManager; using UnityEngine; namespace Seb.Helpers diff --git a/Assets/Settings.meta b/Assets/Settings.meta new file mode 100644 index 00000000..fdd88cac --- /dev/null +++ b/Assets/Settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6d0353d1576e9154f973793f7bc4308b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/Build Profiles.meta b/Assets/Settings/Build Profiles.meta new file mode 100644 index 00000000..5b4e1f70 --- /dev/null +++ b/Assets/Settings/Build Profiles.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f0ee81e026d8b74cad1e5add1f651ea +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/Build Profiles/New Linux Profile.asset b/Assets/Settings/Build Profiles/New Linux Profile.asset new file mode 100644 index 00000000..f5d1a384 --- /dev/null +++ b/Assets/Settings/Build Profiles/New Linux Profile.asset @@ -0,0 +1,42 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 15003, guid: 0000000000000000e000000000000000, type: 0} + m_Name: New Linux Profile + m_EditorClassIdentifier: + m_AssetVersion: 1 + m_BuildTarget: 24 + m_Subtarget: 2 + m_PlatformId: cb423bfea44b4d658edb8bc5d91a3024 + m_PlatformBuildProfile: + rid: 9124197694904729793 + m_OverrideGlobalSceneList: 0 + m_Scenes: [] + m_ScriptingDefines: [] + m_PlayerSettingsYaml: + m_Settings: [] + references: + version: 2 + RefIds: + - rid: 9124197694904729793 + type: {class: LinuxPlatformSettings, ns: UnityEditor.LinuxStandalone, asm: UnityEditor.LinuxStandalone.Extensions} + data: + m_Development: 0 + m_ConnectProfiler: 0 + m_BuildWithDeepProfilingSupport: 0 + m_AllowDebugging: 0 + m_WaitForManagedDebugger: 0 + m_ManagedDebuggerFixedPort: 0 + m_ExplicitNullChecks: 0 + m_ExplicitDivideByZeroChecks: 0 + m_ExplicitArrayBoundsChecks: 0 + m_CompressionType: 0 + m_InstallInBuildFolder: 0 diff --git a/Assets/Settings/Build Profiles/New Linux Profile.asset.meta b/Assets/Settings/Build Profiles/New Linux Profile.asset.meta new file mode 100644 index 00000000..311584b4 --- /dev/null +++ b/Assets/Settings/Build Profiles/New Linux Profile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eafbc780aff4acd48ad4824cd8063138 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index fe5629cb..7fa98e9f 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -2,6 +2,7 @@ "dependencies": { "com.unity.ide.rider": "3.0.36", "com.unity.ide.visualstudio": "2.0.23", + "com.unity.toolchain.linux-x86_64": "2.0.10", "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", "com.unity.modules.accessibility": "1.0.0", "com.unity.modules.assetbundle": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index b62ca8b2..0507288a 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -50,6 +50,16 @@ "com.unity.modules.jsonserialize": "1.0.0" } }, + "com.unity.toolchain.linux-x86_64": { + "version": "2.0.10", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.sysroot": "2.0.10", + "com.unity.sysroot.linux-x86_64": "2.0.9" + }, + "url": "https://packages.unity.com" + }, "com.unity.toolchain.win-x86_64-linux-x86_64": { "version": "2.0.10", "depth": 0, diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 8908a3b3..9a58c4fb 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -718,11 +718,11 @@ PlayerSettings: additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: - Standalone: 0 + Standalone: 1 il2cppCompilerConfiguration: Standalone: 1 il2cppCodeGeneration: - Standalone: 1 + Standalone: 0 il2cppStacktraceInformation: {} managedStrippingLevel: EmbeddedLinux: 1 @@ -751,8 +751,8 @@ PlayerSettings: editorAssembliesCompatibilityLevel: 1 m_RenderingPath: 1 m_MobileRenderingPath: 1 - metroPackageName: 2D_BuiltInRenderer - metroPackageVersion: + metroPackageName: 2DBuiltInRenderer + metroPackageVersion: 1.0.0.0 metroCertificatePath: metroCertificatePassword: metroCertificateSubject: @@ -760,7 +760,7 @@ PlayerSettings: metroCertificateNotAfter: 0000000000000000 metroApplicationDescription: 2D_BuiltInRenderer wsaImages: {} - metroTileShortName: + metroTileShortName: Digital-Logic-Sim metroTileShowName: 0 metroMediumTileShowName: 0 metroLargeTileShowName: 0 From 76ed4235bca3584fe5a83cea8b139d30c3897660 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 22:10:41 +0200 Subject: [PATCH 049/124] ROM fix didn't properly test earlier --- Assets/Scripts/Simulation/Simulator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 92e17c39..e47d1010 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -493,7 +493,7 @@ static void ProcessBuiltinChip(SimChip chip) case ChipType.Rom_256x16: { const int ByteMask = 0b11111111; - uint address = PinState.GetBitStates(chip.InputPins[3].State); + uint address = PinState.GetBitStates(chip.InputPins[0].State); uint data = chip.InternalState[address]; chip.OutputPins[0].State = (ushort)((data >> 8) & ByteMask); chip.OutputPins[1].State = (ushort)(data & ByteMask); From 275adfc54fc24bdbff40c2b216151abb79fb63f9 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 22 May 2025 22:26:09 +0200 Subject: [PATCH 050/124] Fix Dipswitch Yay ! --- Assets/Scripts/Graphics/World/DevSceneDrawer.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 9e3d6795..596f00c3 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -671,14 +671,15 @@ public static (Bounds2D bounds, bool inBounds, bool clicked) DrawInteractable_To if (chipSource != null) { - bool currentState = (chipSource.InternalState[0] & 1) == 1 ? true : false; - Bounds2D bounds = Bounds2D.CreateFromCentreAndSize(centre + Vector2.up * verticalOffset, switchDrawSize); + bool currentState = (chipSource.InternalState[0] & 1) == 1 ? true : false; + currentSwitchHeadPos = currentState ? -1 : 1; + Bounds2D bounds = Bounds2D.CreateFromCentreAndSize(centre + Vector2.up * verticalOffset * currentSwitchHeadPos, switchDrawSize); inBounds = bounds.PointInBounds(InputHelper.MousePosWorld); gettingClicked = inBounds && InputHelper.IsMouseDownThisFrame(MouseButton.Left) && controller.CanInteractWithButton; bool nextState = gettingClicked ? !currentState : currentState; chipSource.OutputPins[0].State = (uint)(nextState ? 1 : 0); - currentSwitchHeadPos = currentState ? -1 : 1; + nextSwitchHeadPos = nextState ? -1 : 1; if (currentState != nextState) { From f301968ea119afadb2790b1e7b9c0ada3a2b5c24 Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Fri, 23 May 2025 22:00:07 +0700 Subject: [PATCH 051/124] Add RTC --- .vscode/extensions.json | 5 + .vscode/launch.json | 10 ++ .vscode/settings.json | 70 +++++++++ .../Description/Helpers/ChipTypeHelper.cs | 3 + .../Description/Types/SubTypes/ChipTypes.cs | 5 +- .../Game/Project/BuiltinChipCreator.cs | 22 ++- Assets/Scripts/Simulation/Simulator.cs | 10 ++ ProjectSettings/ProjectVersion.txt | 4 +- .../Projects/MainTest/Chips/BuzzTest.json | 2 +- TestData/Projects/MainTest/Chips/RTCTest.json | 135 ++++++++++++++++++ .../Projects/MainTest/ProjectDescription.json | 15 +- 11 files changed, 271 insertions(+), 10 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 TestData/Projects/MainTest/Chips/RTCTest.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..ddb6ff85 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "visualstudiotoolsforunity.vstuc" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..da60e25a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,10 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Unity", + "type": "vstuc", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..12dd4d4f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,70 @@ +{ + "files.exclude": { + "**/.DS_Store": true, + "**/.git": true, + "**/.vs": true, + "**/.gitmodules": true, + "**/.vsconfig": true, + "**/*.booproj": true, + "**/*.pidb": true, + "**/*.suo": true, + "**/*.user": true, + "**/*.userprefs": true, + "**/*.unityproj": true, + "**/*.dll": true, + "**/*.exe": true, + "**/*.pdf": true, + "**/*.mid": true, + "**/*.midi": true, + "**/*.wav": true, + "**/*.gif": true, + "**/*.ico": true, + "**/*.jpg": true, + "**/*.jpeg": true, + "**/*.png": true, + "**/*.psd": true, + "**/*.tga": true, + "**/*.tif": true, + "**/*.tiff": true, + "**/*.3ds": true, + "**/*.3DS": true, + "**/*.fbx": true, + "**/*.FBX": true, + "**/*.lxo": true, + "**/*.LXO": true, + "**/*.ma": true, + "**/*.MA": true, + "**/*.obj": true, + "**/*.OBJ": true, + "**/*.asset": true, + "**/*.cubemap": true, + "**/*.flare": true, + "**/*.mat": true, + "**/*.meta": true, + "**/*.prefab": true, + "**/*.unity": true, + "build/": true, + "Build/": true, + "Library/": true, + "library/": true, + "obj/": true, + "Obj/": true, + "Logs/": true, + "logs/": true, + "ProjectSettings/": true, + "UserSettings/": true, + "temp/": true, + "Temp/": true + }, + "files.associations": { + "*.asset": "yaml", + "*.meta": "yaml", + "*.prefab": "yaml", + "*.unity": "yaml", + }, + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "*.sln": "*.csproj", + }, + "dotnet.defaultSolution": "Digital-Logic-Sim.sln" +} \ No newline at end of file diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 3d1e60d0..e8c027fd 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using UnityEngine.TextCore.Text; namespace DLS.Description { @@ -33,6 +34,8 @@ public static class ChipTypeHelper { ChipType.Buzzer, "BUZZER" }, + { ChipType.RTC, "RTC" }, + // ---- Not really chips (but convenient to treat them as such anyway) ---- // ---- Inputs/Outputs ---- diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index 610f0298..a61f01c0 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -47,7 +47,10 @@ public enum ChipType BusTerminus_8Bit, // ---- Audio ---- - Buzzer + Buzzer, + + // ---- Time ---- + RTC, } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index c757f1e1..42b3f243 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -51,7 +51,9 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions() CreateBus(PinBitCount.Bit8), CreateBusTerminus(PinBitCount.Bit8), // ---- Audio ---- - CreateBuzzer() + CreateBuzzer(), + // ---- Time ---- + CreateRTC(), }; } @@ -82,6 +84,24 @@ static ChipDescription CreateBuzzer() return CreateBuiltinChipDescription(ChipType.Buzzer, size, col, inputPins, null, null); } + static ChipDescription CreateRTC() + { + Color col = new(0.4f, 0.4f, 0.4f); + + PinDescription[] outputPins = + { + CreatePinDescription("D", 3, PinBitCount.Bit8), + CreatePinDescription("C", 2, PinBitCount.Bit8), + CreatePinDescription("B", 1, PinBitCount.Bit8), + CreatePinDescription("A", 0, PinBitCount.Bit8), + }; + + float height = SubChipInstance.MinChipHeightForPins(outputPins, null); + Vector2 size = new(CalculateGridSnappedWidth(GridSize * 9), height); + + return CreateBuiltinChipDescription(ChipType.RTC, size, col, null, outputPins); + } + static ChipDescription dev_CreateRAM_8() { Color col = new(0.85f, 0.45f, 0.3f); diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 1d777628..323f51cb 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -506,6 +506,16 @@ static void ProcessBuiltinChip(SimChip chip) audioState.RegisterNote(freqIndex, (uint)volumeIndex); break; } + case ChipType.RTC: + { + const uint ByteMask = 0b11111111; + int unixTime = (int) DateTimeOffset.UtcNow.ToUnixTimeSeconds(); + chip.OutputPins[0].State = (ushort)((unixTime >> 24) & ByteMask); + chip.OutputPins[1].State = (ushort)((unixTime >> 16) & ByteMask); + chip.OutputPins[2].State = (ushort)((unixTime >> 8) & ByteMask); + chip.OutputPins[3].State = (ushort)(unixTime & ByteMask); + break; + } // ---- Bus types ---- default: { diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 8678d93f..7a12cc2b 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 6000.0.46f1 -m_EditorVersionWithRevision: 6000.0.46f1 (fb93bc360d3a) +m_EditorVersion: 6000.0.49f1 +m_EditorVersionWithRevision: 6000.0.49f1 (840e0a9776d9) diff --git a/TestData/Projects/MainTest/Chips/BuzzTest.json b/TestData/Projects/MainTest/Chips/BuzzTest.json index 40fc6f42..17d284ca 100644 --- a/TestData/Projects/MainTest/Chips/BuzzTest.json +++ b/TestData/Projects/MainTest/Chips/BuzzTest.json @@ -1,5 +1,5 @@ { - "DLSVersion": "2.1.5", + "DLSVersion": "2.1.6", "Name": "BuzzTest", "NameLocation": 0, "ChipType": 0, diff --git a/TestData/Projects/MainTest/Chips/RTCTest.json b/TestData/Projects/MainTest/Chips/RTCTest.json new file mode 100644 index 00000000..93127ad3 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/RTCTest.json @@ -0,0 +1,135 @@ +{ + "DLSVersion": "2.1.6", + "Name": "RTCTest", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.175, + "y": 2.0 + }, + "Colour": { + "r": 0.8187522, + "g": 0.385453254, + "b": 0.334759057, + "a": 1 + }, + "InputPins":[], + "OutputPins":[ + { + "Name":"OUT", + "ID":1492030497, + "Position":{ + "x":1.25, + "y":1.0 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"OUT", + "ID":900692905, + "Position":{ + "x":1.25, + "y":0.5 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"OUT", + "ID":1767071873, + "Position":{ + "x":1.25, + "y":0.0 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"OUT", + "ID":1820587991, + "Position":{ + "x":1.25, + "y":-0.5 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + } + ], + "SubChips":[ + { + "Name":"RTC", + "ID":2097162199, + "Label":"", + "Position":{ + "x":-1.0, + "y":0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":0}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":2097162199 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1492030497 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":2097162199 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":900692905 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":2097162199 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1767071873 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":2097162199 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1820587991 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 6d1823ff..46922961 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -1,9 +1,9 @@ { "ProjectName": "MainTest", - "DLSVersion_LastSaved": "2.1.5", + "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", - "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-04T09:15:41.061+02:00", + "CreationTime": "2025-03-15T00:23:30.404+07:00", + "LastSaveTime": "2025-05-23T21:42:49.409+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -62,7 +62,8 @@ "RAM-sync", "TEST MergeSplit", "#", - "BuzzTest" + "BuzzTest", + "RTCTest" ], "StarredList":[ { @@ -96,6 +97,10 @@ { "Name":"BuzzTest", "IsCollection":false + }, + { + "Name":"RTCTest", + "IsCollection":false } ], "ChipCollections":[ @@ -140,7 +145,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","RTC","#","BuzzTest"], "IsToggledOpen":true, "Name":"OTHER" } From 385693d0da452408adbce87637357a5e11074411 Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Sat, 24 May 2025 16:43:36 +0700 Subject: [PATCH 052/124] Initial commit for SPS chip --- .vscode/extensions.json | 5 + .vscode/launch.json | 10 + .vscode/settings.json | 70 +++++++ Assets/Build/DLS.unity | 2 +- .../Description/Helpers/ChipTypeHelper.cs | 2 + .../Description/Types/SubTypes/ChipTypes.cs | 4 +- .../Game/Project/BuiltinChipCreator.cs | 23 ++- Assets/Scripts/Simulation/Simulator.cs | 16 ++ ProjectSettings/ProjectVersion.txt | 4 +- TestData/Projects/MainTest/Chips/SPSTest.json | 185 ++++++++++++++++++ .../Projects/MainTest/ProjectDescription.json | 25 ++- 11 files changed, 331 insertions(+), 15 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 TestData/Projects/MainTest/Chips/SPSTest.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..ddb6ff85 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "visualstudiotoolsforunity.vstuc" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..da60e25a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,10 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Unity", + "type": "vstuc", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..12dd4d4f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,70 @@ +{ + "files.exclude": { + "**/.DS_Store": true, + "**/.git": true, + "**/.vs": true, + "**/.gitmodules": true, + "**/.vsconfig": true, + "**/*.booproj": true, + "**/*.pidb": true, + "**/*.suo": true, + "**/*.user": true, + "**/*.userprefs": true, + "**/*.unityproj": true, + "**/*.dll": true, + "**/*.exe": true, + "**/*.pdf": true, + "**/*.mid": true, + "**/*.midi": true, + "**/*.wav": true, + "**/*.gif": true, + "**/*.ico": true, + "**/*.jpg": true, + "**/*.jpeg": true, + "**/*.png": true, + "**/*.psd": true, + "**/*.tga": true, + "**/*.tif": true, + "**/*.tiff": true, + "**/*.3ds": true, + "**/*.3DS": true, + "**/*.fbx": true, + "**/*.FBX": true, + "**/*.lxo": true, + "**/*.LXO": true, + "**/*.ma": true, + "**/*.MA": true, + "**/*.obj": true, + "**/*.OBJ": true, + "**/*.asset": true, + "**/*.cubemap": true, + "**/*.flare": true, + "**/*.mat": true, + "**/*.meta": true, + "**/*.prefab": true, + "**/*.unity": true, + "build/": true, + "Build/": true, + "Library/": true, + "library/": true, + "obj/": true, + "Obj/": true, + "Logs/": true, + "logs/": true, + "ProjectSettings/": true, + "UserSettings/": true, + "temp/": true, + "Temp/": true + }, + "files.associations": { + "*.asset": "yaml", + "*.meta": "yaml", + "*.prefab": "yaml", + "*.unity": "yaml", + }, + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "*.sln": "*.csproj", + }, + "dotnet.defaultSolution": "Digital-Logic-Sim.sln" +} \ No newline at end of file diff --git a/Assets/Build/DLS.unity b/Assets/Build/DLS.unity index 209cbc4f..677f1b78 100644 --- a/Assets/Build/DLS.unity +++ b/Assets/Build/DLS.unity @@ -244,7 +244,7 @@ MonoBehaviour: openInMainMenu: 0 testProjectName: MainTest openA: 1 - chipToOpenA: BuzzTest + chipToOpenA: SPSTest chipToOpenB: TEST MergeSplit testVecA: {x: 100, y: 0.5333334} testVecB: {x: 1.71, y: 0.0025} diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 3d1e60d0..2c5ae88e 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -33,6 +33,8 @@ public static class ChipTypeHelper { ChipType.Buzzer, "BUZZER" }, + { ChipType.SPS, "SPS" }, + // ---- Not really chips (but convenient to treat them as such anyway) ---- // ---- Inputs/Outputs ---- diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index 610f0298..5ca6b5cf 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -47,7 +47,9 @@ public enum ChipType BusTerminus_8Bit, // ---- Audio ---- - Buzzer + Buzzer, + // ---- Clock ---- + SPS, } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index c757f1e1..17563e52 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -51,7 +51,9 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions() CreateBus(PinBitCount.Bit8), CreateBusTerminus(PinBitCount.Bit8), // ---- Audio ---- - CreateBuzzer() + CreateBuzzer(), + // ---- Clock ---- + CreateSPSChip(), }; } @@ -81,6 +83,25 @@ static ChipDescription CreateBuzzer() return CreateBuiltinChipDescription(ChipType.Buzzer, size, col, inputPins, null, null); } + static ChipDescription CreateSPSChip() + { + Color col = new(0.4f, 0.3f, 0.3f); + + PinDescription[] outputPins = + { + CreatePinDescription("CLOCK_B", 5, PinBitCount.Bit8), + CreatePinDescription("CLOCK_A", 4, PinBitCount.Bit8), + CreatePinDescription("SPS_B", 3, PinBitCount.Bit8), + CreatePinDescription("SPS_A", 2, PinBitCount.Bit8), + CreatePinDescription("CLOCK_CARRY", 1, PinBitCount.Bit1), + CreatePinDescription("SPS_CARRY", 0, PinBitCount.Bit1), + }; + + float height = SubChipInstance.MinChipHeightForPins(outputPins, null); + Vector2 size = new(CalculateGridSnappedWidth(GridSize * 9), height); + + return CreateBuiltinChipDescription(ChipType.SPS, size, col, null, outputPins); + } static ChipDescription dev_CreateRAM_8() { diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 1d777628..597b8385 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Concurrent; using System.Diagnostics; +using UnityEngine; using DLS.Description; using DLS.Game; using Random = System.Random; @@ -506,6 +507,21 @@ static void ProcessBuiltinChip(SimChip chip) audioState.RegisterNote(freqIndex, (uint)volumeIndex); break; } + case ChipType.SPS: + { + const int ByteMask = 0b11111111; + double tps = Project.ActiveProject.simAvgTicksPerSec; + ushort sps = (ushort)tps; + ushort spc = (ushort)stepsPerClockTransition; + + PinState.Set(ref chip.OutputPins[0].State, tps >= 65536 ? PinState.LogicHigh : PinState.LogicLow); + PinState.Set(ref chip.OutputPins[1].State, stepsPerClockTransition > 65535 ? PinState.LogicHigh : PinState.LogicLow); + chip.OutputPins[2].State = (ushort)((sps >> 8) & ByteMask); + chip.OutputPins[3].State = (ushort)(sps & ByteMask); + chip.OutputPins[4].State = (ushort)((spc >> 8) & ByteMask); + chip.OutputPins[5].State = (ushort)(spc & ByteMask); + break; + } // ---- Bus types ---- default: { diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 8678d93f..7a12cc2b 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 6000.0.46f1 -m_EditorVersionWithRevision: 6000.0.46f1 (fb93bc360d3a) +m_EditorVersion: 6000.0.49f1 +m_EditorVersionWithRevision: 6000.0.49f1 (840e0a9776d9) diff --git a/TestData/Projects/MainTest/Chips/SPSTest.json b/TestData/Projects/MainTest/Chips/SPSTest.json new file mode 100644 index 00000000..487c93c4 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/SPSTest.json @@ -0,0 +1,185 @@ +{ + "DLSVersion": "2.1.6", + "Name": "SPSTest", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.175, + "y": 2.5 + }, + "Colour": { + "r": 0.376221627, + "g": 0.949174643, + "b": 0.4645198, + "a": 1 + }, + "InputPins":[], + "OutputPins":[ + { + "Name":"OUT", + "ID":908310544, + "Position":{ + "x":1.125, + "y":1.1875 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"OUT", + "ID":86585601, + "Position":{ + "x":1.125, + "y":0.6875 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"OUT", + "ID":1415148896, + "Position":{ + "x":1.125, + "y":0.1875 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"OUT", + "ID":405999015, + "Position":{ + "x":1.125, + "y":-0.3125 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":1 + }, + { + "Name":"OUT", + "ID":917260170, + "Position":{ + "x":1.125, + "y":-0.8125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":2003410447, + "Position":{ + "x":1.125, + "y":-1.3125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"SPS", + "ID":1380022051, + "Label":"", + "Position":{ + "x":-1.375, + "y":0.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":0}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":5, + "PinOwnerID":1380022051 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":908310544 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1380022051 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":86585601 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":1380022051 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1415148896 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1380022051 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":405999015 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1380022051 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":917260170 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1380022051 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2003410447 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 6d1823ff..7a48f8a3 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -1,9 +1,9 @@ { "ProjectName": "MainTest", - "DLSVersion_LastSaved": "2.1.5", + "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", - "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-04T09:15:41.061+02:00", + "CreationTime": "2025-03-15T00:23:30.404+07:00", + "LastSaveTime": "2025-05-24T16:34:46.079+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -62,7 +62,8 @@ "RAM-sync", "TEST MergeSplit", "#", - "BuzzTest" + "BuzzTest", + "SPSTest" ], "StarredList":[ { @@ -96,27 +97,31 @@ { "Name":"BuzzTest", "IsCollection":false + }, + { + "Name":"SPSTest", + "IsCollection":false } ], "ChipCollections":[ { "Chips":["NAND","AND","NOT","NOR","XOR","OR","KEY","CLOCK","3-STATE BUFFER"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"BASICS" }, { "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"IN/OUT" }, { "Chips":["1-4BIT","1-8BIT","4-8BIT","8-4BIT","8-1BIT","4-1BIT"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"MERGE/SPLIT" }, { "Chips":["7-SEGMENT","DECIMAL-4","DECIMAL-8","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"DISPLAY" }, { @@ -131,7 +136,7 @@ }, { "Chips":["D-LATCH","FLIP-FLOP","OR-8","MEM-1","NOT-8","AND(8,1)","MUX-8","PC","BUF-8","ALU-8","DECODE-3","AND-3","CONTROL UNIT","TOGGLE","FLAGS","DISP-7","demo","7-SEGMENT DRIVER","DABBLE","LSB","LSHIFT-8","DOUBLE DABBLE","ALU","BUS BUFFER","MEM-256","REGISTER-8","XNOR","EQUALS-8","ADDER-4","DECODER-2","ADDER-8","ADDER","MEM-16","REGISTER-1","AND-8","RAM-256×8 (async)","ROM 256×16"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"KEEP" }, { @@ -140,7 +145,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest"], "IsToggledOpen":true, "Name":"OTHER" } From 556a0f85adea187d3af0e6d18d441fc1123fef1d Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Sat, 24 May 2025 18:11:17 +0700 Subject: [PATCH 053/124] Fix SPS count --- .../Game/Project/BuiltinChipCreator.cs | 16 +++-- Assets/Scripts/Simulation/Simulator.cs | 17 +++-- TestData/Projects/MainTest/Chips/SPSTest.json | 66 ++++++++++++++++--- .../Projects/MainTest/ProjectDescription.json | 2 +- 4 files changed, 78 insertions(+), 23 deletions(-) diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 17563e52..7246cf6a 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -89,14 +89,16 @@ static ChipDescription CreateSPSChip() PinDescription[] outputPins = { - CreatePinDescription("CLOCK_B", 5, PinBitCount.Bit8), - CreatePinDescription("CLOCK_A", 4, PinBitCount.Bit8), - CreatePinDescription("SPS_B", 3, PinBitCount.Bit8), - CreatePinDescription("SPS_A", 2, PinBitCount.Bit8), - CreatePinDescription("CLOCK_CARRY", 1, PinBitCount.Bit1), - CreatePinDescription("SPS_CARRY", 0, PinBitCount.Bit1), + CreatePinDescription("SPC_B", 7, PinBitCount.Bit8), + CreatePinDescription("SPC_A", 6, PinBitCount.Bit8), + CreatePinDescription("SPS_B", 5, PinBitCount.Bit8), + CreatePinDescription("SPS_A", 4, PinBitCount.Bit8), + CreatePinDescription("CLOCK_B", 3, PinBitCount.Bit8), + CreatePinDescription("CLOCK_A", 2, PinBitCount.Bit8), + CreatePinDescription("CLOCK_OVERFLOW", 1, PinBitCount.Bit1), + CreatePinDescription("SPS_OVERFLOW", 0, PinBitCount.Bit1), }; - + float height = SubChipInstance.MinChipHeightForPins(outputPins, null); Vector2 size = new(CalculateGridSnappedWidth(GridSize * 9), height); diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 597b8385..54c47f86 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -513,13 +513,16 @@ static void ProcessBuiltinChip(SimChip chip) double tps = Project.ActiveProject.simAvgTicksPerSec; ushort sps = (ushort)tps; ushort spc = (ushort)stepsPerClockTransition; - - PinState.Set(ref chip.OutputPins[0].State, tps >= 65536 ? PinState.LogicHigh : PinState.LogicLow); - PinState.Set(ref chip.OutputPins[1].State, stepsPerClockTransition > 65535 ? PinState.LogicHigh : PinState.LogicLow); - chip.OutputPins[2].State = (ushort)((sps >> 8) & ByteMask); - chip.OutputPins[3].State = (ushort)(sps & ByteMask); - chip.OutputPins[4].State = (ushort)((spc >> 8) & ByteMask); - chip.OutputPins[5].State = (ushort)(spc & ByteMask); + ushort srpc /* stands for steps ran per clock */ = (ushort)(sps / spc); + + PinState.Set(ref chip.OutputPins[7].State, tps >= 65536 ? PinState.LogicHigh : PinState.LogicLow); + PinState.Set(ref chip.OutputPins[6].State, stepsPerClockTransition > 65535 ? PinState.LogicHigh : PinState.LogicLow); + chip.OutputPins[5].State = (ushort)((sps >> 8) & ByteMask); + chip.OutputPins[4].State = (ushort)(sps & ByteMask); + chip.OutputPins[3].State = (ushort)((spc >> 8) & ByteMask); + chip.OutputPins[2].State = (ushort)(spc & ByteMask); + chip.OutputPins[0].State = (ushort)((srpc >> 8) & ByteMask); + chip.OutputPins[1].State = (ushort)(srpc & ByteMask); break; } // ---- Bus types ---- diff --git a/TestData/Projects/MainTest/Chips/SPSTest.json b/TestData/Projects/MainTest/Chips/SPSTest.json index 487c93c4..0eed6020 100644 --- a/TestData/Projects/MainTest/Chips/SPSTest.json +++ b/TestData/Projects/MainTest/Chips/SPSTest.json @@ -5,7 +5,7 @@ "ChipType": 0, "Size": { "x": 1.175, - "y": 2.5 + "y": 3.5 }, "Colour": { "r": 0.376221627, @@ -17,13 +17,35 @@ "OutputPins":[ { "Name":"OUT", - "ID":908310544, + "ID":1439843563, + "Position":{ + "x":1.125, + "y":1.6875 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":1323112485, "Position":{ "x":1.125, "y":1.1875 }, "BitCount":8, "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":908310544, + "Position":{ + "x":1.125, + "y":0.6875 + }, + "BitCount":8, + "Colour":0, "ValueDisplayMode":1 }, { @@ -31,7 +53,7 @@ "ID":86585601, "Position":{ "x":1.125, - "y":0.6875 + "y":0.1875 }, "BitCount":8, "Colour":0, @@ -42,7 +64,7 @@ "ID":1415148896, "Position":{ "x":1.125, - "y":0.1875 + "y":-0.3125 }, "BitCount":8, "Colour":0, @@ -53,7 +75,7 @@ "ID":405999015, "Position":{ "x":1.125, - "y":-0.3125 + "y":-0.8125 }, "BitCount":8, "Colour":0, @@ -64,7 +86,7 @@ "ID":917260170, "Position":{ "x":1.125, - "y":-0.8125 + "y":-1.3125 }, "BitCount":1, "Colour":0, @@ -75,7 +97,7 @@ "ID":2003410447, "Position":{ "x":1.125, - "y":-1.3125 + "y":-1.8125 }, "BitCount":1, "Colour":0, @@ -91,7 +113,7 @@ "x":-1.375, "y":0.1875 }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":0}], + "OutputPinColourInfo":[{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":0}], "InternalData":null } ], @@ -179,6 +201,34 @@ "ConnectedWireIndex":-1, "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":6, + "PinOwnerID":1380022051 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1323112485 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":7, + "PinOwnerID":1380022051 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1439843563 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] } ], "Displays": null diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 7a48f8a3..ccbcebc1 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-05-24T16:34:46.079+07:00", + "LastSaveTime": "2025-05-24T17:43:48.437+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, From 75b8277b1b3a7df4939eec788470e07b7e80eeb7 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Sat, 24 May 2025 13:36:34 +0200 Subject: [PATCH 054/124] Ram builtin chip + secret "All Black Builtin" RAM builtin chip. Works exactly like you would expect. Initial state of RAM is random. You can make all of the built in chips all black by making the name of the projcet include the string "ahic" --- .../Description/Helpers/ChipTypeHelper.cs | 2 +- .../Game/Project/BuiltinChipCreator.cs | 45 ++++++---- Assets/Scripts/Game/Project/ChipLibrary.cs | 2 +- Assets/Scripts/SaveSystem/Loader.cs | 2 +- .../Projects/MainTest/ProjectDescription.json | 4 +- .../ahic CHIPS/ProjectDescription.json | 83 +++++++++++++++++++ .../Projects/ram test/ProjectDescription.json | 58 +++++++++++++ 7 files changed, 173 insertions(+), 23 deletions(-) create mode 100644 TestData/Projects/ahic CHIPS/ProjectDescription.json create mode 100644 TestData/Projects/ram test/ProjectDescription.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 92c021cf..d224e6c0 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -15,7 +15,7 @@ public static class ChipTypeHelper { ChipType.Pulse, "PULSE" }, { ChipType.TriStateBuffer, "3-STATE BUFFER" }, // ---- Memory ---- - { ChipType.dev_Ram_8Bit, "dev.RAM-8" }, + { ChipType.dev_Ram_8Bit, "RAM-8" }, { ChipType.Rom_256x16, $"ROM 256{mulSymbol}16" }, { ChipType.EEPROM_256x16, $"EEPROM 256{mulSymbol}16" }, // ---- Split / Merge ---- diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 5e22d144..9498bd9f 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -9,9 +9,13 @@ namespace DLS.Game public static class BuiltinChipCreator { static readonly Color ChipCol_SplitMerge = new(0.1f, 0.1f, 0.1f); //new(0.8f, 0.8f, 0.8f); + static bool AllBlack; + static Color AllBlackColor = Color.black; - public static ChipDescription[] CreateAllBuiltinChipDescriptions() + public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescription description) { + AllBlack = description.ProjectName.Contains("ahic"); + return new[] { // ---- I/O Pins ---- @@ -62,7 +66,7 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions() static ChipDescription CreateNand() { - Color col = new(0.73f, 0.26f, 0.26f); + Color col = GetColor(new(0.73f, 0.26f, 0.26f)); Vector2 size = new(CalculateGridSnappedWidth(GridSize * 8), GridSize * 4); PinDescription[] inputPins = { CreatePinDescription("IN B", 0), CreatePinDescription("IN A", 1) }; @@ -73,7 +77,7 @@ static ChipDescription CreateNand() static ChipDescription CreateBuzzer() { - Color col = new(0, 0, 0); + Color col = GetColor(new(0, 0, 0)); PinDescription[] inputPins = { @@ -89,7 +93,7 @@ static ChipDescription CreateBuzzer() static ChipDescription dev_CreateRAM_8() { - Color col = new(0.85f, 0.45f, 0.3f); + Color col = GetColor(new(0.85f, 0.45f, 0.3f)); PinDescription[] inputPins = { @@ -117,7 +121,7 @@ static ChipDescription CreateROM_8() CreatePinDescription("OUT A", 2, PinBitCount.Bit8) }; - Color col = new(0.25f, 0.35f, 0.5f); + Color col = GetColor(new(0.25f, 0.35f, 0.5f)); Vector2 size = new(GridSize * 12, SubChipInstance.MinChipHeightForPins(inputPins, outputPins)); return CreateBuiltinChipDescription(ChipType.Rom_256x16, size, col, inputPins, outputPins); @@ -139,7 +143,7 @@ static ChipDescription CreateEEPROM_8() CreatePinDescription("OUT A", 6, PinBitCount.Bit8) }; - Color col = new(0.25f, 0.35f, 0.5f); + Color col = GetColor(new(0.25f, 0.35f, 0.5f)); Vector2 size = new(GridSize * 12, SubChipInstance.MinChipHeightForPins(inputPins, outputPins)); return CreateBuiltinChipDescription(ChipType.EEPROM_256x16, size, col, inputPins, outputPins); @@ -147,7 +151,7 @@ static ChipDescription CreateEEPROM_8() static ChipDescription CreateInputKeyChip() { - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); Vector2 size = new Vector2(GridSize, GridSize) * 3; PinDescription[] outputPins = { CreatePinDescription("OUT", 0) }; @@ -157,7 +161,7 @@ static ChipDescription CreateInputKeyChip() static ChipDescription CreateInputButtonChip() { - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); Vector2 size = new Vector2(GridSize, GridSize) * 3; float displayWidth = size.x - GridSize *0.5f; @@ -177,7 +181,7 @@ static ChipDescription CreateInputButtonChip() static ChipDescription CreateInputToggleChip() { - Color col = new(70, 130, 180); + Color col = GetColor(new(70, 130, 180)); Vector2 size = new Vector2(1f, 2f) * GridSize; float displayWidth = size.x; @@ -198,7 +202,7 @@ static ChipDescription CreateInputToggleChip() static ChipDescription CreateTristateBuffer() { - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); Vector2 size = new(CalculateGridSnappedWidth(1.5f), GridSize * 5); PinDescription[] inputPins = { CreatePinDescription("IN", 0), CreatePinDescription("ENABLE", 1) }; @@ -210,7 +214,7 @@ static ChipDescription CreateTristateBuffer() static ChipDescription CreateClock() { Vector2 size = new(GridHelper.SnapToGrid(1), GridSize * 3); - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); PinDescription[] outputPins = { CreatePinDescription("CLK", 0) }; return CreateBuiltinChipDescription(ChipType.Clock, size, col, null, outputPins); @@ -219,7 +223,7 @@ static ChipDescription CreateClock() static ChipDescription CreatePulse() { Vector2 size = new(GridHelper.SnapToGrid(1), GridSize * 3); - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); PinDescription[] inputPins = { CreatePinDescription("IN", 0) }; PinDescription[] outputPins = { CreatePinDescription("PULSE", 1) }; @@ -246,7 +250,7 @@ static ChipDescription CreateBitConversionChip(ChipType chipType, PinBitCount bi float height = SubChipInstance.MinChipHeightForPins(inputPins, outputPins); Vector2 size = new(GridSize * 9, height); - return CreateBuiltinChipDescription(chipType, size, ChipCol_SplitMerge, inputPins, outputPins); + return CreateBuiltinChipDescription(chipType, size, GetColor(ChipCol_SplitMerge), inputPins, outputPins); } static string GetPinName(int pinIndex, int pinCount, bool isInput) @@ -270,7 +274,7 @@ static ChipDescription CreateDisplay7Seg() CreatePinDescription("COL", 7) }; - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); float height = SubChipInstance.MinChipHeightForPins(inputPins, null); Vector2 size = new(GridSize * 10, height); float displayWidth = size.x - GridSize * 2; @@ -293,7 +297,7 @@ static ChipDescription CreateDisplayRGB() float width = height; float displayWidth = height - GridSize * 2; - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); Vector2 size = new(width, height); PinDescription[] inputPins = @@ -349,7 +353,7 @@ static ChipDescription CreateDisplayDot() float width = height; float displayWidth = height - GridSize * 2; - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); Vector2 size = new(width, height); @@ -405,7 +409,7 @@ static ChipDescription CreateBus(PinBitCount bitCount) PinDescription[] inputs = { CreatePinDescription(name + " (Hidden)", 0, bitCount) }; PinDescription[] outputs = { CreatePinDescription(name, 1, bitCount) }; - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); return CreateBuiltinChipDescription(type, BusChipSize(bitCount), col, inputs, outputs, null, NameDisplayLocation.Hidden); } @@ -421,7 +425,7 @@ static ChipDescription CreateDisplayLED() float width = height; float displayWidth = height - GridSize * 0.5f; - Color col = new(0.1f, 0.1f, 0.1f); + Color col = GetColor(new(0.1f, 0.1f, 0.1f)); Vector2 size = new(width, height); @@ -510,5 +514,10 @@ void AddPins(PinDescription[] pins) } } } + + static Color GetColor(Color color) + { + return AllBlack ? AllBlackColor : color; + } } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Project/ChipLibrary.cs b/Assets/Scripts/Game/Project/ChipLibrary.cs index 602a6427..a05f4a1c 100644 --- a/Assets/Scripts/Game/Project/ChipLibrary.cs +++ b/Assets/Scripts/Game/Project/ChipLibrary.cs @@ -19,7 +19,7 @@ public ChipLibrary(ChipDescription[] customChips, ChipDescription[] builtinChips foreach (ChipDescription chip in builtinChips) { // Bus terminus chip should not be shown to the user (it is created automatically upon placement of a bus start point) - bool hidden = ChipTypeHelper.IsBusTerminusType(chip.ChipType) || chip.ChipType == ChipType.dev_Ram_8Bit; + bool hidden = ChipTypeHelper.IsBusTerminusType(chip.ChipType); AddChipToLibrary(chip, hidden); builtinChipNames.Add(chip.Name); diff --git a/Assets/Scripts/SaveSystem/Loader.cs b/Assets/Scripts/SaveSystem/Loader.cs index 590a3af1..080e0955 100644 --- a/Assets/Scripts/SaveSystem/Loader.cs +++ b/Assets/Scripts/SaveSystem/Loader.cs @@ -85,7 +85,7 @@ static ChipLibrary LoadChipLibrary(ProjectDescription projectDescription) if (!Directory.Exists(chipDirectoryPath) && loadedChips.Length > 0) throw new DirectoryNotFoundException(chipDirectoryPath); - ChipDescription[] builtinChips = BuiltinChipCreator.CreateAllBuiltinChipDescriptions(); + ChipDescription[] builtinChips = BuiltinChipCreator.CreateAllBuiltinChipDescriptions(projectDescription); HashSet customChipNameHashset = new(ChipDescription.NameComparer); for (int i = 0; i < loadedChips.Length; i++) diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 70bf60bc..b0304fb1 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-22T20:14:37.921+02:00", + "LastSaveTime": "2025-05-24T12:45:42.516+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -160,7 +160,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8"], "IsToggledOpen":true, "Name":"OTHER" } diff --git a/TestData/Projects/ahic CHIPS/ProjectDescription.json b/TestData/Projects/ahic CHIPS/ProjectDescription.json new file mode 100644 index 00000000..c11ebc45 --- /dev/null +++ b/TestData/Projects/ahic CHIPS/ProjectDescription.json @@ -0,0 +1,83 @@ +{ + "ProjectName": "ahic CHIPS", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "CreationTime": "2025-05-24T13:06:54.829+02:00", + "LastSaveTime": "2025-05-24T13:13:32.516+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + }, + { + "Name":"MERGE/SPLIT", + "IsCollection":true + }, + { + "Name":"BASIC", + "IsCollection":true + }, + { + "Name":"DISPLAY", + "IsCollection":true + }, + { + "Name":"MEMORY", + "IsCollection":true + }, + { + "Name":"OTHER", + "IsCollection":true + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER"], + "IsToggledOpen":true, + "Name":"BASIC" + }, + { + "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","BUTTON"], + "IsToggledOpen":true, + "Name":"IN/OUT" + }, + { + "Chips":["1-4BIT","1-8BIT","4-8BIT","4-1BIT","8-4BIT","8-1BIT"], + "IsToggledOpen":true, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":true, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + }, + { + "Chips":["DIPSWITCH","RAM-8","BUZZER"], + "IsToggledOpen":false, + "Name":"OTHER" + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/ram test/ProjectDescription.json b/TestData/Projects/ram test/ProjectDescription.json new file mode 100644 index 00000000..9f37d5e7 --- /dev/null +++ b/TestData/Projects/ram test/ProjectDescription.json @@ -0,0 +1,58 @@ +{ + "ProjectName": "ram test", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "CreationTime": "2025-05-24T12:10:42.805+02:00", + "LastSaveTime": "2025-05-24T12:10:42.807+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","BUTTON"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["1-4BIT","1-8BIT","4-8BIT","4-1BIT","8-4BIT","8-1BIT"], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + } + ] +} \ No newline at end of file From be3d9e11b087aafb8d4d2c10de89880125661747 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Sun, 25 May 2025 15:27:23 +0200 Subject: [PATCH 055/124] Constant Chip --- .../Description/Helpers/ChipTypeHelper.cs | 1 + .../Description/Types/SubTypes/ChipTypes.cs | 6 +- .../Game/Project/BuiltinChipCreator.cs | 16 ++++ .../Game/Project/BuiltinCollectionCreator.cs | 5 +- Assets/Scripts/Game/Project/Project.cs | 9 +++ .../Graphics/UI/Menus/ConstantEditMenu.cs | 73 +++++++++++++++++++ .../UI/Menus/ConstantEditMenu.cs.meta | 2 + .../Scripts/Graphics/UI/Menus/ContextMenu.cs | 18 ++++- Assets/Scripts/Graphics/UI/UIDrawer.cs | 8 +- .../Scripts/SaveSystem/DescriptionCreator.cs | 1 + Assets/Scripts/Simulation/Simulator.cs | 7 ++ .../Projects/MainTest/Chips/ConstTest.json | 60 +++++++++++++++ .../Projects/MainTest/ProjectDescription.json | 11 ++- 13 files changed, 205 insertions(+), 12 deletions(-) create mode 100644 Assets/Scripts/Graphics/UI/Menus/ConstantEditMenu.cs create mode 100644 Assets/Scripts/Graphics/UI/Menus/ConstantEditMenu.cs.meta create mode 100644 TestData/Projects/MainTest/Chips/ConstTest.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 92c021cf..781b7f18 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -14,6 +14,7 @@ public static class ChipTypeHelper { ChipType.Clock, "CLOCK" }, { ChipType.Pulse, "PULSE" }, { ChipType.TriStateBuffer, "3-STATE BUFFER" }, + { ChipType.Constant_8Bit, "CONST" }, // ---- Memory ---- { ChipType.dev_Ram_8Bit, "dev.RAM-8" }, { ChipType.Rom_256x16, $"ROM 256{mulSymbol}16" }, diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index 5ffc16ee..818197cd 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -42,8 +42,10 @@ public enum ChipType Button, Toggle, - // ---- Buses ---- - Bus_1Bit, + Constant_8Bit, + + // ---- Buses ---- + Bus_1Bit, BusTerminus_1Bit, Bus_4Bit, BusTerminus_4Bit, diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 5e22d144..54d5c957 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -30,6 +30,8 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions() CreateTristateBuffer(), CreateClock(), CreatePulse(), + CreateConstant_8(), + // ---- Memory ---- dev_CreateRAM_8(), CreateROM_8(), @@ -145,6 +147,20 @@ static ChipDescription CreateEEPROM_8() return CreateBuiltinChipDescription(ChipType.EEPROM_256x16, size, col, inputPins, outputPins); } + static ChipDescription CreateConstant_8() + { + PinDescription[] outputPins = + { + CreatePinDescription("VALUE OUT", 0, PinBitCount.Bit8), + }; + + Color col = new(0.1f, 0.1f, 0.1f); + Vector2 size = Vector2.one * GridSize * 6; + + return CreateBuiltinChipDescription(ChipType.Constant_8Bit, size, col, null, outputPins); + } + + static ChipDescription CreateInputKeyChip() { Color col = new(0.1f, 0.1f, 0.1f); diff --git a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs index 16f876c8..17ec20a6 100644 --- a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs @@ -23,8 +23,9 @@ public static ChipCollection[] CreateDefaultChipCollections() ChipType.Clock, ChipType.Pulse, ChipType.Key, - ChipType.TriStateBuffer - ), + ChipType.TriStateBuffer, + ChipType.Constant_8Bit + ), CreateChipCollection("IN/OUT", ChipType.In_1Bit, ChipType.In_4Bit, diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index db9336bf..8ba4cebd 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -326,7 +326,16 @@ public void NotifyToggleStateChanged(SimChip simChip) instance.UpdateInternalData(simChip.InternalState); } } + + public void NotifyConstantEdited(SubChipInstance constantChip, ushort value) + { + SimChip simChip = rootSimChip. + GetSubChipFromID + (constantChip.ID); + constantChip.InternalData[0] = value; + simChip.UpdateInternalState(constantChip.InternalData); + } public void DeleteChip(string chipToDeleteName) { diff --git a/Assets/Scripts/Graphics/UI/Menus/ConstantEditMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ConstantEditMenu.cs new file mode 100644 index 00000000..9ac1b3c2 --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/ConstantEditMenu.cs @@ -0,0 +1,73 @@ +using System; +using DLS.Game; +using Seb.Helpers; +using Seb.Vis; +using Seb.Vis.UI; +using UnityEngine; + +namespace DLS.Graphics +{ + public static class ConstantEditMenu + { + static SubChipInstance constantChip; + static byte value; + + static readonly UIHandle ID_ValueInput = new("ConstantChipEdit_Value"); + static readonly Func integerInputValidator = ValidateValueInput; + + public static void DrawMenu() + { + MenuHelper.DrawBackgroundOverlay(); + Draw.ID panelID = UI.ReservePanel(); + DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; + + Vector2 pos = UI.Centre + Vector2.up * (UI.HalfHeight * 0.25f); + + using (UI.BeginBoundsScope(true)) + { + UI.DrawText("Value of Constant", theme.FontBold, theme.FontSizeRegular, pos, Anchor.TextCentre, Color.white * 0.8f); + + InputFieldTheme inputFieldTheme = DrawSettings.ActiveUITheme.ChipNameInputField; + inputFieldTheme.fontSize = DrawSettings.ActiveUITheme.FontSizeRegular; + + Vector2 size = new(5.6f, DrawSettings.SelectorWheelHeight); + Vector2 inputPos = UI.PrevBounds.CentreBottom + Vector2.down * DrawSettings.VerticalButtonSpacing; + InputFieldState state = UI.InputField(ID_ValueInput, inputFieldTheme, inputPos, size, "0", Anchor.CentreTop, 1, integerInputValidator, forceFocus: true); + short tempValue; + if (state.text.Equals("-")) tempValue = 0; + else short.TryParse(state.text, out tempValue); + value = (byte)tempValue; + + MenuHelper.CancelConfirmResult result = MenuHelper.DrawCancelConfirmButtons(UI.GetCurrentBoundsScope().BottomLeft, UI.GetCurrentBoundsScope().Width, true); + MenuHelper.DrawReservedMenuPanel(panelID, UI.GetCurrentBoundsScope()); + + if (result == MenuHelper.CancelConfirmResult.Cancel) + { + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + else if (result == MenuHelper.CancelConfirmResult.Confirm) + { + Project.ActiveProject.NotifyConstantEdited(constantChip, value); + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + } + } + + public static void OnMenuOpened() + { + constantChip = (SubChipInstance)ContextMenu.interactionContext; + value = (byte)constantChip.InternalData[0]; + UI.GetInputFieldState(ID_ValueInput).SetText(value.ToString()); + } + + public static bool ValidateValueInput(string s) + { + Debug.Log(s); + if (s.Length > 4) return false; + if (string.IsNullOrEmpty(s)) return true; + if (s.Contains(" ")) return false; + if (s.Equals("-")) return true; + return short.TryParse(s, out _); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/ConstantEditMenu.cs.meta b/Assets/Scripts/Graphics/UI/Menus/ConstantEditMenu.cs.meta new file mode 100644 index 00000000..48bfae92 --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/ConstantEditMenu.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: cd93cbc5664f856498b66b2f285fc8d7 \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs index 84dfec06..8f9dd95d 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ContextMenu.cs @@ -79,8 +79,16 @@ public static class ContextMenu deleteEntry }; + static readonly MenuEntry[] entries_builtinConstantChip = +{ + new(Format("EDIT"), OpenConstantEditMenu, CanEditCurrentChip), + labelChipEntry, + deleteEntry + }; + + - static readonly MenuEntry[] entries_subChipOutput = pinColEntries; + static readonly MenuEntry[] entries_subChipOutput = pinColEntries; static readonly MenuEntry[] entries_inputDevPin = new[] { @@ -186,8 +194,10 @@ static void HandleOpenMenuInput() else if (subChip.ChipType is ChipType.Pulse) activeContextMenuEntries = entries_builtinPulseChip; else if (ChipTypeHelper.IsBusType(subChip.ChipType)) activeContextMenuEntries = entries_builtinBus; else if (subChip.ChipType == ChipType.DisplayLED) activeContextMenuEntries = entries_builtinLED; - else if (subChip.ChipType == ChipType.Button) activeContextMenuEntries = entries_builtinButton; - else activeContextMenuEntries = entries_builtinSubchip; + else if (subChip.ChipType == ChipType.Button) activeContextMenuEntries = entries_builtinButton; + else if (subChip.ChipType == ChipType.Constant_8Bit) activeContextMenuEntries = entries_builtinConstantChip; + + else activeContextMenuEntries = entries_builtinSubchip; } Project.ActiveProject.controller.Select(interactionContext as IMoveable, false); @@ -414,6 +424,8 @@ static void OpenKeyBindMenu() static void OpenPulseEditMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.PulseEdit); + static void OpenConstantEditMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.ConstantEdit); + static bool CanEditCurrentChip() => Project.ActiveProject.CanEditViewedChip; static bool CanEditWire() => CanEditCurrentChip(); diff --git a/Assets/Scripts/Graphics/UI/UIDrawer.cs b/Assets/Scripts/Graphics/UI/UIDrawer.cs index 091248e4..802f9d2b 100644 --- a/Assets/Scripts/Graphics/UI/UIDrawer.cs +++ b/Assets/Scripts/Graphics/UI/UIDrawer.cs @@ -18,7 +18,8 @@ public enum MenuType RebindKeyChip, RomEdit, PulseEdit, - UnsavedChanges, + ConstantEdit, + UnsavedChanges, Search, ChipLabelPopup } @@ -68,6 +69,7 @@ static void DrawProjectMenus(Project project) else if (menuToDraw == MenuType.Search) SearchPopup.DrawMenu(); else if (menuToDraw == MenuType.ChipLabelPopup) ChipLabelMenu.DrawMenu(); else if (menuToDraw == MenuType.PulseEdit) PulseEditMenu.DrawMenu(); + else if (menuToDraw == MenuType.ConstantEdit) ConstantEditMenu.DrawMenu(); else { bool showSimPausedBanner = project.simPaused; @@ -98,8 +100,10 @@ static void NotifyIfActiveMenuChanged() else if (ActiveMenu == MenuType.Search) SearchPopup.OnMenuOpened(); else if (ActiveMenu == MenuType.ChipLabelPopup) ChipLabelMenu.OnMenuOpened(); else if (ActiveMenu == MenuType.PulseEdit) PulseEditMenu.OnMenuOpened(); + else if (ActiveMenu == MenuType.ConstantEdit) ConstantEditMenu.OnMenuOpened(); - if (InInputBlockingMenu() && Project.ActiveProject != null && Project.ActiveProject.controller != null) + + if (InInputBlockingMenu() && Project.ActiveProject != null && Project.ActiveProject.controller != null) { Project.ActiveProject.controller.CancelEverything(); } diff --git a/Assets/Scripts/SaveSystem/DescriptionCreator.cs b/Assets/Scripts/SaveSystem/DescriptionCreator.cs index a947e7d1..c94179d7 100644 --- a/Assets/Scripts/SaveSystem/DescriptionCreator.cs +++ b/Assets/Scripts/SaveSystem/DescriptionCreator.cs @@ -91,6 +91,7 @@ public static uint[] CreateDefaultInstanceData(ChipType type) ChipType.DisplayLED => new uint[] { 0 }, // LED colour ChipType.Button => new uint[] { 0 }, // Button colour ChipType.Toggle => new uint[] { 0 }, // Toggle State + ChipType.Constant_8Bit => new uint[] { 0 }, // Content _ => ChipTypeHelper.IsBusType(type) ? new uint[2] : null }; } diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index e47d1010..096348c8 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -532,6 +532,13 @@ static void ProcessBuiltinChip(SimChip chip) audioState.RegisterNote(freqIndex, (uint)volumeIndex); break; } + + case ChipType.Constant_8Bit: + { + const uint bytemask = 0b11111111; + chip.OutputPins[0].State = (ushort)(chip.InternalState[0] & bytemask); + break; + } // ---- Bus types ---- default: { diff --git a/TestData/Projects/MainTest/Chips/ConstTest.json b/TestData/Projects/MainTest/Chips/ConstTest.json new file mode 100644 index 00000000..3a902037 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/ConstTest.json @@ -0,0 +1,60 @@ +{ + "DLSVersion": "2.1.6", + "Name": "ConstTest", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.475, + "y": 1.0 + }, + "Colour": { + "r": 0.214282215, + "g": 0.17916204, + "b": 0.250567675, + "a": 1 + }, + "InputPins":[], + "OutputPins":[ + { + "Name":"OUT", + "ID":635027160, + "Position":{ + "x":0.625, + "y":1.8125 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"CONST", + "ID":608381212, + "Label":"", + "Position":{ + "x":-1.51, + "y":1.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":0}], + "InternalData":[241] + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":608381212 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":635027160 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 70bf60bc..72ac8c55 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-22T20:14:37.921+02:00", + "LastSaveTime": "2025-05-25T15:26:10.614+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -66,7 +66,8 @@ "EEPROM_test", "BUTTON_test", "BUTTON_test2", - "4sw" + "4sw", + "ConstTest" ], "StarredList":[ { @@ -116,6 +117,10 @@ { "Name":"4sw", "IsCollection":false + }, + { + "Name":"ConstTest", + "IsCollection":false } ], "ChipCollections":[ @@ -155,7 +160,7 @@ "Name":"KEEP" }, { - "Chips":["WIP2","RAM-sync"], + "Chips":["WIP2","RAM-sync","CONST"], "IsToggledOpen":true, "Name":"TEST" }, From de60d467502db95a54eec88735e551fdc069e30b Mon Sep 17 00:00:00 2001 From: Dom Donnelly Date: Wed, 28 May 2025 00:18:19 +0100 Subject: [PATCH 056/124] Initial Commit: Custom pin location on subchips - snaps to any edge. Pins now have a LocalOffset & face (0-3) to indicate which way to face and the offset along the corrosponding edge. 0 = top moves clockwise. There is still reference to LocalPosY on pins but this is just handled as the offset Indicators to point in/out to indicate what pin type each is as they can now be on any edge added in settings wheel for various display options for these indicators - Tab to toggle is bound to the existing tab detection for pin names ChipCustomizationMenu now has a wheel to toggle Default Layout and custom layout. Will automatically toggle to custom on dragging pin. - changing back resets the layout. TODO: -Fix resizing, currently if you enlarge a chip, move the pin to the edge and then shrink the pin does not move to stay in bounds. -Need to change MinSize Calculations to account for pin movement and now the size.X needs to check for pins along top and bottom at time of resizing. -Load Custom layout on the chip customisation menu - Potential improvement to single pin output shape/angle. -slightly alter size of text on settings wheel --- .gitignore | 16 ++ .../Description/Types/ChipDescription.cs | 1 + .../Description/Types/ProjectDescription.cs | 1 + .../Types/SubTypes/PinDescription.cs | 9 +- Assets/Scripts/Game/Elements/PinInstance.cs | 88 ++++-- .../Scripts/Game/Elements/SubChipInstance.cs | 58 +++- .../Scripts/Game/Project/DevChipInstance.cs | 2 + .../UI/Menus/ChipCustomizationMenu.cs | 265 +++++++++++++++++- .../Graphics/UI/Menus/PreferencesMenu.cs | 24 +- .../Scripts/Graphics/World/DevSceneDrawer.cs | 222 +++++++++++++-- Assets/Scripts/Seb/SebVis/Draw.cs | 38 ++- .../Projects/MainTest/Chips/BuzzTest.json | 85 ------ .../Projects/MainTest/ProjectDescription.json | 148 ---------- 13 files changed, 649 insertions(+), 308 deletions(-) delete mode 100644 TestData/Projects/MainTest/Chips/BuzzTest.json delete mode 100644 TestData/Projects/MainTest/ProjectDescription.json diff --git a/.gitignore b/.gitignore index dc00d664..26cdf372 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,19 @@ crashlytics-build.properties /[Aa]ssets/[Ss]treamingAssets/aa/* /.idea /.vsconfig +/TestData/Projects/MainTest/Deleted Chips +/TestData/Projects/MainTest/Chips/123.json +/TestData/Projects/MainTest/Chips/a.json +/TestData/Projects/MainTest/Chips/BuzzTest.json +/TestData/Projects/MainTest/Chips/Defaultlayout.json +/TestData/Projects/MainTest/Chips/In.json +/TestData/Projects/MainTest/Chips/Layout.json +/TestData/Projects/MainTest/Chips/PT.json +/TestData/Projects/MainTest/Chips/SaveTest.json +/TestData/Projects/MainTest/Chips/test.json +/TestData/Projects/MainTest/Chips/test1.json +/TestData/Projects/MainTest/Chips/testarrow.json +/TestData/Projects/MainTest/Chips/Wireless.json +/TestData/Projects/MainTest/ProjectDescription.json +/TestData/Projects/MainTest/Chips/BuzzTest.json +/TestData/Projects/MainTest/ProjectDescription.json diff --git a/Assets/Scripts/Description/Types/ChipDescription.cs b/Assets/Scripts/Description/Types/ChipDescription.cs index b5b0e67f..0d8fa55b 100644 --- a/Assets/Scripts/Description/Types/ChipDescription.cs +++ b/Assets/Scripts/Description/Types/ChipDescription.cs @@ -21,6 +21,7 @@ public class ChipDescription public SubChipDescription[] SubChips; public WireDescription[] Wires; public DisplayDescription[] Displays; + public bool HasCustomLayout = false; // ---- Convenience Functions ---- public bool HasDisplay() => Displays != null && Displays.Length > 0; diff --git a/Assets/Scripts/Description/Types/ProjectDescription.cs b/Assets/Scripts/Description/Types/ProjectDescription.cs index a8dc0f33..5c8a3ccf 100644 --- a/Assets/Scripts/Description/Types/ProjectDescription.cs +++ b/Assets/Scripts/Description/Types/ProjectDescription.cs @@ -21,6 +21,7 @@ public struct ProjectDescription public bool Prefs_SimPaused; public int Prefs_SimTargetStepsPerSecond; public int Prefs_SimStepsPerClockTick; + public int Perfs_PinIndicators; // List of all player-created chips (in order of creation -- oldest first) public string[] AllCustomChipNames; diff --git a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs index 62745260..0af0c50f 100644 --- a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs @@ -10,8 +10,11 @@ public struct PinDescription public PinBitCount BitCount; public PinColour Colour; public PinValueDisplayMode ValueDisplayMode; + public int face; // Which edge of the chip the pin is on: 0 = top, 1 = right, 2 = bottom, 3 = left + public float LocalOffset; //offset on chip edge for pin location + - public PinDescription(string name, int id, Vector2 position, PinBitCount bitCount, PinColour colour, PinValueDisplayMode valueDisplayMode) + public PinDescription(string name, int id, Vector2 position, PinBitCount bitCount, PinColour colour, PinValueDisplayMode valueDisplayMode, float localoff = 0) { Name = name; ID = id; @@ -19,7 +22,9 @@ public PinDescription(string name, int id, Vector2 position, PinBitCount bitCoun BitCount = bitCount; Colour = colour; ValueDisplayMode = valueDisplayMode; - } + LocalOffset = localoff; + face = 1; + } } public enum PinBitCount diff --git a/Assets/Scripts/Game/Elements/PinInstance.cs b/Assets/Scripts/Game/Elements/PinInstance.cs index 2d610eb7..4ca17a82 100644 --- a/Assets/Scripts/Game/Elements/PinInstance.cs +++ b/Assets/Scripts/Game/Elements/PinInstance.cs @@ -22,9 +22,11 @@ public class PinInstance : IInteractable bool faceRight; public float LocalPosY; public string Name; + public int face; + public int ID; + - - public PinInstance(PinDescription desc, PinAddress address, IMoveable parent, bool isSourcePin) + public PinInstance(PinDescription desc, PinAddress address, IMoveable parent, bool isSourcePin) { this.parent = parent; bitCount = desc.BitCount; @@ -33,34 +35,72 @@ public PinInstance(PinDescription desc, PinAddress address, IMoveable parent, bo IsSourcePin = isSourcePin; Colour = desc.Colour; - IsBusPin = parent is SubChipInstance subchip && subchip.IsBus; + IsBusPin = parent is SubChipInstance subchip && subchip.IsBus; faceRight = isSourcePin; - PinState.SetAllDisconnected(ref State); - } + desc.face = faceRight ? 1 : 3; // 1 for right, 3 for left + face = faceRight ? 1 : 3; + PinState.SetAllDisconnected(ref State); + ID = desc.ID; + LocalPosY = desc.LocalOffset; + } public Vector2 ForwardDir => faceRight ? Vector2.right : Vector2.left; - public Vector2 GetWorldPos() - { - switch (parent) - { - case DevPinInstance devPin: - return devPin.PinPosition; - case SubChipInstance subchip: - { - Vector2 chipSize = subchip.Size; - Vector2 chipPos = subchip.Position; - - float xLocal = (chipSize.x / 2 + DrawSettings.ChipOutlineWidth / 2 - DrawSettings.SubChipPinInset) * (faceRight ? 1 : -1); - return chipPos + new Vector2(xLocal, LocalPosY); - } - default: - throw new Exception("Parent type not supported"); - } - } + public Vector2 GetWorldPos() + { + switch (parent) + { + case DevPinInstance devPin: + return devPin.PinPosition; + case SubChipInstance subchip: + { + Vector2 chipSize = subchip.Size; + Vector2 chipPos = subchip.Position; + + float halfWidth = chipSize.x / 2f; + float halfHeight = chipSize.y / 2f; + float inset = DrawSettings.SubChipPinInset; + float outlineOffset = DrawSettings.ChipOutlineWidth / 2f; + + + float x = 0f; + float y = 0f; + + switch (face) + { + case 0: // Top edge (Y fixed) + x = LocalPosY; + y = halfHeight + outlineOffset - inset; + break; + + case 1: // Right edge (X fixed) + x = halfWidth + outlineOffset - inset; + y = LocalPosY; + break; + + case 2: // Bottom edge (Y fixed) + x = LocalPosY; + y = -halfHeight - outlineOffset + inset; + break; + + case 3: // Left edge (X fixed) + x = -halfWidth - outlineOffset + inset; + y = LocalPosY; + break; + + default: + throw new Exception("Invalid pin face: " + face); + } + + return chipPos + new Vector2(x, y); + } + default: + throw new Exception("Parent type not supported"); + } + } - public void SetBusFlip(bool flipped) + public void SetBusFlip(bool flipped) { faceRight = IsSourcePin ^ flipped; } diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index d85725ee..75a58da6 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -29,6 +29,7 @@ public class SubChipInstance : IMoveable public readonly PinInstance[] OutputPins; public string activationKeyString; // input char for the 'key chip' type (stored as string to avoid allocating when drawing) public string Label; + private bool HasCustomLayout; public SubChipInstance(ChipDescription description, SubChipDescription subChipDesc) { @@ -42,8 +43,14 @@ public SubChipInstance(ChipDescription description, SubChipDescription subChipDe MultiLineName = CreateMultiLineName(description.Name); MinSize = CalculateMinChipSize(description.InputPins, description.OutputPins, description.Name); + HasCustomLayout = description.HasCustomLayout; + InputPins = CreatePinInstances(description.InputPins, true); OutputPins = CreatePinInstances(description.OutputPins, false); + if (HasCustomLayout) + { + LoadCustomLayout(description); + } AllPins = InputPins.Concat(OutputPins).ToArray(); LoadOutputPinColours(subChipDesc.OutputPinColourInfo); @@ -85,9 +92,12 @@ PinInstance[] CreatePinInstances(PinDescription[] pinDescriptions, bool isInputP PinAddress address = new(subChipDesc.ID, desc.ID); pins[i] = new PinInstance(desc, address, this, !isInputPin); } + if (!HasCustomLayout) + { + // If no custom layout, then calculate the default layout - CalculatePinLayout(pins); - + CalculatePinLayout(pins); + } return pins; } } @@ -136,10 +146,13 @@ public void SetKeyChipActivationChar(char c) public void UpdatePinLayout() { - CalculatePinLayout(InputPins); - CalculatePinLayout(OutputPins); + if (!HasCustomLayout) + { + CalculatePinLayout(InputPins); + CalculatePinLayout(OutputPins); + } } - + void CalculatePinLayout(PinInstance[] pins) { // If only one pin, it should be placed in the centre @@ -177,6 +190,19 @@ void CalculatePinLayout(PinInstance[] pins) } } + void CustomLayout(PinInstance[] pins) + { + foreach (PinInstance pin in pins) + { + float pinHeight = pin.bitCount == PinBitCount.Bit1 ? DrawSettings.PinRadius * 2 : PinHeightFromBitCount(pin.bitCount); + float halfPinHeight = pinHeight / 2; + float maxY = Size.y / 2 - halfPinHeight; + float minY = -Size.y / 2 + halfPinHeight; + pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, minY, maxY); + } + } + public void SetCustomLayout(bool SetCustom) => this.HasCustomLayout = SetCustom; + // Min chip height based on input and output pins public static float MinChipHeightForPins(PinDescription[] inputs, PinDescription[] outputs) => Mathf.Max(MinChipHeightForPins(inputs), MinChipHeightForPins(outputs)); @@ -393,5 +419,25 @@ void LoadOutputPinColours(OutputPinColourInfo[] cols) } } } - } + void LoadCustomLayout(ChipDescription chipDesc) + { + void ApplyLayout(PinInstance pin, PinDescription[] descriptions) + { + var desc = Array.Find(descriptions, d => d.ID == pin.ID); + if (desc.ID != 0) // found a matching description + { + pin.face = desc.face; + + pin.LocalPosY = desc.LocalOffset; + + } + } + + foreach (var pin in InputPins) + ApplyLayout(pin, chipDesc.InputPins); + + foreach (var pin in OutputPins) + ApplyLayout(pin, chipDesc.OutputPins); + } + } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Project/DevChipInstance.cs b/Assets/Scripts/Game/Project/DevChipInstance.cs index c25d9584..74ddaaf6 100644 --- a/Assets/Scripts/Game/Project/DevChipInstance.cs +++ b/Assets/Scripts/Game/Project/DevChipInstance.cs @@ -24,6 +24,7 @@ public class DevChipInstance public SimChip SimChip; bool hasSimChip; + public bool HasCustomLayout; public string ChipName => LastSavedDescription == null ? string.Empty : LastSavedDescription.Name; @@ -67,6 +68,7 @@ public static (DevChipInstance devChip, bool anyElementFailedToLoad) LoadFromDes description.InputPins ??= Array.Empty(); description.OutputPins ??= Array.Empty(); description.Wires ??= Array.Empty(); + instance.HasCustomLayout = description.HasCustomLayout; bool anyElementFailedToLoad = false; diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs index 959e0c26..d6aef317 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs @@ -18,10 +18,15 @@ public static class ChipCustomizationMenu "Name: Top", "Name: Hidden" }; + static readonly string[] layoutOptions = + { + "Layout: Default", + "Layout: Custom" + }; - // ---- State ---- - static SubChipInstance[] subChipsWithDisplays; + // ---- State ---- + static SubChipInstance[] subChipsWithDisplays; static string displayLabelString; static string colHexCodeString; @@ -29,17 +34,29 @@ public static class ChipCustomizationMenu static readonly UIHandle ID_ColourPicker = new("CustomizeMenu_ChipCol"); static readonly UIHandle ID_ColourHexInput = new("CustomizeMenu_ChipColHexInput"); static readonly UIHandle ID_NameDisplayOptions = new("CustomizeMenu_NameDisplayOptions"); - static readonly UI.ScrollViewDrawElementFunc drawDisplayScrollEntry = DrawDisplayScroll; + static readonly UIHandle ID_LayoutOptions = new("CustomizeMenu_LayoutOptions"); + static readonly UI.ScrollViewDrawElementFunc drawDisplayScrollEntry = DrawDisplayScroll; static readonly Func hexStringInputValidator = ValidateHexStringInput; - - public static void OnMenuOpened() + public static bool isCustomLayout; + public static bool isDraggingPin; + static float pinDragStartY; + static float pinDragMouseStartY; + public static bool isPinPositionValid; + static float lastValidOffset; + static int lastValidFace; + static readonly float minPinSpacing = 0.025f; + public static PinInstance selectedPin; + public static void OnMenuOpened() { DevChipInstance chip = Project.ActiveProject.ViewedChip; subChipsWithDisplays = chip.GetSubchips().Where(c => c.Description.HasDisplay()).OrderBy(c => c.Position.x).ThenBy(c => c.Position.y).ToArray(); CustomizationSceneDrawer.OnCustomizationMenuOpened(); displayLabelString = $"DISPLAYS ({subChipsWithDisplays.Length}):"; + isCustomLayout = false; + isDraggingPin = false; + selectedPin = null; - InitUIFromChipDescription(); + InitUIFromChipDescription(); } public static void DrawMenu() @@ -53,16 +70,43 @@ public static void DrawMenu() DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; UI.DrawPanel(UI.TopLeft, new Vector2(width, UI.Height), theme.MenuPanelCol, Anchor.TopLeft); - - // ---- Cancel/confirm buttons ---- - int cancelConfirmButtonIndex = MenuHelper.DrawButtonPair("CANCEL", "CONFIRM", UI.TopLeft + Vector2.down * pad, pw, false); + HandlePinDragging(); + // ---- Cancel/confirm buttons ---- + int cancelConfirmButtonIndex = MenuHelper.DrawButtonPair("CANCEL", "CONFIRM", UI.TopLeft + Vector2.down * pad, pw, false); // ---- Chip name UI ---- int nameDisplayMode = UI.WheelSelector(ID_NameDisplayOptions, nameDisplayOptions, NextPos(), new Vector2(pw, DrawSettings.ButtonHeight), theme.OptionsWheel, Anchor.TopLeft); ChipSaveMenu.ActiveCustomizeDescription.NameLocation = (NameDisplayLocation)nameDisplayMode; - - // ---- Chip colour UI ---- - Color newCol = UI.DrawColourPicker(ID_ColourPicker, NextPos(), pw, Anchor.TopLeft); + // ---- Chip layout UI ---- + int layoutMode = UI.WheelSelector(ID_LayoutOptions, layoutOptions, NextPos(), new Vector2(pw, DrawSettings.ButtonHeight), theme.OptionsWheel, Anchor.TopLeft); + if (layoutMode == 0 && isCustomLayout) + { + // Switch to default layout + isCustomLayout = false; + ChipSaveMenu.ActiveCustomizeChip.SetCustomLayout(false); + // Reset pins on the preview instance + foreach (PinInstance pin in ChipSaveMenu.ActiveCustomizeChip.InputPins) + { + pin.face = 3; + pin.LocalPosY = 0; + } + foreach (PinInstance pin in ChipSaveMenu.ActiveCustomizeChip.OutputPins) + { + pin.face = 1; + pin.LocalPosY = 0; + //Reset layout + ChipSaveMenu.ActiveCustomizeChip.UpdatePinLayout(); + } + } + else if (layoutMode == 1 && !isCustomLayout) + { + // Switch to custom layout + isCustomLayout = true; + ChipSaveMenu.ActiveCustomizeChip.SetCustomLayout(true); + } + + // ---- Chip colour UI ---- + Color newCol = UI.DrawColourPicker(ID_ColourPicker, NextPos(), pw, Anchor.TopLeft); InputFieldTheme inputTheme = MenuHelper.Theme.ChipNameInputField; inputTheme.fontSize = MenuHelper.Theme.FontSizeRegular; @@ -151,13 +195,35 @@ static void InitUIFromChipDescription() // Init name display mode WheelSelectorState nameDisplayWheelState = UI.GetWheelSelectorState(ID_NameDisplayOptions); nameDisplayWheelState.index = (int)ChipSaveMenu.ActiveCustomizeDescription.NameLocation; - } + // Init layout mode by checking if any pins have custom positions + DevChipInstance chip = Project.ActiveProject.ViewedChip; + isCustomLayout = chip.HasCustomLayout; + + //TODO: Add in Load for custom layout of pins + + WheelSelectorState layoutWheelState = UI.GetWheelSelectorState(ID_LayoutOptions); + layoutWheelState.index = isCustomLayout ? 1 : 0; + } static void UpdateCustomizeDescription() { List displays = ChipSaveMenu.ActiveCustomizeChip.Displays; ChipSaveMenu.ActiveCustomizeDescription.Displays = displays.Select(s => s.Desc).ToArray(); - } + ChipSaveMenu.ActiveCustomizeDescription.HasCustomLayout = isCustomLayout; + + //Saves pin offset and faces + for (int i = 0; i < ChipSaveMenu.ActiveCustomizeChip.Description.InputPins.Length; i++) + { + ChipSaveMenu.ActiveCustomizeChip.Description.InputPins[i].LocalOffset = ChipSaveMenu.ActiveCustomizeChip.InputPins[i].LocalPosY; + ChipSaveMenu.ActiveCustomizeChip.Description.InputPins[i].face = ChipSaveMenu.ActiveCustomizeChip.InputPins[i].face; + } + for (int i = 0; i < ChipSaveMenu.ActiveCustomizeChip.Description.OutputPins.Length; i++) + { + ChipSaveMenu.ActiveCustomizeChip.Description.OutputPins[i].LocalOffset = ChipSaveMenu.ActiveCustomizeChip.OutputPins[i].LocalPosY; + ChipSaveMenu.ActiveCustomizeChip.Description.InputPins[i].face = ChipSaveMenu.ActiveCustomizeChip.InputPins[i].face; + + } + } static void UpdateChipColHexStringFromColour(Color col) { @@ -198,5 +264,176 @@ static bool ValidateHexStringInput(string text) return numHexDigits <= 6; } + + static void HandlePinDragging() + { + if (!InteractionState.MouseIsOverUI) + { + // Start dragging a pin + if (InputHelper.IsMouseDownThisFrame(MouseButton.Left)) + { + if (InteractionState.ElementUnderMouse is PinInstance pin) + { + selectedPin = pin; + isDraggingPin = true; + lastValidOffset = pin.LocalPosY; + lastValidFace = pin.face; + } + } + + if (isDraggingPin && selectedPin?.parent is SubChipInstance chip) + { + Vector2 mouseWorld = InputHelper.MousePosWorld; + Vector2 chipCenter = chip.Position; + Vector2 localMouse = mouseWorld - chipCenter; + Vector2 chipHalfSize = chip.Size / 2f; + + // Determine closest edge + float distTop = Mathf.Abs(localMouse.y - chipHalfSize.y); + float distBottom = Mathf.Abs(localMouse.y + chipHalfSize.y); + float distRight = Mathf.Abs(localMouse.x - chipHalfSize.x); + float distLeft = Mathf.Abs(localMouse.x + chipHalfSize.x); + + int closestFace = 0; + float minDist = distTop; + + if (distRight < minDist) { closestFace = 1; minDist = distRight; } + if (distBottom < minDist) { closestFace = 2; minDist = distBottom; } + if (distLeft < minDist) { closestFace = 3; } + + selectedPin.face = closestFace; + + float pinHeight = selectedPin.bitCount == PinBitCount.Bit1 + ? DrawSettings.PinRadius * 2 + : SubChipInstance.PinHeightFromBitCount(selectedPin.bitCount); + + float maxOffset; + float offsetAlongFace; + + if (closestFace == 0 || closestFace == 2) + { + // Horizontal face -> move along X + maxOffset = chipHalfSize.x - pinHeight / 2f; + offsetAlongFace = Mathf.Clamp(localMouse.x, -maxOffset, maxOffset); + } + else + { + // Vertical face -> move along Y + maxOffset = chipHalfSize.y - pinHeight / 2f; + offsetAlongFace = Mathf.Clamp(localMouse.y, -maxOffset, maxOffset); + } + + selectedPin.LocalPosY = offsetAlongFace; + + // Check for overlap + PinInstance overlappedPin; + isPinPositionValid = !DoesPinOverlap(selectedPin, out overlappedPin); + + // End drag on mouse release + if (InputHelper.IsMouseUpThisFrame(MouseButton.Left)) + { + if (isPinPositionValid) + { + lastValidOffset = offsetAlongFace; + lastValidFace = selectedPin.face; + + if (!isCustomLayout) + { + isCustomLayout = true; + UI.GetWheelSelectorState(ID_LayoutOptions).index = 1; + ChipSaveMenu.ActiveCustomizeChip.SetCustomLayout(true); + } + } + else + { + selectedPin.LocalPosY = lastValidOffset; + selectedPin.face = lastValidFace; + } + + isDraggingPin = false; + selectedPin = null; + isPinPositionValid = true; + } + } + } + } + + static bool DoesPinOverlap(PinInstance pin, out PinInstance overlappedPin) + { + overlappedPin = null; + if (!(pin.parent is SubChipInstance chip)) return false; + + // Get all pins on the same chip to check pins on the same face as selectedpin + List pinsToCheck = new List(); + pinsToCheck.AddRange(chip.InputPins); + pinsToCheck.AddRange(chip.OutputPins); + + foreach (PinInstance otherPin in pinsToCheck) + { + if (otherPin == pin) continue; + + // Only check pins on the same face + if (otherPin.face != pin.face) continue; + + float distanceAlongFace = Mathf.Abs(pin.LocalPosY - otherPin.LocalPosY); + + // Calculate minimum required spacing based on pin sizes + float pinHeight = pin.bitCount == PinBitCount.Bit1 + ? DrawSettings.PinRadius * 2 + : SubChipInstance.PinHeightFromBitCount(pin.bitCount); + + float otherPinHeight = otherPin.bitCount == PinBitCount.Bit1 + ? DrawSettings.PinRadius * 2 + : SubChipInstance.PinHeightFromBitCount(otherPin.bitCount); + + // Required space is half each pin's height plus some buffer + float requiredSpacing = (pinHeight + otherPinHeight) / 2f + minPinSpacing; + + if (distanceAlongFace < requiredSpacing) + { + overlappedPin = otherPin; + return true; + } + } + + return false; + } + + static void FaceSnapping(PinInstance pin, float mouseY) + { + if (pin.parent is SubChipInstance chip) + { + Vector2 chipSize = chip.Size; + Vector2 chipPos = chip.Position; + + //Calculate distances to top and bottom edges + float distanceToTop = Mathf.Abs(mouseY - (chipPos.y + chipSize.y / 2)); + float distanceToBottom = Mathf.Abs(mouseY - (chipPos.y - chipSize.y / 2)); + + //Calculate distances to left and right edges + float distanceToLeft = Mathf.Abs(chipPos.x - chipSize.x / 2); + float distanceToRight = Mathf.Abs(chipPos.x + chipSize.x / 2); + + //Determine the closest vertical edge (top or bottom) + float closestVerticalDistance = Mathf.Min(distanceToTop, distanceToBottom); + bool isTopCloser = closestVerticalDistance == distanceToTop; + + //Determine the closest horizontal edge (left or right) + float closestHorizontalDistance = Mathf.Min(distanceToLeft, distanceToRight); + bool isLeftCloser = closestHorizontalDistance == distanceToLeft; + //Compare the closest of the 2 previously closests + if (closestVerticalDistance < closestHorizontalDistance) + { + if (isTopCloser) {pin.face = 0;} + else {pin.face = 2;} + } + else + { + if (isLeftCloser) {pin.face = 3;} + else{ pin.face = 1; } + } + } + } + } } \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs b/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs index 13909b2b..dccf87b4 100644 --- a/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/PreferencesMenu.cs @@ -50,6 +50,14 @@ public static class PreferencesMenu "Active", "Paused" }; + static readonly string[] PinIndicators = + { + "Off", + "On Hover", + "Tab To Toggle", + "On Disconnected", + "Always" + }; static readonly Vector2 entrySize = new(menuWidth, DrawSettings.SelectorWheelHeight); public static readonly Vector2 settingFieldSize = new(entrySize.x / 3, entrySize.y); @@ -63,8 +71,9 @@ public static class PreferencesMenu static readonly UIHandle ID_SimStatus = new("PREFS_SimStatus"); static readonly UIHandle ID_SimFrequencyField = new("PREFS_SimTickTarget"); static readonly UIHandle ID_ClockSpeedInput = new("PREFS_ClockSpeed"); + static readonly UIHandle ID_PinIndicators = new("PREFS_PinIndicators"); - static readonly string showGridLabel = "Show grid" + CreateShortcutString("Ctrl+G"); + static readonly string showGridLabel = "Show grid" + CreateShortcutString("Ctrl+G"); static readonly string simStatusLabel = "Sim Status" + CreateShortcutString("Ctrl+Space"); static readonly Func integerInputValidator = ValidateIntegerInput; @@ -99,7 +108,8 @@ public static void DrawMenu(Project project) int mainPinNamesMode = DrawNextWheel("Show I/O pin names", PinDisplayOptions, ID_MainPinNames); int chipPinNamesMode = DrawNextWheel("Show chip pin names", PinDisplayOptions, ID_ChipPinNames); int gridDisplayMode = DrawNextWheel(showGridLabel, GridDisplayOptions, ID_GridDisplay); - DrawHeader("EDITING:"); + int pinIndicatorsMode = DrawNextWheel("Show Pin indicators",PinIndicators, ID_PinIndicators); + DrawHeader("EDITING:"); int snappingMode = DrawNextWheel("Snap to grid", SnappingOptions, ID_Snapping); int straightWireMode = DrawNextWheel("Straight wires", StraightWireOptions, ID_StraightWires); @@ -140,9 +150,10 @@ public static void DrawMenu(Project project) project.description.Prefs_SimTargetStepsPerSecond = targetSimTicksPerSecond; project.description.Prefs_SimStepsPerClockTick = clockSpeed; project.description.Prefs_SimPaused = pauseSim; + project.description.Perfs_PinIndicators = pinIndicatorsMode; - // Cancel / Confirm - if (result == MenuHelper.CancelConfirmResult.Cancel) + // Cancel / Confirm + if (result == MenuHelper.CancelConfirmResult.Cancel) { // Restore original description project.description = originalProjectDesc; @@ -207,8 +218,9 @@ static void UpdateUIFromDescription() UI.GetWheelSelectorState(ID_Snapping).index = projDesc.Prefs_Snapping; UI.GetWheelSelectorState(ID_StraightWires).index = projDesc.Prefs_StraightWires; UI.GetWheelSelectorState(ID_SimStatus).index = projDesc.Prefs_SimPaused ? 1 : 0; - // -- Input fields - UI.GetInputFieldState(ID_SimFrequencyField).SetText(projDesc.Prefs_SimTargetStepsPerSecond + "", false); + UI.GetWheelSelectorState(ID_PinIndicators).index = projDesc.Perfs_PinIndicators; + // -- Input fields + UI.GetInputFieldState(ID_SimFrequencyField).SetText(projDesc.Prefs_SimTargetStepsPerSecond + "", false); UI.GetInputFieldState(ID_ClockSpeedInput).SetText(projDesc.Prefs_SimStepsPerClockTick + "", false); } diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index eefb8307..037c4584 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -847,7 +847,24 @@ static void DrawPin(PinInstance pin) { DrawMultiBitPin(pin); } - } + + //makes pins red if too close + if (ChipCustomizationMenu.isDraggingPin && ChipCustomizationMenu.selectedPin == pin && !ChipCustomizationMenu.isPinPositionValid) + { + Vector2 pinPos = pin.GetWorldPos(); + if (pin.bitCount == PinBitCount.Bit1) + { + Draw.Quad(pinPos, Vector2.one * PinRadius * 2.4f, Color.red); + } + else + { + float pinWidth = PinRadius * 2 * 0.95f; + float pinHeight = SubChipInstance.PinHeightFromBitCount(pin.bitCount); + Vector2 pinSize = new(pinWidth, pinHeight); + Draw.Quad(pinPos, pinSize * 1.2f, Color.red); + } + } + } static void DrawSingleBitPin(PinInstance pin) { @@ -868,32 +885,197 @@ static void DrawSingleBitPin(PinInstance pin) } Draw.Point(pinPos, PinRadius, pinCol); - } - - static void DrawMultiBitPin(PinInstance pin) - { - Vector2 pinPos = pin.GetWorldPos(); - Vector2 pinSelectionBoundsPos = pinPos + Vector2.right * ((pin.IsSourcePin ? 1 : -1) * 0.02f); - const float pinWidth = PinRadius * 2 * 0.95f; - float pinHeight = SubChipInstance.PinHeightFromBitCount(pin.bitCount); - Vector2 pinSize = new(pinWidth, pinHeight); - bool mouseOverPin = !InteractionState.MouseIsOverUI && InputHelper.MouseInsideBounds_World(pinSelectionBoundsPos, pinSize); + // ---- input/output arrow ---- - if (mouseOverPin) InteractionState.NotifyElementUnderMouse(pin); - bool canInteract = controller.CanInteractWithPin; + Vector2 dir = pin.face switch + { + 0 => Vector2.down, + 1 => Vector2.left, + 2 => Vector2.up, + 3 => Vector2.right, + _ => Vector2.zero, + }; + if (pin.IsSourcePin) + { + dir = -dir; - Color pinCol = mouseOverPin && canInteract ? ActiveTheme.PinHighlightCol : ActiveTheme.PinCol; - // If hovering over pin while creating a wire, colour should indicate whether it is a valid connection - if (mouseOverPin && canInteract && controller.IsCreatingWire && !controller.CanCompleteWireConnection(pin)) + } + float pinThickness = PinRadius * 2f; + float arrowLength = pinThickness * 0.35f; + float arrowWidth = arrowLength * 1.2f; + Vector2 perp = new Vector2(-dir.y, dir.x); + float edgeOffset = pinThickness / 4f; + Vector2 centerOffset = dir * edgeOffset * (pin.IsSourcePin ? 1 : -1); + Vector2 arrowCenter = pinPos + centerOffset; + Vector2 tip = arrowCenter + dir * (arrowLength / 2f); + Vector2 baseCenter = arrowCenter - dir * (arrowLength / 2f); + Vector2 baseLeft = baseCenter + perp * (arrowWidth / 2f); + Vector2 baseRight = baseCenter - perp * (arrowWidth / 2f); + + // Draws input/output indicators on subchip pins only + bool isInputToCustomChip = pin.parent is SubChipInstance; + if (isInputToCustomChip) { - pinCol = ActiveTheme.PinInvalidCol; + // Check if pin is connect to any wire for the Is Disconnected setting + + List wireList = Project.ActiveProject.controller.ActiveDevChip.Wires; + bool isConnected = false; + for (int i = wireList.Count - 1; i >= 0; i--) + { + WireInstance wire = wireList[i]; + if (PinAddress.Equals(wire.SourcePin.Address, pin.Address) || PinAddress.Equals(wire.TargetPin.Address, pin.Address)) + { + isConnected = true; + break; + } + + } + //set up display mode based on settings + int pinIndicatorMode = Project.ActiveProject.description.Perfs_PinIndicators; + bool drawIndicator = false; + switch (pinIndicatorMode) + { + case 1: // "On Hover" + drawIndicator = mouseOverPin; + break; + case 2: // "Tab To Toggle" + drawIndicator = Project.ActiveProject.PinNameDisplayIsTabToggledOn; + break; + case 3: // "If Pin is not connected" + drawIndicator = !isConnected; + break; + case 4: // "Always" + drawIndicator = true; + break; + + } + if (drawIndicator) + + { + Draw.Point(pinPos, PinRadius, new Color(34f / 255f, 34f / 255f, 34f / 255f, 1f)); + float angle = 0; + float wedgeSpan = 0f; + + if (!pin.IsSourcePin) + { + wedgeSpan = 100f; + angle = Mathf.Atan2(-dir.y, -dir.x) * Mathf.Rad2Deg; + } + else + { + wedgeSpan = 150f; + angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg; + } + float angleStart = angle - wedgeSpan / 2f; + float angleEnd = angle + wedgeSpan / 2f; + Draw.WedgePolygon(pinPos, PinRadius, angleStart, angleEnd, ActiveTheme.PinCol, pin.face, pin.IsSourcePin); + } + } + } + static void DrawMultiBitPin(PinInstance pin) + { + Vector2 pinPos = pin.GetWorldPos(); + + bool isHorizontal = pin.face == 0 || pin.face == 2; + float pinWidth = PinRadius * 2 * 0.95f; + float pinHeight = SubChipInstance.PinHeightFromBitCount(pin.bitCount); + Vector2 pinSize = isHorizontal ? new Vector2(pinHeight, pinWidth) : new Vector2(pinWidth, pinHeight); + + // Determine direction for selection offset (used for mouse interaction) + Vector2 offsetDir = Vector2.zero; + switch (pin.face) + { + case 1: offsetDir = Vector2.left; break; // right face + case 3: offsetDir = Vector2.right; break; // left face + } + + Vector2 pinSelectionBoundsPos = pinPos + offsetDir * 0.02f; + bool mouseOverPin = !InteractionState.MouseIsOverUI && + InputHelper.MouseInsideBounds_World(pinSelectionBoundsPos, pinSize); + if (mouseOverPin) + InteractionState.NotifyElementUnderMouse(pin); + + bool canInteract = controller.CanInteractWithPin; + + Color pinCol = mouseOverPin && canInteract ? ActiveTheme.PinHighlightCol : ActiveTheme.PinCol; + // If hovering over pin while creating a wire, colour should indicate whether it is a valid connection + if (mouseOverPin && canInteract && controller.IsCreatingWire && !controller.CanCompleteWireConnection(pin)) + { + pinCol = ActiveTheme.PinInvalidCol; + } + + Draw.Quad(pinPos, pinSize, pinCol); + + // Draws input/output indicators on subchip pins only + bool isOnCustomChip = pin.parent is SubChipInstance; + if (isOnCustomChip) + { + // Check if pin is connect to any wire + List wireList = Project.ActiveProject.controller.ActiveDevChip.Wires; + bool isConnected = false; + for (int i = wireList.Count - 1; i >= 0; i--) + { + WireInstance wire = wireList[i]; + if (PinAddress.Equals(wire.SourcePin.Address, pin.Address) || PinAddress.Equals(wire.TargetPin.Address, pin.Address)) + { + isConnected = true; + break; + } + + } + //set up display mode based on settings + int pinIndicatorMode = Project.ActiveProject.description.Perfs_PinIndicators; + bool drawIndicator = false; + switch (pinIndicatorMode) + { + case 1: // "On Hover" + drawIndicator = mouseOverPin; + break; + case 2: // "Tab To Toggle" + drawIndicator = Project.ActiveProject.PinNameDisplayIsTabToggledOn; + break; + case 3: // "If Pin is not connected" + drawIndicator = !isConnected; + break; + case 4: // "Always" + drawIndicator = true; + break; + } + if (drawIndicator) + { + Vector2 dir; + switch (pin.face) + { + case 0: dir = Vector2.down; break; + case 1: dir = Vector2.left; break; + case 2: dir = Vector2.up; break; + case 3: dir = Vector2.right; break; + default: dir = Vector2.zero; break; + } + if (pin.IsSourcePin) { dir = -dir; } + float pinThickness = isHorizontal ? pinSize.y : pinSize.x; + float arrowLength = pinThickness / 2f; + float arrowWidth = arrowLength * 2f; + Vector2 perp = new Vector2(-dir.y, dir.x); + + + float edgeOffset = pinThickness / 4f; + + //Shifts arrow based on if input/output to ensure its not hidden behind subchip + Vector2 centerOffset = dir * edgeOffset * (pin.IsSourcePin ? 1 : -1); + Vector2 arrowCenter = pinPos + centerOffset; + + Vector2 tip = arrowCenter + dir * (arrowLength / 2f); + Vector2 baseCenter = arrowCenter - dir * (arrowLength / 2f); + Vector2 baseLeft = baseCenter + perp * (arrowWidth / 2f); + Vector2 baseRight = baseCenter - perp * (arrowWidth / 2f); + Draw.Triangle(tip, baseLeft, baseRight, new Color(34f / 255f, 34f / 255f, 34f / 255f, 1f)); + } } - - Draw.Quad(pinPos, pinSize, pinCol); } - public static void DrawGrid(Color gridCol) + public static void DrawGrid(Color gridCol) { float thickness = GridThickness; diff --git a/Assets/Scripts/Seb/SebVis/Draw.cs b/Assets/Scripts/Seb/SebVis/Draw.cs index 905fe682..0111a94d 100644 --- a/Assets/Scripts/Seb/SebVis/Draw.cs +++ b/Assets/Scripts/Seb/SebVis/Draw.cs @@ -3,6 +3,8 @@ using Seb.Vis.Text.FontLoading; using Seb.Vis.Text.Rendering; using UnityEngine; +using System.Collections.Generic; + namespace Seb.Vis { @@ -154,9 +156,39 @@ public static void Line(Vector2 a, Vector2 b, float thickness, Color col, float shapeDrawer.AddToLayer(data); } - // ------ Composite Draw Functions ------ - - public static void LinePath(Vector2[] points, float thickness, Color col, float animT = 1) + public static void WedgePolygon(Vector2 center, float radius, float angleStartDeg, float angleEndDeg, Color color, int PinFace, bool isSource) + { + List points = new List(); + // plot arc + for (int i = 0; i <= 48; i++) + { + float t = (float)i / 48; + float angleDeg = Mathf.Lerp(angleStartDeg, angleEndDeg, t); + float angleRad = angleDeg * Mathf.Deg2Rad; + Vector2 point = center + new Vector2(Mathf.Cos(angleRad), Mathf.Sin(angleRad)) * (radius*1.002f); + points.Add(point); + } + Vector2 dir = PinFace switch + { + 0 => Vector2.up, + 1 => Vector2.right, + 2 => Vector2.down, + 3 => Vector2.left, + _ => Vector2.left + }; + //shortens radius based on pin type to move point away from chip edge + float radshift = isSource ? 0.80f : 0.25f; + //adds the shifted "center" point + points.Add(center + dir * (radius * radshift)); + + for (int i = 0; i < points.Count - 2; i++) + { + Triangle(points[i], points[i + 1], points[points.Count - 1], color); + } + } + // ------ Composite Draw Functions ------ + + public static void LinePath(Vector2[] points, float thickness, Color col, float animT = 1) { if (col.a == 0 || thickness == 0 || animT <= 0) return; diff --git a/TestData/Projects/MainTest/Chips/BuzzTest.json b/TestData/Projects/MainTest/Chips/BuzzTest.json deleted file mode 100644 index 40fc6f42..00000000 --- a/TestData/Projects/MainTest/Chips/BuzzTest.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "DLSVersion": "2.1.5", - "Name": "BuzzTest", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 1.325, - "y": 1.0 - }, - "Colour": { - "r": 0.214282215, - "g": 0.17916204, - "b": 0.250567675, - "a": 1 - }, - "InputPins":[ - { - "Name":"IN", - "ID":141095185, - "Position":{ - "x":-3.76235, - "y":0.65436 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"IN", - "ID":893919584, - "Position":{ - "x":-3.84573, - "y":-0.12514 - }, - "BitCount":4, - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[], - "SubChips":[ - { - "Name":"BUZZER", - "ID":2106109642, - "Label":"", - "Position":{ - "x":-0.375, - "y":-0.04762 - }, - "OutputPinColourInfo":[], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":893919584 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2106109642 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":141095185 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":2106109642 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - } - ], - "Displays": null -} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json deleted file mode 100644 index 6d1823ff..00000000 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "ProjectName": "MainTest", - "DLSVersion_LastSaved": "2.1.5", - "DLSVersion_EarliestCompatible": "2.0.0", - "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-04T09:15:41.061+02:00", - "Prefs_MainPinNamesDisplayMode": 2, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 1, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 150, - "Prefs_SimStepsPerClockTick": 6, - "AllCustomChipNames":[ - "AND", - "D-LATCH", - "NOT", - "OR", - "NOR", - "FLIP-FLOP", - "XOR", - "ADDER", - "ADDER-4", - "REGISTER-1", - "REGISTER-4", - "MEM-1", - "MEM-16", - "ADDER-8", - "REG-8", - "AND-8", - "OR-8", - "NOT-8", - "AND(8,1)", - "MUX-8", - "PC", - "BUF-8", - "ALU-8", - "DECODE-3", - "AND-3", - "CONTROL UNIT", - "TOGGLE", - "FLAGS", - "7-SEGMENT DRIVER", - "DABBLE", - "WIP2", - "LSB", - "LSHIFT-8", - "DOUBLE DABBLE", - "DISP-7", - "DECIMAL-4", - "demo", - "ALU", - "BUS BUFFER", - "MEM-256", - "DECIMAL-8", - "REGISTER-8", - "XNOR", - "EQUALS-8", - "DECODER-2", - "RAM-256×8 (async)", - "RAM-sync", - "TEST MergeSplit", - "#", - "BuzzTest" - ], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"MERGE/SPLIT", - "IsCollection":true - }, - { - "Name":"WIP2", - "IsCollection":false - }, - { - "Name":"RAM-sync", - "IsCollection":false - }, - { - "Name":"TEST MergeSplit", - "IsCollection":false - }, - { - "Name":"NAND", - "IsCollection":false - }, - { - "Name":"#", - "IsCollection":false - }, - { - "Name":"BuzzTest", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","AND","NOT","NOR","XOR","OR","KEY","CLOCK","3-STATE BUFFER"], - "IsToggledOpen":false, - "Name":"BASICS" - }, - { - "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["1-4BIT","1-8BIT","4-8BIT","8-4BIT","8-1BIT","4-1BIT"], - "IsToggledOpen":false, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["7-SEGMENT","DECIMAL-4","DECIMAL-8","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["REGISTER-4","REG-8"], - "IsToggledOpen":false, - "Name":"MEMORY" - }, - { - "Chips":["D-LATCH","FLIP-FLOP","OR-8","MEM-1","NOT-8","AND(8,1)","MUX-8","PC","BUF-8","ALU-8","DECODE-3","AND-3","CONTROL UNIT","TOGGLE","FLAGS","DISP-7","demo","7-SEGMENT DRIVER","DABBLE","LSB","LSHIFT-8","DOUBLE DABBLE","ALU","BUS BUFFER","MEM-256","REGISTER-8","XNOR","EQUALS-8","ADDER-4","DECODER-2","ADDER-8","ADDER","MEM-16","REGISTER-1","AND-8","RAM-256×8 (async)","ROM 256×16"], - "IsToggledOpen":false, - "Name":"KEEP" - }, - { - "Chips":["WIP2","RAM-sync"], - "IsToggledOpen":false, - "Name":"TEST" - }, - { - "Chips":["PULSE","TEST MergeSplit"], - "IsToggledOpen":true, - "Name":"OTHER" - } - ] -} \ No newline at end of file From 28988da492831712984ca3eb765e72433300394b Mon Sep 17 00:00:00 2001 From: Dom Donnelly Date: Wed, 28 May 2025 03:04:34 +0100 Subject: [PATCH 057/124] Min Chip size is nolonger readonly. Now have a function that will Recalculate Min Size during chip resizing to account for any relocated pins. X now checks name min requirement against Pin min requirement to determine min X If a chip is on the edge when resizing it will move the chip in with it, however this can push the edge chip(s) under other chips. Need to add in "pushing" behaviour until the min size is reached and all are spaced as close as possible --- .../Scripts/Game/Elements/SubChipInstance.cs | 88 ++++++++++++++++--- .../World/CustomizationSceneDrawer.cs | 3 +- 2 files changed, 80 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index 75a58da6..037eaadf 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -23,7 +23,7 @@ public class SubChipInstance : IMoveable public readonly uint[] InternalData; public readonly bool IsBus; - public readonly Vector2 MinSize; + public Vector2 MinSize; public readonly string MultiLineName; public readonly PinInstance[] OutputPins; @@ -151,6 +151,13 @@ public void UpdatePinLayout() CalculatePinLayout(InputPins); CalculatePinLayout(OutputPins); } + else + { + PinInstance[] combinedPins = InputPins.Concat(OutputPins).ToArray(); + //ReCalcMinSizes(combinedPins); + CustomLayout(combinedPins); + + } } void CalculatePinLayout(PinInstance[] pins) @@ -190,15 +197,22 @@ void CalculatePinLayout(PinInstance[] pins) } } - void CustomLayout(PinInstance[] pins) + void CustomLayout(PinInstance[] Pins) { - foreach (PinInstance pin in pins) + foreach (PinInstance pin in Pins) { - float pinHeight = pin.bitCount == PinBitCount.Bit1 ? DrawSettings.PinRadius * 2 : PinHeightFromBitCount(pin.bitCount); - float halfPinHeight = pinHeight / 2; - float maxY = Size.y / 2 - halfPinHeight; - float minY = -Size.y / 2 + halfPinHeight; - pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, minY, maxY); + float pinHeight = pin.bitCount == PinBitCount.Bit1 ? DrawSettings.PinRadius * 2 : PinHeightFromBitCount(pin.bitCount); + float halfPinHeight = pinHeight / 2; + + if (pin.face == 0 || pin.face == 2) // Top or bottom face + { + pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, -Size.x / 2 + halfPinHeight, Size.x / 2 - halfPinHeight); + } + else if(pin.face == 1 || pin.face == 3) // Right or left face + { + pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, -Size.y / 2 + halfPinHeight, Size.y / 2 - halfPinHeight); + } + } } public void SetCustomLayout(bool SetCustom) => this.HasCustomLayout = SetCustom; @@ -212,8 +226,62 @@ public static float MinChipHeightForPins(PinDescription[] pins) return CalculateDefaultPinLayout(pins.Select(p => p.BitCount).ToArray()).chipHeight; } - // Calculate minimal height of chip to fit the given pins, and calculate their y positions (in grid space) - public static (float chipHeight, float[] pinGridY) CalculateDefaultPinLayout(PinBitCount[] pins) + + //updates min size of chip based on which pins are on which faces, needed for custom layouts + public void updateMinSize() + { + PinInstance[] pins = InputPins.Concat(OutputPins).ToArray(); + if (pins == null || pins.Length == 0) return; + float Min0 = 0f; + float Min1 = 0f; + float Min2 = 0f; + float Min3 = 0f; + foreach (PinInstance pin in pins) + { + + int pinGridHeight = pin.bitCount switch + { + PinBitCount.Bit1 => 2, + PinBitCount.Bit4 => 3, + _ => 4 + }; + if (pin.face == 0) + { + Min0 += pinGridHeight; + } + else if (pin.face == 1) + { + Min1 += pinGridHeight; + } + else if (pin.face == 2) + { + Min2 += pinGridHeight; + } + else + { + Min3 += pinGridHeight; + } + } + + float MinY = Mathf.Max(Min1, Min3); + float MinX = Mathf.Max(Min0, Min2); + + MinX = Mathf.Abs(MinX) * DrawSettings.GridSize; + MinY = Mathf.Abs(MinY) * DrawSettings.GridSize; + + string multiLineName = CreateMultiLineName(Description.Name); + bool hasMultiLineName = multiLineName != Description.Name; + float minNameHeight = DrawSettings.GridSize * (hasMultiLineName ? 4 : 3); + + Vector2 nameDrawBoundsSize = DevSceneDrawer.CalculateChipNameBounds(multiLineName); + + float sizeX = Mathf.Max(nameDrawBoundsSize.x + DrawSettings.GridSize, MinX); + float sizeY = Mathf.Max(minNameHeight, MinY); + MinSize = new Vector2(sizeX, sizeY); + } + + // Calculate minimal height of chip to fit the given pins, and calculate their y positions (in grid space) + public static (float chipHeight, float[] pinGridY) CalculateDefaultPinLayout(PinBitCount[] pins) { int gridY = 0; // top float[] pinGridYVals = new float[pins.Length]; diff --git a/Assets/Scripts/Graphics/World/CustomizationSceneDrawer.cs b/Assets/Scripts/Graphics/World/CustomizationSceneDrawer.cs index 0657fd59..4c402f5a 100644 --- a/Assets/Scripts/Graphics/World/CustomizationSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/CustomizationSceneDrawer.cs @@ -337,11 +337,12 @@ bool DrawScaleHandle(Vector2 edge, Vector2Int dir) // Snap chip width to grid lines if in snap mode if (Project.ActiveProject.ShouldSnapToGrid && dir.x != 0) desiredSize.x = GridHelper.SnapToGridForceEven(desiredSize.x) - DrawSettings.ChipOutlineWidth; + chip.updateMinSize(); Vector2 sizeNew = Vector2.Max(desiredSize, chip.MinSize); if (sizeNew != chip.Size) { - chip.Description.Size = Vector2.Max(desiredSize, chip.MinSize); + chip.Description.Size = Vector2.Max(desiredSize, chip.MinSize); ChipSaveMenu.ActiveCustomizeChip.UpdatePinLayout(); } } From 00efe42820d4dc97283aeb23c9e0368eaacdea7f Mon Sep 17 00:00:00 2001 From: Dom Donnelly Date: Wed, 28 May 2025 22:32:19 +0100 Subject: [PATCH 058/124] Rewrote customLayout to to fix issue from last commit, now clamps pins onto chip and push pins inwards to ensure no overlap. sweeps both directions to ensure both ends stay on chip and move pins as needed. --- .gitignore | 1 + .../Scripts/Game/Elements/SubChipInstance.cs | 81 ++++++++++++++----- .../UI/Menus/ChipCustomizationMenu.cs | 2 +- .../Scripts/Graphics/World/DevSceneDrawer.cs | 4 +- 4 files changed, 64 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 26cdf372..ae816e55 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,4 @@ crashlytics-build.properties /TestData/Projects/MainTest/ProjectDescription.json /TestData/Projects/MainTest/Chips/BuzzTest.json /TestData/Projects/MainTest/ProjectDescription.json +/TestData/Projects/MainTest/Chips diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index 037eaadf..f9649d82 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -154,13 +154,12 @@ public void UpdatePinLayout() else { PinInstance[] combinedPins = InputPins.Concat(OutputPins).ToArray(); - //ReCalcMinSizes(combinedPins); CustomLayout(combinedPins); - + } - } - - void CalculatePinLayout(PinInstance[] pins) + } + + void CalculatePinLayout(PinInstance[] pins) { // If only one pin, it should be placed in the centre if (pins.Length == 1) @@ -197,25 +196,65 @@ void CalculatePinLayout(PinInstance[] pins) } } - void CustomLayout(PinInstance[] Pins) - { - foreach (PinInstance pin in Pins) - { - float pinHeight = pin.bitCount == PinBitCount.Bit1 ? DrawSettings.PinRadius * 2 : PinHeightFromBitCount(pin.bitCount); - float halfPinHeight = pinHeight / 2; + void CustomLayout(PinInstance[] pins) + { + if (pins == null || pins.Length == 0) return; - if (pin.face == 0 || pin.face == 2) // Top or bottom face - { - pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, -Size.x / 2 + halfPinHeight, Size.x / 2 - halfPinHeight); + foreach (int face in new[] { 0, 1, 2, 3 }) + { + var facePins = pins.Where(p => p.face == face).ToList(); + if (facePins.Count == 0) continue; + + bool isHorizontal = face == 0 || face == 2; + float chipSpan = isHorizontal ? Size.x : Size.y; + + float GetHalfHeight(PinInstance pin) => PinHeightFromBitCount(pin.bitCount) / 2f; + float GetRequiredSpacing(PinInstance a, PinInstance b) + => GetHalfHeight(a) + GetHalfHeight(b) + DrawSettings.GridSize; + float GetMinBound(PinInstance pin) => -chipSpan / 2f + GetHalfHeight(pin); + float GetMaxBound(PinInstance pin) => chipSpan / 2f - GetHalfHeight(pin); + + void Clamp(PinInstance pin) + => pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, GetMinBound(pin), GetMaxBound(pin)); + + foreach (var pin in facePins) + Clamp(pin); + + // Sweeps negative to positive (left to right / bottom to top) + var sweepLowToHigh = facePins.OrderBy(p => p.LocalPosY).ToList(); + for (int i = 1; i < sweepLowToHigh.Count; i++) + { + var prev = sweepLowToHigh[i - 1]; + var curr = sweepLowToHigh[i]; + + float spacing = GetRequiredSpacing(prev, curr); + float delta = curr.LocalPosY - prev.LocalPosY; + + if (delta < spacing) + { + curr.LocalPosY = prev.LocalPosY + spacing; + Clamp(curr); + } } - else if(pin.face == 1 || pin.face == 3) // Right or left face - { - pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, -Size.y / 2 + halfPinHeight, Size.y / 2 - halfPinHeight); + // now sweep positive to negative (right to left / top to bottom) to ensure both ends are within chip + var sweepHighToLow = facePins.OrderByDescending(p => p.LocalPosY).ToList(); + for (int i = 1; i < sweepHighToLow.Count; i++) + { + var prev = sweepHighToLow[i - 1]; + var curr = sweepHighToLow[i]; + + float spacing = GetRequiredSpacing(prev, curr); + float delta = prev.LocalPosY - curr.LocalPosY; + + if (delta < spacing) + { + curr.LocalPosY = prev.LocalPosY - spacing; + Clamp(curr); + } } - - } - } - public void SetCustomLayout(bool SetCustom) => this.HasCustomLayout = SetCustom; + } + } + public void SetCustomLayout(bool SetCustom) => this.HasCustomLayout = SetCustom; // Min chip height based on input and output pins public static float MinChipHeightForPins(PinDescription[] inputs, PinDescription[] outputs) => Mathf.Max(MinChipHeightForPins(inputs), MinChipHeightForPins(outputs)); diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs index d6aef317..b4477919 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs @@ -358,7 +358,7 @@ static void HandlePinDragging() } } - static bool DoesPinOverlap(PinInstance pin, out PinInstance overlappedPin) + public static bool DoesPinOverlap(PinInstance pin, out PinInstance overlappedPin) { overlappedPin = null; if (!(pin.parent is SubChipInstance chip)) return false; diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 037c4584..39742f5c 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -959,12 +959,12 @@ static void DrawSingleBitPin(PinInstance pin) if (!pin.IsSourcePin) { - wedgeSpan = 100f; + wedgeSpan = 100f; //edit angle of input angle = Mathf.Atan2(-dir.y, -dir.x) * Mathf.Rad2Deg; } else { - wedgeSpan = 150f; + wedgeSpan = 150f; //edits angle of output angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg; } float angleStart = angle - wedgeSpan / 2f; From 0e3248b3b48a1d34fa4812805515636434e380a4 Mon Sep 17 00:00:00 2001 From: Dom Donnelly Date: Wed, 28 May 2025 22:32:19 +0100 Subject: [PATCH 059/124] Rewrote customLayout to to fix issue from last commit, now clamps pins onto chip and push pins inwards to ensure no overlap. sweeps both directions to ensure both ends stay on chip and move pins as needed. --- .gitignore | 16 -- .../Scripts/Game/Elements/SubChipInstance.cs | 81 +++++++--- .../UI/Menus/ChipCustomizationMenu.cs | 2 +- .../Scripts/Graphics/World/DevSceneDrawer.cs | 4 +- .../Projects/MainTest/Chips/BuzzTest.json | 85 ++++++++++ .../Projects/MainTest/ProjectDescription.json | 149 ++++++++++++++++++ 6 files changed, 297 insertions(+), 40 deletions(-) create mode 100644 TestData/Projects/MainTest/Chips/BuzzTest.json create mode 100644 TestData/Projects/MainTest/ProjectDescription.json diff --git a/.gitignore b/.gitignore index 26cdf372..dc00d664 100644 --- a/.gitignore +++ b/.gitignore @@ -71,19 +71,3 @@ crashlytics-build.properties /[Aa]ssets/[Ss]treamingAssets/aa/* /.idea /.vsconfig -/TestData/Projects/MainTest/Deleted Chips -/TestData/Projects/MainTest/Chips/123.json -/TestData/Projects/MainTest/Chips/a.json -/TestData/Projects/MainTest/Chips/BuzzTest.json -/TestData/Projects/MainTest/Chips/Defaultlayout.json -/TestData/Projects/MainTest/Chips/In.json -/TestData/Projects/MainTest/Chips/Layout.json -/TestData/Projects/MainTest/Chips/PT.json -/TestData/Projects/MainTest/Chips/SaveTest.json -/TestData/Projects/MainTest/Chips/test.json -/TestData/Projects/MainTest/Chips/test1.json -/TestData/Projects/MainTest/Chips/testarrow.json -/TestData/Projects/MainTest/Chips/Wireless.json -/TestData/Projects/MainTest/ProjectDescription.json -/TestData/Projects/MainTest/Chips/BuzzTest.json -/TestData/Projects/MainTest/ProjectDescription.json diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index 037eaadf..f9649d82 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -154,13 +154,12 @@ public void UpdatePinLayout() else { PinInstance[] combinedPins = InputPins.Concat(OutputPins).ToArray(); - //ReCalcMinSizes(combinedPins); CustomLayout(combinedPins); - + } - } - - void CalculatePinLayout(PinInstance[] pins) + } + + void CalculatePinLayout(PinInstance[] pins) { // If only one pin, it should be placed in the centre if (pins.Length == 1) @@ -197,25 +196,65 @@ void CalculatePinLayout(PinInstance[] pins) } } - void CustomLayout(PinInstance[] Pins) - { - foreach (PinInstance pin in Pins) - { - float pinHeight = pin.bitCount == PinBitCount.Bit1 ? DrawSettings.PinRadius * 2 : PinHeightFromBitCount(pin.bitCount); - float halfPinHeight = pinHeight / 2; + void CustomLayout(PinInstance[] pins) + { + if (pins == null || pins.Length == 0) return; - if (pin.face == 0 || pin.face == 2) // Top or bottom face - { - pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, -Size.x / 2 + halfPinHeight, Size.x / 2 - halfPinHeight); + foreach (int face in new[] { 0, 1, 2, 3 }) + { + var facePins = pins.Where(p => p.face == face).ToList(); + if (facePins.Count == 0) continue; + + bool isHorizontal = face == 0 || face == 2; + float chipSpan = isHorizontal ? Size.x : Size.y; + + float GetHalfHeight(PinInstance pin) => PinHeightFromBitCount(pin.bitCount) / 2f; + float GetRequiredSpacing(PinInstance a, PinInstance b) + => GetHalfHeight(a) + GetHalfHeight(b) + DrawSettings.GridSize; + float GetMinBound(PinInstance pin) => -chipSpan / 2f + GetHalfHeight(pin); + float GetMaxBound(PinInstance pin) => chipSpan / 2f - GetHalfHeight(pin); + + void Clamp(PinInstance pin) + => pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, GetMinBound(pin), GetMaxBound(pin)); + + foreach (var pin in facePins) + Clamp(pin); + + // Sweeps negative to positive (left to right / bottom to top) + var sweepLowToHigh = facePins.OrderBy(p => p.LocalPosY).ToList(); + for (int i = 1; i < sweepLowToHigh.Count; i++) + { + var prev = sweepLowToHigh[i - 1]; + var curr = sweepLowToHigh[i]; + + float spacing = GetRequiredSpacing(prev, curr); + float delta = curr.LocalPosY - prev.LocalPosY; + + if (delta < spacing) + { + curr.LocalPosY = prev.LocalPosY + spacing; + Clamp(curr); + } } - else if(pin.face == 1 || pin.face == 3) // Right or left face - { - pin.LocalPosY = Mathf.Clamp(pin.LocalPosY, -Size.y / 2 + halfPinHeight, Size.y / 2 - halfPinHeight); + // now sweep positive to negative (right to left / top to bottom) to ensure both ends are within chip + var sweepHighToLow = facePins.OrderByDescending(p => p.LocalPosY).ToList(); + for (int i = 1; i < sweepHighToLow.Count; i++) + { + var prev = sweepHighToLow[i - 1]; + var curr = sweepHighToLow[i]; + + float spacing = GetRequiredSpacing(prev, curr); + float delta = prev.LocalPosY - curr.LocalPosY; + + if (delta < spacing) + { + curr.LocalPosY = prev.LocalPosY - spacing; + Clamp(curr); + } } - - } - } - public void SetCustomLayout(bool SetCustom) => this.HasCustomLayout = SetCustom; + } + } + public void SetCustomLayout(bool SetCustom) => this.HasCustomLayout = SetCustom; // Min chip height based on input and output pins public static float MinChipHeightForPins(PinDescription[] inputs, PinDescription[] outputs) => Mathf.Max(MinChipHeightForPins(inputs), MinChipHeightForPins(outputs)); diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs index d6aef317..b4477919 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs @@ -358,7 +358,7 @@ static void HandlePinDragging() } } - static bool DoesPinOverlap(PinInstance pin, out PinInstance overlappedPin) + public static bool DoesPinOverlap(PinInstance pin, out PinInstance overlappedPin) { overlappedPin = null; if (!(pin.parent is SubChipInstance chip)) return false; diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 037c4584..39742f5c 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -959,12 +959,12 @@ static void DrawSingleBitPin(PinInstance pin) if (!pin.IsSourcePin) { - wedgeSpan = 100f; + wedgeSpan = 100f; //edit angle of input angle = Mathf.Atan2(-dir.y, -dir.x) * Mathf.Rad2Deg; } else { - wedgeSpan = 150f; + wedgeSpan = 150f; //edits angle of output angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg; } float angleStart = angle - wedgeSpan / 2f; diff --git a/TestData/Projects/MainTest/Chips/BuzzTest.json b/TestData/Projects/MainTest/Chips/BuzzTest.json new file mode 100644 index 00000000..40fc6f42 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/BuzzTest.json @@ -0,0 +1,85 @@ +{ + "DLSVersion": "2.1.5", + "Name": "BuzzTest", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.325, + "y": 1.0 + }, + "Colour": { + "r": 0.214282215, + "g": 0.17916204, + "b": 0.250567675, + "a": 1 + }, + "InputPins":[ + { + "Name":"IN", + "ID":141095185, + "Position":{ + "x":-3.76235, + "y":0.65436 + }, + "BitCount":8, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"IN", + "ID":893919584, + "Position":{ + "x":-3.84573, + "y":-0.12514 + }, + "BitCount":4, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[], + "SubChips":[ + { + "Name":"BUZZER", + "ID":2106109642, + "Label":"", + "Position":{ + "x":-0.375, + "y":-0.04762 + }, + "OutputPinColourInfo":[], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":893919584 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2106109642 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":141095185 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":2106109642 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + } + ], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json new file mode 100644 index 00000000..5f607697 --- /dev/null +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -0,0 +1,149 @@ +{ + "ProjectName": "MainTest", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "CreationTime": "2025-03-14T17:23:30.404+00:00", + "LastSaveTime": "2025-05-29T03:05:44.779+01:00", + "Prefs_MainPinNamesDisplayMode": 2, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 1, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 150, + "Prefs_SimStepsPerClockTick": 6, + "Perfs_PinIndicators": 0, + "AllCustomChipNames":[ + "AND", + "D-LATCH", + "NOT", + "OR", + "NOR", + "FLIP-FLOP", + "XOR", + "ADDER", + "ADDER-4", + "REGISTER-1", + "REGISTER-4", + "MEM-1", + "MEM-16", + "ADDER-8", + "REG-8", + "AND-8", + "OR-8", + "NOT-8", + "AND(8,1)", + "MUX-8", + "PC", + "BUF-8", + "ALU-8", + "DECODE-3", + "AND-3", + "CONTROL UNIT", + "TOGGLE", + "FLAGS", + "7-SEGMENT DRIVER", + "DABBLE", + "WIP2", + "LSB", + "LSHIFT-8", + "DOUBLE DABBLE", + "DISP-7", + "DECIMAL-4", + "demo", + "ALU", + "BUS BUFFER", + "MEM-256", + "DECIMAL-8", + "REGISTER-8", + "XNOR", + "EQUALS-8", + "DECODER-2", + "RAM-256×8 (async)", + "RAM-sync", + "TEST MergeSplit", + "#", + "BuzzTest" + ], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"MERGE/SPLIT", + "IsCollection":true + }, + { + "Name":"WIP2", + "IsCollection":false + }, + { + "Name":"RAM-sync", + "IsCollection":false + }, + { + "Name":"TEST MergeSplit", + "IsCollection":false + }, + { + "Name":"NAND", + "IsCollection":false + }, + { + "Name":"#", + "IsCollection":false + }, + { + "Name":"BuzzTest", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","AND","NOT","NOR","XOR","OR","KEY","CLOCK","3-STATE BUFFER"], + "IsToggledOpen":false, + "Name":"BASICS" + }, + { + "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["1-4BIT","1-8BIT","4-8BIT","8-4BIT","8-1BIT","4-1BIT"], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["7-SEGMENT","DECIMAL-4","DECIMAL-8","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["REGISTER-4","REG-8"], + "IsToggledOpen":false, + "Name":"MEMORY" + }, + { + "Chips":["D-LATCH","FLIP-FLOP","OR-8","MEM-1","NOT-8","AND(8,1)","MUX-8","PC","BUF-8","ALU-8","DECODE-3","AND-3","CONTROL UNIT","TOGGLE","FLAGS","DISP-7","demo","7-SEGMENT DRIVER","DABBLE","LSB","LSHIFT-8","DOUBLE DABBLE","ALU","BUS BUFFER","MEM-256","REGISTER-8","XNOR","EQUALS-8","ADDER-4","DECODER-2","ADDER-8","ADDER","MEM-16","REGISTER-1","AND-8","RAM-256×8 (async)","ROM 256×16"], + "IsToggledOpen":false, + "Name":"KEEP" + }, + { + "Chips":["WIP2","RAM-sync"], + "IsToggledOpen":false, + "Name":"TEST" + }, + { + "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest"], + "IsToggledOpen":true, + "Name":"OTHER" + } + ] +} \ No newline at end of file From 3ed84a1dd0d43094022aff1277089c0327d9fd36 Mon Sep 17 00:00:00 2001 From: Dom Donnelly Date: Thu, 29 May 2025 20:04:59 +0100 Subject: [PATCH 060/124] Customisation menu now loads existing custom layouts if editing a previously created chip. Fixed red highlight for overlapping pins not drawing horizontally. Fixed issue of not calculating and setting chip min size when going from custom to default layout via wheel. --- .../Scripts/Game/Elements/SubChipInstance.cs | 2 +- .../UI/Menus/ChipCustomizationMenu.cs | 35 ++++++++-------- .../Scripts/Graphics/UI/Menus/ChipSaveMenu.cs | 41 +++++++++++++++---- .../World/CustomizationSceneDrawer.cs | 36 ++++++++++++---- .../Scripts/Graphics/World/DevSceneDrawer.cs | 10 +++-- 5 files changed, 87 insertions(+), 37 deletions(-) diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index a4f32d19..ebffe3bb 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -29,7 +29,7 @@ public class SubChipInstance : IMoveable public readonly PinInstance[] OutputPins; public string activationKeyString; // input char for the 'key chip' type (stored as string to avoid allocating when drawing) public string Label; - private bool HasCustomLayout; + public bool HasCustomLayout; public SubChipInstance(ChipDescription description, SubChipDescription subChipDesc) { diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs index b4477919..4a94d099 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs @@ -95,8 +95,18 @@ public static void DrawMenu() pin.face = 1; pin.LocalPosY = 0; //Reset layout - ChipSaveMenu.ActiveCustomizeChip.UpdatePinLayout(); + } + ChipSaveMenu.ActiveCustomizeChip.updateMinSize(); + if (ChipSaveMenu.ActiveCustomizeChip.MinSize.x > ChipSaveMenu.ActiveCustomizeChip.Description.Size.x) + { + ChipSaveMenu.ActiveCustomizeChip.Description.Size.x = ChipSaveMenu.ActiveCustomizeChip.MinSize.x; + } + if (ChipSaveMenu.ActiveCustomizeChip.MinSize.y > ChipSaveMenu.ActiveCustomizeChip.Description.Size.y) + { + ChipSaveMenu.ActiveCustomizeChip.Description.Size.y = ChipSaveMenu.ActiveCustomizeChip.MinSize.y; + } + ChipSaveMenu.ActiveCustomizeChip.UpdatePinLayout(); } else if (layoutMode == 1 && !isCustomLayout) { @@ -195,11 +205,9 @@ static void InitUIFromChipDescription() // Init name display mode WheelSelectorState nameDisplayWheelState = UI.GetWheelSelectorState(ID_NameDisplayOptions); nameDisplayWheelState.index = (int)ChipSaveMenu.ActiveCustomizeDescription.NameLocation; + // Init layout mode by checking if any pins have custom positions - DevChipInstance chip = Project.ActiveProject.ViewedChip; - isCustomLayout = chip.HasCustomLayout; - - //TODO: Add in Load for custom layout of pins + isCustomLayout = Project.ActiveProject.ViewedChip.HasCustomLayout; WheelSelectorState layoutWheelState = UI.GetWheelSelectorState(ID_LayoutOptions); layoutWheelState.index = isCustomLayout ? 1 : 0; @@ -303,29 +311,26 @@ static void HandlePinDragging() selectedPin.face = closestFace; - float pinHeight = selectedPin.bitCount == PinBitCount.Bit1 - ? DrawSettings.PinRadius * 2 - : SubChipInstance.PinHeightFromBitCount(selectedPin.bitCount); + float pinHeight = SubChipInstance.PinHeightFromBitCount(selectedPin.bitCount); float maxOffset; float offsetAlongFace; if (closestFace == 0 || closestFace == 2) { - // Horizontal face -> move along X + // Horizontal face - move along X axis maxOffset = chipHalfSize.x - pinHeight / 2f; offsetAlongFace = Mathf.Clamp(localMouse.x, -maxOffset, maxOffset); } else { - // Vertical face -> move along Y + // Vertical face - move along Y axis maxOffset = chipHalfSize.y - pinHeight / 2f; offsetAlongFace = Mathf.Clamp(localMouse.y, -maxOffset, maxOffset); } selectedPin.LocalPosY = offsetAlongFace; - // Check for overlap PinInstance overlappedPin; isPinPositionValid = !DoesPinOverlap(selectedPin, out overlappedPin); @@ -378,13 +383,9 @@ public static bool DoesPinOverlap(PinInstance pin, out PinInstance overlappedPin float distanceAlongFace = Mathf.Abs(pin.LocalPosY - otherPin.LocalPosY); // Calculate minimum required spacing based on pin sizes - float pinHeight = pin.bitCount == PinBitCount.Bit1 - ? DrawSettings.PinRadius * 2 - : SubChipInstance.PinHeightFromBitCount(pin.bitCount); + float pinHeight = SubChipInstance.PinHeightFromBitCount(pin.bitCount); - float otherPinHeight = otherPin.bitCount == PinBitCount.Bit1 - ? DrawSettings.PinRadius * 2 - : SubChipInstance.PinHeightFromBitCount(otherPin.bitCount); + float otherPinHeight = SubChipInstance.PinHeightFromBitCount(otherPin.bitCount); // Required space is half each pin's height plus some buffer float requiredSpacing = (pinHeight + otherPinHeight) / 2f + minPinSpacing; diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipSaveMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipSaveMenu.cs index 53b191ea..6a7e078a 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipSaveMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipSaveMenu.cs @@ -113,15 +113,38 @@ public static void DrawMenu() } } - // Create a subchip instance based on the current dev chip (we need a subchip instance to be able to draw a preview of the chip in the customization menu) - // The description on this subchip holds potential customizations, such as name changes, resizing, colour etc. - static SubChipInstance CreateCustomizationState() - { - ChipDescription desc = DescriptionCreator.CreateChipDescription(Project.ActiveProject.ViewedChip); - return CreatePreviewSubChipInstance(desc); - } - - static void OpenCustomizationMenu() + // Create a subchip instance based on the current dev chip (we need a subchip instance to be able to draw a preview of the chip in the customization menu) + // The description on this subchip holds potential customizations, such as name changes, resizing, colour etc. + // This will load custom pin layouts if available to support editting existing chips. if no custom layout will use default behaviours. + static SubChipInstance CreateCustomizationState() + { + DevChipInstance viewedChip = Project.ActiveProject.ViewedChip; + ChipDescription desc = DescriptionCreator.CreateChipDescription(viewedChip); + + desc.HasCustomLayout = viewedChip.HasCustomLayout; + + // Copy layout if it exists + if (desc.HasCustomLayout && viewedChip.LastSavedDescription != null) + { + var savedDesc = viewedChip.LastSavedDescription; + + for (int i = 0; i < desc.InputPins.Length && i < savedDesc.InputPins.Length; i++) + { + desc.InputPins[i].face = savedDesc.InputPins[i].face; + desc.InputPins[i].LocalOffset = savedDesc.InputPins[i].LocalOffset; + } + + for (int i = 0; i < desc.OutputPins.Length && i < savedDesc.OutputPins.Length; i++) + { + desc.OutputPins[i].face = savedDesc.OutputPins[i].face; + desc.OutputPins[i].LocalOffset = savedDesc.OutputPins[i].LocalOffset; + } + } + + return CreatePreviewSubChipInstance(desc); + } + + static void OpenCustomizationMenu() { ActiveCustomizeChip = CreatePreviewSubChipInstance(ActiveCustomizeDescription); CustomizeStateBeforeEnteringCustomizeMenu = CreatePreviewSubChipInstance(Saver.CloneChipDescription(ActiveCustomizeDescription)); diff --git a/Assets/Scripts/Graphics/World/CustomizationSceneDrawer.cs b/Assets/Scripts/Graphics/World/CustomizationSceneDrawer.cs index 4c402f5a..e3a5a241 100644 --- a/Assets/Scripts/Graphics/World/CustomizationSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/CustomizationSceneDrawer.cs @@ -5,6 +5,7 @@ using Seb.Types; using Seb.Vis; using UnityEngine; +using System.Linq; namespace DLS.Graphics { @@ -331,13 +332,34 @@ bool DrawScaleHandle(Vector2 edge, Vector2Int dir) Vector2 mouseDelta = InputHelper.MousePosWorld - chipResizeMouseStartPos; Vector2 desiredSize = chipResizeStartSize + Vector2.Scale(dir, mouseDelta) * 2; - // Always snap chip height so that pins align with grid lines/centers - float deltaY = GridHelper.SnapToGrid(desiredSize.y - chip.MinSize.y); - desiredSize.y = chip.MinSize.y + deltaY; - // Snap chip width to grid lines if in snap mode - if (Project.ActiveProject.ShouldSnapToGrid && dir.x != 0) desiredSize.x = GridHelper.SnapToGridForceEven(desiredSize.x) - DrawSettings.ChipOutlineWidth; - - chip.updateMinSize(); + // snaps if snapping is on or if chip has pins on top or bottom + bool snapX = Project.ActiveProject.ShouldSnapToGrid; + if (!snapX && chip.HasCustomLayout) + { + bool hasXFacePins = chip.InputPins.Concat(chip.OutputPins).Any(p => p.face == 0 || p.face == 2); + snapX = hasXFacePins; + } + + // snaps if snapping is on or if chip has pins on left or right. if default layout then forces snapping on Y + bool snapY = true; + if (chip.HasCustomLayout) + { + bool hasYFacePins = chip.InputPins.Concat(chip.OutputPins).Any(p => p.face == 1 || p.face == 3); + snapY = hasYFacePins || Project.ActiveProject.ShouldSnapToGrid; + } + + if (snapY && dir.y != 0) + { + float deltaY = GridHelper.SnapToGrid(desiredSize.y - chip.MinSize.y); + desiredSize.y = chip.MinSize.y + deltaY; + } + + if (snapX && dir.x != 0) + { + desiredSize.x = GridHelper.SnapToGridForceEven(desiredSize.x) - DrawSettings.ChipOutlineWidth; + } + + chip.updateMinSize(); Vector2 sizeNew = Vector2.Max(desiredSize, chip.MinSize); if (sizeNew != chip.Size) diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 3b2bb945..451739ed 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -964,7 +964,7 @@ static void DrawPin(PinInstance pin) DrawMultiBitPin(pin); } - //makes pins red if too close + //makes pins red if too close if (ChipCustomizationMenu.isDraggingPin && ChipCustomizationMenu.selectedPin == pin && !ChipCustomizationMenu.isPinPositionValid) { Vector2 pinPos = pin.GetWorldPos(); @@ -976,13 +976,17 @@ static void DrawPin(PinInstance pin) { float pinWidth = PinRadius * 2 * 0.95f; float pinHeight = SubChipInstance.PinHeightFromBitCount(pin.bitCount); - Vector2 pinSize = new(pinWidth, pinHeight); + + Vector2 pinSize = (pin.face == 0 || pin.face == 2) + ? new Vector2(pinHeight, pinWidth) // horizontal pin + : new Vector2(pinWidth, pinHeight); // vertical pin + Draw.Quad(pinPos, pinSize * 1.2f, Color.red); } } } - static void DrawSingleBitPin(PinInstance pin) + static void DrawSingleBitPin(PinInstance pin) { Vector2 pinPos = pin.GetWorldPos(); Vector2 pinSelectionBoundsPos = pinPos + pin.ForwardDir * 0.02f; From c05ae1bb702cac347525e9e46da572d2dd0b840f Mon Sep 17 00:00:00 2001 From: Dom Donnelly Date: Thu, 29 May 2025 20:37:19 +0100 Subject: [PATCH 061/124] Missed a typo which was causing some issues. Now working (I hope) --- Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs index 4a94d099..c7fea0d0 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs @@ -228,7 +228,7 @@ static void UpdateCustomizeDescription() for (int i = 0; i < ChipSaveMenu.ActiveCustomizeChip.Description.OutputPins.Length; i++) { ChipSaveMenu.ActiveCustomizeChip.Description.OutputPins[i].LocalOffset = ChipSaveMenu.ActiveCustomizeChip.OutputPins[i].LocalPosY; - ChipSaveMenu.ActiveCustomizeChip.Description.InputPins[i].face = ChipSaveMenu.ActiveCustomizeChip.InputPins[i].face; + ChipSaveMenu.ActiveCustomizeChip.Description.OutputPins[i].face = ChipSaveMenu.ActiveCustomizeChip.OutputPins[i].face; } } From 27b14a9add2b85b02586dcc43aaf56b33ee88304 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Fri, 30 May 2025 05:22:02 +0200 Subject: [PATCH 062/124] Support for pins of any size Max limit of 16 bits for usable pins. --- .gitignore | 10 +++ .../Description/Helpers/ChipTypeHelper.cs | 44 ++----------- .../Description/Serialization/Serializer.cs | 19 ++++++ .../Description/Types/ProjectDescription.cs | 9 ++- .../Description/Types/SubTypes/ChipTypes.cs | 12 ++-- .../Types/SubTypes/PinDescription.cs | 61 +++++++++++++++++-- .../Scripts/Game/Elements/DevPinInstance.cs | 34 +++++------ Assets/Scripts/Game/Elements/PinInstance.cs | 8 ++- .../Scripts/Game/Elements/SubChipInstance.cs | 16 ++--- Assets/Scripts/Game/Helpers/GridHelper.cs | 25 ++++++++ .../Interaction/ChipInteractionController.cs | 6 +- Assets/Scripts/Game/Main/Main.cs | 4 +- .../Game/Project/BuiltInPinTypeCreator.cs | 19 ++++++ .../Project/BuiltInPinTypeCreator.cs.meta | 2 + .../Game/Project/BuiltinChipCreator.cs | 56 ++++++----------- .../Game/Project/BuiltinCollectionCreator.cs | 6 -- .../Scripts/Graphics/World/DevSceneDrawer.cs | 2 +- Assets/Scripts/SaveSystem/Loader.cs | 56 +++++++++++++++-- Assets/Scripts/SaveSystem/UpgradeHelper.cs | 13 ++++ 19 files changed, 267 insertions(+), 135 deletions(-) create mode 100644 Assets/Scripts/Game/Project/BuiltInPinTypeCreator.cs create mode 100644 Assets/Scripts/Game/Project/BuiltInPinTypeCreator.cs.meta diff --git a/.gitignore b/.gitignore index dc00d664..6ab61d28 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,13 @@ crashlytics-build.properties /[Aa]ssets/[Ss]treamingAssets/aa/* /.idea /.vsconfig +TestData/Projects/testea/ProjectDescription.json +TestData/Projects/sq/ProjectDescription.json +TestData/Projects/sq/Chips/rzqr.json +TestData/Projects/sq/Chips/qdzadzada.json +TestData/Projects/sq/Chips/q.json +TestData/Projects/MainTest/ProjectDescription.json +TestData/Deleted Projects/testPins/ProjectDescription.json +TestData/Deleted Projects/pintest/ProjectDescription.json +TestData/Deleted Projects/Pinners/ProjectDescription.json +TestData/Deleted Projects/aaa/ProjectDescription.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 5a4e10be..4410ed0f 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -38,12 +38,6 @@ public static class ChipTypeHelper // ---- Not really chips (but convenient to treat them as such anyway) ---- // ---- Inputs/Outputs ---- - { ChipType.In_1Bit, "IN-1" }, - { ChipType.In_4Bit, "IN-4" }, - { ChipType.In_8Bit, "IN-8" }, - { ChipType.Out_1Bit, "OUT-1" }, - { ChipType.Out_4Bit, "OUT-4" }, - { ChipType.Out_8Bit, "OUT-8" }, { ChipType.Key, "KEY" }, { ChipType.Button, "BUTTON" }, { ChipType.Toggle, "DIPSWITCH" }, @@ -78,39 +72,13 @@ public static ChipType GetCorrespondingBusTerminusType(ChipType type) }; } - public static ChipType GetPinType(bool isInput, PinBitCount numBits) + public static (bool isInput, bool isOutput, PinBitCount numBits) IsInputOrOutputPin(ChipDescription chip) { - if (isInput) + return chip.ChipType switch { - return numBits switch - { - PinBitCount.Bit1 => ChipType.In_1Bit, - PinBitCount.Bit4 => ChipType.In_4Bit, - PinBitCount.Bit8 => ChipType.In_8Bit, - _ => throw new Exception("No input pin type found for bitcount: " + numBits) - }; - } - - return numBits switch - { - PinBitCount.Bit1 => ChipType.Out_1Bit, - PinBitCount.Bit4 => ChipType.Out_4Bit, - PinBitCount.Bit8 => ChipType.Out_8Bit, - _ => throw new Exception("No output pin type found for bitcount: " + numBits) - }; - } - - public static (bool isInput, bool isOutput, PinBitCount numBits) IsInputOrOutputPin(ChipType type) - { - return type switch - { - ChipType.In_1Bit => (true, false, PinBitCount.Bit1), - ChipType.Out_1Bit => (false, true, PinBitCount.Bit1), - ChipType.In_4Bit => (true, false, PinBitCount.Bit4), - ChipType.Out_4Bit => (false, true, PinBitCount.Bit4), - ChipType.In_8Bit => (true, false, PinBitCount.Bit8), - ChipType.Out_8Bit => (false, true, PinBitCount.Bit8), - _ => (false, false, PinBitCount.Bit1) + ChipType.In_Pin => (true, false, chip.OutputPins[0].BitCount), + ChipType.Out_Pin => (false, true, chip.InputPins[0].BitCount), + _ => (false, false, new PinBitCount { BitCount = 1 }) }; } @@ -124,4 +92,4 @@ public static bool IsInternalDataModifiable(ChipType type) { return type == ChipType.EEPROM_256x16 || type == ChipType.Toggle; } } -} \ No newline at end of file +} \ No newline at end of file diff --git a/Assets/Scripts/Description/Serialization/Serializer.cs b/Assets/Scripts/Description/Serialization/Serializer.cs index 4ee50c55..504db116 100644 --- a/Assets/Scripts/Description/Serialization/Serializer.cs +++ b/Assets/Scripts/Description/Serialization/Serializer.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using Newtonsoft.Json; @@ -23,6 +24,7 @@ static JsonSerializerSettings CreateSerializationSettings() settings.Converters.Add(new Vector2Converter()); settings.Converters.Add(new ColorConverter()); settings.Converters.Add(new DateTimeConverter()); + settings.Converters.Add(new PinBitCountConverter()); return settings; } @@ -110,6 +112,22 @@ public override void WriteJson(JsonWriter writer, DateTime value, JsonSerializer public override DateTime ReadJson(JsonReader reader, Type objectType, DateTime existingValue, bool hasExistingValue, JsonSerializer serializer) => (DateTime)reader.Value; } + + public class PinBitCountConverter : JsonConverter + { + + + public override void WriteJson(JsonWriter writer, [AllowNull] PinBitCount value, JsonSerializer serializer) + { + string formattedBitCount = value.BitCount.ToString(); + writer.WriteValue(formattedBitCount); + } + + public override PinBitCount ReadJson(JsonReader reader, Type objectType, [AllowNull] PinBitCount existingValue, bool hasExistingValue, JsonSerializer serializer) + { + return new PinBitCount(ushort.Parse(reader.Value.ToString())); + } + } class CustomJsonTextWriter : JsonTextWriter { @@ -147,5 +165,6 @@ protected override void WriteIndentSpace() base.WriteIndentSpace(); } } + } } \ No newline at end of file diff --git a/Assets/Scripts/Description/Types/ProjectDescription.cs b/Assets/Scripts/Description/Types/ProjectDescription.cs index a8dc0f33..24c92b66 100644 --- a/Assets/Scripts/Description/Types/ProjectDescription.cs +++ b/Assets/Scripts/Description/Types/ProjectDescription.cs @@ -9,6 +9,7 @@ public struct ProjectDescription public string ProjectName; public string DLSVersion_LastSaved; public string DLSVersion_EarliestCompatible; + public string DLSVersion_LastSavedModdedVersion; public DateTime CreationTime; public DateTime LastSaveTime; @@ -28,8 +29,12 @@ public struct ProjectDescription public List StarredList; public List ChipCollections; - // ---- Helper functions ---- - public bool IsStarred(string chipName, bool isCollection) + // List of all player-created I/O (in order of creation -- oldest first) + public PinBitCount[] pinBitCounts; + + + // ---- Helper functions ---- + public bool IsStarred(string chipName, bool isCollection) { foreach (StarredItem item in StarredList) { diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index 818197cd..fbbd1064 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -30,14 +30,10 @@ public enum ChipType Split_8To1Bit, // ---- In / Out Pins ---- - In_1Bit, - In_4Bit, - In_8Bit, - Out_1Bit, - Out_4Bit, - Out_8Bit, - - Key, + In_Pin, + Out_Pin, + + Key, Button, Toggle, diff --git a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs index 62745260..e7706c5f 100644 --- a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs @@ -1,3 +1,5 @@ +using System; +using System.Collections; using UnityEngine; namespace DLS.Description @@ -22,14 +24,61 @@ public PinDescription(string name, int id, Vector2 position, PinBitCount bitCoun } } - public enum PinBitCount + public struct PinBitCount { - Bit1 = 1, - Bit4 = 4, - Bit8 = 8 - } + public const int Bit1 = 1; + public const int Bit4 = 4; + public const int Bit8 = 8; + + public ushort BitCount; + + public PinBitCount(ushort BitCount = 1) + { + this.BitCount = BitCount; + } + public readonly BitArray GetEmptyBitArray() + { + return new BitArray(BitCount); + } + + public override bool Equals(System.Object @object) + { + if(@object is uint number) + { + return BitCount == number; + } + return base.Equals(@object); + } + + public override int GetHashCode() + { + return HashCode.Combine(BitCount); + } + + public static bool operator ==(PinBitCount a, PinBitCount b) => a.BitCount == b.BitCount; + public static bool operator !=(PinBitCount a, PinBitCount b) => a.BitCount != b.BitCount; + + public static bool operator ==(uint number, PinBitCount b) => number == b.BitCount; + public static bool operator !=(uint number, PinBitCount b) => number != b.BitCount; + public static bool operator ==(PinBitCount a, uint number) => number == a.BitCount; + public static bool operator !=(PinBitCount a, uint number) => number != a.BitCount; + + public static bool operator ==(PinBitCount a, int number) => number == a.BitCount; + public static bool operator !=(PinBitCount a, int number) => number != a.BitCount; + + + public static implicit operator uint(PinBitCount b) => b.BitCount; + public static implicit operator int(PinBitCount b) => b.BitCount; + public static implicit operator ushort(PinBitCount b) => b.BitCount; + public static implicit operator PinBitCount(Int64 b) => new PinBitCount((ushort)b); + + + public static explicit operator PinBitCount(ushort number) => new PinBitCount(number); + public static explicit operator PinBitCount(int number) => new PinBitCount((ushort)number); + + } - public enum PinColour + public enum PinColour { Red, Orange, diff --git a/Assets/Scripts/Game/Elements/DevPinInstance.cs b/Assets/Scripts/Game/Elements/DevPinInstance.cs index 7827e687..bdd08f4e 100644 --- a/Assets/Scripts/Game/Elements/DevPinInstance.cs +++ b/Assets/Scripts/Game/Elements/DevPinInstance.cs @@ -10,7 +10,7 @@ namespace DLS.Game { public class DevPinInstance : IMoveable { - public readonly PinBitCount BitCount; + public PinBitCount BitCount; public readonly char[] decimalDisplayCharBuffer = new char[16]; // Size/Layout info @@ -19,8 +19,8 @@ public class DevPinInstance : IMoveable public readonly bool IsInputPin; public readonly string Name; public readonly PinInstance Pin; - public readonly Vector2Int StateGridDimensions; - public readonly Vector2 StateGridSize; + public Vector2Int StateGridDimensions; + public Vector2 StateGridSize; public PinValueDisplayMode pinValueDisplayMode; @@ -37,18 +37,9 @@ public DevPinInstance(PinDescription pinDescription, bool isInput) // Calculate layout info faceDir = new Vector2(IsInputPin ? 1 : -1, 0); - StateGridDimensions = BitCount switch - { - PinBitCount.Bit1 => new Vector2Int(1, 1), - PinBitCount.Bit4 => new Vector2Int(2, 2), - PinBitCount.Bit8 => new Vector2Int(4, 2), - _ => throw new Exception("Bit count not implemented") - }; - StateGridSize = BitCount switch - { - PinBitCount.Bit1 => Vector2.one * (DevPinStateDisplayRadius * 2 + DevPinStateDisplayOutline * 2), - _ => (Vector2)StateGridDimensions * MultiBitPinStateDisplaySquareSize + Vector2.one * DevPinStateDisplayOutline - }; + StateGridDimensions = GridHelper.GetStateGridDimension(BitCount.BitCount); + StateGridSize = BitCount.BitCount == 1 ? Vector2.one * (DevPinStateDisplayRadius * 2 + DevPinStateDisplayOutline * 2) : (Vector2)StateGridDimensions * MultiBitPinStateDisplaySquareSize + Vector2.one * DevPinStateDisplayOutline; + } public Vector2 HandlePosition => Position; @@ -56,9 +47,9 @@ public DevPinInstance(PinDescription pinDescription, bool isInput) public Vector2 PinPosition { - get + get { - int gridDst = BitCount is PinBitCount.Bit1 or PinBitCount.Bit4 ? 6 : 9; + float gridDst = BitCount == 1 || BitCount == 4 ? 6 : ((StateGridDimensions.x* MultiBitPinStateDisplaySquareSize) / GridSize + 2.5f); return HandlePosition + faceDir * (GridSize * gridDst); } } @@ -127,5 +118,12 @@ public void ToggleState(int bitIndex) public bool PointIsInStateIndicatorBounds(Vector2 point) => Maths.PointInCircle2D(point, StateDisplayPosition, DevPinStateDisplayRadius); public bool PointIsInHandleBounds(Vector2 point) => HandleBounds().PointInBounds(point); - } + + public void ChangeBitCount(ushort bitcount) + { + BitCount.BitCount = bitcount; + StateGridDimensions = GridHelper.GetStateGridDimension(BitCount.BitCount); + StateGridSize = BitCount.BitCount == 1 ? Vector2.one * (DevPinStateDisplayRadius * 2 + DevPinStateDisplayOutline * 2) : (Vector2)StateGridDimensions * MultiBitPinStateDisplaySquareSize + Vector2.one * DevPinStateDisplayOutline; + } + } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/PinInstance.cs b/Assets/Scripts/Game/Elements/PinInstance.cs index 2d610eb7..eedc5bb0 100644 --- a/Assets/Scripts/Game/Elements/PinInstance.cs +++ b/Assets/Scripts/Game/Elements/PinInstance.cs @@ -10,7 +10,7 @@ public class PinInstance : IInteractable { public readonly PinAddress Address; - public readonly PinBitCount bitCount; + public PinBitCount bitCount; public readonly bool IsBusPin; public readonly bool IsSourcePin; @@ -77,5 +77,11 @@ public Color GetStateCol(int bitIndex, bool hover = false, bool canUsePlayerStat return DrawSettings.GetStateColour(state == PinState.LogicHigh, (uint)Colour, hover); } + + public void ChangeBitCount(int NewBitCount) + { + bitCount.BitCount = (ushort)NewBitCount; + Color col = new Color(0x22, 0x22, 0x22); + } } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index 4f76381e..7dbadc00 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -195,12 +195,14 @@ public static (float chipHeight, float[] pinGridY) CalculateDefaultPinLayout(Pin for (int i = 0; i < pins.Length; i++) { PinBitCount pinBitCount = pins[i]; - int pinGridHeight = pinBitCount switch + int pinGridHeight = pinBitCount.BitCount switch { PinBitCount.Bit1 => 2, PinBitCount.Bit4 => 3, - _ => 4 - }; + PinBitCount.Bit8 => 4, + _ => Mathf.RoundToInt(0.43f / 8 * pinBitCount.BitCount / DrawSettings.GridSize) + + }; pinGridYVals[i] = gridY - pinGridHeight / 2f; gridY -= pinGridHeight; @@ -304,13 +306,13 @@ public static Vector2 CalculateMinChipSize(PinDescription[] inputPins, PinDescri public static float PinHeightFromBitCount(PinBitCount bitCount) { - return bitCount switch + return bitCount.BitCount switch { PinBitCount.Bit1 => DrawSettings.PinRadius * 2, - PinBitCount.Bit4 => DrawSettings.PinHeight4Bit, + PinBitCount.Bit4 => DrawSettings.PinHeight4Bit, PinBitCount.Bit8 => DrawSettings.PinHeight8Bit, - _ => throw new Exception("Bit count not implemented " + bitCount) - }; + _ => 0.43f/8 * bitCount.BitCount, + }; } // Split chip name into two lines (if contains a space character) diff --git a/Assets/Scripts/Game/Helpers/GridHelper.cs b/Assets/Scripts/Game/Helpers/GridHelper.cs index 63df3ee2..21969dc1 100644 --- a/Assets/Scripts/Game/Helpers/GridHelper.cs +++ b/Assets/Scripts/Game/Helpers/GridHelper.cs @@ -52,5 +52,30 @@ public static Vector2 ForceStraightLine(Vector2 prev, Vector2 curr) return prev + offset; } + + public static Vector2Int GetStateGridDimension(uint bitcount) + { + int h = 1; + int w = (int)bitcount; + + int bestH = h; + int bestW = w; + + while (2 * h <= bitcount) + { + h++; + while (h * w > bitcount) + { + w--; + } + if (w * h == bitcount && w + h < bestH + bestW) + { + bestW = w; + bestH = h; + } + } + + return new Vector2Int(bestW, bestH); + } } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index 72f8dee2..e07e595c 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -889,7 +889,7 @@ void StartPlacing(IMoveable elementToPlace, Vector2 position, bool isDuplicating } ChipType chipType; - if (elementToPlace is DevPinInstance devPin) chipType = ChipTypeHelper.GetPinType(devPin.IsInputPin, devPin.BitCount); + if (elementToPlace is DevPinInstance devPinInstance) chipType = devPinInstance.IsInputPin ? ChipType.In_Pin : ChipType.Out_Pin; else chipType = ((SubChipInstance)elementToPlace).ChipType; // Place bus terminus to right of bus origin @@ -945,11 +945,11 @@ IMoveable CreateElementFromChipDescription(ChipDescription chipDescription) int instanceID = IDGenerator.GenerateNewElementID(ActiveDevChip); // Input/output dev pins are represented as chips for convenience - (bool isInput, bool isOutput, PinBitCount numBits) ioPinInfo = ChipTypeHelper.IsInputOrOutputPin(chipDescription.ChipType); + (bool isInput, bool isOutput, PinBitCount numBits) ioPinInfo = ChipTypeHelper.IsInputOrOutputPin(chipDescription); if (ioPinInfo.isInput || ioPinInfo.isOutput) // Dev pin { - PinDescription pinDesc = ioPinInfo.isInput ? chipDescription.InputPins[0] : chipDescription.OutputPins[0]; + PinDescription pinDesc = ioPinInfo.isInput ? chipDescription.OutputPins[0] : chipDescription.InputPins[0]; pinDesc.ID = instanceID; elementToPlace = new DevPinInstance(pinDesc, ioPinInfo.isInput); } diff --git a/Assets/Scripts/Game/Main/Main.cs b/Assets/Scripts/Game/Main/Main.cs index 247a085f..f99f14a9 100644 --- a/Assets/Scripts/Game/Main/Main.cs +++ b/Assets/Scripts/Game/Main/Main.cs @@ -13,6 +13,7 @@ public static class Main { public static readonly Version DLSVersion = new(2, 1, 6); public static readonly Version DLSVersion_EarliestCompatible = new(2, 0, 0); + public static readonly Version DLSVersion_ModdedID = new(1, 1, 0); public const string LastUpdatedString = "5 May 2025"; public static AppSettings ActiveAppSettings; @@ -88,7 +89,8 @@ static Project CreateProject(string projectName) Prefs_SimPaused = false, AllCustomChipNames = Array.Empty(), StarredList = BuiltinCollectionCreator.GetDefaultStarredList().ToList(), - ChipCollections = new List(BuiltinCollectionCreator.CreateDefaultChipCollections()) + ChipCollections = new List(BuiltinCollectionCreator.CreateDefaultChipCollections()), + pinBitCounts = new PinBitCount[]{ 1, 4, 8 } }; Saver.SaveProjectDescription(initialDescription); diff --git a/Assets/Scripts/Game/Project/BuiltInPinTypeCreator.cs b/Assets/Scripts/Game/Project/BuiltInPinTypeCreator.cs new file mode 100644 index 00000000..51589dd1 --- /dev/null +++ b/Assets/Scripts/Game/Project/BuiltInPinTypeCreator.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using DLS.Description; +using UnityEngine; +using static DLS.Graphics.DrawSettings; + +namespace DLS.Game +{ + public static class BuiltinPinTypeCreator + { + public static PinBitCount[] CreateBuiltInPinType() + { + return new PinBitCount[] + { + 1, 4, 8 + }; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Game/Project/BuiltInPinTypeCreator.cs.meta b/Assets/Scripts/Game/Project/BuiltInPinTypeCreator.cs.meta new file mode 100644 index 00000000..02931dd2 --- /dev/null +++ b/Assets/Scripts/Game/Project/BuiltInPinTypeCreator.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: e9fcd48a66a25a44da90495333d5c3f0 \ No newline at end of file diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index b0a52ab4..23750174 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -18,14 +18,7 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript return new[] { - // ---- I/O Pins ---- - CreateInputOrOutputPin(ChipType.In_1Bit), - CreateInputOrOutputPin(ChipType.Out_1Bit), - CreateInputOrOutputPin(ChipType.In_4Bit), - CreateInputOrOutputPin(ChipType.Out_4Bit), - CreateInputOrOutputPin(ChipType.In_8Bit), - CreateInputOrOutputPin(ChipType.Out_8Bit), - CreateInputKeyChip(), + CreateInputKeyChip(), CreateInputButtonChip(), CreateInputToggleChip(), @@ -42,25 +35,25 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript CreateEEPROM_8(), // ---- Merge / Split ---- - CreateBitConversionChip(ChipType.Split_4To1Bit, PinBitCount.Bit4, PinBitCount.Bit1, 1, 4), - CreateBitConversionChip(ChipType.Split_8To4Bit, PinBitCount.Bit8, PinBitCount.Bit4, 1, 2), - CreateBitConversionChip(ChipType.Split_8To1Bit, PinBitCount.Bit8, PinBitCount.Bit1, 1, 8), + CreateBitConversionChip(ChipType.Split_4To1Bit, (PinBitCount)PinBitCount.Bit4, (PinBitCount) PinBitCount.Bit1, 1, 4), + CreateBitConversionChip(ChipType.Split_8To4Bit, (PinBitCount) PinBitCount.Bit8, (PinBitCount) PinBitCount.Bit4, 1, 2), + CreateBitConversionChip(ChipType.Split_8To1Bit, (PinBitCount) PinBitCount.Bit8, (PinBitCount) PinBitCount.Bit1, 1, 8), - CreateBitConversionChip(ChipType.Merge_1To8Bit, PinBitCount.Bit1, PinBitCount.Bit8, 8, 1), - CreateBitConversionChip(ChipType.Merge_1To4Bit, PinBitCount.Bit1, PinBitCount.Bit4, 4, 1), - CreateBitConversionChip(ChipType.Merge_4To8Bit, PinBitCount.Bit4, PinBitCount.Bit8, 2, 1), + CreateBitConversionChip(ChipType.Merge_1To8Bit, (PinBitCount) PinBitCount.Bit1, (PinBitCount) PinBitCount.Bit8, 8, 1), + CreateBitConversionChip(ChipType.Merge_1To4Bit, (PinBitCount) PinBitCount.Bit1, (PinBitCount) PinBitCount.Bit4, 4, 1), + CreateBitConversionChip(ChipType.Merge_4To8Bit, (PinBitCount) PinBitCount.Bit4, (PinBitCount) PinBitCount.Bit8, 2, 1), // ---- Displays ---- CreateDisplay7Seg(), CreateDisplayRGB(), CreateDisplayDot(), CreateDisplayLED(), // ---- Bus ---- - CreateBus(PinBitCount.Bit1), - CreateBusTerminus(PinBitCount.Bit1), - CreateBus(PinBitCount.Bit4), - CreateBusTerminus(PinBitCount.Bit4), - CreateBus(PinBitCount.Bit8), - CreateBusTerminus(PinBitCount.Bit8), + CreateBus((PinBitCount) PinBitCount.Bit1), + CreateBusTerminus((PinBitCount) PinBitCount.Bit1), + CreateBus((PinBitCount) PinBitCount.Bit4), + CreateBusTerminus((PinBitCount) PinBitCount.Bit4), + CreateBus((PinBitCount) PinBitCount.Bit8), + CreateBusTerminus((PinBitCount) PinBitCount.Bit8), // ---- Audio ---- CreateBuzzer() }; @@ -386,22 +379,9 @@ static ChipDescription CreateDisplayDot() return CreateBuiltinChipDescription(ChipType.DisplayDot, size, col, inputPins, outputPins, displays, NameDisplayLocation.Hidden); } - // (Not a chip, but convenient to treat it as one) - public static ChipDescription CreateInputOrOutputPin(ChipType type) - { - (bool isInput, bool isOutput, PinBitCount numBits) = ChipTypeHelper.IsInputOrOutputPin(type); - string name = isInput ? "IN" : "OUT"; - PinDescription[] pin = { CreatePinDescription(name, 0, numBits) }; - - PinDescription[] inputs = isInput ? pin : null; - PinDescription[] outputs = isOutput ? pin : null; - - return CreateBuiltinChipDescription(type, Vector2.zero, Color.clear, inputs, outputs); - } - static Vector2 BusChipSize(PinBitCount bitCount) { - return bitCount switch + return bitCount.BitCount switch { PinBitCount.Bit1 => new Vector2(GridSize * 2, GridSize * 2), PinBitCount.Bit4 => new Vector2(GridSize * 2, GridSize * 3), @@ -412,7 +392,7 @@ static Vector2 BusChipSize(PinBitCount bitCount) static ChipDescription CreateBus(PinBitCount bitCount) { - ChipType type = bitCount switch + ChipType type = bitCount.BitCount switch { PinBitCount.Bit1 => ChipType.Bus_1Bit, PinBitCount.Bit4 => ChipType.Bus_4Bit, @@ -461,7 +441,7 @@ static ChipDescription CreateDisplayLED() static ChipDescription CreateBusTerminus(PinBitCount bitCount) { - ChipType type = bitCount switch + ChipType type = bitCount.BitCount switch { PinBitCount.Bit1 => ChipType.BusTerminus_1Bit, PinBitCount.Bit4 => ChipType.BusTerminus_4Bit, @@ -496,12 +476,12 @@ static ChipDescription CreateBuiltinChipDescription(ChipType type, Vector2 size, }; } - static PinDescription CreatePinDescription(string name, int id, PinBitCount bitCount = PinBitCount.Bit1) => + static PinDescription CreatePinDescription(string name, int id, ushort bitcount = 1) => new( name, id, Vector2.zero, - bitCount, + new(bitcount), PinColour.Red, PinValueDisplayMode.Off ); diff --git a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs index 17ec20a6..2e027d7a 100644 --- a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs @@ -27,12 +27,6 @@ public static ChipCollection[] CreateDefaultChipCollections() ChipType.Constant_8Bit ), CreateChipCollection("IN/OUT", - ChipType.In_1Bit, - ChipType.In_4Bit, - ChipType.In_8Bit, - ChipType.Out_1Bit, - ChipType.Out_4Bit, - ChipType.Out_8Bit, ChipType.Button ), CreateChipCollection("MERGE/SPLIT", diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 596f00c3..c06eff58 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -700,7 +700,7 @@ public static (Bounds2D bounds, bool inBounds, bool clicked) DrawInteractable_To public static void DrawDevPin(DevPinInstance devPin) { - if (devPin.BitCount == PinBitCount.Bit1) + if (devPin.BitCount == (uint)1) { Draw1BitDevPin(devPin); } diff --git a/Assets/Scripts/SaveSystem/Loader.cs b/Assets/Scripts/SaveSystem/Loader.cs index 080e0955..cee77881 100644 --- a/Assets/Scripts/SaveSystem/Loader.cs +++ b/Assets/Scripts/SaveSystem/Loader.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Drawing; using System.IO; using System.Linq; using DLS.Description; @@ -53,6 +54,7 @@ public static ProjectDescription LoadProjectDescription(string projectName) collection.UpdateDisplayStrings(); } + UpgradeHelper.ApplyVersionChangesToProject(desc); // Apply changes necessary to ProjectDesc file for modded game. return desc; } @@ -81,14 +83,57 @@ public static ProjectDescription[] LoadAllProjectDescriptions() static ChipLibrary LoadChipLibrary(ProjectDescription projectDescription) { string chipDirectoryPath = SavePaths.GetChipsPath(projectDescription.ProjectName); - ChipDescription[] loadedChips = new ChipDescription[projectDescription.AllCustomChipNames.Length]; + PinBitCount[] loadedPinBitCounts = projectDescription.pinBitCounts; + ChipDescription[] PinDescriptions = new ChipDescription[loadedPinBitCounts.Length * 2]; + ChipDescription[] loadedChips = new ChipDescription[projectDescription.AllCustomChipNames.Length]; if (!Directory.Exists(chipDirectoryPath) && loadedChips.Length > 0) throw new DirectoryNotFoundException(chipDirectoryPath); ChipDescription[] builtinChips = BuiltinChipCreator.CreateAllBuiltinChipDescriptions(projectDescription); HashSet customChipNameHashset = new(ChipDescription.NameComparer); - for (int i = 0; i < loadedChips.Length; i++) + for (int i = 0; i < loadedPinBitCounts.Length; i ++) + { + PinBitCount pinBitCounts = loadedPinBitCounts[i]; + PinDescription[] outPin = new[] { new PinDescription("OUT", 1, UnityEngine.Vector2.zero, pinBitCounts, PinColour.Red, PinValueDisplayMode.Off) }; + PinDescription[] inPin = new[] { new PinDescription("IN", 0, UnityEngine.Vector2.zero, pinBitCounts, PinColour.Red, PinValueDisplayMode.Off) }; + + + ChipDescription InChipDesc = new ChipDescription + { + Name = "IN-" + pinBitCounts.BitCount, + NameLocation = NameDisplayLocation.Hidden, + ChipType = ChipType.In_Pin, + Colour = UnityEngine.Color.clear, + SubChips = Array.Empty(), + InputPins = Array.Empty(), + OutputPins = outPin, + Displays = null, + Size = UnityEngine.Vector2.zero, + Wires = Array.Empty() + }; + + ChipDescription OutChipDesc = new ChipDescription + { + Name = "OUT-" + pinBitCounts.BitCount, + NameLocation = NameDisplayLocation.Hidden, + ChipType = ChipType.Out_Pin, + Colour = UnityEngine.Color.clear, + SubChips = Array.Empty(), + InputPins = inPin, + OutputPins = Array.Empty(), + Displays = null, + Size = UnityEngine.Vector2.zero, + Wires = Array.Empty() + }; + + PinDescriptions[i*2] = InChipDesc; + PinDescriptions[i*2 + 1] = OutChipDesc; + } + + builtinChips = builtinChips.Concat(PinDescriptions).ToArray(); + + for (int i = 0; i < projectDescription.AllCustomChipNames.Length; i++) { string chipPath = Path.Combine(chipDirectoryPath, projectDescription.AllCustomChipNames[i] + ".json"); string chipSaveString = File.ReadAllText(chipPath); @@ -98,10 +143,9 @@ static ChipLibrary LoadChipLibrary(ProjectDescription projectDescription) customChipNameHashset.Add(chipDesc.Name); } - - // If built-in chip name conflicts with a custom chip, the built-in chip must have been added in a newer version. - // In that case, simply exclude the built-in chip. TODO: warn player that they should rename their chip if they want access to new builtin version - builtinChips = builtinChips.Where(b => !customChipNameHashset.Contains(b.Name)).ToArray(); + // If built-in chip name conflicts with a custom chip, the built-in chip must have been added in a newer version. + // In that case, simply exclude the built-in chip. TODO: warn player that they should rename their chip if they want access to new builtin version + builtinChips = builtinChips.Where(b => !customChipNameHashset.Contains(b.Name)).ToArray(); UpgradeHelper.ApplyVersionChanges(loadedChips, builtinChips); return new ChipLibrary(loadedChips, builtinChips); diff --git a/Assets/Scripts/SaveSystem/UpgradeHelper.cs b/Assets/Scripts/SaveSystem/UpgradeHelper.cs index e6bf1703..1d85e7b9 100644 --- a/Assets/Scripts/SaveSystem/UpgradeHelper.cs +++ b/Assets/Scripts/SaveSystem/UpgradeHelper.cs @@ -26,6 +26,19 @@ public static void ApplyVersionChanges(ChipDescription[] customChips, ChipDescri } } + public static void ApplyVersionChangesToProject(ProjectDescription projectDescription) + { + Main.Version defaultModdedVersion = new(1, 0, 0); + Main.Version moddedVersion_1_1_0 = new(1, 1, 0); // Custom IN and OUTS version + + bool canParseModdedVersion = Main.Version.TryParse(projectDescription.DLSVersion_LastSaved, out Main.Version projectVersion); + + + if (!canParseModdedVersion || projectVersion.ToInt() <= moddedVersion_1_1_0.ToInt()) + { + projectDescription.pinBitCounts = new PinBitCount[]{1,4,8}; + } + } static void UpdateChipPre_2_1_5(ChipDescription chipDesc) { From 26187f197c0695a0f0ea80764df3ec2ede15c4a4 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Fri, 30 May 2025 06:26:33 +0200 Subject: [PATCH 063/124] Loading fix --- Assets/Build/DLS.unity | 2 +- Assets/Scripts/SaveSystem/Loader.cs | 2 +- Assets/Scripts/SaveSystem/UpgradeHelper.cs | 14 +++++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Assets/Build/DLS.unity b/Assets/Build/DLS.unity index 209cbc4f..11788549 100644 --- a/Assets/Build/DLS.unity +++ b/Assets/Build/DLS.unity @@ -241,7 +241,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: openSaveDirectory: 0 - openInMainMenu: 0 + openInMainMenu: 1 testProjectName: MainTest openA: 1 chipToOpenA: BuzzTest diff --git a/Assets/Scripts/SaveSystem/Loader.cs b/Assets/Scripts/SaveSystem/Loader.cs index cee77881..879f8441 100644 --- a/Assets/Scripts/SaveSystem/Loader.cs +++ b/Assets/Scripts/SaveSystem/Loader.cs @@ -54,7 +54,7 @@ public static ProjectDescription LoadProjectDescription(string projectName) collection.UpdateDisplayStrings(); } - UpgradeHelper.ApplyVersionChangesToProject(desc); // Apply changes necessary to ProjectDesc file for modded game. + UpgradeHelper.ApplyVersionChangesToProject(ref desc); // Apply changes necessary to ProjectDesc file for modded game. return desc; } diff --git a/Assets/Scripts/SaveSystem/UpgradeHelper.cs b/Assets/Scripts/SaveSystem/UpgradeHelper.cs index 1d85e7b9..040b9b6f 100644 --- a/Assets/Scripts/SaveSystem/UpgradeHelper.cs +++ b/Assets/Scripts/SaveSystem/UpgradeHelper.cs @@ -26,19 +26,23 @@ public static void ApplyVersionChanges(ChipDescription[] customChips, ChipDescri } } - public static void ApplyVersionChangesToProject(ProjectDescription projectDescription) + public static void ApplyVersionChangesToProject(ref ProjectDescription projectDescription) { Main.Version defaultModdedVersion = new(1, 0, 0); Main.Version moddedVersion_1_1_0 = new(1, 1, 0); // Custom IN and OUTS version - bool canParseModdedVersion = Main.Version.TryParse(projectDescription.DLSVersion_LastSaved, out Main.Version projectVersion); + bool canParseModdedVersion = Main.Version.TryParse(projectDescription.DLSVersion_LastSavedModdedVersion, out Main.Version projectVersion); - if (!canParseModdedVersion || projectVersion.ToInt() <= moddedVersion_1_1_0.ToInt()) + if (!canParseModdedVersion || projectVersion.ToInt() <= moddedVersion_1_1_0.ToInt()) { + Debug.Log("a"); + projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); projectDescription.pinBitCounts = new PinBitCount[]{1,4,8}; - } - } + Debug.Log(projectDescription.pinBitCounts); + + } + } static void UpdateChipPre_2_1_5(ChipDescription chipDesc) { From e6b3720f7390e8f8e162ccbdda86036cd3ab5b62 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Fri, 30 May 2025 15:32:55 +0200 Subject: [PATCH 064/124] Improved Save Compatibility --- .../Description/Types/ProjectDescription.cs | 2 +- Assets/Scripts/Game/Main/Main.cs | 3 +- Assets/Scripts/SaveSystem/Saver.cs | 1 + Assets/Scripts/SaveSystem/UpgradeHelper.cs | 5 +- .../Projects/MainTest/Chips/BuzzTest.json | 6 +- .../Projects/MainTest/ProjectDescription.json | 8 ++- .../Projects/testz/ProjectDescription.json | 64 +++++++++++++++++++ 7 files changed, 79 insertions(+), 10 deletions(-) create mode 100644 TestData/Projects/testz/ProjectDescription.json diff --git a/Assets/Scripts/Description/Types/ProjectDescription.cs b/Assets/Scripts/Description/Types/ProjectDescription.cs index 24c92b66..63a405f8 100644 --- a/Assets/Scripts/Description/Types/ProjectDescription.cs +++ b/Assets/Scripts/Description/Types/ProjectDescription.cs @@ -29,7 +29,7 @@ public struct ProjectDescription public List StarredList; public List ChipCollections; - // List of all player-created I/O (in order of creation -- oldest first) + // List of all I/O (in order of creation -- oldest first) public PinBitCount[] pinBitCounts; diff --git a/Assets/Scripts/Game/Main/Main.cs b/Assets/Scripts/Game/Main/Main.cs index f99f14a9..8598fb02 100644 --- a/Assets/Scripts/Game/Main/Main.cs +++ b/Assets/Scripts/Game/Main/Main.cs @@ -65,7 +65,7 @@ public static void LoadMainMenu() public static void CreateOrLoadProject(string projectName, string startupChipName = "") { - if (Loader.ProjectExists(projectName)) ActiveProject = LoadProject(projectName); + if (Loader.ProjectExists(projectName)) { ActiveProject = LoadProject(projectName); Saver.SaveProjectDescription(ActiveProject.description); } else ActiveProject = CreateProject(projectName); ActiveProject.LoadDevChipOrCreateNewIfDoesntExist(startupChipName); @@ -80,6 +80,7 @@ static Project CreateProject(string projectName) { ProjectName = projectName, DLSVersion_LastSaved = DLSVersion.ToString(), + DLSVersion_LastSavedModdedVersion = DLSVersion_ModdedID.ToString(), DLSVersion_EarliestCompatible = DLSVersion_EarliestCompatible.ToString(), CreationTime = DateTime.Now, Prefs_ChipPinNamesDisplayMode = PreferencesMenu.DisplayMode_OnHover, diff --git a/Assets/Scripts/SaveSystem/Saver.cs b/Assets/Scripts/SaveSystem/Saver.cs index feea08af..788f69ca 100644 --- a/Assets/Scripts/SaveSystem/Saver.cs +++ b/Assets/Scripts/SaveSystem/Saver.cs @@ -18,6 +18,7 @@ public static void SaveProjectDescription(ProjectDescription projectDescription) projectDescription.LastSaveTime = DateTime.Now; projectDescription.DLSVersion_LastSaved = Main.DLSVersion.ToString(); projectDescription.DLSVersion_EarliestCompatible = Main.DLSVersion_EarliestCompatible.ToString(); + projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); string data = Serializer.SerializeProjectDescription(projectDescription); WriteToFile(data, SavePaths.GetProjectDescriptionPath(projectDescription.ProjectName)); diff --git a/Assets/Scripts/SaveSystem/UpgradeHelper.cs b/Assets/Scripts/SaveSystem/UpgradeHelper.cs index 040b9b6f..fe473aa1 100644 --- a/Assets/Scripts/SaveSystem/UpgradeHelper.cs +++ b/Assets/Scripts/SaveSystem/UpgradeHelper.cs @@ -34,13 +34,10 @@ public static void ApplyVersionChangesToProject(ref ProjectDescription projectDe bool canParseModdedVersion = Main.Version.TryParse(projectDescription.DLSVersion_LastSavedModdedVersion, out Main.Version projectVersion); - if (!canParseModdedVersion || projectVersion.ToInt() <= moddedVersion_1_1_0.ToInt()) + if ((!canParseModdedVersion) || projectVersion.ToInt() < moddedVersion_1_1_0.ToInt()) { - Debug.Log("a"); projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); projectDescription.pinBitCounts = new PinBitCount[]{1,4,8}; - Debug.Log(projectDescription.pinBitCounts); - } } diff --git a/TestData/Projects/MainTest/Chips/BuzzTest.json b/TestData/Projects/MainTest/Chips/BuzzTest.json index 40fc6f42..93244f4d 100644 --- a/TestData/Projects/MainTest/Chips/BuzzTest.json +++ b/TestData/Projects/MainTest/Chips/BuzzTest.json @@ -1,5 +1,5 @@ { - "DLSVersion": "2.1.5", + "DLSVersion": "2.1.6", "Name": "BuzzTest", "NameLocation": 0, "ChipType": 0, @@ -21,7 +21,7 @@ "x":-3.76235, "y":0.65436 }, - "BitCount":8, + "BitCount":"8", "Colour":0, "ValueDisplayMode":0 }, @@ -32,7 +32,7 @@ "x":-3.84573, "y":-0.12514 }, - "BitCount":4, + "BitCount":"4", "Colour":0, "ValueDisplayMode":0 } diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index e1fec53d..5218b9e5 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -2,8 +2,9 @@ "ProjectName": "MainTest", "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-24T12:45:42.516+02:00", + "LastSaveTime": "2025-05-30T15:31:34.074+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -169,5 +170,10 @@ "IsToggledOpen":true, "Name":"OTHER" } + ], + "pinBitCounts":[ + "1", + "4", + "8" ] } \ No newline at end of file diff --git a/TestData/Projects/testz/ProjectDescription.json b/TestData/Projects/testz/ProjectDescription.json new file mode 100644 index 00000000..5f6c4c6e --- /dev/null +++ b/TestData/Projects/testz/ProjectDescription.json @@ -0,0 +1,64 @@ +{ + "ProjectName": "testz", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-05-30T15:28:02.070+02:00", + "LastSaveTime": "2025-05-30T15:28:02.070+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["1-4BIT","1-8BIT","4-8BIT","4-1BIT","8-4BIT","8-1BIT"], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ] +} \ No newline at end of file From a30ba6dd66e27cc894a8e6ad98de8fc01d7e34b6 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Fri, 30 May 2025 16:14:31 +0200 Subject: [PATCH 065/124] Reorganized for ease of use. --- .../Description/Helpers/ChipTypeHelper.cs | 10 +++++ .../Game/Project/BuiltinChipCreator.cs | 36 +++++++++++++--- Assets/Scripts/SaveSystem/Loader.cs | 43 ------------------- .../Projects/MainTest/ProjectDescription.json | 2 +- 4 files changed, 42 insertions(+), 49 deletions(-) diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 4410ed0f..5aad02e5 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -51,6 +51,7 @@ public static class ChipTypeHelper { ChipType.BusTerminus_8Bit, "BUS-TERMINUS-8" } }; + public static string GetName(ChipType type) => Names[type]; public static bool IsBusType(ChipType type) => IsBusOriginType(type) || IsBusTerminusType(type); @@ -82,6 +83,15 @@ public static (bool isInput, bool isOutput, PinBitCount numBits) IsInputOrOutput }; } + public static string GetDevPinName(bool isInput, PinBitCount numBits) + { + return (isInput ? "IN-" : "OUT-") + numBits.BitCount.ToString(); + } + + public static bool IsDevPin(ChipType chipType) + { + return chipType == ChipType.In_Pin || chipType == ChipType.Out_Pin; + } public static bool IsClickableDisplayType(ChipType type) { // Return true for any chiptype that is a clickable display diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 23750174..11ea9260 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using DLS.Description; using UnityEngine; using static DLS.Graphics.DrawSettings; @@ -18,7 +19,7 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript return new[] { - CreateInputKeyChip(), + CreateInputKeyChip(), CreateInputButtonChip(), CreateInputToggleChip(), @@ -56,10 +57,34 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript CreateBusTerminus((PinBitCount) PinBitCount.Bit8), // ---- Audio ---- CreateBuzzer() - }; + } + .Concat(CreateInOutPins(description.pinBitCounts)) + .ToArray(); } - static ChipDescription CreateNand() + static ChipDescription[] CreateInOutPins(PinBitCount[] pinBitCountsToLoad) + { + ChipDescription[] DevPinDescriptions = new ChipDescription[pinBitCountsToLoad.Length * 2]; + + for (int i = 0; i < pinBitCountsToLoad.Length; i++) + { + PinBitCount pinBitCount = pinBitCountsToLoad[i]; + PinDescription[] outPin = new[] { CreatePinDescription("OUT", 0, pinBitCount) }; + PinDescription[] inPin = new[] { CreatePinDescription("IN", 0, pinBitCount)}; + + ChipDescription InChip = CreateBuiltinChipDescription(ChipType.In_Pin, Vector2.zero, Color.clear, null, outPin, null, + NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(true, pinBitCount)); + ChipDescription OutChip = CreateBuiltinChipDescription(ChipType.In_Pin, Vector2.zero, Color.clear, inPin, null, null, + NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(false, pinBitCount)); + + DevPinDescriptions[i * 2] = InChip; + DevPinDescriptions[i * 2 + 1] = OutChip; + } + + return DevPinDescriptions; + } + + static ChipDescription CreateNand() { Color col = GetColor(new(0.73f, 0.26f, 0.26f)); Vector2 size = new(CalculateGridSnappedWidth(GridSize * 8), GridSize * 4); @@ -456,9 +481,10 @@ static ChipDescription CreateBusTerminus(PinBitCount bitCount) } - static ChipDescription CreateBuiltinChipDescription(ChipType type, Vector2 size, Color col, PinDescription[] inputs, PinDescription[] outputs, DisplayDescription[] displays = null, NameDisplayLocation nameLoc = NameDisplayLocation.Centre) + static ChipDescription CreateBuiltinChipDescription(ChipType type, Vector2 size, Color col, PinDescription[] inputs, PinDescription[] outputs, DisplayDescription[] displays = null, NameDisplayLocation nameLoc = NameDisplayLocation.Centre, string name = "") { - string name = ChipTypeHelper.GetName(type); + if (!ChipTypeHelper.IsDevPin(type)){name = ChipTypeHelper.GetName(type); } + ValidatePinIDs(inputs, outputs, name); return new ChipDescription diff --git a/Assets/Scripts/SaveSystem/Loader.cs b/Assets/Scripts/SaveSystem/Loader.cs index 879f8441..c01ff479 100644 --- a/Assets/Scripts/SaveSystem/Loader.cs +++ b/Assets/Scripts/SaveSystem/Loader.cs @@ -83,8 +83,6 @@ public static ProjectDescription[] LoadAllProjectDescriptions() static ChipLibrary LoadChipLibrary(ProjectDescription projectDescription) { string chipDirectoryPath = SavePaths.GetChipsPath(projectDescription.ProjectName); - PinBitCount[] loadedPinBitCounts = projectDescription.pinBitCounts; - ChipDescription[] PinDescriptions = new ChipDescription[loadedPinBitCounts.Length * 2]; ChipDescription[] loadedChips = new ChipDescription[projectDescription.AllCustomChipNames.Length]; if (!Directory.Exists(chipDirectoryPath) && loadedChips.Length > 0) throw new DirectoryNotFoundException(chipDirectoryPath); @@ -92,47 +90,6 @@ static ChipLibrary LoadChipLibrary(ProjectDescription projectDescription) ChipDescription[] builtinChips = BuiltinChipCreator.CreateAllBuiltinChipDescriptions(projectDescription); HashSet customChipNameHashset = new(ChipDescription.NameComparer); - for (int i = 0; i < loadedPinBitCounts.Length; i ++) - { - PinBitCount pinBitCounts = loadedPinBitCounts[i]; - PinDescription[] outPin = new[] { new PinDescription("OUT", 1, UnityEngine.Vector2.zero, pinBitCounts, PinColour.Red, PinValueDisplayMode.Off) }; - PinDescription[] inPin = new[] { new PinDescription("IN", 0, UnityEngine.Vector2.zero, pinBitCounts, PinColour.Red, PinValueDisplayMode.Off) }; - - - ChipDescription InChipDesc = new ChipDescription - { - Name = "IN-" + pinBitCounts.BitCount, - NameLocation = NameDisplayLocation.Hidden, - ChipType = ChipType.In_Pin, - Colour = UnityEngine.Color.clear, - SubChips = Array.Empty(), - InputPins = Array.Empty(), - OutputPins = outPin, - Displays = null, - Size = UnityEngine.Vector2.zero, - Wires = Array.Empty() - }; - - ChipDescription OutChipDesc = new ChipDescription - { - Name = "OUT-" + pinBitCounts.BitCount, - NameLocation = NameDisplayLocation.Hidden, - ChipType = ChipType.Out_Pin, - Colour = UnityEngine.Color.clear, - SubChips = Array.Empty(), - InputPins = inPin, - OutputPins = Array.Empty(), - Displays = null, - Size = UnityEngine.Vector2.zero, - Wires = Array.Empty() - }; - - PinDescriptions[i*2] = InChipDesc; - PinDescriptions[i*2 + 1] = OutChipDesc; - } - - builtinChips = builtinChips.Concat(PinDescriptions).ToArray(); - for (int i = 0; i < projectDescription.AllCustomChipNames.Length; i++) { string chipPath = Path.Combine(chipDirectoryPath, projectDescription.AllCustomChipNames[i] + ".json"); diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 5218b9e5..a8b50667 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-30T15:31:34.074+02:00", + "LastSaveTime": "2025-05-30T16:14:10.012+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, From 5044fa07ff8a9fc327634c1fbe5cdd8ffc3c12ef Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Sat, 31 May 2025 16:38:56 +0700 Subject: [PATCH 066/124] Remove spct --- .../Game/Project/BuiltinChipCreator.cs | 14 ++--- Assets/Scripts/Plugins.meta | 8 +++ Assets/Scripts/Plugins/x86_64.meta | 8 +++ Assets/Scripts/Plugins/x86_64/lua52.dll | Bin 0 -> 195072 bytes Assets/Scripts/Plugins/x86_64/lua52.dll.meta | 2 + Assets/Scripts/Simulation/Simulator.cs | 17 +++--- TestData/Projects/MainTest/Chips/SPSTest.json | 56 +----------------- .../Projects/MainTest/ProjectDescription.json | 2 +- 8 files changed, 35 insertions(+), 72 deletions(-) create mode 100644 Assets/Scripts/Plugins.meta create mode 100644 Assets/Scripts/Plugins/x86_64.meta create mode 100644 Assets/Scripts/Plugins/x86_64/lua52.dll create mode 100644 Assets/Scripts/Plugins/x86_64/lua52.dll.meta diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 7246cf6a..7f7f1928 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -89,14 +89,12 @@ static ChipDescription CreateSPSChip() PinDescription[] outputPins = { - CreatePinDescription("SPC_B", 7, PinBitCount.Bit8), - CreatePinDescription("SPC_A", 6, PinBitCount.Bit8), - CreatePinDescription("SPS_B", 5, PinBitCount.Bit8), - CreatePinDescription("SPS_A", 4, PinBitCount.Bit8), - CreatePinDescription("CLOCK_B", 3, PinBitCount.Bit8), - CreatePinDescription("CLOCK_A", 2, PinBitCount.Bit8), - CreatePinDescription("CLOCK_OVERFLOW", 1, PinBitCount.Bit1), - CreatePinDescription("SPS_OVERFLOW", 0, PinBitCount.Bit1), + CreatePinDescription("SPCT_B", 5, PinBitCount.Bit8), + CreatePinDescription("SPCT_A", 4, PinBitCount.Bit8), + CreatePinDescription("SPS_B", 3, PinBitCount.Bit8), + CreatePinDescription("SPS_A", 2, PinBitCount.Bit8), + CreatePinDescription("SPS_OVERFLOW", 1, PinBitCount.Bit1), + CreatePinDescription("SPCT_OVERFLOW", 0, PinBitCount.Bit1), }; float height = SubChipInstance.MinChipHeightForPins(outputPins, null); diff --git a/Assets/Scripts/Plugins.meta b/Assets/Scripts/Plugins.meta new file mode 100644 index 00000000..db6b7b55 --- /dev/null +++ b/Assets/Scripts/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fda228beaff894d4faa68ea52787275f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Plugins/x86_64.meta b/Assets/Scripts/Plugins/x86_64.meta new file mode 100644 index 00000000..50c936a3 --- /dev/null +++ b/Assets/Scripts/Plugins/x86_64.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 18cbf6fd3574b564ca035125b3bfbfc4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Plugins/x86_64/lua52.dll b/Assets/Scripts/Plugins/x86_64/lua52.dll new file mode 100644 index 0000000000000000000000000000000000000000..4cb376623f75596ec44082ad93bae1ef4288acd4 GIT binary patch literal 195072 zcmd?Sdwf*Y)$l*bBoK%&K^TcjOVsESjhEPX2?k|OGJ!KNkst_o12wJMYOR+U1;s!d z^2qc!R$FatAN$naZELSuL~1n`C4op1pekrp)T%p9(Re8&c$xRR_Bm%}l0e({^ZxqR zFQ3n3=A5(7-fOS>T6>*+>My+8^oF=j?`|+1|=F@Kt+<29YHF9PRbsouHdiOT3=qe7*;AJr5r*C!D_uuV=Rq?qB@%S-GC;vfDJ|daiQd%0BJ> zJ~{HG6%h_nGo5+L+()!8@pvvh`GzlE7P-vhS=v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oNdWQvK`rI zwln+nMvh=tGly{rI*m@qX>!6&ixY7=oT$_3#GEe2aZ*ms8Fcc_kW+AmouV`1l$`C3 ziC4va@#?rgUK*K+AV>}dZiihJZ@kqQQ9*uX#WAU!I6Hmo+@xgdLJ`^v+hvORm zq4kCJ!|RLdN7k3tZztNSD(OpBC;iFVWFQ$zHYLN!mZUx2a>>DDJ~@;uB!`p5WT?BT zJKWvU9qsPyZt4m5wDd%JG-@VOmH9d&=VVfuTxKwn&kSV>nc++^Gmhn z`QIE*#l%RWl-N$hSJnDpPh(H0XLQRtdZIm@J+Ypyp4?ZQX~DmHcIlkb8O0~%iX8vC WW;s=klGJM2wgTt)xW*M9>n= 65536 ? PinState.LogicHigh : PinState.LogicLow); - PinState.Set(ref chip.OutputPins[6].State, stepsPerClockTransition > 65535 ? PinState.LogicHigh : PinState.LogicLow); - chip.OutputPins[5].State = (ushort)((sps >> 8) & ByteMask); - chip.OutputPins[4].State = (ushort)(sps & ByteMask); - chip.OutputPins[3].State = (ushort)((spc >> 8) & ByteMask); - chip.OutputPins[2].State = (ushort)(spc & ByteMask); - chip.OutputPins[0].State = (ushort)((srpc >> 8) & ByteMask); - chip.OutputPins[1].State = (ushort)(srpc & ByteMask); + + PinState.Set(ref chip.OutputPins[5].State, tps >= 65536 ? PinState.LogicHigh : PinState.LogicLow); + PinState.Set(ref chip.OutputPins[4].State, stepsPerClockTransition > 65535 ? PinState.LogicHigh : PinState.LogicLow); + chip.OutputPins[3].State = (ushort)(sps & ByteMask); + chip.OutputPins[2].State = (ushort)((sps >> 8) & ByteMask); + chip.OutputPins[1].State = (ushort)(spc & ByteMask); + chip.OutputPins[0].State = (ushort)((spc >> 8) & ByteMask); break; } // ---- Bus types ---- diff --git a/TestData/Projects/MainTest/Chips/SPSTest.json b/TestData/Projects/MainTest/Chips/SPSTest.json index 0eed6020..3a098220 100644 --- a/TestData/Projects/MainTest/Chips/SPSTest.json +++ b/TestData/Projects/MainTest/Chips/SPSTest.json @@ -15,28 +15,6 @@ }, "InputPins":[], "OutputPins":[ - { - "Name":"OUT", - "ID":1439843563, - "Position":{ - "x":1.125, - "y":1.6875 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OUT", - "ID":1323112485, - "Position":{ - "x":1.125, - "y":1.1875 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":0 - }, { "Name":"OUT", "ID":908310544, @@ -110,10 +88,10 @@ "ID":1380022051, "Label":"", "Position":{ - "x":-1.375, - "y":0.1875 + "x":-1.25, + "y":-0.3125 }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":7},{"PinColour":0,"PinID":6},{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":0}], + "OutputPinColourInfo":[{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":0}], "InternalData":null } ], @@ -201,34 +179,6 @@ "ConnectedWireIndex":-1, "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":6, - "PinOwnerID":1380022051 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1323112485 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":7, - "PinOwnerID":1380022051 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1439843563 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] } ], "Displays": null diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index ccbcebc1..2074a724 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-05-24T17:43:48.437+07:00", + "LastSaveTime": "2025-05-31T16:34:51.885+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, From 1932eadb358d0d4f81254304615b0b96ad46b2c7 Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Sat, 31 May 2025 16:44:06 +0700 Subject: [PATCH 067/124] Delete Lua leftovers from unpublished branch --- Assets/Scripts/Plugins.meta | 8 -------- Assets/Scripts/Plugins/x86_64.meta | 8 -------- Assets/Scripts/Plugins/x86_64/lua52.dll | Bin 195072 -> 0 bytes Assets/Scripts/Plugins/x86_64/lua52.dll.meta | 2 -- 4 files changed, 18 deletions(-) delete mode 100644 Assets/Scripts/Plugins.meta delete mode 100644 Assets/Scripts/Plugins/x86_64.meta delete mode 100644 Assets/Scripts/Plugins/x86_64/lua52.dll delete mode 100644 Assets/Scripts/Plugins/x86_64/lua52.dll.meta diff --git a/Assets/Scripts/Plugins.meta b/Assets/Scripts/Plugins.meta deleted file mode 100644 index db6b7b55..00000000 --- a/Assets/Scripts/Plugins.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fda228beaff894d4faa68ea52787275f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Plugins/x86_64.meta b/Assets/Scripts/Plugins/x86_64.meta deleted file mode 100644 index 50c936a3..00000000 --- a/Assets/Scripts/Plugins/x86_64.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 18cbf6fd3574b564ca035125b3bfbfc4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Plugins/x86_64/lua52.dll b/Assets/Scripts/Plugins/x86_64/lua52.dll deleted file mode 100644 index 4cb376623f75596ec44082ad93bae1ef4288acd4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 195072 zcmd?Sdwf*Y)$l*bBoK%&K^TcjOVsESjhEPX2?k|OGJ!KNkst_o12wJMYOR+U1;s!d z^2qc!R$FatAN$naZELSuL~1n`C4op1pekrp)T%p9(Re8&c$xRR_Bm%}l0e({^ZxqR zFQ3n3=A5(7-fOS>T6>*+>My+8^oF=j?`|+1|=F@Kt+<29YHF9PRbsouHdiOT3=qe7*;AJr5r*C!D_uuV=Rq?qB@%S-GC;vfDJ|daiQd%0BJ> zJ~{HG6%h_nGo5+L+()!8@pvvh`GzlE7P-vhS=vlv`t;n+cMacJe*xI&WV@NCXe<|Y zb6uJ|J*r*n$=BHp^&FY2=LFhq8r3dv@(nlM(8wi?6L6yuF731a0y6FmU%KXNG}Jf( zS9%V6N42ZTy6yj$Kh4C1&5*kP!BcZR&+_LU-#y}ZjdL8dY6?v2(7MXa{ipug<9XIP zwEuDWcK^aws3dH)wQO%HHXGZ`w%vIlZ;n}Q6x}e^Oyoa*Wv-{=@tuzkq^h?y9g=Pk zDC&rg3t53;Gu9gDDBlvYCdFTGIZEi)0(`%XdaS*nKRs*}8@~0mGX7-74>z{bFjsD__jV-5GDN-%VdaM69`Its0|m|~ zx0UU!DF{T44qLg#-oQ9-q&Q^Nl$aK{o3yuPTwbIgWNqp1-RAK)^KkK(xc$Fo`#fjM zzndqU%*?bxMP_+{**27y$Q$2bxf6G8Fyj}O7A!Gif3GmDU9tURqQ%Uo2wV;TlVJr0 z1t>FS6cy1~QEY|snu!&=!wGXB`UNAlvcMZH|G@ASP5QuBP@m(R`dbj~S2UOXT8 zCXF>?wM7G_b#ZCHj6G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petbHhbBs<>xgs`|ipm$DgAIZKl;MTF~0oT;reoX*&&*zj`eVlRwv|hRL69 z9E&$h9vwHn(GK|k@)hE5x@>DC*^!JUyOK^amg-75sZ=VL8cgL=L#aY)I8{uIq)Msn zDU+^B`_k2Ef4VjuNY|%>>Be*@-INZeThftqM>?ABOvln)X(ydZ=hB1ee0nHdNDrrr z>5;V4o9fN=4)*4Ihk6UW!@b4ck={~oEZdcJvZ-t?JDAO9hq8t2aJHBo$(FL)v!=hQ z-`8K=@9(ee5A@gf2m2fQoq^OqZeVaAKQJ^<7#JQX4vY+x2DT5FF!w_hd{#6*5--KK z6RK2|@Fl7f{zPpekf=`t6OD;bqA3whv?L;ljzl!knTRF25>6tO$R!37`NUA7kQh$* zx~seW-L>6;?qI4h6-qUw!l{;2B-N3MraDt!Ha1^(`%CHVXX` zWtuYKOiLz`>BvMgotapsE7RB)>TBvt_2v2o`~2D3Y#>{o4Q3m&p=?t&oNdWQvK`rI zwln+nMvh=tGly{rI*m@qX>!6&ixY7=oT$_3#GEe2aZ*ms8Fcc_kW+AmouV`1l$`C3 ziC4va@#?rgUK*K+AV>}dZiihJZ@kqQQ9*uX#WAU!I6Hmo+@xgdLJ`^v+hvORm zq4kCJ!|RLdN7k3tZztNSD(OpBC;iFVWFQ$zHYLN!mZUx2a>>DDJ~@;uB!`p5WT?BT zJKWvU9qsPyZt4m5wDd%JG-@VOmH9d&=VVfuTxKwn&kSV>nc++^Gmhn z`QIE*#l%RWl-N$hSJnDpPh(H0XLQRtdZIm@J+Ypyp4?ZQX~DmHcIlkb8O0~%iX8vC WW;s=klGJM2wgTt)xW*M9>n Date: Sat, 31 May 2025 18:52:14 +0700 Subject: [PATCH 068/124] Update gitignore to ignore vscode dirs --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index dc00d664..b5563351 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,9 @@ # Visual Studio cache directory .vs/ +# Visual Studio Code directory +.vscode/ + # Gradle cache directory .gradle/ From 75107a83dfad0066ab4f25d090f04fd4b86b638b Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Sat, 31 May 2025 18:58:07 +0700 Subject: [PATCH 069/124] Remove vscode dirs --- .vscode/extensions.json | 5 --- .vscode/launch.json | 10 ------ .vscode/settings.json | 70 ----------------------------------------- 3 files changed, 85 deletions(-) delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index ddb6ff85..00000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "visualstudiotoolsforunity.vstuc" - ] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index da60e25a..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Attach to Unity", - "type": "vstuc", - "request": "attach" - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 12dd4d4f..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "files.exclude": { - "**/.DS_Store": true, - "**/.git": true, - "**/.vs": true, - "**/.gitmodules": true, - "**/.vsconfig": true, - "**/*.booproj": true, - "**/*.pidb": true, - "**/*.suo": true, - "**/*.user": true, - "**/*.userprefs": true, - "**/*.unityproj": true, - "**/*.dll": true, - "**/*.exe": true, - "**/*.pdf": true, - "**/*.mid": true, - "**/*.midi": true, - "**/*.wav": true, - "**/*.gif": true, - "**/*.ico": true, - "**/*.jpg": true, - "**/*.jpeg": true, - "**/*.png": true, - "**/*.psd": true, - "**/*.tga": true, - "**/*.tif": true, - "**/*.tiff": true, - "**/*.3ds": true, - "**/*.3DS": true, - "**/*.fbx": true, - "**/*.FBX": true, - "**/*.lxo": true, - "**/*.LXO": true, - "**/*.ma": true, - "**/*.MA": true, - "**/*.obj": true, - "**/*.OBJ": true, - "**/*.asset": true, - "**/*.cubemap": true, - "**/*.flare": true, - "**/*.mat": true, - "**/*.meta": true, - "**/*.prefab": true, - "**/*.unity": true, - "build/": true, - "Build/": true, - "Library/": true, - "library/": true, - "obj/": true, - "Obj/": true, - "Logs/": true, - "logs/": true, - "ProjectSettings/": true, - "UserSettings/": true, - "temp/": true, - "Temp/": true - }, - "files.associations": { - "*.asset": "yaml", - "*.meta": "yaml", - "*.prefab": "yaml", - "*.unity": "yaml", - }, - "explorer.fileNesting.enabled": true, - "explorer.fileNesting.patterns": { - "*.sln": "*.csproj", - }, - "dotnet.defaultSolution": "Digital-Logic-Sim.sln" -} \ No newline at end of file From 2a3e0451d86eda19ce2d1d88da3da49747c7ac9a Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Sat, 31 May 2025 19:25:39 +0700 Subject: [PATCH 070/124] Gitignore projectversion --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index b5563351..94eef259 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,6 @@ crashlytics-build.properties /[Aa]ssets/[Ss]treamingAssets/aa/* /.idea /.vsconfig + +# Why not gitignore the f****** projectversion +ProjectSettings/ProjectVersion.txt From b92cc5802fcd06b3c20f7200eb338c0f602f7dca Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Sat, 31 May 2025 19:28:13 +0700 Subject: [PATCH 071/124] Change projectversion --- ProjectSettings/ProjectVersion.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 7a12cc2b..8678d93f 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 6000.0.49f1 -m_EditorVersionWithRevision: 6000.0.49f1 (840e0a9776d9) +m_EditorVersion: 6000.0.46f1 +m_EditorVersionWithRevision: 6000.0.46f1 (fb93bc360d3a) From 4fd10b00d427738987981da7a584720ac96ce8e7 Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Sat, 31 May 2025 15:18:03 +0200 Subject: [PATCH 072/124] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fcb92730..343dea04 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Digital-Logic-Sim Community Edit Our version of Sebastian Lague's Digital Logic Sim, which you can find on [itch.io](https://sebastian.itch.io/digital-logic-sim) and on [Github](https://github.com/SebLague/Digital-Logic-Sim). +If you want to know, what we are working on right now, check our [Task Management](https://nimble-pineapple-9b5.notion.site/2048ce5472ef8067a14cf50ecfb276e4?v=2048ce5472ef807e9872000c03ec9fe8) . Feel free to open a Pull Request and contribute to it, we would love to add your Features! This Community Edit is made, so that you can have all the Festures that you love in one single repository or build. From b9c5c631af6a8862a32e4fa2630e1ed7183b1888 Mon Sep 17 00:00:00 2001 From: BeboKhouja Date: Sun, 1 Jun 2025 09:14:10 +0700 Subject: [PATCH 073/124] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 343dea04..38c7261a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Digital-Logic-Sim Community Edit -Our version of Sebastian Lague's Digital Logic Sim, which you can find on [itch.io](https://sebastian.itch.io/digital-logic-sim) and on [Github](https://github.com/SebLague/Digital-Logic-Sim). +Our version of Sebastian Lague's Digital Logic Sim, which you can find on [itch.io](https://sebastian.itch.io/digital-logic-sim) and on [GitHub](https://github.com/SebLague/Digital-Logic-Sim). -If you want to know, what we are working on right now, check our [Task Management](https://nimble-pineapple-9b5.notion.site/2048ce5472ef8067a14cf50ecfb276e4?v=2048ce5472ef807e9872000c03ec9fe8) . -Feel free to open a Pull Request and contribute to it, we would love to add your Features! -This Community Edit is made, so that you can have all the Festures that you love in one single repository or build. +If you want to know what we are working on right now, check our [Task Management](https://nimble-pineapple-9b5.notion.site/2048ce5472ef8067a14cf50ecfb276e4?v=2048ce5472ef807e9872000c03ec9fe8). +Feel free to open a pull request and contribute to it, we would love to add your features! +This Community Edit is made so that you can have all the features that you love in one single repository or build. From 7aeb6a34e284c521a177d6f40dff5056ff93b871 Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Mon, 2 Jun 2025 21:30:09 +0200 Subject: [PATCH 074/124] Detector Gate, corrected ProjectVersion, code formatting --- .../Description/Helpers/ChipTypeHelper.cs | 1 + .../Description/Types/SubTypes/ChipTypes.cs | 1 + .../Game/Project/BuiltinChipCreator.cs | 21 ++++++ Assets/Scripts/Simulation/Simulator.cs | 72 +++++++++++++------ ProjectSettings/ProjectVersion.txt | 4 +- .../Projects/MainTest/ProjectDescription.json | 2 +- 6 files changed, 77 insertions(+), 24 deletions(-) diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 6bb8ef46..cc198e2e 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -16,6 +16,7 @@ public static class ChipTypeHelper { ChipType.Pulse, "PULSE" }, { ChipType.TriStateBuffer, "3-STATE BUFFER" }, { ChipType.Constant_8Bit, "CONST" }, + { ChipType.Detector, "DETECTOR" }, // ---- Memory ---- { ChipType.dev_Ram_8Bit, "RAM-8" }, { ChipType.Rom_256x16, $"ROM 256{mulSymbol}16" }, diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index fdbeff01..aada44a0 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -9,6 +9,7 @@ public enum ChipType TriStateBuffer, Clock, Pulse, + Detector, // ---- Memory ---- dev_Ram_8Bit, diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 14f9a64e..2fde6884 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -35,6 +35,7 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript CreateClock(), CreatePulse(), CreateConstant_8(), + CreateDetector(), // ---- Memory ---- dev_CreateRAM_8(), @@ -205,6 +206,26 @@ static ChipDescription CreateConstant_8() return CreateBuiltinChipDescription(ChipType.Constant_8Bit, size, col, null, outputPins); } + static ChipDescription CreateDetector() + { + PinDescription[] inputPins = + { + CreatePinDescription("IN", 0, PinBitCount.Bit1), + }; + + PinDescription[] outputPins = + { + CreatePinDescription("0", 1, PinBitCount.Bit1), + CreatePinDescription("1", 2, PinBitCount.Bit1), + CreatePinDescription("Z", 3, PinBitCount.Bit1), + }; + + Color col = new(0.1f, 0.1f, 0.3f); + Vector2 size = new(GridSize * 12, SubChipInstance.MinChipHeightForPins(inputPins, outputPins)); + + return CreateBuiltinChipDescription(ChipType.Detector, size, col, inputPins, outputPins); + } + static ChipDescription CreateInputKeyChip() { diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index ad9f2153..f071f40a 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -5,6 +5,7 @@ using DLS.Description; using DLS.Game; using Random = System.Random; +using System.Security.Cryptography; namespace DLS.Simulation { @@ -501,17 +502,17 @@ static void ProcessBuiltinChip(SimChip chip) break; } - case ChipType.EEPROM_256x16: - { - const int ByteMask = 0b11111111; + case ChipType.EEPROM_256x16: + { + const int ByteMask = 0b11111111; uint address = PinState.GetBitStates(chip.InputPins[0].State); - bool isWriting = PinState.FirstBitHigh(chip.InputPins[3].State); - bool clockHigh = PinState.FirstBitHigh(chip.InputPins[4].State); - bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; - chip.InternalState[^1] = clockHigh ? 1u : 0; + bool isWriting = PinState.FirstBitHigh(chip.InputPins[3].State); + bool clockHigh = PinState.FirstBitHigh(chip.InputPins[4].State); + bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; + chip.InternalState[^1] = clockHigh ? 1u : 0; - if (isWriting && isRisingEdge) + if (isWriting && isRisingEdge) { uint writeData = (ushort)(((PinState.GetBitStates(chip.InputPins[1].State) << 8) & (ByteMask<<8)) | (PinState.GetBitStates(chip.InputPins[2].State) & ByteMask)); @@ -520,13 +521,13 @@ static void ProcessBuiltinChip(SimChip chip) Project.ActiveProject.NotifyRomContentsEditedRuntime(chip); } - uint data = chip.InternalState[address]; - chip.OutputPins[0].State = (ushort)((data >> 8) & ByteMask); - chip.OutputPins[1].State = (ushort)(data & ByteMask); - break; - } + uint data = chip.InternalState[address]; + chip.OutputPins[0].State = (ushort)((data >> 8) & ByteMask); + chip.OutputPins[1].State = (ushort)(data & ByteMask); + break; + } - case ChipType.Buzzer: + case ChipType.Buzzer: { int freqIndex = PinState.GetBitStates(chip.InputPins[0].State); int volumeIndex = PinState.GetBitStates(chip.InputPins[1].State); @@ -546,23 +547,52 @@ static void ProcessBuiltinChip(SimChip chip) chip.OutputPins[2].State = (ushort)((sps >> 8) & ByteMask); chip.OutputPins[1].State = (ushort)(spc & ByteMask); chip.OutputPins[0].State = (ushort)((spc >> 8) & ByteMask); - break; - } - + break; + } case ChipType.RTC: { const uint ByteMask = 0b11111111; - int unixTime = (int) DateTimeOffset.UtcNow.ToUnixTimeSeconds(); + int unixTime = (int)DateTimeOffset.UtcNow.ToUnixTimeSeconds(); chip.OutputPins[0].State = (ushort)((unixTime >> 24) & ByteMask); chip.OutputPins[1].State = (ushort)((unixTime >> 16) & ByteMask); chip.OutputPins[2].State = (ushort)((unixTime >> 8) & ByteMask); chip.OutputPins[3].State = (ushort)(unixTime & ByteMask); - break; - + break; + } case ChipType.Constant_8Bit: { const uint bytemask = 0b11111111; - chip.OutputPins[0].State = (ushort)(chip.InternalState[0] & bytemask); + chip.OutputPins[0].State = (ushort)(chip.InternalState[0] & bytemask); + break; + } + case ChipType.Detector: + { + uint state = ((chip.InputPins[0].State >> 16) & 0x01) << 1 | (chip.InputPins[0].State & 0x01); + + switch (state) + { + case 0b00: // LogicLow + { + chip.OutputPins[0].State = 0x0001; // 0 = true + chip.OutputPins[1].State = 0x0000; // 1 = false + chip.OutputPins[2].State = 0x0000; // Z = false + break; + } + case 0b01: // LogicHigh + { + chip.OutputPins[0].State = 0x0000; // 0 = false + chip.OutputPins[1].State = 0x0001; // 1 = true + chip.OutputPins[2].State = 0x0000; // Z = false + break; + } + case 0b10 or 0b11: // Tristate / High Z + { + chip.OutputPins[0].State = 0x0000; // 0 = false + chip.OutputPins[1].State = 0x0000; // 1 = false + chip.OutputPins[2].State = 0x0001; // Z = true + break; + } + } break; } // ---- Bus types ---- diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 7a12cc2b..8678d93f 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 6000.0.49f1 -m_EditorVersionWithRevision: 6000.0.49f1 (840e0a9776d9) +m_EditorVersion: 6000.0.46f1 +m_EditorVersionWithRevision: 6000.0.46f1 (fb93bc360d3a) diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 051a7f17..a67cda71 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -169,7 +169,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","DETECTOR","RTC","ConstTest"], "IsToggledOpen":true, "Name":"OTHER" } From c371e459f63fc49beb1dbcdd45d9d350aa3213a9 Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Mon, 2 Jun 2025 21:52:59 +0200 Subject: [PATCH 075/124] Create codeql.yml --- .github/workflows/codeql.yml | 94 ++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..f8f76edb --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,94 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '00 12 * * *' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + strategy: + fail-fast: false + matrix: + include: + - language: csharp + build-mode: autobuild + # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Add any setup steps before running the `github/codeql-action/init` action. + # This includes steps like installing compilers or runtimes (`actions/setup-node` + # or others). This is typically only required for manual builds. + # - name: Setup runtime (example) + # uses: actions/setup-example@v1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + # If the analyze step fails for one of the languages you are analyzing with + # "We were unable to automatically build your code", modify the matrix above + # to set the build mode to "manual" for that language. Then modify this step + # to build your code. + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + - if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" From 1dbdb90462da363c3b8a530e87fb5e9a0b6eed17 Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Mon, 2 Jun 2025 21:59:54 +0200 Subject: [PATCH 076/124] Update codeql.yml --- .github/workflows/codeql.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f8f76edb..17138557 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -87,6 +87,8 @@ jobs: echo ' make bootstrap' echo ' make release' exit 1 + - name: Autobuild + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 From 6e3154e659fa344d7c823ee94570b0fd90e17855 Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Mon, 2 Jun 2025 22:00:48 +0200 Subject: [PATCH 077/124] Update codeql.yml --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 17138557..77540501 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -40,7 +40,7 @@ jobs: matrix: include: - language: csharp - build-mode: autobuild + build-mode: none # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' # Use `c-cpp` to analyze code written in C, C++ or both # Use 'java-kotlin' to analyze code written in Java, Kotlin or both From 959b19cbb1a40c6d26eafb300d142f3ac80d4b7e Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Tue, 3 Jun 2025 08:21:04 +0200 Subject: [PATCH 078/124] Update Simulator.cs --- Assets/Scripts/Simulation/Simulator.cs | 30 +++----------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index f071f40a..0ce17dea 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -567,32 +567,8 @@ static void ProcessBuiltinChip(SimChip chip) } case ChipType.Detector: { - uint state = ((chip.InputPins[0].State >> 16) & 0x01) << 1 | (chip.InputPins[0].State & 0x01); - - switch (state) - { - case 0b00: // LogicLow - { - chip.OutputPins[0].State = 0x0001; // 0 = true - chip.OutputPins[1].State = 0x0000; // 1 = false - chip.OutputPins[2].State = 0x0000; // Z = false - break; - } - case 0b01: // LogicHigh - { - chip.OutputPins[0].State = 0x0000; // 0 = false - chip.OutputPins[1].State = 0x0001; // 1 = true - chip.OutputPins[2].State = 0x0000; // Z = false - break; - } - case 0b10 or 0b11: // Tristate / High Z - { - chip.OutputPins[0].State = 0x0000; // 0 = false - chip.OutputPins[1].State = 0x0000; // 1 = false - chip.OutputPins[2].State = 0x0001; // Z = true - break; - } - } + uint state = PinState.GetBitTristatedValue(chip.InputPin[0].State) + chip.OutputPins[state] = 1 break; } // ---- Bus types ---- @@ -790,4 +766,4 @@ public enum ModificationType public int removeSubChipID; } } -} \ No newline at end of file +} From b31f49ad31d4882c9c9253a6815b1830e5183c4a Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Tue, 3 Jun 2025 17:36:19 +0700 Subject: [PATCH 079/124] Initial commit for stats --- .../Graphics/UI/Menus/ChipLibraryMenu.cs | 7 +- .../Graphics/UI/Menus/ChipStatsMenu.cs | 85 ++++++ .../Graphics/UI/Menus/ChipStatsMenu.cs.meta | 2 + Assets/Scripts/Graphics/UI/UIDrawer.cs | 14 + TestData/Projects/MainTest/Chips/#AA.json | 21 ++ .../Projects/MainTest/Chips/FLIP-FLOP.json | 99 +------ TestData/Projects/MainTest/Chips/MEM-1.json | 70 +---- .../Projects/MainTest/Chips/StatsTest.json | 44 +++ .../MainTest/Deleted Chips/D-LATCH.json | 266 ++++++++++++++++++ .../Projects/MainTest/ProjectDescription.json | 33 ++- 10 files changed, 472 insertions(+), 169 deletions(-) create mode 100644 Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs create mode 100644 Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs.meta create mode 100644 TestData/Projects/MainTest/Chips/#AA.json create mode 100644 TestData/Projects/MainTest/Chips/StatsTest.json create mode 100644 TestData/Projects/MainTest/Deleted Chips/D-LATCH.json diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs index 4a333008..99f2e66b 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs @@ -13,6 +13,7 @@ namespace DLS.Graphics { public static class ChipLibraryMenu { + public static string selectedChipName {get; private set;} const string defaultOtherChipsCollectionName = "OTHER"; const int deleteMessageMaxCharsPerLine = 25; @@ -231,7 +232,7 @@ static void DrawSelectedItemPanel(Vector2 topLeft, Vector2 size) { // ---- Draw ---- ChipCollection collection = collections[selectedCollectionIndex]; - string selectedChipName = collection.Chips[selectedChipInCollectionIndex]; + selectedChipName = collection.Chips[selectedChipInCollectionIndex]; bool canStepUpInCollection = selectedChipInCollectionIndex > 0; bool canStepDownInCollection = selectedChipInCollectionIndex < collection.Chips.Count - 1; bool canJumpUpACollection = selectedCollectionIndex > 0; @@ -250,6 +251,7 @@ static void DrawSelectedItemPanel(Vector2 topLeft, Vector2 size) int buttonIndex_moveStep = DrawHorizontalButtonGroup(buttonNames_moveSingleStep, interactableStates_move, ref topLeft, panelContentBounds.Width); int buttonIndex_moveJump = DrawHorizontalButtonGroup(buttonNames_jump, interactableStates_move, ref topLeft, panelContentBounds.Width); ChipActionButtons(selectedChipName, ref topLeft, panelContentBounds.Width); + bool stats = DrawHorizontalButtonGroup(new[]{"STATS"}, null, ref topLeft, panelContentBounds.Width) == 0; bool moveSingleStepDown = buttonIndex_moveStep == 1; bool moveJumpDown = buttonIndex_moveJump == 1; @@ -262,6 +264,9 @@ static void DrawSelectedItemPanel(Vector2 topLeft, Vector2 size) project.SetStarred(selectedChipName, !isStarred, false); } + if (stats) + UIDrawer.SetActiveMenu(UIDrawer.MenuType.ChipStats); + if (moveSingleStepDown || moveJumpDown) // Move chip down { bool moveWithinCurrentCollection = (moveSingleStepDown && canStepDownInCollection) || (moveJumpDown && !canJumpDownACollection); diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs new file mode 100644 index 00000000..0f3baa63 --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs @@ -0,0 +1,85 @@ +using System.Runtime.CompilerServices; +using DLS.Description; +using DLS.Game; +using Seb.Types; +using Seb.Vis; +using Seb.Vis.UI; +using UnityEngine; + +namespace DLS.Graphics +{ + public static class ChipStatsMenu + { + const float entrySpacing = 0.5f; + const float menuWidth = 55; + const float verticalOffset = 22; + + static readonly Vector2 entrySize = new(menuWidth, DrawSettings.SelectorWheelHeight); + public static readonly Vector2 settingFieldSize = new(entrySize.x / 3, entrySize.y); + + static string chip; + + // ---- Stats ---- + static readonly string usesLabel = "Uses"; + + + public static void DrawMenu(string chip) + { + //HandleKeyboardShortcuts(); + ChipStatsMenu.chip = chip; + + DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; + MenuHelper.DrawBackgroundOverlay(); + Draw.ID panelID = UI.ReservePanel(); + + const int inputTextPad = 1; + const float headerSpacing = 1.5f; + Color labelCol = Color.white; + Color headerCol = new(0.46f, 1, 0.54f); + Vector2 topLeft = UI.Centre + new Vector2(-menuWidth / 2, verticalOffset); + Vector2 labelPosCurr = topLeft; + + using (UI.BeginBoundsScope(true)) + { + // Draw stats + Vector2 usesLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, "Uses", labelCol * 0.75f, true); + UI.DrawPanel(usesLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(GetChipUses().ToString(), theme.FontBold, theme.FontSizeRegular, usesLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + + // Draw close + Vector2 buttonTopLeft = new(labelPosCurr.x, UI.PrevBounds.Bottom); + bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft); + + // Draw menu background + Bounds2D menuBounds = UI.GetCurrentBoundsScope(); + MenuHelper.DrawReservedMenuPanel(panelID, menuBounds); + + // Close + if (result) + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + + return; + + void AddSpacing() + { + labelPosCurr.y -= entrySize.y + entrySpacing; + } + + void AddHeaderSpacing() + { + labelPosCurr.y -= headerSpacing; + } + } + + private static uint GetChipUses() { + uint uses = 0; + foreach (ChipDescription chip in Project.ActiveProject.chipLibrary.allChips) + if (chip.Name != ChipStatsMenu.chip) + foreach (SubChipDescription subChip in chip.SubChips) + if (subChip.Name == ChipStatsMenu.chip) uses++; + + return uses; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs.meta b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs.meta new file mode 100644 index 00000000..c7ad2449 --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 4d891c77cf9d5fb4984ca10a6b12e5fb \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/UIDrawer.cs b/Assets/Scripts/Graphics/UI/UIDrawer.cs index 091248e4..2b4f8426 100644 --- a/Assets/Scripts/Graphics/UI/UIDrawer.cs +++ b/Assets/Scripts/Graphics/UI/UIDrawer.cs @@ -17,6 +17,7 @@ public enum MenuType MainMenu, RebindKeyChip, RomEdit, + ChipStats, PulseEdit, UnsavedChanges, Search, @@ -37,6 +38,8 @@ public static void Draw() { DrawAppMenus(); } + else if (ActiveMenu is MenuType.ChipStats) + DrawChipMenus(Project.ActiveProject, ChipLibraryMenu.selectedChipName); else { DrawProjectMenus(Project.ActiveProject); @@ -78,6 +81,17 @@ static void DrawProjectMenus(Project project) ContextMenu.Update(); } + static void DrawChipMenus(Project project, string chipName) + { + MenuType menuToDraw = ActiveMenu; // cache state in case it changes while drawing/updating the menus + + if (menuToDraw != MenuType.ChipCustomization) BottomBarUI.DrawUI(project); + + if (menuToDraw == MenuType.ChipStats) ChipStatsMenu.DrawMenu(chipName); + + ContextMenu.Update(); + } + public static bool InInputBlockingMenu() => !(ActiveMenu is MenuType.None or MenuType.BottomBarMenuPopup or MenuType.ChipCustomization); static void NotifyIfActiveMenuChanged() diff --git a/TestData/Projects/MainTest/Chips/#AA.json b/TestData/Projects/MainTest/Chips/#AA.json new file mode 100644 index 00000000..8df2b430 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/#AA.json @@ -0,0 +1,21 @@ +{ + "DLSVersion": "2.1.6", + "Name": "#AA", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 0.575, + "y": 0.375 + }, + "Colour": { + "r": 1.0, + "g": 1.0, + "b": 1.0, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[], + "Wires":[], + "Displays":[] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/FLIP-FLOP.json b/TestData/Projects/MainTest/Chips/FLIP-FLOP.json index 5f43b6dd..2990888a 100644 --- a/TestData/Projects/MainTest/Chips/FLIP-FLOP.json +++ b/TestData/Projects/MainTest/Chips/FLIP-FLOP.json @@ -1,6 +1,8 @@ { + "DLSVersion": "2.1.6", "Name": "FLIP-FLOP", "NameLocation": 0, + "ChipType": 0, "Size": { "x": 1.59, "y": 0.56 @@ -31,7 +33,7 @@ "y":-0.1875 }, "BitCount":1, - "Colour":5, + "Colour":6, "ValueDisplayMode":0 } ], @@ -49,28 +51,6 @@ } ], "SubChips":[ - { - "Name":"D-LATCH", - "ID":1435657029, - "Label":null, - "Position":{ - "x":-3.22, - "y":0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1677203907}], - "InternalData":null - }, - { - "Name":"D-LATCH", - "ID":1262867679, - "Label":null, - "Position":{ - "x":-0.97, - "y":-0.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1677203907}], - "InternalData":null - }, { "Name":"NOT", "ID":687615599, @@ -84,20 +64,6 @@ } ], "Wires":[ - { - "SourcePinAddress":{ - "PinID":1677203907, - "PinOwnerID":1262867679 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1920302974 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":0, @@ -111,64 +77,7 @@ "ConnectedWireIndex":-1, "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1732460994 - }, - "TargetPinAddress":{ - "PinID":1709633590, - "PinOwnerID":1435657029 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2001814538, - "PinOwnerID":687615599 - }, - "TargetPinAddress":{ - "PinID":1820713789, - "PinOwnerID":1435657029 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-4.25,"y":-0.1875},{"x":-4.25,"y":0.125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":2143575788 - }, - "TargetPinAddress":{ - "PinID":1820713789, - "PinOwnerID":1262867679 - }, - "ConnectionType":1, - "ConnectedWireIndex":1, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-5.96018,"y":-0.1875},{"x":-5.96018,"y":-0.5625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1677203907, - "PinOwnerID":1435657029 - }, - "TargetPinAddress":{ - "PinID":1709633590, - "PinOwnerID":1262867679 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-2.0,"y":0.25},{"x":-2.0,"y":-0.3125},{"x":0.0,"y":0.0}] } ], - "Displays":[], - "ChipType": 0 + "Displays":[] } \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/MEM-1.json b/TestData/Projects/MainTest/Chips/MEM-1.json index a09046ed..2411a68d 100644 --- a/TestData/Projects/MainTest/Chips/MEM-1.json +++ b/TestData/Projects/MainTest/Chips/MEM-1.json @@ -1,6 +1,8 @@ { + "DLSVersion": "2.1.6", "Name": "MEM-1", "NameLocation": 0, + "ChipType": 0, "Size": { "x": 1.015, "y": 1.0 @@ -31,7 +33,7 @@ "y":-0.5 }, "BitCount":1, - "Colour":1, + "Colour":2, "ValueDisplayMode":0 }, { @@ -42,7 +44,7 @@ "y":-1.375 }, "BitCount":1, - "Colour":2, + "Colour":3, "ValueDisplayMode":0 }, { @@ -53,7 +55,7 @@ "y":-2.0 }, "BitCount":1, - "Colour":3, + "Colour":4, "ValueDisplayMode":0 } ], @@ -71,17 +73,6 @@ } ], "SubChips":[ - { - "Name":"D-LATCH", - "ID":782972032, - "Label":null, - "Position":{ - "x":-0.72, - "y":0.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1677203907}], - "InternalData":null - }, { "Name":"AND", "ID":936394086, @@ -90,7 +81,7 @@ "x":-4.015, "y":-1.5 }, - "OutputPinColourInfo":[{"PinColour":4,"PinID":1580367471}], + "OutputPinColourInfo":[{"PinColour":5,"PinID":1580367471}], "InternalData":null }, { @@ -112,7 +103,7 @@ "x":-2.64, "y":-0.625 }, - "OutputPinColourInfo":[{"PinColour":1,"PinID":1580367471}], + "OutputPinColourInfo":[{"PinColour":2,"PinID":1580367471}], "InternalData":null } ], @@ -145,34 +136,6 @@ "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] }, - { - "SourcePinAddress":{ - "PinID":1677203907, - "PinOwnerID":782972032 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":364195663 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1453644181 - }, - "TargetPinAddress":{ - "PinID":1709633590, - "PinOwnerID":782972032 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":0, @@ -201,20 +164,6 @@ "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":0.25,"y":-1.5},{"x":0.25,"y":-0.375},{"x":0.0,"y":0.0}] }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":957057383 - }, - "TargetPinAddress":{ - "PinID":1820713789, - "PinOwnerID":782972032 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-1.875,"y":-0.625},{"x":-1.875,"y":-0.125},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":1580367471, @@ -225,7 +174,7 @@ "PinOwnerID":957057383 }, "ConnectionType":1, - "ConnectedWireIndex":5, + "ConnectedWireIndex":3, "ConnectedWireSegmentIndex":0, "Points":[{"x":-3.25,"y":-1.5},{"x":-3.25,"y":-0.75},{"x":0.0,"y":0.0}] }, @@ -244,6 +193,5 @@ "Points":[{"x":0.0,"y":0.0},{"x":-4.75,"y":-2.0},{"x":-4.75,"y":-1.625},{"x":0.0,"y":0.0}] } ], - "Displays":[], - "ChipType": 0 + "Displays":[] } \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/StatsTest.json b/TestData/Projects/MainTest/Chips/StatsTest.json new file mode 100644 index 00000000..48be5c87 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/StatsTest.json @@ -0,0 +1,44 @@ +{ + "DLSVersion": "2.1.6", + "Name": "StatsTest", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.475, + "y": 0.375 + }, + "Colour": { + "r": 0.122551017, + "g": 0.9483913, + "b": 0.0456536263, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"#AA", + "ID":1839347277, + "Label":"", + "Position":{ + "x":-1.125, + "y":-0.625 + }, + "OutputPinColourInfo":[], + "InternalData":null + }, + { + "Name":"#AA", + "ID":1590622850, + "Label":"", + "Position":{ + "x":1.32377, + "y":-1.9697 + }, + "OutputPinColourInfo":[], + "InternalData":null + } + ], + "Wires":[], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Deleted Chips/D-LATCH.json b/TestData/Projects/MainTest/Deleted Chips/D-LATCH.json new file mode 100644 index 00000000..a25899ac --- /dev/null +++ b/TestData/Projects/MainTest/Deleted Chips/D-LATCH.json @@ -0,0 +1,266 @@ +{ + "ChipType": 0, + "Colour": { + "r": 0.8017309, + "g": 0.425566971, + "b": 0.11274536, + "a": 1 + }, + "Displays":[], + "InputPins":[ + { + "Name":"DATA", + "ID":1709633590, + "Position":{ + "x":-6.375, + "y":0.5 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"STORE", + "ID":1820713789, + "Position":{ + "x":-6.375, + "y":-0.25 + }, + "BitCount":1, + "Colour":1, + "ValueDisplayMode":0 + } + ], + "Name": "D-LATCH", + "NameLocation": 0, + "OutputPins":[ + { + "Name":"OUT", + "ID":1677203907, + "Position":{ + "x":2.375, + "y":0.125 + }, + "BitCount":1, + "Colour":0, + "ValueDisplayMode":0 + } + ], + "Size": { + "x": 1.29, + "y": 0.5 + }, + "SubChips":[ + { + "Name":"NAND", + "ID":114480724, + "Label":"", + "Position":{ + "x":-0.125, + "y":0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":242969089, + "Label":"", + "Position":{ + "x":-0.125, + "y":-0.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":630167622, + "Label":"", + "Position":{ + "x":-2.125, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":736914670, + "Label":"", + "Position":{ + "x":-2.25, + "y":-0.8125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1748511812, + "Label":"", + "Position":{ + "x":-3.75, + "y":-0.9375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":114480724 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1677203907 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":0.875},{"x":0.75,"y":0.125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":242969089 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":114480724 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.75,"y":-0.6875},{"x":0.75,"y":-0.375},{"x":-0.9679,"y":0.57151},{"x":-0.9679,"y":0.75},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":114480724 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":242969089 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":0.75,"y":0.36127},{"x":-0.94879,"y":-0.25672},{"x":-0.94879,"y":-0.5625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":630167622 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":114480724 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":736914670 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":242969089 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1748511812 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":736914670 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1709633590 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1748511812 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-4.5,"y":0.5},{"x":-4.5,"y":-1.0625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1709633590 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1748511812 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-4.5,"y":-0.8125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1820713789 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":736914670 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":-2.9375,"y":-0.25},{"x":-2.9375,"y":-0.6875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1820713789 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":630167622 + }, + "ConnectionType":1, + "ConnectedWireIndex":8, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":-2.9375,"y":-0.25},{"x":-2.9375,"y":0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1709633590 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":630167622 + }, + "ConnectionType":1, + "ConnectedWireIndex":6, + "ConnectedWireSegmentIndex":1, + "Points":[{"x":-4.5,"y":0.49506},{"x":-4.5,"y":1.125},{"x":0.0,"y":0.0}] + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 6d1823ff..72324d22 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -1,9 +1,9 @@ { "ProjectName": "MainTest", - "DLSVersion_LastSaved": "2.1.5", + "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", - "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-04T09:15:41.061+02:00", + "CreationTime": "2025-03-15T00:23:30.404+07:00", + "LastSaveTime": "2025-06-03T17:04:29.880+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -14,7 +14,6 @@ "Prefs_SimStepsPerClockTick": 6, "AllCustomChipNames":[ "AND", - "D-LATCH", "NOT", "OR", "NOR", @@ -62,7 +61,9 @@ "RAM-sync", "TEST MergeSplit", "#", - "BuzzTest" + "BuzzTest", + "#AA", + "StatsTest" ], "StarredList":[ { @@ -96,17 +97,25 @@ { "Name":"BuzzTest", "IsCollection":false + }, + { + "Name":"#AA", + "IsCollection":false + }, + { + "Name":"StatsTest", + "IsCollection":false } ], "ChipCollections":[ { "Chips":["NAND","AND","NOT","NOR","XOR","OR","KEY","CLOCK","3-STATE BUFFER"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"BASICS" }, { "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"IN/OUT" }, { @@ -116,7 +125,7 @@ }, { "Chips":["7-SEGMENT","DECIMAL-4","DECIMAL-8","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"DISPLAY" }, { @@ -126,12 +135,12 @@ }, { "Chips":["REGISTER-4","REG-8"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"MEMORY" }, { - "Chips":["D-LATCH","FLIP-FLOP","OR-8","MEM-1","NOT-8","AND(8,1)","MUX-8","PC","BUF-8","ALU-8","DECODE-3","AND-3","CONTROL UNIT","TOGGLE","FLAGS","DISP-7","demo","7-SEGMENT DRIVER","DABBLE","LSB","LSHIFT-8","DOUBLE DABBLE","ALU","BUS BUFFER","MEM-256","REGISTER-8","XNOR","EQUALS-8","ADDER-4","DECODER-2","ADDER-8","ADDER","MEM-16","REGISTER-1","AND-8","RAM-256×8 (async)","ROM 256×16"], - "IsToggledOpen":false, + "Chips":["FLIP-FLOP","OR-8","MEM-1","NOT-8","AND(8,1)","MUX-8","PC","BUF-8","ALU-8","DECODE-3","AND-3","CONTROL UNIT","TOGGLE","FLAGS","DISP-7","demo","7-SEGMENT DRIVER","DABBLE","LSB","LSHIFT-8","DOUBLE DABBLE","ALU","BUS BUFFER","MEM-256","REGISTER-8","XNOR","EQUALS-8","ADDER-4","DECODER-2","ADDER-8","ADDER","MEM-16","REGISTER-1","AND-8","RAM-256×8 (async)","ROM 256×16"], + "IsToggledOpen":true, "Name":"KEEP" }, { @@ -140,7 +149,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","dev.RAM-8","#AA","StatsTest"], "IsToggledOpen":true, "Name":"OTHER" } From cb895888e55195159a9b23ba3d27f99b976bc1c0 Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Tue, 3 Jun 2025 18:52:19 +0700 Subject: [PATCH 080/124] Add collection stats --- .../Graphics/UI/Menus/ChipLibraryMenu.cs | 14 +++- .../Graphics/UI/Menus/ChipStatsMenu.cs | 15 ++-- .../Graphics/UI/Menus/CollectionStatsMenu.cs | 81 +++++++++++++++++++ .../UI/Menus/CollectionStatsMenu.cs.meta | 2 + Assets/Scripts/Graphics/UI/UIDrawer.cs | 17 +--- 5 files changed, 108 insertions(+), 21 deletions(-) create mode 100644 Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs create mode 100644 Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs.meta diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs index 99f2e66b..8484c6d2 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs @@ -13,7 +13,6 @@ namespace DLS.Graphics { public static class ChipLibraryMenu { - public static string selectedChipName {get; private set;} const string defaultOtherChipsCollectionName = "OTHER"; const int deleteMessageMaxCharsPerLine = 25; @@ -232,7 +231,7 @@ static void DrawSelectedItemPanel(Vector2 topLeft, Vector2 size) { // ---- Draw ---- ChipCollection collection = collections[selectedCollectionIndex]; - selectedChipName = collection.Chips[selectedChipInCollectionIndex]; + string selectedChipName = collection.Chips[selectedChipInCollectionIndex]; bool canStepUpInCollection = selectedChipInCollectionIndex > 0; bool canStepDownInCollection = selectedChipInCollectionIndex < collection.Chips.Count - 1; bool canJumpUpACollection = selectedCollectionIndex > 0; @@ -264,8 +263,10 @@ static void DrawSelectedItemPanel(Vector2 topLeft, Vector2 size) project.SetStarred(selectedChipName, !isStarred, false); } - if (stats) + if (stats) { + ChipStatsMenu.SetChip(selectedChipName); UIDrawer.SetActiveMenu(UIDrawer.MenuType.ChipStats); + } if (moveSingleStepDown || moveJumpDown) // Move chip down { @@ -303,6 +304,7 @@ static void DrawSelectedItemPanel(Vector2 topLeft, Vector2 size) { // ---- Draw ---- ChipCollection collection = collections[selectedCollectionIndex]; + string selectedCollectionName = collection.Name; ButtonTheme colSource = GetButtonTheme(true, true); DrawHeader(collection.Name, colSource.buttonCols.normal, colSource.textCols.normal, ref topLeft, panelContentBounds.Width); @@ -318,6 +320,12 @@ static void DrawSelectedItemPanel(Vector2 topLeft, Vector2 size) interactableStates_renameDelete[1] = canRenameOrDelete; int buttonIndexEditCollection = DrawHorizontalButtonGroup(buttonNames_collectionRenameOrDelete, interactableStates_renameDelete, ref topLeft, panelContentBounds.Width); + bool stats = DrawHorizontalButtonGroup(new[]{"STATS"}, null, ref topLeft, panelContentBounds.Width) == 0; + + if (stats) { + CollectionStatsMenu.SetCollection(selectedCollectionName); + UIDrawer.SetActiveMenu(UIDrawer.MenuType.CollectionStats); + } // ---- Handle button inputs ---- if (toggleStarred) { diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs index 0f3baa63..8dd0902e 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs @@ -23,11 +23,9 @@ public static class ChipStatsMenu static readonly string usesLabel = "Uses"; - public static void DrawMenu(string chip) + public static void SetChip(string chip) => ChipStatsMenu.chip = chip; + public static void DrawMenu() { - //HandleKeyboardShortcuts(); - ChipStatsMenu.chip = chip; - DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; MenuHelper.DrawBackgroundOverlay(); Draw.ID panelID = UI.ReservePanel(); @@ -42,7 +40,7 @@ public static void DrawMenu(string chip) using (UI.BeginBoundsScope(true)) { // Draw stats - Vector2 usesLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, "Uses", labelCol * 0.75f, true); + Vector2 usesLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, usesLabel, labelCol * 0.75f, true); UI.DrawPanel(usesLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); UI.DrawText(GetChipUses().ToString(), theme.FontBold, theme.FontSizeRegular, usesLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); @@ -61,6 +59,13 @@ public static void DrawMenu(string chip) return; + void DrawHeader(string text) + { + AddHeaderSpacing(); + UI.DrawText(text, theme.FontBold, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, headerCol); + AddHeaderSpacing(); + } + void AddSpacing() { labelPosCurr.y -= entrySize.y + entrySpacing; diff --git a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs new file mode 100644 index 00000000..15e32956 --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs @@ -0,0 +1,81 @@ +using System.Linq; +using DLS.Game; +using Seb.Types; +using Seb.Vis; +using Seb.Vis.UI; +using UnityEngine; + +namespace DLS.Graphics +{ + public static class CollectionStatsMenu + { + const float entrySpacing = 0.5f; + const float menuWidth = 55; + const float verticalOffset = 22; + + static readonly Vector2 entrySize = new(menuWidth, DrawSettings.SelectorWheelHeight); + public static readonly Vector2 settingFieldSize = new(entrySize.x / 3, entrySize.y); + + static string collection; + + // ---- Stats ---- + static readonly string numOfChipsLabel = "Number of chips"; + + public static void SetCollection(string collection) => CollectionStatsMenu.collection = collection; + public static void DrawMenu() + { + DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; + MenuHelper.DrawBackgroundOverlay(); + Draw.ID panelID = UI.ReservePanel(); + + const int inputTextPad = 1; + const float headerSpacing = 1.5f; + Color labelCol = Color.white; + Color headerCol = new(0.46f, 1, 0.54f); + Vector2 topLeft = UI.Centre + new Vector2(-menuWidth / 2, verticalOffset); + Vector2 labelPosCurr = topLeft; + + using (UI.BeginBoundsScope(true)) + { + // Draw stats + Vector2 numOfChipsLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, numOfChipsLabel, labelCol * 0.75f, true); + UI.DrawPanel(numOfChipsLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(GetCollectionChipsLength().ToString(), theme.FontBold, theme.FontSizeRegular, numOfChipsLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + + // Draw close + Vector2 buttonTopLeft = new(labelPosCurr.x, UI.PrevBounds.Bottom); + bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft); + + // Draw menu background + Bounds2D menuBounds = UI.GetCurrentBoundsScope(); + MenuHelper.DrawReservedMenuPanel(panelID, menuBounds); + + // Close + if (result) + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + + return; + + void DrawHeader(string text) + { + AddHeaderSpacing(); + UI.DrawText(text, theme.FontBold, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, headerCol); + AddHeaderSpacing(); + } + + void AddSpacing() + { + labelPosCurr.y -= entrySize.y + entrySpacing; + } + + void AddHeaderSpacing() + { + labelPosCurr.y -= headerSpacing; + } + } + + private static int GetCollectionChipsLength() => + Project.ActiveProject.description.ChipCollections.First(e => e.Name == collection).Chips.Count; + } +} \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs.meta b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs.meta new file mode 100644 index 00000000..ea0bd31b --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 5216bbbe9ac67bb43a8fa1acc4dd9812 \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/UIDrawer.cs b/Assets/Scripts/Graphics/UI/UIDrawer.cs index 2b4f8426..4e692eb7 100644 --- a/Assets/Scripts/Graphics/UI/UIDrawer.cs +++ b/Assets/Scripts/Graphics/UI/UIDrawer.cs @@ -1,3 +1,4 @@ +using System.Diagnostics; using DLS.Game; using Seb.Vis.UI; @@ -18,6 +19,7 @@ public enum MenuType RebindKeyChip, RomEdit, ChipStats, + CollectionStats, PulseEdit, UnsavedChanges, Search, @@ -38,8 +40,6 @@ public static void Draw() { DrawAppMenus(); } - else if (ActiveMenu is MenuType.ChipStats) - DrawChipMenus(Project.ActiveProject, ChipLibraryMenu.selectedChipName); else { DrawProjectMenus(Project.ActiveProject); @@ -67,6 +67,8 @@ static void DrawProjectMenus(Project project) else if (menuToDraw == MenuType.PinRename) PinEditMenu.DrawMenu(); else if (menuToDraw == MenuType.RebindKeyChip) RebindKeyChipMenu.DrawMenu(); else if (menuToDraw == MenuType.RomEdit) RomEditMenu.DrawMenu(); + else if (menuToDraw == MenuType.ChipStats) ChipStatsMenu.DrawMenu(); + else if (menuToDraw == MenuType.CollectionStats) CollectionStatsMenu.DrawMenu(); else if (menuToDraw == MenuType.UnsavedChanges) UnsavedChangesPopup.DrawMenu(); else if (menuToDraw == MenuType.Search) SearchPopup.DrawMenu(); else if (menuToDraw == MenuType.ChipLabelPopup) ChipLabelMenu.DrawMenu(); @@ -81,17 +83,6 @@ static void DrawProjectMenus(Project project) ContextMenu.Update(); } - static void DrawChipMenus(Project project, string chipName) - { - MenuType menuToDraw = ActiveMenu; // cache state in case it changes while drawing/updating the menus - - if (menuToDraw != MenuType.ChipCustomization) BottomBarUI.DrawUI(project); - - if (menuToDraw == MenuType.ChipStats) ChipStatsMenu.DrawMenu(chipName); - - ContextMenu.Update(); - } - public static bool InInputBlockingMenu() => !(ActiveMenu is MenuType.None or MenuType.BottomBarMenuPopup or MenuType.ChipCustomization); static void NotifyIfActiveMenuChanged() From 9f1d710f848d6c716fc52e2f160e29557cae342d Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Tue, 3 Jun 2025 20:31:06 +0700 Subject: [PATCH 081/124] Add num of chips in a chip --- .../Scripts/Graphics/UI/Menus/ChipStatsMenu.cs | 18 +++++++++++++++++- .../Projects/MainTest/ProjectDescription.json | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs index 8dd0902e..19442230 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs @@ -1,3 +1,4 @@ +using System.Linq; using System.Runtime.CompilerServices; using DLS.Description; using DLS.Game; @@ -22,8 +23,14 @@ public static class ChipStatsMenu // ---- Stats ---- static readonly string usesLabel = "Uses"; + static readonly string numOfChipsInChipLabel = "Number of chips in this chip"; - public static void SetChip(string chip) => ChipStatsMenu.chip = chip; + + public static void SetChip(string chip) { + ChipStatsMenu.chip = chip; + isChipBuiltIn = Project.ActiveProject.chipLibrary.IsBuiltinChip(chip); + } + static bool isChipBuiltIn; public static void DrawMenu() { DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; @@ -43,6 +50,13 @@ public static void DrawMenu() Vector2 usesLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, usesLabel, labelCol * 0.75f, true); UI.DrawPanel(usesLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); UI.DrawText(GetChipUses().ToString(), theme.FontBold, theme.FontSizeRegular, usesLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + + if (!isChipBuiltIn) { + AddSpacing(); + Vector2 numOfChipsInChipLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, numOfChipsInChipLabel, labelCol * 0.75f, true); + UI.DrawPanel(numOfChipsInChipLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(GetNumOfChipsInChip().ToString(), theme.FontBold, theme.FontSizeRegular, numOfChipsInChipLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + } // Draw close Vector2 buttonTopLeft = new(labelPosCurr.x, UI.PrevBounds.Bottom); @@ -86,5 +100,7 @@ private static uint GetChipUses() { return uses; } + private static int GetNumOfChipsInChip() => + Project.ActiveProject.chipLibrary.GetChipDescription(chip).SubChips.Length; } } \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 72324d22..31172019 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-06-03T17:04:29.880+07:00", + "LastSaveTime": "2025-06-03T19:53:58.743+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, From 219536796b42a3f5127e0c9183144cc50a7741a8 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Tue, 3 Jun 2025 18:06:00 +0200 Subject: [PATCH 082/124] No max pincount Slightly more performant : will need improvements. (8% less performant, but could actually become more performant I think) Still need to add custom Merge/Split, Buses, and the menu for those. --- .../Description/Helpers/ChipTypeHelper.cs | 7 - .../Description/Types/SubTypes/ChipTypes.cs | 8 +- .../Types/SubTypes/PinDescription.cs | 2 +- .../Scripts/Game/Elements/DevPinInstance.cs | 6 +- Assets/Scripts/Game/Elements/PinInstance.cs | 24 +- .../Interaction/ChipInteractionController.cs | 3 +- Assets/Scripts/Game/Main/UnityMain.cs | 4 +- .../Game/Project/BuiltinChipCreator.cs | 8 +- .../Game/Project/BuiltinCollectionCreator.cs | 8 - .../Scripts/Game/Project/DevChipInstance.cs | 2 +- .../Scripts/Graphics/World/DevSceneDrawer.cs | 8 +- Assets/Scripts/Seb/Helpers/StringHelper.cs | 2 +- Assets/Scripts/Simulation/PinState.cs | 310 +++- Assets/Scripts/Simulation/PinStateValue.cs | 301 ++++ .../Scripts/Simulation/PinStateValue.cs.meta | 2 + Assets/Scripts/Simulation/SimChip.cs | 4 +- Assets/Scripts/Simulation/SimPin.cs | 31 +- Assets/Scripts/Simulation/Simulator.cs | 324 ++-- .../Projects/MainTest/ProjectDescription.json | 4 +- TestData/Projects/sq/Chips/s.json | 136 ++ TestData/Projects/test/Chips/128Nand.json | 1430 +++++++++++++++++ .../Projects/test/ProjectDescription.json | 35 +- 22 files changed, 2372 insertions(+), 287 deletions(-) create mode 100644 Assets/Scripts/Simulation/PinStateValue.cs create mode 100644 Assets/Scripts/Simulation/PinStateValue.cs.meta create mode 100644 TestData/Projects/sq/Chips/s.json create mode 100644 TestData/Projects/test/Chips/128Nand.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 5aad02e5..90a71301 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -19,13 +19,6 @@ public static class ChipTypeHelper { ChipType.dev_Ram_8Bit, "RAM-8" }, { ChipType.Rom_256x16, $"ROM 256{mulSymbol}16" }, { ChipType.EEPROM_256x16, $"EEPROM 256{mulSymbol}16" }, - // ---- Split / Merge ---- - { ChipType.Split_4To1Bit, "4-1BIT" }, - { ChipType.Split_8To1Bit, "8-1BIT" }, - { ChipType.Split_8To4Bit, "8-4BIT" }, - { ChipType.Merge_4To8Bit, "4-8BIT" }, - { ChipType.Merge_1To8Bit, "1-8BIT" }, - { ChipType.Merge_1To4Bit, "1-4BIT" }, // ---- Displays ----- { ChipType.DisplayRGB, "RGB DISPLAY" }, diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index fbbd1064..c552b185 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -22,12 +22,8 @@ public enum ChipType DisplayLED, // ---- Merge / Split ---- - Merge_1To4Bit, - Merge_1To8Bit, - Merge_4To8Bit, - Split_4To1Bit, - Split_8To4Bit, - Split_8To1Bit, + Merge_Pin, + Split_Pin, // ---- In / Out Pins ---- In_Pin, diff --git a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs index e7706c5f..abfd5ebf 100644 --- a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs @@ -38,7 +38,7 @@ public PinBitCount(ushort BitCount = 1) } public readonly BitArray GetEmptyBitArray() { - return new BitArray(BitCount); + return new BitArray(BitCount<<1); } public override bool Equals(System.Object @object) diff --git a/Assets/Scripts/Game/Elements/DevPinInstance.cs b/Assets/Scripts/Game/Elements/DevPinInstance.cs index bdd08f4e..1741b66d 100644 --- a/Assets/Scripts/Game/Elements/DevPinInstance.cs +++ b/Assets/Scripts/Game/Elements/DevPinInstance.cs @@ -79,7 +79,7 @@ public bool ShouldBeIncludedInSelectionBox(Vector2 selectionCentre, Vector2 sele public int GetStateDecimalDisplayValue() { - uint rawValue = PinState.GetBitStates(Pin.State); + uint rawValue = Pin.State.GetValue(); int displayValue = (int)rawValue; if (pinValueDisplayMode == PinValueDisplayMode.SignedDecimal) @@ -110,7 +110,9 @@ Bounds2D CreateBoundingBox(float pad) public void ToggleState(int bitIndex) { - PinState.Toggle(ref Pin.PlayerInputState, bitIndex); + Pin.PlayerInputState.ToggleBit(bitIndex); + Debug.Log("PlayerInputState at Toggle : " + Pin.PlayerInputState.GetValue()); + Debug.Log("DevPinId at Toggle : " + ID); } public bool PointIsInInteractionBounds(Vector2 point) => PointIsInHandleBounds(point) || PointIsInStateIndicatorBounds(point); diff --git a/Assets/Scripts/Game/Elements/PinInstance.cs b/Assets/Scripts/Game/Elements/PinInstance.cs index eedc5bb0..bec192a8 100644 --- a/Assets/Scripts/Game/Elements/PinInstance.cs +++ b/Assets/Scripts/Game/Elements/PinInstance.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using DLS.Description; using DLS.Graphics; using DLS.Simulation; @@ -16,8 +17,8 @@ public class PinInstance : IInteractable // Pin may be attached to a chip or a devPin as its parent public readonly IMoveable parent; - public uint State; // sim state - public uint PlayerInputState; // dev input pins only + public PinStateValue State; // sim state + public PinStateValue PlayerInputState; public PinColour Colour; bool faceRight; public float LocalPosY; @@ -35,7 +36,14 @@ public PinInstance(PinDescription desc, PinAddress address, IMoveable parent, bo IsBusPin = parent is SubChipInstance subchip && subchip.IsBus; faceRight = isSourcePin; - PinState.SetAllDisconnected(ref State); + + Debug.Log(desc.BitCount.BitCount); + State.MakeFromPinBitCount(bitCount); + PlayerInputState.MakeFromPinBitCount(bitCount); + Debug.Log(State.size); + Debug.Log("AfterDisconnect :" + State.size); + + Debug.Log("Maybe this ?"); } public Vector2 ForwardDir => faceRight ? Vector2.right : Vector2.left; @@ -70,18 +78,16 @@ public void SetBusFlip(bool flipped) public Color GetStateCol(int bitIndex, bool hover = false, bool canUsePlayerState = true) { - uint pinState = (IsSourcePin && canUsePlayerState) ? PlayerInputState : State; // dev input pin uses player state (so it updates even when sim is paused) - uint state = PinState.GetBitTristatedValue(pinState, bitIndex); - - if (state == PinState.LogicDisconnected) return DrawSettings.ActiveTheme.StateDisconnectedCol; - return DrawSettings.GetStateColour(state == PinState.LogicHigh, (uint)Colour, hover); + PinStateValue pinState = (IsSourcePin && canUsePlayerState) ? PlayerInputState : State; // dev input pin uses player state (so it updates even when sim is paused) + uint state = pinState.GetTristatedValue(bitIndex); + if (state == BitArrayHelper.LogicDisconnected) return DrawSettings.ActiveTheme.StateDisconnectedCol; + return DrawSettings.GetStateColour(state == BitArrayHelper.LogicHigh, (uint)Colour, hover); } public void ChangeBitCount(int NewBitCount) { bitCount.BitCount = (ushort)NewBitCount; - Color col = new Color(0x22, 0x22, 0x22); } } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index e07e595c..bedb13bf 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -951,7 +951,8 @@ IMoveable CreateElementFromChipDescription(ChipDescription chipDescription) { PinDescription pinDesc = ioPinInfo.isInput ? chipDescription.OutputPins[0] : chipDescription.InputPins[0]; pinDesc.ID = instanceID; - elementToPlace = new DevPinInstance(pinDesc, ioPinInfo.isInput); + elementToPlace = new DevPinInstance(pinDesc, ioPinInfo.isInput); + } else // SubChip diff --git a/Assets/Scripts/Game/Main/UnityMain.cs b/Assets/Scripts/Game/Main/UnityMain.cs index bca26bf9..e0e9e008 100644 --- a/Assets/Scripts/Game/Main/UnityMain.cs +++ b/Assets/Scripts/Game/Main/UnityMain.cs @@ -128,8 +128,8 @@ void EditorDebugUpdate() if (InteractionState.PinUnderMouse != null) { SimPin simPin = Project.ActiveProject.rootSimChip.GetSimPinFromAddress(InteractionState.PinUnderMouse.Address); - ushort bitData = PinState.GetBitStates(simPin.State); - ushort tristateFlags = PinState.GetTristateFlags(simPin.State); + uint bitData = simPin.State.GetValue(); + uint tristateFlags = simPin.State.GetTristatedFlags() ; string bitString = StringHelper.CreateBinaryString(bitData, true); string triStateString = StringHelper.CreateBinaryString(tristateFlags, true); diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 11ea9260..b1a66c5f 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -36,13 +36,7 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript CreateEEPROM_8(), // ---- Merge / Split ---- - CreateBitConversionChip(ChipType.Split_4To1Bit, (PinBitCount)PinBitCount.Bit4, (PinBitCount) PinBitCount.Bit1, 1, 4), - CreateBitConversionChip(ChipType.Split_8To4Bit, (PinBitCount) PinBitCount.Bit8, (PinBitCount) PinBitCount.Bit4, 1, 2), - CreateBitConversionChip(ChipType.Split_8To1Bit, (PinBitCount) PinBitCount.Bit8, (PinBitCount) PinBitCount.Bit1, 1, 8), - CreateBitConversionChip(ChipType.Merge_1To8Bit, (PinBitCount) PinBitCount.Bit1, (PinBitCount) PinBitCount.Bit8, 8, 1), - CreateBitConversionChip(ChipType.Merge_1To4Bit, (PinBitCount) PinBitCount.Bit1, (PinBitCount) PinBitCount.Bit4, 4, 1), - CreateBitConversionChip(ChipType.Merge_4To8Bit, (PinBitCount) PinBitCount.Bit4, (PinBitCount) PinBitCount.Bit8, 2, 1), // ---- Displays ---- CreateDisplay7Seg(), CreateDisplayRGB(), @@ -74,7 +68,7 @@ static ChipDescription[] CreateInOutPins(PinBitCount[] pinBitCountsToLoad) ChipDescription InChip = CreateBuiltinChipDescription(ChipType.In_Pin, Vector2.zero, Color.clear, null, outPin, null, NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(true, pinBitCount)); - ChipDescription OutChip = CreateBuiltinChipDescription(ChipType.In_Pin, Vector2.zero, Color.clear, inPin, null, null, + ChipDescription OutChip = CreateBuiltinChipDescription(ChipType.Out_Pin, Vector2.zero, Color.clear, inPin, null, null, NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(false, pinBitCount)); DevPinDescriptions[i * 2] = InChip; diff --git a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs index 2e027d7a..b0b5f840 100644 --- a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs @@ -29,14 +29,6 @@ public static ChipCollection[] CreateDefaultChipCollections() CreateChipCollection("IN/OUT", ChipType.Button ), - CreateChipCollection("MERGE/SPLIT", - ChipType.Merge_1To4Bit, - ChipType.Merge_1To8Bit, - ChipType.Merge_4To8Bit, - ChipType.Split_4To1Bit, - ChipType.Split_8To4Bit, - ChipType.Split_8To1Bit - ), CreateChipCollection("BUS", ChipType.Bus_1Bit, ChipType.Bus_4Bit, diff --git a/Assets/Scripts/Game/Project/DevChipInstance.cs b/Assets/Scripts/Game/Project/DevChipInstance.cs index c25d9584..de4a6241 100644 --- a/Assets/Scripts/Game/Project/DevChipInstance.cs +++ b/Assets/Scripts/Game/Project/DevChipInstance.cs @@ -228,7 +228,7 @@ public void AddNewDevPin(DevPinInstance pin, bool isLoadingFromFile) AddElement(pin); if (!isLoadingFromFile) { - Simulator.AddPin(SimChip, pin.ID, pin.IsInputPin); + Simulator.AddPin(SimChip, pin.ID, pin.IsInputPin, pin.BitCount); } } diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index c06eff58..e4adeff3 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -267,7 +267,7 @@ public static void DrawSubChip(SubChipInstance subchip) if (isKeyChip) { // Key changes colour when pressed down - if (PinState.FirstBitHigh(subchip.OutputPins[0].State)) chipCol = Color.white; + if (subchip.OutputPins[0].State.SmallHigh()) chipCol = Color.white; } Color outlineCol = GetChipOutlineCol(chipCol); @@ -634,7 +634,7 @@ public static (Bounds2D bounds, bool inBounds, bool clicked) DrawInteractable_Bu pressed = inBounds && InputHelper.IsMouseHeld(MouseButton.Left) && controller.CanInteractWithButton; uint displayColIndex = chipSource.InternalState[0]; col = GetStateColour(pressed, displayColIndex); - chipSource.OutputPins[0].State = (uint)(pressed ? 1 : 0); + chipSource.OutputPins[0].State.SmallSet(pressed ? Constants.LOGIC_HIGH : Constants.LOGIC_LOW); } Vector2 buttonDrawSize = Vector2.one * (scale * buttonSize); @@ -677,7 +677,7 @@ public static (Bounds2D bounds, bool inBounds, bool clicked) DrawInteractable_To inBounds = bounds.PointInBounds(InputHelper.MousePosWorld); gettingClicked = inBounds && InputHelper.IsMouseDownThisFrame(MouseButton.Left) && controller.CanInteractWithButton; bool nextState = gettingClicked ? !currentState : currentState; - chipSource.OutputPins[0].State = (uint)(nextState ? 1 : 0); + chipSource.OutputPins[0].State.SmallSet(nextState ? Constants.LOGIC_HIGH : Constants.LOGIC_LOW); nextSwitchHeadPos = nextState ? -1 : 1; @@ -1065,7 +1065,7 @@ static int WireDrawOrder(WireInstance wire) if (wire.IsBusWire) return int.MaxValue - 2; // Draw wires carrying high signal above those carrying low signal (for single bit wires) - bool wireIsHigh = wire.bitCount == PinBitCount.Bit1 && PinState.FirstBitHigh(wire.SourcePin.State); + bool wireIsHigh = wire.bitCount == PinBitCount.Bit1 && wire.SourcePin.State.SmallHigh(); int drawPriority_signalHigh = wireIsHigh ? 1000 : 0; // Draw multi-bit wires above single bit wires diff --git a/Assets/Scripts/Seb/Helpers/StringHelper.cs b/Assets/Scripts/Seb/Helpers/StringHelper.cs index 979209e3..625e854b 100644 --- a/Assets/Scripts/Seb/Helpers/StringHelper.cs +++ b/Assets/Scripts/Seb/Helpers/StringHelper.cs @@ -36,7 +36,7 @@ public static string CreateBinaryString(uint value, bool removeLeadingZeroes = f public static int CreateIntegerStringNonAlloc(char[] charArray, int value) { bool isNegative = value < 0; - value = Math.Abs(value); + value = Math.Abs(value); int digitCount = value == 0 ? 1 : (int)Math.Log10(value) + 1; int charCount = digitCount; diff --git a/Assets/Scripts/Simulation/PinState.cs b/Assets/Scripts/Simulation/PinState.cs index 3d121e9f..c29b3383 100644 --- a/Assets/Scripts/Simulation/PinState.cs +++ b/Assets/Scripts/Simulation/PinState.cs @@ -1,71 +1,319 @@ +using System; +using System.Collections; +using System.Diagnostics; +using UnityEngine; + namespace DLS.Simulation { // Helper class for dealing with pin state. // Pin state is stored as a uint32, with format: // Tristate flags (most significant 16 bits) | Bit states (least significant 16 bits) - public static class PinState + public static class BitArrayHelper { // Each bit has three possible states (tri-state logic): public const ushort LogicLow = 0; public const ushort LogicHigh = 1; public const ushort LogicDisconnected = 2; + // Mask for single bit value (bit state, and tristate flag) public const uint SingleBitMask = 1 | (1 << 16); - - public static ushort GetBitStates(uint state) => (ushort)state; - public static ushort GetTristateFlags(uint state) => (ushort)(state >> 16); - public static void Set(ref uint state, ushort bitStates, ushort tristateFlags) + public static BitArray NibbleMaskArray = new BitArray(new byte[] { 0b1111}); + public static BitArray ByteMaskArray = new BitArray(new byte[] { 0b11111111 }); + public static BitArray ShortMaskArray = new BitArray(new byte[] { 0b11111111, 0b11111111 }); + public static BitArray IntMaskArray = new BitArray(new byte[] { 0b11111111, 0b11111111, 0b11111111, 0b11111111 }); + + public static BitArray TrueBitArray(int length) + { + BitArray array = new BitArray(length); + array.SetAll(true); + return array; + } + public static BitArray FalseBitArray(int length) + { + BitArray array = new BitArray(length); + array.SetAll(false); + return array; + } + + public static BitArray GetBitStates(BitArray state) { + return GetFirstNBits(state, state.Length>>1); + } + + public static BitArray GetTristateFlags(BitArray state) + { + BitArray array = new BitArray(state).RightShift(state.Length >> 1); + return GetFirstNBits(array, array.Length >> 1); + } + + public static BitArray Concatenate(BitArray a, BitArray b) + { + BitArray newBitArray = SetNBitsAtIndex(a, b, a.Length); + return newBitArray; + } + + public static void Set(ref BitArray state, BitArray bitStates, BitArray tristateFlags) + { + state = Concatenate(bitStates, tristateFlags); + } + + + + public static void Set(ref BitArray state, BitArray other) + { + state = other; + } + + public static ushort GetBitTristatedValue(BitArray state, int bitIndex) + { + if(state is null || state.Length<=1) return LogicDisconnected; + bool bitState = GetBitStates(state).Get(bitIndex); + bool tri = GetTristateFlags(state).Get(bitIndex); + return (ushort)(bitState ? 1 : tri ? 2 : 0); // Combine to form tri-stated value: 0 = LOW, 1 = HIGH, 2 = DISCONNECTED + } + + public static bool FirstBitHigh(BitArray state) { + if (state.Length <=0) return false; + return state.Get(0); + } + + public static BitArray GetFirstNBits(BitArray state, int length) + { + int len = Math.Min(length, state.Count); + BitArray n = new BitArray(length); + for (byte i = 0; i < len; i++) + { + n.Set(i, state[i]); + } + return n; + } + + + public static byte GetFirstByteFromByteArray(BitArray state) { - state = (uint)(bitStates | (tristateFlags << 16)); + int len = Math.Min(8, state.Count); + byte n = 0; + for (byte i = 0; i < len; i++) + { + if (state.Get(i)) + n |= (byte)(1 << i); + } + return n; + } + + public static byte GetFirstOfMaxLengthFromByteArray(BitArray state, int maxLength) + { + int len = Math.Min(maxLength, state.Count); + byte n = 0; + for (byte i = 0; i < len; i++) + { + if (state.Get(i)) + n |= (byte)(1 << i); + } + return n; + } + + public static ushort GetFirstUShortFromByteArray(BitArray state) + { + int len = Math.Min(16, state.Count); + ushort n = 0; + for (byte i = 0; i < len; i++) + { + if (state.Get(i)) + n |= (ushort)(1 << i); + } + return n; + } + + public static uint GetFirstUIntFromByteArray(BitArray state) + { + int len = Math.Min(32, state.Count); + uint n = 0; + for (byte i = 0; i < len; i++) + { + if (state.Get(i)) + n |= (uint)(1 << i); + } + return n; + } + + + public static byte GetByteOfMaxLengthStartingAtIndex(BitArray state, int index, int maxByteLength) // Gets the byte that starts at bit Index (ex GetByteStartingAtIndex(0b1001000111111111, 8) -> 0b10010001 + { + return GetFirstOfMaxLengthFromByteArray(state.RightShift(index).And(ByteMaskArray), maxByteLength); + } + + public static byte GetByteStartingAtIndex(BitArray state, int index) // Gets the byte that starts at bit Index (ex GetByteStartingAtIndex(0b1001000111111111, 8) -> 0b10010001 + { + return GetFirstByteFromByteArray(state.RightShift(index).And(ByteMaskArray)); } - public static void Set(ref uint state, uint other) => state = other; + public static ushort GetShortStartingAtIndex(BitArray state, int index) + { + return GetFirstUShortFromByteArray(state.RightShift(index).And(ShortMaskArray)); + } - public static ushort GetBitTristatedValue(uint state, int bitIndex) + public static uint GetIntStartingAtIndex(BitArray state, int index) + { + return GetFirstUIntFromByteArray(state.RightShift(index).And(IntMaskArray)); + } + + public static byte[] GetByteArrayStartingAtIndex(BitArray state, int index, int length) { - ushort bitState = (ushort)((GetBitStates(state) >> bitIndex) & 1); - ushort tri = (ushort)((GetTristateFlags(state) >> bitIndex) & 1); - return (ushort)(bitState | (tri << 1)); // Combine to form tri-stated value: 0 = LOW, 1 = HIGH, 2 = DISCONNECTED + byte[] bytes = new byte[length]; + + for (int i = 0; i <= length; i++) + { + bytes[i] = GetByteStartingAtIndex(state, index + (i << 3)); + } + + return bytes; } - public static bool FirstBitHigh(uint state) => (state & 1) == LogicHigh; + public static byte[] GetByteArrayOfMaxLengthStartingAtIndex(BitArray state, int index, int length, int maxByteLength) + { + byte[] bytes = new byte[length]; + + for (int i = 0; i <= length; i++) + { + bytes[i] = GetByteOfMaxLengthStartingAtIndex(state, index + (i * maxByteLength), maxByteLength); + } + + return bytes; + } - public static void Set4BitFrom8BitSource(ref uint state, uint source8bit, bool firstNibble) + + public static void SetBitAtIndex(ref BitArray state, int index, bool value) { - ushort sourceBitStates = GetBitStates(source8bit); - ushort sourceTristateFlags = GetTristateFlags(source8bit); + state.Set(index, value); + } + + public static BitArray SetNBitsAtIndex(BitArray state, BitArray source, int index) + { + BitArray bitArray = new BitArray(Mathf.Max(state.Length, source.Length + index)); + for (int i = 0; i < state.Length; i++) + { + bitArray.Set(i, state[i]); + } + for (int i = 0; i < source.Length; i++) + { + bitArray.Set(index + i, source[i]); + } + return bitArray; + } + - if (firstNibble) + + public static void SetByteAtIndexWithLimit(ref BitArray state, int index, byte value, byte maxbits) + { + byte max = Math.Min(maxbits, (byte)8); + for (int i = 0; i < max; i++) { - const ushort mask = 0b1111; - Set(ref state, (ushort)(sourceBitStates & mask), (ushort)(sourceTristateFlags & mask)); + state.Set(index + i, ((value >> i) & 1) == 1); } - else + } + + public static void SetByteAtIndexWithlimitNoReplace(ref BitArray state, int index, byte value, byte maxbits) + { + byte max = Math.Min(maxbits, (byte)8); + for (int i = 0; i < max; i++) + { + bool set = ((value >> i) & 1) == 1; + if (set) state.Set(index + i, true); + } + } + + + public static void SetShortAtIndex(ref BitArray state, int index, ushort value) + { + for (int i = 0; i < 16; i++) + { + state.Set(index + i, ((value >> i) & 1) == 1); + } + } + + public static void SetIntAtIndex(ref BitArray state, int index, uint value) + { + for (int i = 0; i < 32; i++) + { + state.Set(index + i, ((value >> i) & 1) == 1); + } + } + + public static void SetByteArrayAtIndex (ref BitArray state, int index, byte[] value) + { + for(int i = 0; i < value.Length; i++) { - const uint mask = 0b11110000; - Set(ref state, (ushort)((sourceBitStates & mask) >> 4), (ushort)((sourceTristateFlags & mask) >> 4)); + SetByteAtIndexWithLimit(ref state, index + (i<<3), value[i], 8); } } - public static void Set8BitFrom4BitSources(ref uint state, uint a, uint b) + public static void SetByteArrayAtIndexWithLimit(ref BitArray state, int index, byte[] value, byte limit) + { + for (int i = 0; i < value.Length; i++) + { + SetByteAtIndexWithLimit(ref state, index + (i * limit), value[i], limit); + } + } + + public static void MergeManyToOne(ref BitArray target, BitArray[] source) + { + BitArray tValue = new BitArray(target.Length); + BitArray tTristate = GetTristateFlags(target); + int sourceLength = source[0].Length >> 1; // Same one everywhere + for (int i = 0; i < source.Length; i++) { + tValue = tValue.Or(GetBitStates(source[i]).LeftShift(i*sourceLength)); + tTristate = tTristate.Or(GetTristateFlags(source[i]).LeftShift(i * sourceLength)); + + } + Set(ref target, tValue, tTristate); + } + + public static void SplitOneToMany(ref BitArray[] target, BitArray source) { - ushort bitStates = (ushort)(GetBitStates(a) | (GetBitStates(b) << 4)); - ushort tristateFlags = (ushort)((GetTristateFlags(a) & 0b1111) | ((GetTristateFlags(b) & 0b1111) << 4)); - Set(ref state, bitStates, tristateFlags); + int sourceLength = source.Length >> 1; // Divide by two (because half the array is dedicated to tristate) + int targetArrayCount = target.Length; // Take the amount of bitarrays. + int bitArrayLength = target[0].Length >> 1; //Same for any one. + int sizeofvaluebytearray = bitArrayLength / 8 + (bitArrayLength % 8 == 0 ? 0 : 1); + + for (int i = 0; i <= targetArrayCount; i++) + { + byte[] valueByteArray = new byte[sizeofvaluebytearray]; + byte[] tristateArray = new byte[sizeofvaluebytearray]; + + valueByteArray = GetByteArrayOfMaxLengthStartingAtIndex(source, i * sizeofvaluebytearray * bitArrayLength, valueByteArray.Length, bitArrayLength); + SetByteArrayAtIndexWithLimit(ref target[i], 0, valueByteArray, (byte)bitArrayLength); + + tristateArray = GetByteArrayOfMaxLengthStartingAtIndex(source, sourceLength + i * sizeofvaluebytearray * bitArrayLength, valueByteArray.Length, bitArrayLength); + SetByteArrayAtIndexWithLimit(ref target[i], bitArrayLength , valueByteArray, (byte)bitArrayLength); + } } - public static void Toggle(ref uint state, int bitIndex) + public static void Toggle(ref BitArray state, int bitIndex) { - ushort bitStates = GetBitStates(state); - bitStates ^= (ushort)(1u << bitIndex); + UnityEngine.Debug.Log("State length : " + state.Length + "\n BitIndex : " + bitIndex); + BitArray bitStates = GetBitStates(state); + bitStates.Set(bitIndex, !bitStates[bitIndex]); + UnityEngine.Debug.Log("bitstate" + bitStates.Get(0)); // Clear tristate flags (can't be disconnected if toggling as only input dev pins are allowed) - Set(ref state, bitStates, 0); - } + Set(ref state, bitStates, FalseBitArray(bitStates.Length)); + UnityEngine.Debug.Log("state" + state.Get(0)); + + } + + public static void SetAllDisconnected(ref BitArray state, int length) + { + if(state == null) { state = new BitArray(length); } + BitArray bitStates = new BitArray(state.Length >> 1); + bitStates.SetAll(false); + BitArray tristates = new BitArray(state.Length >> 1); + tristates.SetAll(true); + - public static void SetAllDisconnected(ref uint state) => Set(ref state, 0, ushort.MaxValue); + Set(ref state, bitStates, tristates); + } } } \ No newline at end of file diff --git a/Assets/Scripts/Simulation/PinStateValue.cs b/Assets/Scripts/Simulation/PinStateValue.cs new file mode 100644 index 00000000..140236fd --- /dev/null +++ b/Assets/Scripts/Simulation/PinStateValue.cs @@ -0,0 +1,301 @@ +using System; +using System.Collections; +using System.Collections.Specialized; +using DLS.Description; +using Seb.Helpers; +using UnityEngine; + +namespace DLS.Simulation +{ + public struct PinStateValue + { + public const uint LOGIC_LOW = 0; + public const uint LOGIC_HIGH = 1; + public const uint LOGIC_DISCONNECTED = 2; + + + public uint singleBit; // ONLY USE FOR 1 BIT + + public BitVector32 a; // If bitcount <= 16 : use only this -- FASTEST + public static BitVector32.Section valueSection = BitVector32.CreateSection(short.MaxValue); // Only in use on less than 16 + public static BitVector32.Section tristateSection = BitVector32.CreateSection(short.MaxValue, valueSection); // this too + + public BitVector32 b; // If 16 < bitcount <=32 : use this too -- medium + public BitArray BigValues; // If bitcount >= 32 use this INSTEAD -- SLOWEST + public BitArray BigTristates; // Goes with it + public ushort size; + + const short maxSigned16bitValue = 0x7FFF; + public void MakeFromPinBitCount(PinBitCount pinBitCount) + { + size = pinBitCount.BitCount; + if (size <= 1) + { + singleBit = 0; + } + else if (size <= 16) + { + a = new BitVector32(0); + } + + else if (size <= 32) + { + a = new BitVector32(0); + b = new BitVector32(0); + } + else + { + BigValues = new BitArray(size); + BigTristates = new BitArray(size); + } + } + + + public void MakeFromAnother(PinStateValue source) + { + CopyFrom(source); + } + + public bool SmallHigh() + { + return (singleBit & 1) == 1; + } + + public void SetAllDisconnected() + { + if(size == 1) + { + singleBit = 2; + return; + } + + if(size <= 16) + { + a[valueSection] = 0; + a[tristateSection] = -1; + return; + } + + if(size <= 32) + { + a = new BitVector32(0); + b = new BitVector32(-1); + return; + } + + BigValues = new BitArray(size); + BigTristates = BitArrayHelper.TrueBitArray(size); + } + + public void SmallSet(uint value) + { + singleBit = value; + } + + public void SmallToggle() + { + singleBit ^= 1; + } + + public bool FirstBitHigh() + { + if (size <= 32) { return (a.Data & 1) == 1; } + else return BigValues.Get(0); + } + public void ToggleBit(int index) + { + UnityEngine.Debug.Log("Index: " + index); + if (size == 1) { SmallToggle(); } + else if (size <= 16) { a[valueSection] = (a[valueSection]) ^ (1 << index); } + else if (size <= 32) { a = new BitVector32(a.Data ^ (1 << index)); } + else if (size >32) BigValues.Set(index, !BigValues.Get(index)); + } + + public void SetFirstBit(bool firstBit) + { + if (size == 1) { SmallSet((uint)(firstBit ? 1 : 0)); } + else if (size <= 32) { + a[valueSection] = firstBit ? a[valueSection] | 1 : a[valueSection] ^ 1; + } + else BigValues.Set(0, firstBit); + } + + public void SetShortValue(ushort value) + { + a[valueSection] = value; + } + + public void SetMediumValue(uint value) + { + a = new BitVector32((int)value); + } + + public void SetShort(uint valueAndFlags) + { + a = new BitVector32((int)valueAndFlags); + } + + public void SetMedium(uint value, uint tristateFlags) + { + a = new BitVector32((int)value); + b = new BitVector32((int)tristateFlags); + } + public uint GetShortValues() + { + return (uint)a[valueSection]; + } + + public uint GetMediumValues() + { + return (uint)a.Data; + } + + public uint GetShortTristate() + { + return (uint)a[tristateSection]; + } + + public uint GetMediumTristate() + { + return (uint)b.Data; + } + + public uint GetValue() + { + if(size == 1) { return (uint)(SmallHigh() ? 1 : 0); } + if(size <=16) { return GetShortValues(); } + if(size <=32) { return GetMediumValues(); } + return BitArrayHelper.GetFirstUIntFromByteArray(BigValues); + } + + + public ushort GetSmallTristate() + { + return (ushort)(singleBit & 1 ); + } + public ushort GetTristatedValue(int index) + { + if(size == 1) + { + return GetSmallTristate(); + } + + else if (size <= 16) + { + return GetShortBitTristatedValue(index); + } + + else if (size <= 32) + { + return GetMediumBitTristatedValue(index); + } + else + { + return GetBigBitTristatedValue(index); + } + } + + ushort GetShortBitTristatedValue(int index) + { + return (ushort)((GetShortValues() >> index) & 1 | ((GetShortTristate() >> index & 1) << 1)); + } + + + ushort GetMediumBitTristatedValue(int index) + { + return (ushort)((GetMediumValues() >> index) & 1 | (GetMediumTristate() >> index & 1) << 1); + } + + ushort GetBigBitTristatedValue(int index) + { + return (ushort)(BigValues.Get(index)?1:BigTristates.Get(index)?2:0); + } + + public uint GetTristatedFlags() + { + if (size == 1) { return (uint)(singleBit >> 1); } + if (size <=16) { return (uint)a[tristateSection]; } + if (size <= 32) { return (uint)b.Data; } + return BitArrayHelper.GetFirstUIntFromByteArray(BigTristates); + } + + public void CopyFrom(PinStateValue pinStateValue) + { + size = pinStateValue.size; + if(size == 1) {SmallCopyFrom(pinStateValue); } + else if (size <= 16) { ShortCopyFrom(pinStateValue); } + else if (size <= 32) {MediumCopyFrom(pinStateValue); } + else {BigCopyFrom(pinStateValue); } + } + + void SmallCopyFrom(PinStateValue pinStateValue) + { + singleBit = pinStateValue.singleBit; + } + + void ShortCopyFrom(PinStateValue pinStateValue) + { + a = pinStateValue.a; + } + + void MediumCopyFrom(PinStateValue pinStateValue) + { + a = pinStateValue.a; + b = pinStateValue.b; + } + + void BigCopyFrom(PinStateValue pinStateValue) + { + BigValues = new BitArray(pinStateValue.BigValues); + BigTristates = new BitArray(pinStateValue.BigTristates); + } + + public uint OR(PinStateValue pinStateValue) + { + if (size == 1) { return (pinStateValue.singleBit | singleBit); } + else if (size <= 16) { return pinStateValue.GetShortValues() | GetShortValues(); } + else if (size <= 32) { return pinStateValue.GetMediumValues() | GetMediumValues(); } + return 0; + } + + public void SetAsOr(PinStateValue pinStateValue) + { + if (size == 1) { singleBit |= pinStateValue.singleBit; } + else if (size <= 16) { a[valueSection] |= (int)pinStateValue.GetShortValues(); } + else if (size <= 32) { SetMediumValue(((uint)a.Data | pinStateValue.GetMediumValues())); } + else { BigValues.Or(pinStateValue.BigValues); } + + } + + public void SetAsAnd(PinStateValue pinStateValue) + { + if (size == 1) { singleBit &= pinStateValue.singleBit; } + else if (size <= 16) { a[valueSection] &= (int)pinStateValue.GetShortValues(); } + else if (size <= 32) { SetMediumValue(((uint)a.Data & pinStateValue.GetMediumValues())); } + else { BigValues.And(pinStateValue.BigValues); } + } + + public void SetAsRightShift(int shift) + { + if (shift <= 0) { return; } + if (size == 1) { singleBit = 0; } + else if (size <= 16) { a[valueSection] >>= shift; } + else if (size <= 32) { SetMediumValue((uint)(a.Data >> shift)); } + else { BigValues.RightShift(shift); } + } + + public void SetAsLeftShift(int shift) + { + if (shift <= 0) { return; } + if (size == 1) { singleBit = 0; } + else if (size <= 16) { a[valueSection] <<= shift; } + else if (size <= 32) { SetMediumValue((uint)(a.Data << shift)); } + else { BigValues.LeftShift(shift); } + } + + internal void SetShortValue(uint v) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Simulation/PinStateValue.cs.meta b/Assets/Scripts/Simulation/PinStateValue.cs.meta new file mode 100644 index 00000000..bf6e35ef --- /dev/null +++ b/Assets/Scripts/Simulation/PinStateValue.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d5a1af65fa02f294d960270c8bb6a22d \ No newline at end of file diff --git a/Assets/Scripts/Simulation/SimChip.cs b/Assets/Scripts/Simulation/SimChip.cs index 73710595..2b5f27e4 100644 --- a/Assets/Scripts/Simulation/SimChip.cs +++ b/Assets/Scripts/Simulation/SimChip.cs @@ -219,7 +219,7 @@ public void AddPin(SimPin pin, bool isInput) } } - static SimPin CreateSimPinFromDescription(PinDescription desc, bool isInput, SimChip parent) => new(desc.ID, isInput, parent); + static SimPin CreateSimPinFromDescription(PinDescription desc, bool isInput, SimChip parent) => new(desc.ID, isInput, parent, desc.BitCount); public void RemovePin(int removePinID) { @@ -271,7 +271,7 @@ public void RemoveConnection(PinAddress sourcePinAddress, PinAddress targetPinAd removeTargetPin.numInputConnections -= 1; if (removeTargetPin.numInputConnections == 0) { - PinState.SetAllDisconnected(ref removeTargetPin.State); + removeTargetPin.State.SetAllDisconnected(); removeTargetPin.latestSourceID = -1; removeTargetPin.latestSourceParentChipID = -1; if (targetChip != null) removeTargetPin.parentChip.numConnectedInputs--; diff --git a/Assets/Scripts/Simulation/SimPin.cs b/Assets/Scripts/Simulation/SimPin.cs index 9528fe5e..3a5c8ca4 100644 --- a/Assets/Scripts/Simulation/SimPin.cs +++ b/Assets/Scripts/Simulation/SimPin.cs @@ -1,4 +1,6 @@ using System; +using System.Collections; +using DLS.Description; namespace DLS.Simulation { @@ -7,7 +9,7 @@ public class SimPin public readonly int ID; public readonly SimChip parentChip; public readonly bool isInput; - public uint State; + public PinStateValue State; public SimPin[] ConnectedTargetPins = Array.Empty(); @@ -23,7 +25,7 @@ public class SimPin public int numInputConnections; public int numInputsReceivedThisFrame; - public SimPin(int id, bool isInput, SimChip parentChip) + public SimPin(int id, bool isInput, SimChip parentChip, PinBitCount pinBitCount) { this.parentChip = parentChip; this.isInput = isInput; @@ -31,10 +33,11 @@ public SimPin(int id, bool isInput, SimChip parentChip) latestSourceID = -1; latestSourceParentChipID = -1; - PinState.SetAllDisconnected(ref State); + State.MakeFromPinBitCount(pinBitCount); + State.SetAllDisconnected(); } - public bool FirstBitHigh => PinState.FirstBitHigh(State); + public bool FirstBitHigh => State.FirstBitHigh(); public void PropagateSignal() { @@ -59,21 +62,15 @@ void ReceiveInput(SimPin source) if (numInputsReceivedThisFrame > 0) { - // Has already received input this frame, so choose at random whether to accept conflicting input. - // Note: for multi-bit pins, this choice is made identically for all bits, rather than individually. - // Todo: maybe consider changing to per-bit in the future...) + PinStateValue OR = new(); OR.MakeFromAnother(source.State) ; + OR.SetAsOr(State); + PinStateValue AND = new(); AND.MakeFromAnother(source.State); + AND.SetAsAnd(State); - uint OR = source.State | State; - uint AND = source.State & State; - ushort bitsNew = (ushort)(Simulator.RandomBool() ? OR : AND); // randomly accept or reject conflicting state + PinStateValue bitsNew = new(); AND.MakeFromAnother(Simulator.RandomBool() ? OR : AND); // randomly accept or reject conflicting state - ushort mask = (ushort)(OR >> 16); // tristate flags - bitsNew = (ushort)((bitsNew & ~mask) | ((ushort)OR & mask)); // can always accept input for tristated bits - - ushort tristateNew = (ushort)(AND >> 16); - uint stateNew = (uint)(bitsNew | (tristateNew << 16)); - set = stateNew != State; - State = stateNew; + set = bitsNew.GetValue() != State.GetValue(); + State = bitsNew; } else { diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 096348c8..5bd944e1 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -1,13 +1,21 @@ using System; +using System.Collections; using System.Collections.Concurrent; using System.Diagnostics; using DLS.Description; using DLS.Game; +using NUnit.Framework.Interfaces; using Random = System.Random; namespace DLS.Simulation { - public static class Simulator + public static class Constants + { + public const uint LOGIC_LOW = 0; + public const uint LOGIC_HIGH = 1; + public const uint LOGIC_DISCONNECTED = 2; + } + public static class Simulator { public static readonly Random rng = new(); static readonly Stopwatch stopwatch = Stopwatch.StartNew(); @@ -66,13 +74,12 @@ public static void RunSimulationStep(SimChip rootSimChip, DevPinInstance[] input try { SimPin simPin = rootSimChip.GetSimPinFromAddress(input.Pin.Address); - PinState.Set(ref simPin.State, input.Pin.PlayerInputState); - input.Pin.State = input.Pin.PlayerInputState; + simPin.State.CopyFrom(input.Pin.PlayerInputState); } catch (Exception) { - // Possible for sim to be temporarily out of sync since running on separate threads, so just ignore failure to find pin. + throw;// Possible for sim to be temporarily out of sync since running on separate threads, so just ignore failure to find pin. } } @@ -230,151 +237,110 @@ static void ProcessBuiltinChip(SimChip chip) // ---- Process Built-in chips ---- case ChipType.Nand: { - uint nandOp = 1 ^ (chip.InputPins[0].State & chip.InputPins[1].State); - chip.OutputPins[0].State = (ushort)(nandOp & 1); - break; - } + uint nandOp = 1 ^ (chip.InputPins[0].State.singleBit & chip.InputPins[1].State.singleBit); + chip.OutputPins[0].State.singleBit = (nandOp & 1); + break; + } case ChipType.Clock: { - bool high = stepsPerClockTransition != 0 && ((simulationFrame / stepsPerClockTransition) & 1) == 0; - PinState.Set(ref chip.OutputPins[0].State, high ? PinState.LogicHigh : PinState.LogicLow); - break; - } + bool high = stepsPerClockTransition != 0 && ((simulationFrame / stepsPerClockTransition) & 1) == 0; + chip.OutputPins[0].State.SmallSet((high ? Constants.LOGIC_HIGH : Constants.LOGIC_LOW)); + break; + } case ChipType.Pulse: { - const int pulseDurationIndex = 0; - const int pulseTicksRemainingIndex = 1; - const int pulseInputOldIndex = 2; + const int pulseDurationIndex = 0; + const int pulseTicksRemainingIndex = 1; + const int pulseInputOldIndex = 2; + + uint inputState = chip.InputPins[0].State.singleBit; + bool pulseInputHigh = (inputState & 1) == 1; + uint pulseTicksRemaining = chip.InternalState[pulseTicksRemainingIndex]; + + if (pulseTicksRemaining == 0) + { + bool isRisingEdge = pulseInputHigh && chip.InternalState[pulseInputOldIndex] == 0; + if (isRisingEdge) + { + pulseTicksRemaining = chip.InternalState[pulseDurationIndex]; + chip.InternalState[pulseTicksRemainingIndex] = pulseTicksRemaining; + } + } + + uint outputState = 0; + if (pulseTicksRemaining > 0) + { + chip.InternalState[1]--; + outputState = 1; + } + else if ((inputState >> 1) != 0) + { + outputState = 2; + } + + chip.OutputPins[0].State.singleBit = outputState; + chip.InternalState[pulseInputOldIndex] = pulseInputHigh ? 1u : 0; - uint inputState = chip.InputPins[0].State; - bool pulseInputHigh = PinState.FirstBitHigh(inputState); - uint pulseTicksRemaining = chip.InternalState[pulseTicksRemainingIndex]; - - if (pulseTicksRemaining == 0) - { - bool isRisingEdge = pulseInputHigh && chip.InternalState[pulseInputOldIndex] == 0; - if (isRisingEdge) - { - pulseTicksRemaining = chip.InternalState[pulseDurationIndex]; - chip.InternalState[pulseTicksRemainingIndex] = pulseTicksRemaining; - } - } - - uint outputState = PinState.LogicLow; - if (pulseTicksRemaining > 0) - { - chip.InternalState[1]--; - outputState = PinState.LogicHigh; - } - else if (PinState.GetTristateFlags(inputState) != 0) - { - PinState.SetAllDisconnected(ref outputState); - } - - chip.OutputPins[0].State = outputState; - chip.InternalState[pulseInputOldIndex] = pulseInputHigh ? 1u : 0; + break; + } + + /*case ChipType.Split_Pin: + { + BitArray[] bitArrays = new BitArray[chip.OutputPins.Length]; + for (int i = 0; i < chip.OutputPins.Length; i++) + { + bitArrays[i] = chip.OutputPins[i].State; + } + PinState.SplitOneToMany(ref bitArrays, chip.InputPins[0].State); + break; + } + case ChipType.Merge_Pin: + { + BitArray[] bitArrays = new BitArray[chip.InputPins.Length]; + for (int i = 0; i < chip.InputPins.Length; i++) + { + bitArrays[i] = chip.InputPins[i].State; + } + PinState.MergeManyToOne(ref chip.OutputPins[0].State, bitArrays); + break; + }*/ - break; - } - case ChipType.Split_4To1Bit: - { - uint inState4Bit = chip.InputPins[0].State; - chip.OutputPins[0].State = (inState4Bit >> 3) & PinState.SingleBitMask; - chip.OutputPins[1].State = (inState4Bit >> 2) & PinState.SingleBitMask; - chip.OutputPins[2].State = (inState4Bit >> 1) & PinState.SingleBitMask; - chip.OutputPins[3].State = (inState4Bit >> 0) & PinState.SingleBitMask; - break; - } - case ChipType.Merge_1To4Bit: - { - uint stateA = chip.InputPins[3].State & PinState.SingleBitMask; // lsb - uint stateB = chip.InputPins[2].State & PinState.SingleBitMask; - uint stateC = chip.InputPins[1].State & PinState.SingleBitMask; - uint stateD = chip.InputPins[0].State & PinState.SingleBitMask; - chip.OutputPins[0].State = stateA | stateB << 1 | stateC << 2 | stateD << 3; - break; - } - case ChipType.Merge_1To8Bit: - { - uint stateA = chip.InputPins[7].State & PinState.SingleBitMask; // lsb - uint stateB = chip.InputPins[6].State & PinState.SingleBitMask; - uint stateC = chip.InputPins[5].State & PinState.SingleBitMask; - uint stateD = chip.InputPins[4].State & PinState.SingleBitMask; - uint stateE = chip.InputPins[3].State & PinState.SingleBitMask; - uint stateF = chip.InputPins[2].State & PinState.SingleBitMask; - uint stateG = chip.InputPins[1].State & PinState.SingleBitMask; - uint stateH = chip.InputPins[0].State & PinState.SingleBitMask; - chip.OutputPins[0].State = stateA | stateB << 1 | stateC << 2 | stateD << 3 | stateE << 4 | stateF << 5 | stateG << 6 | stateH << 7; - break; - } - case ChipType.Merge_4To8Bit: - { - SimPin in4A = chip.InputPins[0]; - SimPin in4B = chip.InputPins[1]; - SimPin out8 = chip.OutputPins[0]; - PinState.Set8BitFrom4BitSources(ref out8.State, in4B.State, in4A.State); - break; - } - case ChipType.Split_8To4Bit: - { - SimPin in8 = chip.InputPins[0]; - SimPin out4A = chip.OutputPins[0]; - SimPin out4B = chip.OutputPins[1]; - PinState.Set4BitFrom8BitSource(ref out4A.State, in8.State, false); - PinState.Set4BitFrom8BitSource(ref out4B.State, in8.State, true); - break; - } - case ChipType.Split_8To1Bit: - { - uint in8 = chip.InputPins[0].State; - chip.OutputPins[0].State = (in8 >> 7) & PinState.SingleBitMask; - chip.OutputPins[1].State = (in8 >> 6) & PinState.SingleBitMask; - chip.OutputPins[2].State = (in8 >> 5) & PinState.SingleBitMask; - chip.OutputPins[3].State = (in8 >> 4) & PinState.SingleBitMask; - chip.OutputPins[4].State = (in8 >> 3) & PinState.SingleBitMask; - chip.OutputPins[5].State = (in8 >> 2) & PinState.SingleBitMask; - chip.OutputPins[6].State = (in8 >> 1) & PinState.SingleBitMask; - chip.OutputPins[7].State = (in8 >> 0) & PinState.SingleBitMask; - break; - } - case ChipType.TriStateBuffer: + case ChipType.TriStateBuffer: { SimPin dataPin = chip.InputPins[0]; SimPin enablePin = chip.InputPins[1]; - SimPin outputPin = chip.OutputPins[0]; + SimPin outputPin = chip.OutputPins[0]; - if (PinState.FirstBitHigh(enablePin.State)) outputPin.State = dataPin.State; - else PinState.SetAllDisconnected(ref outputPin.State); + if (enablePin.State.SmallHigh()) outputPin.State = dataPin.State; + else outputPin.State.singleBit = 2; break; } case ChipType.Key: { bool isHeld = SimKeyboardHelper.KeyIsHeld((char)chip.InternalState[0]); - chip.OutputPins[0].State = isHeld ? PinState.LogicHigh : PinState.LogicLow; + chip.OutputPins[0].State.SmallSet(isHeld ? Constants.LOGIC_HIGH : Constants.LOGIC_LOW); break; } case ChipType.DisplayRGB: { const uint addressSpace = 256; - uint addressPin = chip.InputPins[0].State; - uint redPin = chip.InputPins[1].State; - uint greenPin = chip.InputPins[2].State; - uint bluePin = chip.InputPins[3].State; - uint resetPin = chip.InputPins[4].State; - uint writePin = chip.InputPins[5].State; - uint refreshPin = chip.InputPins[6].State; - uint clockPin = chip.InputPins[7].State; - - // Detect clock rising edge - bool clockHigh = PinState.FirstBitHigh(clockPin); - bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; - chip.InternalState[^1] = clockHigh ? 1u : 0; + uint addressPin = chip.InputPins[0].State.GetShortValues(); + uint redPin = chip.InputPins[1].State.GetShortValues(); + uint greenPin = chip.InputPins[2].State.GetShortValues(); + uint bluePin = chip.InputPins[3].State.GetShortValues(); + bool resetPin = chip.InputPins[4].State.SmallHigh(); + bool writePin = chip.InputPins[5].State.SmallHigh(); + bool refreshPin = chip.InputPins[6].State.SmallHigh(); + bool clockPin = chip.InputPins[7].State.SmallHigh(); + + bool isRisingEdge = clockPin && chip.InternalState[^1] == 0; + chip.InternalState[^1] = clockPin ? 1u : 0; if (isRisingEdge) { // Clear back buffer - if (PinState.FirstBitHigh(resetPin)) + if (resetPin) { for (int i = 0; i < addressSpace; i++) { @@ -382,15 +348,15 @@ static void ProcessBuiltinChip(SimChip chip) } } // Write to back-buffer - else if (PinState.FirstBitHigh(writePin)) + else if (writePin) { - uint addressIndex = PinState.GetBitStates(addressPin) + addressSpace; - uint data = (uint)(PinState.GetBitStates(redPin) | (PinState.GetBitStates(greenPin) << 4) | (PinState.GetBitStates(bluePin) << 8)); + uint addressIndex = addressPin + addressSpace; + uint data = (uint)(redPin | (greenPin << 4) | (bluePin << 8)); chip.InternalState[addressIndex] = data; } // Copy back-buffer to display buffer - if (PinState.FirstBitHigh(refreshPin)) + if (refreshPin) { for (int i = 0; i < addressSpace; i++) { @@ -400,32 +366,32 @@ static void ProcessBuiltinChip(SimChip chip) } // Output current pixel colour - uint colData = chip.InternalState[PinState.GetBitStates(addressPin)]; - chip.OutputPins[0].State = (ushort)((colData >> 0) & 0b1111); // red - chip.OutputPins[1].State = (ushort)((colData >> 4) & 0b1111); // green - chip.OutputPins[2].State = (ushort)((colData >> 8) & 0b1111); // blue + uint colData = chip.InternalState[addressPin]; + chip.OutputPins[0].State.SetShortValue(colData & 0b1111);//red + chip.OutputPins[1].State.SetShortValue((colData >> 4) & 0b1111);//green + chip.OutputPins[2].State.SetShortValue((colData >> 8) & 0b1111);//blue - break; + + break; } case ChipType.DisplayDot: { const uint addressSpace = 256; - uint addressPin = chip.InputPins[0].State; - uint pixelInputPin = chip.InputPins[1].State; - uint resetPin = chip.InputPins[2].State; - uint writePin = chip.InputPins[3].State; - uint refreshPin = chip.InputPins[4].State; - uint clockPin = chip.InputPins[5].State; + uint addressPin = chip.InputPins[0].State.GetShortValues(); + bool pixelInputPin = chip.InputPins[1].State.SmallHigh(); + bool resetPin = chip.InputPins[2].State.SmallHigh(); + bool writePin = chip.InputPins[3].State.SmallHigh(); + bool refreshPin = chip.InputPins[4].State.SmallHigh(); + bool clockPin = chip.InputPins[5].State.SmallHigh(); // Detect clock rising edge - bool clockHigh = PinState.FirstBitHigh(clockPin); - bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; - chip.InternalState[^1] = clockHigh ? 1u : 0; + bool isRisingEdge = clockPin && chip.InternalState[^1] == 0; + chip.InternalState[^1] = clockPin ? 1u : 0; if (isRisingEdge) { // Clear back buffer - if (PinState.FirstBitHigh(resetPin)) + if (resetPin) { for (int i = 0; i < addressSpace; i++) { @@ -433,15 +399,15 @@ static void ProcessBuiltinChip(SimChip chip) } } // Write to back-buffer - else if (PinState.FirstBitHigh(writePin)) + else if (writePin) { - uint addressIndex = PinState.GetBitStates(addressPin) + addressSpace; - uint data = PinState.GetBitStates(pixelInputPin); + uint addressIndex = addressPin + addressSpace; + uint data = (uint)(pixelInputPin ? 1 : 0); chip.InternalState[addressIndex] = data; } // Copy back-buffer to display buffer - if (PinState.FirstBitHigh(refreshPin)) + if (refreshPin) { for (int i = 0; i < addressSpace; i++) { @@ -451,68 +417,67 @@ static void ProcessBuiltinChip(SimChip chip) } // Output current pixel colour - ushort pixelState = (ushort)chip.InternalState[PinState.GetBitStates(addressPin)]; - chip.OutputPins[0].State = pixelState; - + uint pixelState = chip.InternalState[addressPin]; + chip.OutputPins[0].State.SmallSet(pixelState); break; } case ChipType.dev_Ram_8Bit: { - uint addressPin = chip.InputPins[0].State; - uint dataPin = chip.InputPins[1].State; - uint writeEnablePin = chip.InputPins[2].State; - uint resetPin = chip.InputPins[3].State; - uint clockPin = chip.InputPins[4].State; + uint addressPin = chip.InputPins[0].State.GetShortValues(); + uint dataPin = chip.InputPins[1].State.GetShortValues(); + bool writeEnablePin = chip.InputPins[2].State.SmallHigh(); + bool resetPin = chip.InputPins[3].State.SmallHigh(); // Detect clock rising edge - bool clockHigh = PinState.FirstBitHigh(clockPin); + bool clockHigh = chip.InputPins[4].State.SmallHigh(); bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; chip.InternalState[^1] = clockHigh ? 1u : 0; // Write/Reset on rising edge if (isRisingEdge) { - if (PinState.FirstBitHigh(resetPin)) + if (resetPin) { for (int i = 0; i < 256; i++) { chip.InternalState[i] = 0; } } - else if (PinState.FirstBitHigh(writeEnablePin)) + else if (writeEnablePin) { - chip.InternalState[PinState.GetBitStates(addressPin)] = PinState.GetBitStates(dataPin); + chip.InternalState[addressPin] = dataPin; } } // Output data at current address - chip.OutputPins[0].State = (ushort)chip.InternalState[PinState.GetBitStates(addressPin)]; + chip.OutputPins[0].State.SetShortValue((ushort)chip.InternalState[addressPin]); break; } case ChipType.Rom_256x16: { - const int ByteMask = 0b11111111; - uint address = PinState.GetBitStates(chip.InputPins[0].State); + uint address = chip.InputPins[0].State.GetShortValues(); uint data = chip.InternalState[address]; - chip.OutputPins[0].State = (ushort)((data >> 8) & ByteMask); - chip.OutputPins[1].State = (ushort)(data & ByteMask); - break; + + chip.OutputPins[0].State.SetShortValue((ushort)(data << 8)); + chip.OutputPins[1].State.SetShortValue((ushort)data); + + break; } case ChipType.EEPROM_256x16: { const int ByteMask = 0b11111111; - uint address = PinState.GetBitStates(chip.InputPins[0].State); - bool isWriting = PinState.FirstBitHigh(chip.InputPins[3].State); - bool clockHigh = PinState.FirstBitHigh(chip.InputPins[4].State); + uint address = chip.InputPins[0].State.GetShortValues(); + bool isWriting = chip.InputPins[3].State.SmallHigh(); + bool clockHigh = chip.InputPins[4].State.SmallHigh(); bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; chip.InternalState[^1] = clockHigh ? 1u : 0; if (isWriting && isRisingEdge) { - uint writeData = (ushort)(((PinState.GetBitStates(chip.InputPins[1].State) << 8) & (ByteMask<<8)) | (PinState.GetBitStates(chip.InputPins[2].State) & ByteMask)); + uint writeData = (ushort)(((chip.InputPins[1].State.GetShortValues() << 8) & (ByteMask<<8)) | (chip.InputPins[2].State.GetShortValues() & ByteMask)); chip.InternalState[address] = writeData; @@ -520,23 +485,24 @@ static void ProcessBuiltinChip(SimChip chip) } uint data = chip.InternalState[address]; - chip.OutputPins[0].State = (ushort)((data >> 8) & ByteMask); - chip.OutputPins[1].State = (ushort)(data & ByteMask); + + + chip.OutputPins[0].State.SetShortValue((ushort)(data << 8)); + chip.OutputPins[1].State.SetShortValue((ushort)(data << 0)); break; } case ChipType.Buzzer: { - int freqIndex = PinState.GetBitStates(chip.InputPins[0].State); - int volumeIndex = PinState.GetBitStates(chip.InputPins[1].State); - audioState.RegisterNote(freqIndex, (uint)volumeIndex); + int freqIndex = (int)chip.InputPins[0].State.GetShortValues(); + uint volumeIndex = chip.InputPins[1].State.GetShortValues(); + audioState.RegisterNote(freqIndex, volumeIndex); break; } case ChipType.Constant_8Bit: { - const uint bytemask = 0b11111111; - chip.OutputPins[0].State = (ushort)(chip.InternalState[0] & bytemask); + chip.OutputPins[0].State.SetShortValue((ushort)chip.InternalState[0]); break; } // ---- Bus types ---- @@ -545,7 +511,7 @@ static void ProcessBuiltinChip(SimChip chip) if (ChipTypeHelper.IsBusOriginType(chip.ChipType)) { SimPin inputPin = chip.InputPins[0]; - PinState.Set(ref chip.OutputPins[0].State, inputPin.State); + chip.OutputPins[0].State.CopyFrom(inputPin.State); } break; @@ -590,13 +556,13 @@ static SimChip BuildSimChipRecursive(ChipDescription chipDesc, ChipLibrary libra return simChip; } - public static void AddPin(SimChip simChip, int pinID, bool isInputPin) + public static void AddPin(SimChip simChip, int pinID, bool isInputPin, PinBitCount pinBitCount) { SimModifyCommand command = new() { type = SimModifyCommand.ModificationType.AddPin, modifyTarget = simChip, - simPinToAdd = new SimPin(pinID, isInputPin, simChip), + simPinToAdd = new SimPin(pinID, isInputPin, simChip, pinBitCount), pinIsInputPin = isInputPin }; modificationQueue.Enqueue(command); diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index a8b50667..733537f2 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,14 +4,14 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-30T16:14:10.012+02:00", + "LastSaveTime": "2025-05-31T17:34:26.079+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 100, + "Prefs_SimTargetStepsPerSecond": 100000000, "Prefs_SimStepsPerClockTick": 6, "AllCustomChipNames":[ "AND", diff --git a/TestData/Projects/sq/Chips/s.json b/TestData/Projects/sq/Chips/s.json new file mode 100644 index 00000000..7b0f73a8 --- /dev/null +++ b/TestData/Projects/sq/Chips/s.json @@ -0,0 +1,136 @@ +{ + "DLSVersion": "2.1.6", + "Name": "s", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 0.37, + "y": 0.5 + }, + "Colour": { + "r": 0.607444167, + "g": 0.0234385636, + "b": 0.439777076, + "a": 1 + }, + "InputPins":[ + { + "Name":"OUT", + "ID":898096517, + "Position":{ + "x":-6.01407, + "y":-1.6823 + }, + "BitCount":"1", + "Colour":0, + "ValueDisplayMode":0 + }, + { + "Name":"OUT", + "ID":1296796487, + "Position":{ + "x":-6.0, + "y":-2.25 + }, + "BitCount":"1", + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"IN", + "ID":1536622727, + "Position":{ + "x":2.28605, + "y":-1.79953 + }, + "BitCount":"1", + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"BUS-1", + "ID":1525428923, + "Label":"", + "Position":{ + "x":-5.31829, + "y":-0.09965 + }, + "OutputPinColourInfo":null, + "InternalData":[385429360,0] + }, + { + "Name":"BUS-TERMINUS-1", + "ID":385429360, + "Label":"", + "Position":{ + "x":1.885, + "y":-0.09965 + }, + "OutputPinColourInfo":null, + "InternalData":[1525428923,0] + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1525428923 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":385429360 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":898096517 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1525428923 + }, + "ConnectionType":2, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":-4.0625,"y":-1.6875},{"x":-4.0625,"y":-0.09965}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1525428923 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1536622727 + }, + "ConnectionType":1, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.5,"y":-0.09965},{"x":0.5,"y":-1.8125},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1296796487 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1525428923 + }, + "ConnectionType":2, + "ConnectedWireIndex":0, + "ConnectedWireSegmentIndex":0, + "Points":[{"x":0.0,"y":0.0},{"x":-3.0625,"y":-2.25},{"x":-3.0625,"y":-0.09965}] + } + ], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/test/Chips/128Nand.json b/TestData/Projects/test/Chips/128Nand.json new file mode 100644 index 00000000..67b1167b --- /dev/null +++ b/TestData/Projects/test/Chips/128Nand.json @@ -0,0 +1,1430 @@ +{ + "DLSVersion": "2.1.6", + "Name": "128Nand", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.175, + "y": 0.375 + }, + "Colour": { + "r": 0.47345227, + "g": 0.368196636, + "b": 0.381946534, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"NAND", + "ID":1037436837, + "Label":"", + "Position":{ + "x":-4.25, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1782796312, + "Label":"", + "Position":{ + "x":-4.25, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1133947279, + "Label":"", + "Position":{ + "x":-4.25, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1958890484, + "Label":"", + "Position":{ + "x":-4.25, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":965887867, + "Label":"", + "Position":{ + "x":-2.875, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":984597380, + "Label":"", + "Position":{ + "x":-2.875, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":498409179, + "Label":"", + "Position":{ + "x":-2.875, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":821532349, + "Label":"", + "Position":{ + "x":-2.875, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":919153886, + "Label":"", + "Position":{ + "x":-1.625, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":225140029, + "Label":"", + "Position":{ + "x":-1.625, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1771476137, + "Label":"", + "Position":{ + "x":-1.625, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1416851458, + "Label":"", + "Position":{ + "x":-1.625, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":789313381, + "Label":"", + "Position":{ + "x":-0.25, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":972372965, + "Label":"", + "Position":{ + "x":-0.25, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":320459552, + "Label":"", + "Position":{ + "x":-0.25, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1198888161, + "Label":"", + "Position":{ + "x":-0.25, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1735152186, + "Label":"", + "Position":{ + "x":-4.25, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":689225101, + "Label":"", + "Position":{ + "x":-4.25, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1378839873, + "Label":"", + "Position":{ + "x":-4.25, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":218304152, + "Label":"", + "Position":{ + "x":-4.25, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1309809540, + "Label":"", + "Position":{ + "x":-2.875, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":473147561, + "Label":"", + "Position":{ + "x":-2.875, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":68554836, + "Label":"", + "Position":{ + "x":-2.875, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1076604979, + "Label":"", + "Position":{ + "x":-2.875, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1507775190, + "Label":"", + "Position":{ + "x":-1.625, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1469537882, + "Label":"", + "Position":{ + "x":-1.625, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":871636732, + "Label":"", + "Position":{ + "x":-1.625, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":4834403, + "Label":"", + "Position":{ + "x":-1.625, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":510679920, + "Label":"", + "Position":{ + "x":-0.25, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":516977451, + "Label":"", + "Position":{ + "x":-0.25, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":897031458, + "Label":"", + "Position":{ + "x":-0.25, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":807061339, + "Label":"", + "Position":{ + "x":-0.25, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":673550427, + "Label":"", + "Position":{ + "x":1.125, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1218477270, + "Label":"", + "Position":{ + "x":1.125, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1233863810, + "Label":"", + "Position":{ + "x":1.125, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1098021250, + "Label":"", + "Position":{ + "x":1.125, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":149803267, + "Label":"", + "Position":{ + "x":2.5, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":22682235, + "Label":"", + "Position":{ + "x":2.5, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":208806525, + "Label":"", + "Position":{ + "x":2.5, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":446006325, + "Label":"", + "Position":{ + "x":2.5, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":156585193, + "Label":"", + "Position":{ + "x":3.75, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":694871158, + "Label":"", + "Position":{ + "x":3.75, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":2056559915, + "Label":"", + "Position":{ + "x":3.75, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1467259146, + "Label":"", + "Position":{ + "x":3.75, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":100736233, + "Label":"", + "Position":{ + "x":5.125, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":315625149, + "Label":"", + "Position":{ + "x":5.125, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":688208241, + "Label":"", + "Position":{ + "x":5.125, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":822843206, + "Label":"", + "Position":{ + "x":5.125, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1115702660, + "Label":"", + "Position":{ + "x":1.125, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":88146244, + "Label":"", + "Position":{ + "x":1.125, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1161913772, + "Label":"", + "Position":{ + "x":1.125, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":591552654, + "Label":"", + "Position":{ + "x":1.125, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":402261656, + "Label":"", + "Position":{ + "x":2.5, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1078843262, + "Label":"", + "Position":{ + "x":2.5, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1366105353, + "Label":"", + "Position":{ + "x":2.5, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":974965131, + "Label":"", + "Position":{ + "x":2.5, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1059513122, + "Label":"", + "Position":{ + "x":3.75, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1093174171, + "Label":"", + "Position":{ + "x":3.75, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1692410214, + "Label":"", + "Position":{ + "x":3.75, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1178199252, + "Label":"", + "Position":{ + "x":3.75, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":775531381, + "Label":"", + "Position":{ + "x":5.125, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":298492642, + "Label":"", + "Position":{ + "x":5.125, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":837865283, + "Label":"", + "Position":{ + "x":5.125, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":677086361, + "Label":"", + "Position":{ + "x":5.125, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":2004489522, + "Label":"", + "Position":{ + "x":6.5, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1379473554, + "Label":"", + "Position":{ + "x":6.5, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":197423381, + "Label":"", + "Position":{ + "x":6.5, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":564271499, + "Label":"", + "Position":{ + "x":6.5, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":984341173, + "Label":"", + "Position":{ + "x":7.875, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1396005591, + "Label":"", + "Position":{ + "x":7.875, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1539729565, + "Label":"", + "Position":{ + "x":7.875, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1316692452, + "Label":"", + "Position":{ + "x":7.875, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1578371819, + "Label":"", + "Position":{ + "x":9.125, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1218308124, + "Label":"", + "Position":{ + "x":9.125, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1050295550, + "Label":"", + "Position":{ + "x":9.125, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1619813768, + "Label":"", + "Position":{ + "x":9.125, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":2003224764, + "Label":"", + "Position":{ + "x":10.5, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1999666308, + "Label":"", + "Position":{ + "x":10.5, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":123854344, + "Label":"", + "Position":{ + "x":10.5, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":749576642, + "Label":"", + "Position":{ + "x":10.5, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":908244702, + "Label":"", + "Position":{ + "x":6.5, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1334657778, + "Label":"", + "Position":{ + "x":6.5, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1734797205, + "Label":"", + "Position":{ + "x":6.5, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1900758407, + "Label":"", + "Position":{ + "x":6.5, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1644133108, + "Label":"", + "Position":{ + "x":7.875, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":687271831, + "Label":"", + "Position":{ + "x":7.875, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1008311304, + "Label":"", + "Position":{ + "x":7.875, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1661686302, + "Label":"", + "Position":{ + "x":7.875, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":751038039, + "Label":"", + "Position":{ + "x":9.125, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1884060458, + "Label":"", + "Position":{ + "x":9.125, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1587314380, + "Label":"", + "Position":{ + "x":9.125, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1171698609, + "Label":"", + "Position":{ + "x":9.125, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1907985727, + "Label":"", + "Position":{ + "x":10.5, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1600628976, + "Label":"", + "Position":{ + "x":10.5, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1613333627, + "Label":"", + "Position":{ + "x":10.5, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":510649831, + "Label":"", + "Position":{ + "x":10.5, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1259456591, + "Label":"", + "Position":{ + "x":11.875, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1365009594, + "Label":"", + "Position":{ + "x":11.875, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1656916817, + "Label":"", + "Position":{ + "x":11.875, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1619120880, + "Label":"", + "Position":{ + "x":11.875, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":112513099, + "Label":"", + "Position":{ + "x":13.25, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1768141617, + "Label":"", + "Position":{ + "x":13.25, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1520894910, + "Label":"", + "Position":{ + "x":13.25, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":194880103, + "Label":"", + "Position":{ + "x":13.25, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1630010703, + "Label":"", + "Position":{ + "x":14.5, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1632634376, + "Label":"", + "Position":{ + "x":14.5, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":719705280, + "Label":"", + "Position":{ + "x":14.5, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":597950580, + "Label":"", + "Position":{ + "x":14.5, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":705337560, + "Label":"", + "Position":{ + "x":15.875, + "y":1.0 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1460580221, + "Label":"", + "Position":{ + "x":15.875, + "y":0.375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1886449695, + "Label":"", + "Position":{ + "x":15.875, + "y":-0.25 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":189256, + "Label":"", + "Position":{ + "x":15.875, + "y":-0.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":135044335, + "Label":"", + "Position":{ + "x":11.875, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1436415133, + "Label":"", + "Position":{ + "x":11.875, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":295868041, + "Label":"", + "Position":{ + "x":11.875, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1290581537, + "Label":"", + "Position":{ + "x":11.875, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1590777362, + "Label":"", + "Position":{ + "x":13.25, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":2064683831, + "Label":"", + "Position":{ + "x":13.25, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":361443090, + "Label":"", + "Position":{ + "x":13.25, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1317217691, + "Label":"", + "Position":{ + "x":13.25, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":371162250, + "Label":"", + "Position":{ + "x":14.5, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":683220726, + "Label":"", + "Position":{ + "x":14.5, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1960717107, + "Label":"", + "Position":{ + "x":14.5, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1247764362, + "Label":"", + "Position":{ + "x":14.5, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1956174858, + "Label":"", + "Position":{ + "x":15.875, + "y":-1.4375 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":368030956, + "Label":"", + "Position":{ + "x":15.875, + "y":-2.0625 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1556190372, + "Label":"", + "Position":{ + "x":15.875, + "y":-2.6875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":2125226490, + "Label":"", + "Position":{ + "x":15.875, + "y":-3.3125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/test/ProjectDescription.json b/TestData/Projects/test/ProjectDescription.json index be60b7bb..869b606d 100644 --- a/TestData/Projects/test/ProjectDescription.json +++ b/TestData/Projects/test/ProjectDescription.json @@ -2,17 +2,20 @@ "ProjectName": "test", "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-19T11:48:01.969+02:00", - "LastSaveTime": "2025-05-19T11:48:01.969+02:00", + "LastSaveTime": "2025-06-03T18:02:32.975+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimTargetStepsPerSecond": 100, "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], + "AllCustomChipNames":[ + "128Nand" + ], "StarredList":[ { "Name":"IN/OUT", @@ -21,12 +24,16 @@ { "Name":"NAND", "IsCollection":false + }, + { + "Name":"128Nand", + "IsCollection":false } ], "ChipCollections":[ { "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"BASIC" }, { @@ -41,18 +48,32 @@ }, { "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"BUS" }, { "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"DISPLAY" }, { "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"MEMORY" + }, + { + "Chips":["BUTTON","DIPSWITCH","CONST","RAM-8","BUZZER","128Nand","IN-32","OUT-32","IN-16","OUT-16","IN-24","OUT-24","IN-128","OUT-128"], + "IsToggledOpen":true, + "Name":"OTHER" } + ], + "pinBitCounts":[ + "1", + "4", + "8", + "32", + "16", + "24", + "128" ] } \ No newline at end of file From 52f39271ec4e2f85fae53183b27ceb26f69e1a20 Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Wed, 4 Jun 2025 15:47:52 +0700 Subject: [PATCH 083/124] Fix close button --- .../Scripts/Graphics/UI/Menus/ChipStatsMenu.cs | 18 +++++++++++++----- .../Graphics/UI/Menus/CollectionStatsMenu.cs | 4 ++-- Assets/Scripts/Graphics/UI/Menus/MainMenu.cs | 7 ++++++- TestData/AppSettings.json | 6 +++--- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs index 19442230..2da20bef 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs @@ -1,5 +1,3 @@ -using System.Linq; -using System.Runtime.CompilerServices; using DLS.Description; using DLS.Game; using Seb.Types; @@ -23,6 +21,8 @@ public static class ChipStatsMenu // ---- Stats ---- static readonly string usesLabel = "Uses"; + static readonly string usedByLabel = "Used by"; + static readonly string numOfChipsInChipLabel = "Number of chips in this chip"; @@ -50,17 +50,22 @@ public static void DrawMenu() Vector2 usesLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, usesLabel, labelCol * 0.75f, true); UI.DrawPanel(usesLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); UI.DrawText(GetChipUses().ToString(), theme.FontBold, theme.FontSizeRegular, usesLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + AddSpacing(); + + Vector2 usedByLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, usedByLabel, labelCol * 0.75f, true); + UI.DrawPanel(usedByLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(GetChipUsedBy().ToString(), theme.FontBold, theme.FontSizeRegular, usedByLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + AddSpacing(); if (!isChipBuiltIn) { - AddSpacing(); Vector2 numOfChipsInChipLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, numOfChipsInChipLabel, labelCol * 0.75f, true); UI.DrawPanel(numOfChipsInChipLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); UI.DrawText(GetNumOfChipsInChip().ToString(), theme.FontBold, theme.FontSizeRegular, numOfChipsInChipLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); } // Draw close - Vector2 buttonTopLeft = new(labelPosCurr.x, UI.PrevBounds.Bottom); - bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft); + Vector2 buttonTopLeft = new(labelPosCurr.x * 2.223f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); + bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.115f, 0)); // Draw menu background Bounds2D menuBounds = UI.GetCurrentBoundsScope(); @@ -102,5 +107,8 @@ private static uint GetChipUses() { } private static int GetNumOfChipsInChip() => Project.ActiveProject.chipLibrary.GetChipDescription(chip).SubChips.Length; + + private static int GetChipUsedBy() => + Project.ActiveProject.chipLibrary.GetDirectParentChips(chip).Length; } } \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs index 15e32956..8b54ee07 100644 --- a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs @@ -43,8 +43,8 @@ public static void DrawMenu() UI.DrawText(GetCollectionChipsLength().ToString(), theme.FontBold, theme.FontSizeRegular, numOfChipsLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); // Draw close - Vector2 buttonTopLeft = new(labelPosCurr.x, UI.PrevBounds.Bottom); - bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft); + Vector2 buttonTopLeft = new(labelPosCurr.x * 2.223f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); + bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.115f, 0)); // Draw menu background Bounds2D menuBounds = UI.GetCurrentBoundsScope(); diff --git a/Assets/Scripts/Graphics/UI/Menus/MainMenu.cs b/Assets/Scripts/Graphics/UI/Menus/MainMenu.cs index 97f8205d..eb783828 100644 --- a/Assets/Scripts/Graphics/UI/Menus/MainMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/MainMenu.cs @@ -486,7 +486,12 @@ static void DrawVersionInfo() static void Quit() { - Application.Quit(); + #if UNITY_EDITOR + // There should be a NullReferenceException when quitting, but it does not affect the application. + UnityEditor.EditorApplication.isPlaying = false; + #else + Application.Quit(); + #endif } enum MenuScreen diff --git a/TestData/AppSettings.json b/TestData/AppSettings.json index 75e0b057..8fae20ec 100644 --- a/TestData/AppSettings.json +++ b/TestData/AppSettings.json @@ -1,6 +1,6 @@ { - "ResolutionX": 1280, - "ResolutionY": 720, - "fullscreenMode": 1, + "ResolutionX": 960, + "ResolutionY": 540, + "fullscreenMode": 3, "VSyncEnabled": true } \ No newline at end of file From 8bd7de4e6f17aee3e80f955f8b8ae06de371f2cf Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Wed, 4 Jun 2025 18:41:12 +0700 Subject: [PATCH 084/124] Add proj stats --- Assets/Scripts/Description/CustomStopwatch.cs | 28 ++++ .../Description/CustomStopwatch.cs.meta | 2 + .../Description/Types/ProjectDescription.cs | 9 +- .../Game/Interaction/KeyboardShortcuts.cs | 1 + Assets/Scripts/Game/Main/Main.cs | 4 +- Assets/Scripts/Game/Project/Project.cs | 1 + .../Scripts/Graphics/UI/Menus/BottomBarUI.cs | 9 +- .../Graphics/UI/Menus/ProjectStatsMenu.cs | 124 ++++++++++++++++++ .../UI/Menus/ProjectStatsMenu.cs.meta | 2 + Assets/Scripts/Graphics/UI/UIDrawer.cs | 2 + Assets/Scripts/SaveSystem/Loader.cs | 1 + Assets/Scripts/Simulation/Simulator.cs | 1 + .../Projects/MainTest/Chips/BuzzTest.json | 2 +- .../Projects/MainTest/ProjectDescription.json | 6 +- 14 files changed, 185 insertions(+), 7 deletions(-) create mode 100644 Assets/Scripts/Description/CustomStopwatch.cs create mode 100644 Assets/Scripts/Description/CustomStopwatch.cs.meta create mode 100644 Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs create mode 100644 Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs.meta diff --git a/Assets/Scripts/Description/CustomStopwatch.cs b/Assets/Scripts/Description/CustomStopwatch.cs new file mode 100644 index 00000000..633a361f --- /dev/null +++ b/Assets/Scripts/Description/CustomStopwatch.cs @@ -0,0 +1,28 @@ +using System; +using System.Diagnostics; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +// Originally on DLS.SaveSystem, now on DLS.Description because of you bad C# does not allow ProjectDescription to use classes from outside its namespace +namespace DLS.Description { + public class CustomStopwatch { + [JsonIgnore] + public Stopwatch Stopwatch; + public TimeSpan StartFrom; + [JsonIgnore] + public TimeSpan Elapsed {get => StartFrom.Add(Stopwatch.Elapsed);} + [JsonConstructor] + public CustomStopwatch(TimeSpan StartFrom) { + Stopwatch = Stopwatch.StartNew(); + this.StartFrom = StartFrom; + } + [OnSerializing] + public void Save(StreamingContext unused) => StartFrom = Elapsed; + public void Save() => StartFrom = Elapsed; + public CustomStopwatch() { + Stopwatch = Stopwatch.StartNew(); + StartFrom = new(); + } + + } +} \ No newline at end of file diff --git a/Assets/Scripts/Description/CustomStopwatch.cs.meta b/Assets/Scripts/Description/CustomStopwatch.cs.meta new file mode 100644 index 00000000..8ec18bfc --- /dev/null +++ b/Assets/Scripts/Description/CustomStopwatch.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 65d145e050f884d4fa29a1eb85460172 \ No newline at end of file diff --git a/Assets/Scripts/Description/Types/ProjectDescription.cs b/Assets/Scripts/Description/Types/ProjectDescription.cs index a8dc0f33..73e079ce 100644 --- a/Assets/Scripts/Description/Types/ProjectDescription.cs +++ b/Assets/Scripts/Description/Types/ProjectDescription.cs @@ -4,7 +4,7 @@ namespace DLS.Description { - public struct ProjectDescription + public struct ProjectDescription { public string ProjectName; public string DLSVersion_LastSaved; @@ -22,6 +22,10 @@ public struct ProjectDescription public int Prefs_SimTargetStepsPerSecond; public int Prefs_SimStepsPerClockTick; + // Stats + public uint StepsRanSinceCreated; + public CustomStopwatch /* We should ask Stack Overflow why we cannot access this class from outside its namespace */ TimeSpentSinceCreated; + // List of all player-created chips (in order of creation -- oldest first) public string[] AllCustomChipNames; @@ -40,7 +44,8 @@ public bool IsStarred(string chipName, bool isCollection) } } - public struct StarredItem + + public struct StarredItem { public string Name; public bool IsCollection; diff --git a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs index 21f9dbd0..0ccf1133 100644 --- a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs +++ b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs @@ -15,6 +15,7 @@ public static class KeyboardShortcuts public static bool SaveShortcutTriggered => CtrlShortcutTriggered(KeyCode.S); public static bool LibraryShortcutTriggered => CtrlShortcutTriggered(KeyCode.L); public static bool PreferencesShortcutTriggered => CtrlShortcutTriggered(KeyCode.P); + public static bool StatsShortcutTriggered => CtrlShortcutTriggered(KeyCode.T); public static bool CreateNewChipShortcutTriggered => CtrlShortcutTriggered(KeyCode.N); public static bool QuitToMainMenuShortcutTriggered => CtrlShortcutTriggered(KeyCode.Q); public static bool SearchShortcutTriggered => CtrlShortcutTriggered(KeyCode.F); diff --git a/Assets/Scripts/Game/Main/Main.cs b/Assets/Scripts/Game/Main/Main.cs index 247a085f..ea2a95c9 100644 --- a/Assets/Scripts/Game/Main/Main.cs +++ b/Assets/Scripts/Game/Main/Main.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using DLS.Description; @@ -81,6 +82,7 @@ static Project CreateProject(string projectName) DLSVersion_LastSaved = DLSVersion.ToString(), DLSVersion_EarliestCompatible = DLSVersion_EarliestCompatible.ToString(), CreationTime = DateTime.Now, + TimeSpentSinceCreated = new(), Prefs_ChipPinNamesDisplayMode = PreferencesMenu.DisplayMode_OnHover, Prefs_MainPinNamesDisplayMode = PreferencesMenu.DisplayMode_OnHover, Prefs_SimTargetStepsPerSecond = 1000, @@ -109,7 +111,7 @@ public static void OpenSaveDataFolderInFileBrowser() } catch (Exception e) { - Debug.LogError("Error opening folder: " + e.Message); + UnityEngine.Debug.LogError("Error opening folder: " + e.Message); } } diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index e2a5be6e..0ef050bc 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -484,6 +484,7 @@ public void ToggleGridDisplay() public void NotifyExit() { simThreadActive = false; + ActiveProject.UpdateAndSaveProjectDescription(ActiveProject.description); } void SimThread() diff --git a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs index 932230d8..bd1b3cd9 100644 --- a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs +++ b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs @@ -24,6 +24,7 @@ public static class BottomBarUI $"SAVE CHIP {shortcutTextCol}Ctrl+S", $"FIND CHIP {shortcutTextCol}Ctrl+F", $"LIBRARY {shortcutTextCol}Ctrl+L", + $"STATS {shortcutTextCol}Ctrl+T", // Ctrl+'T' from the T in Stats $"PREFS {shortcutTextCol}Ctrl+P", $"QUIT {shortcutTextCol}Ctrl+Q" }; @@ -32,8 +33,9 @@ public static class BottomBarUI const int SaveChipButtonIndex = 1; const int FindChipButtonIndex = 2; const int LibraryButtonIndex = 3; - const int OptionsButtonIndex = 4; - const int QuitButtonIndex = 5; + const int StatsButtonIndex = 4; + const int OptionsButtonIndex = 5; + const int QuitButtonIndex = 6; // ---- State ---- static float scrollX; @@ -111,6 +113,7 @@ void ButtonPressed(int i) else if (i == SaveChipButtonIndex) OpenSaveMenu(); else if (i == FindChipButtonIndex) OpenSearchMenu(); else if (i == LibraryButtonIndex) OpenLibraryMenu(); + else if (i == StatsButtonIndex) OpenStatsMenu(); else if (i == OptionsButtonIndex) OpenPreferencesMenu(); else if (i == QuitButtonIndex) ExitToMainMenu(); } @@ -388,6 +391,7 @@ static void ExitIfTrue(bool exit) static void OpenSaveMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.ChipSave); static void OpenSearchMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.Search); static void OpenLibraryMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.ChipLibrary); + static void OpenStatsMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.ProjectStats); static void OpenPreferencesMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.Preferences); static void CreateNewChip() @@ -413,6 +417,7 @@ static void HandleKeyboardShortcuts() if (KeyboardShortcuts.LibraryShortcutTriggered) OpenLibraryMenu(); } + if (KeyboardShortcuts.StatsShortcutTriggered) OpenStatsMenu(); if (KeyboardShortcuts.PreferencesShortcutTriggered) OpenPreferencesMenu(); if (KeyboardShortcuts.QuitToMainMenuShortcutTriggered) ExitToMainMenu(); } diff --git a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs new file mode 100644 index 00000000..5745446c --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs @@ -0,0 +1,124 @@ +using System; +using System.Globalization; +using DLS.Description; +using DLS.Game; +using Seb.Types; +using Seb.Vis; +using Seb.Vis.UI; +using Unity.Android.Gradle; +using UnityEngine; + +namespace DLS.Graphics +{ + public static class ProjectStatsMenu + { + const float entrySpacing = 0.5f; + const float menuWidth = 55; + const float verticalOffset = 22; + + static readonly Vector2 entrySize = new(menuWidth, DrawSettings.SelectorWheelHeight); + public static readonly Vector2 settingFieldSize = new(entrySize.x / 3, entrySize.y); + + + // ---- Stats ---- + static readonly string srscLabel /* Source engine label */ = "Steps ran since created"; + static readonly string tsscLabel = "Time spent since created"; + static readonly string createdOnLabel = "Created on"; + static readonly string chipsLabel = "Chips"; + static readonly string chipsUsedLabel = "Chips used"; + + public static void DrawMenu() + { + DrawSettings.UIThemeDLS theme = DrawSettings.ActiveUITheme; + MenuHelper.DrawBackgroundOverlay(); + Draw.ID panelID = UI.ReservePanel(); + + const int inputTextPad = 1; + const float headerSpacing = 1.5f; + Color labelCol = Color.white; + Color headerCol = new(0.46f, 1, 0.54f); + Vector2 topLeft = UI.Centre + new Vector2(-menuWidth / 2, verticalOffset); + Vector2 labelPosCurr = topLeft; + + using (UI.BeginBoundsScope(true)) + { + // Draw stats + Vector2 srscLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, srscLabel, labelCol * 0.75f, true); + UI.DrawPanel(srscLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(Project.ActiveProject.description.StepsRanSinceCreated.ToString(), theme.FontBold, theme.FontSizeRegular, srscLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + AddSpacing(); + + Vector2 tsscLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, tsscLabel, labelCol * 0.75f, true); + UI.DrawPanel(tsscLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(FormatTime(Project.ActiveProject.description.TimeSpentSinceCreated.Elapsed), theme.FontBold, theme.FontSizeRegular, tsscLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + AddSpacing(); + + Vector2 createdOnLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, createdOnLabel, labelCol * 0.75f, true); + UI.DrawPanel(createdOnLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(FormatTime(Project.ActiveProject.description.CreationTime), theme.FontBold, theme.FontSizeRegular, createdOnLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + AddSpacing(); + + Vector2 chipsLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, chipsLabel, labelCol * 0.75f, true); + UI.DrawPanel(chipsLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(Project.ActiveProject.chipLibrary.allChips.Count.ToString(), theme.FontBold, theme.FontSizeRegular, chipsLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + AddSpacing(); + + Vector2 chipsUsedLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, chipsUsedLabel, labelCol * 0.75f, true); + UI.DrawPanel(chipsUsedLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(GetChipsUsed().ToString(), theme.FontBold, theme.FontSizeRegular, chipsUsedLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + + // Draw close + Vector2 buttonTopLeft = new(labelPosCurr.x * 2.223f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); + bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.115f, 0)); + + // Draw menu background + Bounds2D menuBounds = UI.GetCurrentBoundsScope(); + MenuHelper.DrawReservedMenuPanel(panelID, menuBounds); + + // Close + if (result) + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + + return; + + void DrawHeader(string text) + { + AddHeaderSpacing(); + UI.DrawText(text, theme.FontBold, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, headerCol); + AddHeaderSpacing(); + } + + void AddSpacing() + { + labelPosCurr.y -= entrySize.y + entrySpacing; + } + + void AddHeaderSpacing() + { + labelPosCurr.y -= headerSpacing; + } + } + static uint GetChipsUsed() { + uint uses = 0; + foreach (ChipDescription chip in Project.ActiveProject.chipLibrary.allChips) + foreach (SubChipDescription subChip in chip.SubChips) + uses++; + + return uses; + } + static string FormatTime(TimeSpan time) { + if (time.Days == 0 && time.Hours == 0 && time.Minutes == 0) + return $"{time.Seconds}s"; + else if (time.Days == 0 && time.Hours == 0) + return $"{time.Minutes}m {time.Seconds}s"; + else if (time.Days == 0) + return $"{time.Hours}h {time.Minutes}m {time.Seconds}s"; + else + return $"{time.Days}d {time.Hours}h {time.Minutes}m {time.Seconds}s"; + } + static string FormatTime(DateTime time) { + return time.ToString(@"MMM dd\, yyyy", CultureInfo.InvariantCulture); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs.meta b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs.meta new file mode 100644 index 00000000..e2ebe0ea --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d440a07d08a53c041aaaff570d965801 \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/UIDrawer.cs b/Assets/Scripts/Graphics/UI/UIDrawer.cs index 4e692eb7..8b73d308 100644 --- a/Assets/Scripts/Graphics/UI/UIDrawer.cs +++ b/Assets/Scripts/Graphics/UI/UIDrawer.cs @@ -20,6 +20,7 @@ public enum MenuType RomEdit, ChipStats, CollectionStats, + ProjectStats, PulseEdit, UnsavedChanges, Search, @@ -69,6 +70,7 @@ static void DrawProjectMenus(Project project) else if (menuToDraw == MenuType.RomEdit) RomEditMenu.DrawMenu(); else if (menuToDraw == MenuType.ChipStats) ChipStatsMenu.DrawMenu(); else if (menuToDraw == MenuType.CollectionStats) CollectionStatsMenu.DrawMenu(); + else if (menuToDraw == MenuType.ProjectStats) ProjectStatsMenu.DrawMenu(); else if (menuToDraw == MenuType.UnsavedChanges) UnsavedChangesPopup.DrawMenu(); else if (menuToDraw == MenuType.Search) SearchPopup.DrawMenu(); else if (menuToDraw == MenuType.ChipLabelPopup) ChipLabelMenu.DrawMenu(); diff --git a/Assets/Scripts/SaveSystem/Loader.cs b/Assets/Scripts/SaveSystem/Loader.cs index 590a3af1..231501c8 100644 --- a/Assets/Scripts/SaveSystem/Loader.cs +++ b/Assets/Scripts/SaveSystem/Loader.cs @@ -23,6 +23,7 @@ public static AppSettings LoadAppSettings() public static Project LoadProject(string projectName) { ProjectDescription projectDescription = LoadProjectDescription(projectName); + if (projectDescription.TimeSpentSinceCreated == null) projectDescription.TimeSpentSinceCreated = new(); ChipLibrary chipLibrary = LoadChipLibrary(projectDescription); return new Project(projectDescription, chipLibrary); } diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 1d777628..81647382 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -88,6 +88,7 @@ public static void RunSimulationStep(SimChip rootSimChip, DevPinInstance[] input } UpdateAudioState(); + Project.ActiveProject.description.StepsRanSinceCreated++; } public static void UpdateInPausedState() diff --git a/TestData/Projects/MainTest/Chips/BuzzTest.json b/TestData/Projects/MainTest/Chips/BuzzTest.json index 40fc6f42..17d284ca 100644 --- a/TestData/Projects/MainTest/Chips/BuzzTest.json +++ b/TestData/Projects/MainTest/Chips/BuzzTest.json @@ -1,5 +1,5 @@ { - "DLSVersion": "2.1.5", + "DLSVersion": "2.1.6", "Name": "BuzzTest", "NameLocation": 0, "ChipType": 0, diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 31172019..16af8e88 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-06-03T19:53:58.743+07:00", + "LastSaveTime": "2025-06-04T18:38:07.143+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -12,6 +12,10 @@ "Prefs_SimPaused": false, "Prefs_SimTargetStepsPerSecond": 150, "Prefs_SimStepsPerClockTick": 6, + "StepsRanSinceCreated": 124413, + "TimeSpentSinceCreated": { + "StartFrom": "00:11:44.8633696" + }, "AllCustomChipNames":[ "AND", "NOT", From 2652e148f297581ea32ef2f8a19b0339494cab05 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 4 Jun 2025 14:56:45 +0200 Subject: [PATCH 085/124] Pin conflicts The new implementation now shares the same features as the old one, simulation speaking. --- .../{PinState.cs => BitArrayHelper.cs} | 21 ++ ...inState.cs.meta => BitArrayHelper.cs.meta} | 0 Assets/Scripts/Simulation/PinStateValue.cs | 184 ++++++++++++------ Assets/Scripts/Simulation/SimPin.cs | 10 +- Assets/Scripts/Simulation/Simulator.cs | 30 +-- .../Projects/test/ProjectDescription.json | 12 +- 6 files changed, 166 insertions(+), 91 deletions(-) rename Assets/Scripts/Simulation/{PinState.cs => BitArrayHelper.cs} (95%) rename Assets/Scripts/Simulation/{PinState.cs.meta => BitArrayHelper.cs.meta} (100%) diff --git a/Assets/Scripts/Simulation/PinState.cs b/Assets/Scripts/Simulation/BitArrayHelper.cs similarity index 95% rename from Assets/Scripts/Simulation/PinState.cs rename to Assets/Scripts/Simulation/BitArrayHelper.cs index c29b3383..720b364a 100644 --- a/Assets/Scripts/Simulation/PinState.cs +++ b/Assets/Scripts/Simulation/BitArrayHelper.cs @@ -24,6 +24,27 @@ public static class BitArrayHelper public static BitArray ShortMaskArray = new BitArray(new byte[] { 0b11111111, 0b11111111 }); public static BitArray IntMaskArray = new BitArray(new byte[] { 0b11111111, 0b11111111, 0b11111111, 0b11111111 }); + public static BitArray NonMutativeOR(BitArray A, BitArray B) + { + BitArray temp = new BitArray(A); + temp.Or(B); + return temp; + } + + public static BitArray NonMutativeAND(BitArray A, BitArray B) + { + BitArray temp = new BitArray(A); + temp.And(B); + return temp; + } + + public static BitArray NonMutativeNOT(BitArray A) + { + BitArray temp = new BitArray(A); + temp.Not(); + return temp; + } + public static BitArray TrueBitArray(int length) { BitArray array = new BitArray(length); diff --git a/Assets/Scripts/Simulation/PinState.cs.meta b/Assets/Scripts/Simulation/BitArrayHelper.cs.meta similarity index 100% rename from Assets/Scripts/Simulation/PinState.cs.meta rename to Assets/Scripts/Simulation/BitArrayHelper.cs.meta diff --git a/Assets/Scripts/Simulation/PinStateValue.cs b/Assets/Scripts/Simulation/PinStateValue.cs index 140236fd..467b55ab 100644 --- a/Assets/Scripts/Simulation/PinStateValue.cs +++ b/Assets/Scripts/Simulation/PinStateValue.cs @@ -4,6 +4,7 @@ using DLS.Description; using Seb.Helpers; using UnityEngine; +using static UnityEngine.Random; namespace DLS.Simulation { @@ -13,12 +14,7 @@ public struct PinStateValue public const uint LOGIC_HIGH = 1; public const uint LOGIC_DISCONNECTED = 2; - - public uint singleBit; // ONLY USE FOR 1 BIT - - public BitVector32 a; // If bitcount <= 16 : use only this -- FASTEST - public static BitVector32.Section valueSection = BitVector32.CreateSection(short.MaxValue); // Only in use on less than 16 - public static BitVector32.Section tristateSection = BitVector32.CreateSection(short.MaxValue, valueSection); // this too + public uint a; // If bitcount <= 16 : use only this -- FASTEST public BitVector32 b; // If 16 < bitcount <=32 : use this too -- medium public BitArray BigValues; // If bitcount >= 32 use this INSTEAD -- SLOWEST @@ -29,18 +25,13 @@ public struct PinStateValue public void MakeFromPinBitCount(PinBitCount pinBitCount) { size = pinBitCount.BitCount; - if (size <= 1) - { - singleBit = 0; - } - else if (size <= 16) + if (size <= 16) { - a = new BitVector32(0); + a = 0; } - else if (size <= 32) { - a = new BitVector32(0); + a = 0; b = new BitVector32(0); } else @@ -55,30 +46,43 @@ public void MakeFromAnother(PinStateValue source) { CopyFrom(source); } + + public void MakeFromValueAndFlags(PinBitCount pinBitCount, uint values, uint flags) + { + size = pinBitCount.BitCount; + + if (size <= 16) + { + SetShortTristateAndValue((ushort)value, (ushort)flags); + } + else if (size <= 32) { + SetMedium(values, flags); + } + else { throw new Exception("ArgumentsException : PinBitCount should be smaller or equal to 32 bits for this operation."); } + } public bool SmallHigh() { - return (singleBit & 1) == 1; + return (a & 1) == 1; } public void SetAllDisconnected() { if(size == 1) { - singleBit = 2; + a = 2; return; } if(size <= 16) { - a[valueSection] = 0; - a[tristateSection] = -1; + a = 0xFFFF0000; return; } if(size <= 32) { - a = new BitVector32(0); + a = 0; b = new BitVector32(-1); return; } @@ -89,70 +93,74 @@ public void SetAllDisconnected() public void SmallSet(uint value) { - singleBit = value; + a = value; } public void SmallToggle() { - singleBit ^= 1; + a ^= 1; } public bool FirstBitHigh() { - if (size <= 32) { return (a.Data & 1) == 1; } + if (size <= 32) { return (a & 1) == 1; } else return BigValues.Get(0); } public void ToggleBit(int index) { UnityEngine.Debug.Log("Index: " + index); if (size == 1) { SmallToggle(); } - else if (size <= 16) { a[valueSection] = (a[valueSection]) ^ (1 << index); } - else if (size <= 32) { a = new BitVector32(a.Data ^ (1 << index)); } - else if (size >32) BigValues.Set(index, !BigValues.Get(index)); + else if (size <= 32) { a ^= (uint)(1 << index); } + else if (size > 32) BigValues.Set(index, !BigValues.Get(index)); } public void SetFirstBit(bool firstBit) { if (size == 1) { SmallSet((uint)(firstBit ? 1 : 0)); } else if (size <= 32) { - a[valueSection] = firstBit ? a[valueSection] | 1 : a[valueSection] ^ 1; + a = firstBit ? a | 1 : a ^ 1; } else BigValues.Set(0, firstBit); } public void SetShortValue(ushort value) { - a[valueSection] = value; + a = value | (a & 0xFFFF0000); + } + + public void SetShortTristateAndValue(ushort tristate, ushort value) + { + a = (uint)(value | tristate << 16); } public void SetMediumValue(uint value) { - a = new BitVector32((int)value); + a = value; } public void SetShort(uint valueAndFlags) { - a = new BitVector32((int)valueAndFlags); + a = valueAndFlags; } public void SetMedium(uint value, uint tristateFlags) { - a = new BitVector32((int)value); + a = value; b = new BitVector32((int)tristateFlags); } public uint GetShortValues() { - return (uint)a[valueSection]; + return a & 0xFFFF; } public uint GetMediumValues() { - return (uint)a.Data; + return a; } public uint GetShortTristate() { - return (uint)a[tristateSection]; + return (a & 0xFFFF0000)>>16; } public uint GetMediumTristate() @@ -169,15 +177,16 @@ public uint GetValue() } - public ushort GetSmallTristate() + public ushort GetSmallTristatedValue() { - return (ushort)(singleBit & 1 ); + return (ushort)a; } + public ushort GetTristatedValue(int index) { if(size == 1) { - return GetSmallTristate(); + return GetSmallTristatedValue(); } else if (size <= 16) @@ -197,13 +206,13 @@ public ushort GetTristatedValue(int index) ushort GetShortBitTristatedValue(int index) { - return (ushort)((GetShortValues() >> index) & 1 | ((GetShortTristate() >> index & 1) << 1)); + return (ushort)(((GetShortValues() >> index) & 1) | (((GetShortTristate() >> index) & 1) << 1)); } ushort GetMediumBitTristatedValue(int index) { - return (ushort)((GetMediumValues() >> index) & 1 | (GetMediumTristate() >> index & 1) << 1); + return (ushort)((a >> index) & 1 | (GetMediumTristate() >> index & 1) << 1); } ushort GetBigBitTristatedValue(int index) @@ -213,8 +222,8 @@ ushort GetBigBitTristatedValue(int index) public uint GetTristatedFlags() { - if (size == 1) { return (uint)(singleBit >> 1); } - if (size <=16) { return (uint)a[tristateSection]; } + if (size == 1) { return (uint)(a >> 1); } + if (size <=16) { return a & 0xFFFF0000; } if (size <= 32) { return (uint)b.Data; } return BitArrayHelper.GetFirstUIntFromByteArray(BigTristates); } @@ -230,7 +239,7 @@ public void CopyFrom(PinStateValue pinStateValue) void SmallCopyFrom(PinStateValue pinStateValue) { - singleBit = pinStateValue.singleBit; + a = pinStateValue.a; } void ShortCopyFrom(PinStateValue pinStateValue) @@ -252,7 +261,7 @@ void BigCopyFrom(PinStateValue pinStateValue) public uint OR(PinStateValue pinStateValue) { - if (size == 1) { return (pinStateValue.singleBit | singleBit); } + if (size == 1) { return (pinStateValue.a | a); } else if (size <= 16) { return pinStateValue.GetShortValues() | GetShortValues(); } else if (size <= 32) { return pinStateValue.GetMediumValues() | GetMediumValues(); } return 0; @@ -260,42 +269,93 @@ public uint OR(PinStateValue pinStateValue) public void SetAsOr(PinStateValue pinStateValue) { - if (size == 1) { singleBit |= pinStateValue.singleBit; } - else if (size <= 16) { a[valueSection] |= (int)pinStateValue.GetShortValues(); } - else if (size <= 32) { SetMediumValue(((uint)a.Data | pinStateValue.GetMediumValues())); } + if (size == 1) { a |= pinStateValue.a; } + else if (size <= 16) { SetShortValue((ushort)pinStateValue.GetShortValues()); } + else if (size <= 32) { SetMediumValue(a | pinStateValue.GetMediumValues()); } else { BigValues.Or(pinStateValue.BigValues); } } public void SetAsAnd(PinStateValue pinStateValue) { - if (size == 1) { singleBit &= pinStateValue.singleBit; } - else if (size <= 16) { a[valueSection] &= (int)pinStateValue.GetShortValues(); } - else if (size <= 32) { SetMediumValue(((uint)a.Data & pinStateValue.GetMediumValues())); } + if (size == 1) { a &= pinStateValue.a; } + else if (size <= 16) { SetShortValue((ushort)(a & pinStateValue.GetShortValues())); } + else if (size <= 32) { SetMediumValue(a & pinStateValue.GetMediumValues()); } else { BigValues.And(pinStateValue.BigValues); } } - public void SetAsRightShift(int shift) + public bool HandleConflictShort(PinStateValue other) { - if (shift <= 0) { return; } - if (size == 1) { singleBit = 0; } - else if (size <= 16) { a[valueSection] >>= shift; } - else if (size <= 32) { SetMediumValue((uint)(a.Data >> shift)); } - else { BigValues.RightShift(shift); } + bool set; + uint OR = a | other.a; + uint AND = a & other.a; + ushort bitsNew = (ushort)(Simulator.RandomBool() ? OR : AND); + + ushort mask = (ushort)(OR >> 16); // tristate flags + bitsNew = (ushort)((bitsNew & ~mask) | ((ushort)OR & mask)); // can always accept input for tristated bits + + ushort tristateNew = (ushort)(AND >> 16); + uint stateNew = (uint)(bitsNew | (tristateNew << 16)); + set = stateNew != a; + + SetShortTristateAndValue(tristateNew, bitsNew); + + return set; } - public void SetAsLeftShift(int shift) + public bool HandleConflictMedium(PinStateValue other) { - if (shift <= 0) { return; } - if (size == 1) { singleBit = 0; } - else if (size <= 16) { a[valueSection] <<= shift; } - else if (size <= 32) { SetMediumValue((uint)(a.Data << shift)); } - else { BigValues.LeftShift(shift); } + bool set; + (uint a, uint b) OR = (a | other.a, (uint)(b.Data | other.b.Data)) ; + (uint a, uint b) AND = (a & other.a, (uint)(b.Data & other.b.Data)); + uint bitsNew = Simulator.RandomBool() ? OR.a : AND.a; + + bitsNew = (bitsNew & ~OR.b) | (OR.b); + + uint tristateNew = AND.b; + + set = bitsNew != a && (tristateNew != b.Data); + + a = bitsNew; + b = new BitVector32((int)tristateNew); + + return set; + } + + public bool HandleConflictBig(PinStateValue other) { + bool set; + + (BitArray a, BitArray b) OR = (BitArrayHelper.NonMutativeOR(BigValues, other.BigValues), BitArrayHelper.NonMutativeOR(BigTristates, other.BigTristates)) ; + (BitArray a, BitArray b) AND = (BitArrayHelper.NonMutativeAND(BigValues, other.BigValues), BitArrayHelper.NonMutativeAND(BigTristates, other.BigTristates)); + BitArray bitsNew = new BitArray(Simulator.RandomBool() ? OR.a : AND.a); + + bitsNew = BitArrayHelper.NonMutativeOR( + BitArrayHelper.NonMutativeAND(bitsNew, BitArrayHelper.NonMutativeNOT(OR.b)), + OR.b); + + BitArray tristatesNew = AND.b; + set = !bitsNew.Equals(BigValues) && !tristatesNew.Equals(BigTristates); + + BigValues = bitsNew; + BigTristates = tristatesNew; + + return set; } - internal void SetShortValue(uint v) + public bool HandleConflicts(PinStateValue other) { - throw new NotImplementedException(); + if (size <= 16) + { + return HandleConflictShort(other); + } + else if (size <= 32) + { + return HandleConflictMedium(other); + } + else + { + return HandleConflictBig(other); + } } } } \ No newline at end of file diff --git a/Assets/Scripts/Simulation/SimPin.cs b/Assets/Scripts/Simulation/SimPin.cs index 3a5c8ca4..6fcec59f 100644 --- a/Assets/Scripts/Simulation/SimPin.cs +++ b/Assets/Scripts/Simulation/SimPin.cs @@ -62,15 +62,7 @@ void ReceiveInput(SimPin source) if (numInputsReceivedThisFrame > 0) { - PinStateValue OR = new(); OR.MakeFromAnother(source.State) ; - OR.SetAsOr(State); - PinStateValue AND = new(); AND.MakeFromAnother(source.State); - AND.SetAsAnd(State); - - PinStateValue bitsNew = new(); AND.MakeFromAnother(Simulator.RandomBool() ? OR : AND); // randomly accept or reject conflicting state - - set = bitsNew.GetValue() != State.GetValue(); - State = bitsNew; + set = State.HandleConflicts(source.State); } else { diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 5bd944e1..e284c785 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -79,7 +79,7 @@ public static void RunSimulationStep(SimChip rootSimChip, DevPinInstance[] input } catch (Exception) { - throw;// Possible for sim to be temporarily out of sync since running on separate threads, so just ignore failure to find pin. + // Possible for sim to be temporarily out of sync since running on separate threads, so just ignore failure to find pin. } } @@ -237,8 +237,8 @@ static void ProcessBuiltinChip(SimChip chip) // ---- Process Built-in chips ---- case ChipType.Nand: { - uint nandOp = 1 ^ (chip.InputPins[0].State.singleBit & chip.InputPins[1].State.singleBit); - chip.OutputPins[0].State.singleBit = (nandOp & 1); + uint nandOp = 1 ^ (chip.InputPins[0].State.a & chip.InputPins[1].State.a); + chip.OutputPins[0].State.a = (nandOp & 1); break; } case ChipType.Clock: @@ -253,7 +253,7 @@ static void ProcessBuiltinChip(SimChip chip) const int pulseTicksRemainingIndex = 1; const int pulseInputOldIndex = 2; - uint inputState = chip.InputPins[0].State.singleBit; + uint inputState = chip.InputPins[0].State.a; bool pulseInputHigh = (inputState & 1) == 1; uint pulseTicksRemaining = chip.InternalState[pulseTicksRemainingIndex]; @@ -278,7 +278,7 @@ static void ProcessBuiltinChip(SimChip chip) outputState = 2; } - chip.OutputPins[0].State.singleBit = outputState; + chip.OutputPins[0].State.a = outputState; chip.InternalState[pulseInputOldIndex] = pulseInputHigh ? 1u : 0; break; @@ -312,7 +312,7 @@ static void ProcessBuiltinChip(SimChip chip) SimPin outputPin = chip.OutputPins[0]; if (enablePin.State.SmallHigh()) outputPin.State = dataPin.State; - else outputPin.State.singleBit = 2; + else outputPin.State.a = 2; break; } @@ -367,9 +367,9 @@ static void ProcessBuiltinChip(SimChip chip) // Output current pixel colour uint colData = chip.InternalState[addressPin]; - chip.OutputPins[0].State.SetShortValue(colData & 0b1111);//red - chip.OutputPins[1].State.SetShortValue((colData >> 4) & 0b1111);//green - chip.OutputPins[2].State.SetShortValue((colData >> 8) & 0b1111);//blue + chip.OutputPins[0].State.SetShort((ushort)(colData & 0b1111));//red + chip.OutputPins[1].State.SetShort((ushort)((colData >> 4) & 0b1111));//green + chip.OutputPins[2].State.SetShort((ushort)((colData >> 8) & 0b1111) );//blue break; @@ -450,7 +450,7 @@ static void ProcessBuiltinChip(SimChip chip) } // Output data at current address - chip.OutputPins[0].State.SetShortValue((ushort)chip.InternalState[addressPin]); + chip.OutputPins[0].State.SetShort((ushort)chip.InternalState[addressPin]); break; } @@ -459,8 +459,8 @@ static void ProcessBuiltinChip(SimChip chip) uint address = chip.InputPins[0].State.GetShortValues(); uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShortValue((ushort)(data << 8)); - chip.OutputPins[1].State.SetShortValue((ushort)data); + chip.OutputPins[0].State.SetShort((ushort)(data << 8)); + chip.OutputPins[1].State.SetShort((ushort)data); break; } @@ -487,8 +487,8 @@ static void ProcessBuiltinChip(SimChip chip) uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShortValue((ushort)(data << 8)); - chip.OutputPins[1].State.SetShortValue((ushort)(data << 0)); + chip.OutputPins[0].State.SetShort((ushort)(data << 8)); + chip.OutputPins[1].State.SetShort((ushort)(data << 0)); break; } @@ -502,7 +502,7 @@ static void ProcessBuiltinChip(SimChip chip) case ChipType.Constant_8Bit: { - chip.OutputPins[0].State.SetShortValue((ushort)chip.InternalState[0]); + chip.OutputPins[0].State.SetShort((ushort)chip.InternalState[0]); break; } // ---- Bus types ---- diff --git a/TestData/Projects/test/ProjectDescription.json b/TestData/Projects/test/ProjectDescription.json index 869b606d..9be90e8a 100644 --- a/TestData/Projects/test/ProjectDescription.json +++ b/TestData/Projects/test/ProjectDescription.json @@ -4,14 +4,14 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-19T11:48:01.969+02:00", - "LastSaveTime": "2025-06-03T18:02:32.975+02:00", + "LastSaveTime": "2025-06-04T14:55:19.314+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, + "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 100, + "Prefs_SimTargetStepsPerSecond": 100000000, "Prefs_SimStepsPerClockTick": 250, "AllCustomChipNames":[ "128Nand" @@ -62,7 +62,7 @@ "Name":"MEMORY" }, { - "Chips":["BUTTON","DIPSWITCH","CONST","RAM-8","BUZZER","128Nand","IN-32","OUT-32","IN-16","OUT-16","IN-24","OUT-24","IN-128","OUT-128"], + "Chips":["BUTTON","DIPSWITCH","CONST","RAM-8","BUZZER","128Nand","IN-32","OUT-32","IN-16","OUT-16","IN-24","OUT-24","IN-128","OUT-128","IN-1024","OUT-1024","IN-20736000","OUT-20736000","IN-345600","OUT-345600"], "IsToggledOpen":true, "Name":"OTHER" } @@ -74,6 +74,8 @@ "32", "16", "24", - "128" + "128", + "1024", + "15" ] } \ No newline at end of file From 49ec8108385b7acacee97f2d5d2c43edf98effaf Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 4 Jun 2025 14:58:04 +0200 Subject: [PATCH 086/124] Debug.Log cleanup Cleaned a few debug logs. --- Assets/Scripts/Game/Elements/DevPinInstance.cs | 2 -- Assets/Scripts/Game/Elements/PinInstance.cs | 4 ---- Assets/Scripts/Simulation/PinStateValue.cs | 1 - TestData/Projects/test/ProjectDescription.json | 2 +- 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Assets/Scripts/Game/Elements/DevPinInstance.cs b/Assets/Scripts/Game/Elements/DevPinInstance.cs index 1741b66d..377dac13 100644 --- a/Assets/Scripts/Game/Elements/DevPinInstance.cs +++ b/Assets/Scripts/Game/Elements/DevPinInstance.cs @@ -111,8 +111,6 @@ Bounds2D CreateBoundingBox(float pad) public void ToggleState(int bitIndex) { Pin.PlayerInputState.ToggleBit(bitIndex); - Debug.Log("PlayerInputState at Toggle : " + Pin.PlayerInputState.GetValue()); - Debug.Log("DevPinId at Toggle : " + ID); } public bool PointIsInInteractionBounds(Vector2 point) => PointIsInHandleBounds(point) || PointIsInStateIndicatorBounds(point); diff --git a/Assets/Scripts/Game/Elements/PinInstance.cs b/Assets/Scripts/Game/Elements/PinInstance.cs index bec192a8..bef5938b 100644 --- a/Assets/Scripts/Game/Elements/PinInstance.cs +++ b/Assets/Scripts/Game/Elements/PinInstance.cs @@ -37,13 +37,9 @@ public PinInstance(PinDescription desc, PinAddress address, IMoveable parent, bo IsBusPin = parent is SubChipInstance subchip && subchip.IsBus; faceRight = isSourcePin; - Debug.Log(desc.BitCount.BitCount); State.MakeFromPinBitCount(bitCount); PlayerInputState.MakeFromPinBitCount(bitCount); - Debug.Log(State.size); - Debug.Log("AfterDisconnect :" + State.size); - Debug.Log("Maybe this ?"); } public Vector2 ForwardDir => faceRight ? Vector2.right : Vector2.left; diff --git a/Assets/Scripts/Simulation/PinStateValue.cs b/Assets/Scripts/Simulation/PinStateValue.cs index 467b55ab..ee44625a 100644 --- a/Assets/Scripts/Simulation/PinStateValue.cs +++ b/Assets/Scripts/Simulation/PinStateValue.cs @@ -108,7 +108,6 @@ public bool FirstBitHigh() } public void ToggleBit(int index) { - UnityEngine.Debug.Log("Index: " + index); if (size == 1) { SmallToggle(); } else if (size <= 32) { a ^= (uint)(1 << index); } else if (size > 32) BigValues.Set(index, !BigValues.Get(index)); diff --git a/TestData/Projects/test/ProjectDescription.json b/TestData/Projects/test/ProjectDescription.json index 9be90e8a..674c5501 100644 --- a/TestData/Projects/test/ProjectDescription.json +++ b/TestData/Projects/test/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-19T11:48:01.969+02:00", - "LastSaveTime": "2025-06-04T14:55:19.314+02:00", + "LastSaveTime": "2025-06-04T14:57:40.593+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, From ffaa83df605b24fdded027717a88dbf7a976047b Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Wed, 4 Jun 2025 21:08:24 +0700 Subject: [PATCH 087/124] Add total chips used --- .../Description/Types/ProjectDescription.cs | 2 +- .../Graphics/UI/Menus/ChipStatsMenu.cs | 21 ++++++ .../Graphics/UI/Menus/ProjectStatsMenu.cs | 24 +++++++ .../Projects/MainTest/Chips/StatsTest1.json | 44 +++++++++++++ .../Projects/MainTest/Chips/StatsTest2.json | 66 +++++++++++++++++++ .../Projects/MainTest/ProjectDescription.json | 12 ++-- 6 files changed, 163 insertions(+), 6 deletions(-) create mode 100644 TestData/Projects/MainTest/Chips/StatsTest1.json create mode 100644 TestData/Projects/MainTest/Chips/StatsTest2.json diff --git a/Assets/Scripts/Description/Types/ProjectDescription.cs b/Assets/Scripts/Description/Types/ProjectDescription.cs index 73e079ce..d9f4bbc6 100644 --- a/Assets/Scripts/Description/Types/ProjectDescription.cs +++ b/Assets/Scripts/Description/Types/ProjectDescription.cs @@ -23,7 +23,7 @@ public struct ProjectDescription public int Prefs_SimStepsPerClockTick; // Stats - public uint StepsRanSinceCreated; + public ulong StepsRanSinceCreated; public CustomStopwatch /* We should ask Stack Overflow why we cannot access this class from outside its namespace */ TimeSpentSinceCreated; // List of all player-created chips (in order of creation -- oldest first) diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs index 2da20bef..6fcfbf16 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs @@ -1,3 +1,5 @@ +using System.Collections.Generic; +using System.Linq; using DLS.Description; using DLS.Game; using Seb.Types; @@ -21,6 +23,8 @@ public static class ChipStatsMenu // ---- Stats ---- static readonly string usesLabel = "Uses"; + static readonly string totalUsesLabel = "Total uses"; + static readonly string usedByLabel = "Used by"; static readonly string numOfChipsInChipLabel = "Number of chips in this chip"; @@ -57,7 +61,12 @@ public static void DrawMenu() UI.DrawText(GetChipUsedBy().ToString(), theme.FontBold, theme.FontSizeRegular, usedByLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); AddSpacing(); + Vector2 totalUsesLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, totalUsesLabel, labelCol * 0.75f, true); + UI.DrawPanel(totalUsesLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(GetChipUsesTotal().ToString(), theme.FontBold, theme.FontSizeRegular, totalUsesLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + if (!isChipBuiltIn) { + AddSpacing(); Vector2 numOfChipsInChipLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, numOfChipsInChipLabel, labelCol * 0.75f, true); UI.DrawPanel(numOfChipsInChipLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); UI.DrawText(GetNumOfChipsInChip().ToString(), theme.FontBold, theme.FontSizeRegular, numOfChipsInChipLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); @@ -105,6 +114,18 @@ private static uint GetChipUses() { return uses; } + private static int GetChipUsesTotal() { + Dictionary usesByChip = new(); + foreach (ChipDescription chip in Project.ActiveProject.chipLibrary.allChips) + { + usesByChip.Add(chip, 0); + foreach (SubChipDescription subChip in chip.SubChips) + if (subChip.Name == ChipStatsMenu.chip) usesByChip[chip]++; + else if (usesByChip.Any(e => e.Key.Name == subChip.Name)) usesByChip[chip] += usesByChip.First(e => e.Key.Name == subChip.Name).Value; + } + + return usesByChip.Values.ToArray().Sum(); + } private static int GetNumOfChipsInChip() => Project.ActiveProject.chipLibrary.GetChipDescription(chip).SubChips.Length; diff --git a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs index 5745446c..236f89e9 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs @@ -1,5 +1,7 @@ using System; +using System.Collections.Generic; using System.Globalization; +using System.Linq; using DLS.Description; using DLS.Game; using Seb.Types; @@ -26,6 +28,7 @@ public static class ProjectStatsMenu static readonly string createdOnLabel = "Created on"; static readonly string chipsLabel = "Chips"; static readonly string chipsUsedLabel = "Chips used"; + static readonly string chipsUsedTotalLabel = "Total chips used"; public static void DrawMenu() { @@ -66,6 +69,11 @@ public static void DrawMenu() Vector2 chipsUsedLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, chipsUsedLabel, labelCol * 0.75f, true); UI.DrawPanel(chipsUsedLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); UI.DrawText(GetChipsUsed().ToString(), theme.FontBold, theme.FontSizeRegular, chipsUsedLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); + AddSpacing(); + + Vector2 chipsUsedTotalLabelRight = MenuHelper.DrawLabelSectionOfLabelInputPair(labelPosCurr, entrySize, chipsUsedTotalLabel, labelCol * 0.75f, true); + UI.DrawPanel(chipsUsedTotalLabelRight, settingFieldSize, new Color(0.18f, 0.18f, 0.18f), Anchor.CentreRight); + UI.DrawText(GetTotalChipsUsed().ToString(), theme.FontBold, theme.FontSizeRegular, chipsUsedTotalLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); // Draw close Vector2 buttonTopLeft = new(labelPosCurr.x * 2.223f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); @@ -99,6 +107,22 @@ void AddHeaderSpacing() labelPosCurr.y -= headerSpacing; } } + static int GetTotalChipsUsed() { + int uses = 0; + foreach (ChipDescription chip in Project.ActiveProject.chipLibrary.allChips) { + Dictionary usesByChip = new(); + foreach (ChipDescription chipchip in Project.ActiveProject.chipLibrary.allChips) + { + usesByChip.Add(chipchip, 0); + foreach (SubChipDescription subChip in chipchip.SubChips) + if (subChip.Name == chip.Name) usesByChip[chipchip]++; + else if (usesByChip.Any(e => e.Key.Name == subChip.Name)) usesByChip[chipchip] += usesByChip.First(e => e.Key.Name == subChip.Name).Value; + } + + uses += usesByChip.Values.ToArray().Sum(); + } + return uses; + } static uint GetChipsUsed() { uint uses = 0; foreach (ChipDescription chip in Project.ActiveProject.chipLibrary.allChips) diff --git a/TestData/Projects/MainTest/Chips/StatsTest1.json b/TestData/Projects/MainTest/Chips/StatsTest1.json new file mode 100644 index 00000000..f117d373 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/StatsTest1.json @@ -0,0 +1,44 @@ +{ + "DLSVersion": "2.1.6", + "Name": "StatsTest1", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.625, + "y": 0.375 + }, + "Colour": { + "r": 0.249502838, + "g": 0.0543793626, + "b": 0.182806984, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"StatsTest", + "ID":1008107898, + "Label":"", + "Position":{ + "x":-0.5, + "y":1.25 + }, + "OutputPinColourInfo":[], + "InternalData":null + }, + { + "Name":"StatsTest", + "ID":930092738, + "Label":"", + "Position":{ + "x":-0.45249, + "y":-0.02033 + }, + "OutputPinColourInfo":[], + "InternalData":null + } + ], + "Wires":[], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/StatsTest2.json b/TestData/Projects/MainTest/Chips/StatsTest2.json new file mode 100644 index 00000000..3cabca04 --- /dev/null +++ b/TestData/Projects/MainTest/Chips/StatsTest2.json @@ -0,0 +1,66 @@ +{ + "DLSVersion": "2.1.6", + "Name": "StatsTest2", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 1.625, + "y": 0.375 + }, + "Colour": { + "r": 0.7356529, + "g": 0.03489643, + "b": 0.3001187, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"StatsTest1", + "ID":56785596, + "Label":"", + "Position":{ + "x":-2.5, + "y":0.75 + }, + "OutputPinColourInfo":[], + "InternalData":null + }, + { + "Name":"StatsTest1", + "ID":92195362, + "Label":"", + "Position":{ + "x":-0.5, + "y":-0.625 + }, + "OutputPinColourInfo":[], + "InternalData":null + }, + { + "Name":"StatsTest1", + "ID":1416875230, + "Label":"", + "Position":{ + "x":1.5, + "y":2.3125 + }, + "OutputPinColourInfo":[], + "InternalData":null + }, + { + "Name":"StatsTest1", + "ID":19961094, + "Label":"", + "Position":{ + "x":-2.375, + "y":-1.5 + }, + "OutputPinColourInfo":[], + "InternalData":null + } + ], + "Wires":[], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 16af8e88..b4f3909e 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-06-04T18:38:07.143+07:00", + "LastSaveTime": "2025-06-04T21:08:06.129+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -12,9 +12,9 @@ "Prefs_SimPaused": false, "Prefs_SimTargetStepsPerSecond": 150, "Prefs_SimStepsPerClockTick": 6, - "StepsRanSinceCreated": 124413, + "StepsRanSinceCreated": 548378, "TimeSpentSinceCreated": { - "StartFrom": "00:11:44.8633696" + "StartFrom": "01:20:51.1831871" }, "AllCustomChipNames":[ "AND", @@ -67,7 +67,9 @@ "#", "BuzzTest", "#AA", - "StatsTest" + "StatsTest", + "StatsTest1", + "StatsTest2" ], "StarredList":[ { @@ -153,7 +155,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","dev.RAM-8","#AA","StatsTest"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","dev.RAM-8","#AA","StatsTest","StatsTest1","StatsTest2"], "IsToggledOpen":true, "Name":"OTHER" } From 28558ca950941d1f4af6a92ac95fd0c0d15f061a Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 4 Jun 2025 19:01:10 +0200 Subject: [PATCH 088/124] Adding bus types to project description --- .../Description/Serialization/Serializer.cs | 4 +- .../Description/Types/ProjectDescription.cs | 5 +- .../Types/SubTypes/PinDescription.cs | 4 + Assets/Scripts/Game/Main/Main.cs | 3 +- .../Game/Project/BuiltinChipCreator.cs | 6 +- Assets/Scripts/SaveSystem/UpgradeHelper.cs | 12 +- .../Projects/ATEST/ProjectDescription.json | 73 +++++ TestData/Projects/MainTest/Chips/WIP2.json | 249 ++---------------- .../Projects/MainTest/ProjectDescription.json | 2 +- .../ahic CHIPS/ProjectDescription.json | 22 +- .../Projects/ram test/ProjectDescription.json | 22 +- TestData/Projects/test/Chips/2NAND.json | 44 ++++ TestData/Projects/test/Chips/4nand.json | 44 ++++ .../Projects/test/ProjectDescription.json | 16 +- .../Projects/testz/ProjectDescription.json | 5 +- .../Projects/ztest/ProjectDescription.json | 60 +++++ 16 files changed, 325 insertions(+), 246 deletions(-) create mode 100644 TestData/Projects/ATEST/ProjectDescription.json create mode 100644 TestData/Projects/test/Chips/2NAND.json create mode 100644 TestData/Projects/test/Chips/4nand.json create mode 100644 TestData/Projects/ztest/ProjectDescription.json diff --git a/Assets/Scripts/Description/Serialization/Serializer.cs b/Assets/Scripts/Description/Serialization/Serializer.cs index 504db116..259d48d9 100644 --- a/Assets/Scripts/Description/Serialization/Serializer.cs +++ b/Assets/Scripts/Description/Serialization/Serializer.cs @@ -1,7 +1,9 @@ using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; +using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using UnityEngine; @@ -129,7 +131,7 @@ public override PinBitCount ReadJson(JsonReader reader, Type objectType, [AllowN } } - class CustomJsonTextWriter : JsonTextWriter + class CustomJsonTextWriter : JsonTextWriter { int arrayDepth; diff --git a/Assets/Scripts/Description/Types/ProjectDescription.cs b/Assets/Scripts/Description/Types/ProjectDescription.cs index 63a405f8..ad594b87 100644 --- a/Assets/Scripts/Description/Types/ProjectDescription.cs +++ b/Assets/Scripts/Description/Types/ProjectDescription.cs @@ -30,8 +30,11 @@ public struct ProjectDescription public List ChipCollections; // List of all I/O (in order of creation -- oldest first) - public PinBitCount[] pinBitCounts; + public List pinBitCounts; + // Used both for Merge Chips and Split Chips + // Dictionnary of Big Pin and Small Pin Ex : (4,1) or (8,4) or (8,1) + public List> SplitMergePairs; // ---- Helper functions ---- public bool IsStarred(string chipName, bool isCollection) diff --git a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs index abfd5ebf..96d28e55 100644 --- a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs @@ -32,6 +32,10 @@ public struct PinBitCount public ushort BitCount; + public override string ToString() + { + return BitCount.ToString(); + } public PinBitCount(ushort BitCount = 1) { this.BitCount = BitCount; diff --git a/Assets/Scripts/Game/Main/Main.cs b/Assets/Scripts/Game/Main/Main.cs index 8598fb02..6d7e19fe 100644 --- a/Assets/Scripts/Game/Main/Main.cs +++ b/Assets/Scripts/Game/Main/Main.cs @@ -91,7 +91,8 @@ static Project CreateProject(string projectName) AllCustomChipNames = Array.Empty(), StarredList = BuiltinCollectionCreator.GetDefaultStarredList().ToList(), ChipCollections = new List(BuiltinCollectionCreator.CreateDefaultChipCollections()), - pinBitCounts = new PinBitCount[]{ 1, 4, 8 } + pinBitCounts = new List { 1, 4, 8 }, + SplitMergePairs = new() { new(8,4), new(8,1), new(4,1) } }; Saver.SaveProjectDescription(initialDescription); diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index b1a66c5f..cdea4f33 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -56,11 +56,11 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript .ToArray(); } - static ChipDescription[] CreateInOutPins(PinBitCount[] pinBitCountsToLoad) + static ChipDescription[] CreateInOutPins(List pinBitCountsToLoad) { - ChipDescription[] DevPinDescriptions = new ChipDescription[pinBitCountsToLoad.Length * 2]; + ChipDescription[] DevPinDescriptions = new ChipDescription[pinBitCountsToLoad.Count * 2]; - for (int i = 0; i < pinBitCountsToLoad.Length; i++) + for (int i = 0; i < pinBitCountsToLoad.Count; i++) { PinBitCount pinBitCount = pinBitCountsToLoad[i]; PinDescription[] outPin = new[] { CreatePinDescription("OUT", 0, pinBitCount) }; diff --git a/Assets/Scripts/SaveSystem/UpgradeHelper.cs b/Assets/Scripts/SaveSystem/UpgradeHelper.cs index fe473aa1..8c2057ec 100644 --- a/Assets/Scripts/SaveSystem/UpgradeHelper.cs +++ b/Assets/Scripts/SaveSystem/UpgradeHelper.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using DLS.Description; using DLS.Game; using UnityEngine; @@ -37,11 +38,18 @@ public static void ApplyVersionChangesToProject(ref ProjectDescription projectDe if ((!canParseModdedVersion) || projectVersion.ToInt() < moddedVersion_1_1_0.ToInt()) { projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); - projectDescription.pinBitCounts = new PinBitCount[]{1,4,8}; + projectDescription.pinBitCounts = new List {1,4,8}; + projectDescription.SplitMergePairs = new(){ + new(8,4), + new(8,1), + new(4,1) + }; + } + Saver.SaveProjectDescription(projectDescription); } - static void UpdateChipPre_2_1_5(ChipDescription chipDesc) + static void UpdateChipPre_2_1_5(ChipDescription chipDesc) { string ledName = ChipTypeHelper.GetName(ChipType.DisplayLED); diff --git a/TestData/Projects/ATEST/ProjectDescription.json b/TestData/Projects/ATEST/ProjectDescription.json new file mode 100644 index 00000000..ce5abca3 --- /dev/null +++ b/TestData/Projects/ATEST/ProjectDescription.json @@ -0,0 +1,73 @@ +{ + "ProjectName": "ATEST", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-04T18:32:03.724+02:00", + "LastSaveTime": "2025-06-04T18:36:36.826+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/MainTest/Chips/WIP2.json b/TestData/Projects/MainTest/Chips/WIP2.json index f6d2cb43..333d73ef 100644 --- a/TestData/Projects/MainTest/Chips/WIP2.json +++ b/TestData/Projects/MainTest/Chips/WIP2.json @@ -1,4 +1,5 @@ { + "DLSVersion": "2.1.6", "Name": "WIP2", "NameLocation": 0, "ChipType": 0, @@ -20,7 +21,7 @@ "x":-6.07331, "y":-1.66224 }, - "BitCount":1, + "BitCount":"1", "Colour":0, "ValueDisplayMode":0 } @@ -33,7 +34,7 @@ "x":-1.50295, "y":7.39811 }, - "BitCount":8, + "BitCount":"8", "Colour":0, "ValueDisplayMode":1 }, @@ -44,7 +45,7 @@ "x":1.6467, "y":2.99376 }, - "BitCount":8, + "BitCount":"8", "Colour":0, "ValueDisplayMode":1 }, @@ -55,7 +56,7 @@ "x":4.11785, "y":-0.46966 }, - "BitCount":8, + "BitCount":"8", "Colour":0, "ValueDisplayMode":1 } @@ -105,17 +106,6 @@ "OutputPinColourInfo":[{"PinColour":0,"PinID":128796038},{"PinColour":0,"PinID":632432616}], "InternalData":null }, - { - "Name":"dev.RAM-8", - "ID":247733947, - "Label":null, - "Position":{ - "x":7.47288, - "y":5.30698 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":5}], - "InternalData":null - }, { "Name":"ALU-8", "ID":301021643, @@ -190,7 +180,7 @@ "x":-9.20893, "y":5.13451 }, - "OutputPinColourInfo":[{"PinColour":2,"PinID":1151713402},{"PinColour":2,"PinID":349361804},{"PinColour":2,"PinID":883528113},{"PinColour":2,"PinID":1590314579},{"PinColour":2,"PinID":1175090400},{"PinColour":2,"PinID":805153383},{"PinColour":2,"PinID":1401872117},{"PinColour":2,"PinID":1118858130},{"PinColour":2,"PinID":742048505},{"PinColour":2,"PinID":1476868706},{"PinColour":2,"PinID":87848670},{"PinColour":0,"PinID":288562873},{"PinColour":0,"PinID":1148046748},{"PinColour":0,"PinID":1249996143},{"PinColour":0,"PinID":1157119205},{"PinColour":0,"PinID":845055315},{"PinColour":0,"PinID":895153575}], + "OutputPinColourInfo":[{"PinColour":3,"PinID":1151713402},{"PinColour":3,"PinID":349361804},{"PinColour":3,"PinID":883528113},{"PinColour":3,"PinID":1590314579},{"PinColour":3,"PinID":1175090400},{"PinColour":3,"PinID":805153383},{"PinColour":3,"PinID":1401872117},{"PinColour":3,"PinID":1118858130},{"PinColour":3,"PinID":742048505},{"PinColour":3,"PinID":1476868706},{"PinColour":3,"PinID":87848670},{"PinColour":0,"PinID":288562873},{"PinColour":0,"PinID":1148046748},{"PinColour":0,"PinID":1249996143},{"PinColour":0,"PinID":1157119205},{"PinColour":0,"PinID":845055315},{"PinColour":0,"PinID":895153575}], "InternalData":null }, { @@ -314,17 +304,6 @@ "OutputPinColourInfo":[{"PinColour":0,"PinID":1222614200}], "InternalData":null }, - { - "Name":"8-4BIT", - "ID":657752229, - "Label":null, - "Position":{ - "x":7.0552, - "y":-0.62319 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":null - }, { "Name":"REGISTER-1", "ID":602363710, @@ -336,17 +315,6 @@ "OutputPinColourInfo":[{"PinColour":0,"PinID":1938418986}], "InternalData":null }, - { - "Name":"8-4BIT", - "ID":1049240007, - "Label":null, - "Position":{ - "x":7.0925, - "y":-1.44374 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":2}], - "InternalData":null - }, { "Name":"CLOCK", "ID":719592481, @@ -423,17 +391,6 @@ }, "OutputPinColourInfo":[{"PinColour":0,"PinID":1454394007}], "InternalData":null - }, - { - "Name":"4-8BIT", - "ID":769198515, - "Label":"", - "Position":{ - "x":9.07547, - "y":-0.88058 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null } ], "Wires":[ @@ -563,20 +520,6 @@ "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":1.23784,"y":5.88339},{"x":1.2602,"y":5.01362},{"x":0.0,"y":0.0}] }, - { - "SourcePinAddress":{ - "PinID":5, - "PinOwnerID":247733947 - }, - "TargetPinAddress":{ - "PinID":581914641, - "PinOwnerID":153832190 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":158720235, @@ -657,38 +600,10 @@ "PinOwnerID":1255067638 }, "ConnectionType":1, - "ConnectedWireIndex":12, + "ConnectedWireIndex":11, "ConnectedWireSegmentIndex":0, "Points":[{"x":-7.14197,"y":-0.34843},{"x":-7.32057,"y":2.72294},{"x":-5.72798,"y":2.72294},{"x":-5.72798,"y":6.37857},{"x":0.0,"y":0.0}] }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":4, - "PinOwnerID":247733947 - }, - "ConnectionType":1, - "ConnectedWireIndex":15, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":-5.72798,"y":5.10441},{"x":-0.72235,"y":5.10441},{"x":-0.72235,"y":4.33081},{"x":5.52711,"y":4.33081},{"x":5.52711,"y":4.58868},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":1027672421, - "PinOwnerID":609414526 - }, - "ConnectionType":1, - "ConnectedWireIndex":16, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":-3.13415,"y":5.10441},{"x":-3.13415,"y":5.33194},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":605802866, @@ -703,20 +618,6 @@ "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":8.0906,"y":0.63864},{"x":8.0906,"y":-2.26752},{"x":-10.70327,"y":-2.26752},{"x":-10.70327,"y":4.54317},{"x":0.0,"y":0.0}] }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":76195595 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":247733947 - }, - "ConnectionType":1, - "ConnectedWireIndex":4, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":5.05626,"y":3.98817},{"x":5.05627,"y":5.40778},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":158720235, @@ -755,7 +656,7 @@ "PinOwnerID":1237918361 }, "ConnectionType":1, - "ConnectedWireIndex":21, + "ConnectedWireIndex":17, "ConnectedWireSegmentIndex":0, "Points":[{"x":-1.89033,"y":0.5235},{"x":0.0,"y":0.0}] }, @@ -811,7 +712,7 @@ "PinOwnerID":1805959142 }, "ConnectionType":1, - "ConnectedWireIndex":25, + "ConnectedWireIndex":21, "ConnectedWireSegmentIndex":0, "Points":[{"x":-9.97518,"y":1.88111},{"x":-9.97518,"y":0.08361},{"x":0.0,"y":0.0}] }, @@ -839,7 +740,7 @@ "PinOwnerID":1867709155 }, "ConnectionType":1, - "ConnectedWireIndex":27, + "ConnectedWireIndex":23, "ConnectedWireSegmentIndex":2, "Points":[{"x":-5.10695,"y":1.25578},{"x":-5.10695,"y":4.79626},{"x":0.0,"y":0.0}] }, @@ -853,7 +754,7 @@ "PinOwnerID":687931053 }, "ConnectionType":1, - "ConnectedWireIndex":12, + "ConnectedWireIndex":11, "ConnectedWireSegmentIndex":0, "Points":[{"x":-7.44021,"y":-0.3515},{"x":-7.4402,"y":-1.17057},{"x":4.71352,"y":-1.17057},{"x":4.71352,"y":0.27946},{"x":0.0,"y":0.0}] }, @@ -867,7 +768,7 @@ "PinOwnerID":2007842624 }, "ConnectionType":1, - "ConnectedWireIndex":29, + "ConnectedWireIndex":25, "ConnectedWireSegmentIndex":1, "Points":[{"x":-1.54796,"y":-1.17057},{"x":-1.54796,"y":1.16265},{"x":0.0,"y":0.0}] }, @@ -881,7 +782,7 @@ "PinOwnerID":1237918361 }, "ConnectionType":1, - "ConnectedWireIndex":30, + "ConnectedWireIndex":26, "ConnectedWireSegmentIndex":0, "Points":[{"x":-1.54796,"y":-0.55101},{"x":0.0,"y":0.0}] }, @@ -895,7 +796,7 @@ "PinOwnerID":1255067638 }, "ConnectionType":1, - "ConnectedWireIndex":25, + "ConnectedWireIndex":21, "ConnectedWireSegmentIndex":2, "Points":[{"x":-6.06223,"y":0.86},{"x":-6.00002,"y":2.45656},{"x":-5.28537,"y":2.45656},{"x":-5.28537,"y":5.55538},{"x":0.0,"y":0.0}] }, @@ -909,7 +810,7 @@ "PinOwnerID":1255067638 }, "ConnectionType":1, - "ConnectedWireIndex":28, + "ConnectedWireIndex":24, "ConnectedWireSegmentIndex":1, "Points":[{"x":-4.93394,"y":4.78826},{"x":-4.93398,"y":5.94273},{"x":0.0,"y":0.0}] }, @@ -965,38 +866,10 @@ "PinOwnerID":602363710 }, "ConnectionType":1, - "ConnectedWireIndex":29, + "ConnectedWireIndex":25, "ConnectedWireSegmentIndex":1, "Points":[{"x":-6.53977,"y":-1.17057},{"x":-6.53977,"y":-3.23403},{"x":8.24873,"y":-3.23403},{"x":8.24873,"y":0.62628},{"x":0.0,"y":0.0}] }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":2007842624 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":657752229 - }, - "ConnectionType":1, - "ConnectedWireIndex":6, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":1.6297,"y":2.29716},{"x":1.62996,"y":2.95738},{"x":5.22762,"y":2.95738},{"x":5.22762,"y":-0.60454},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":1237918361 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1049240007 - }, - "ConnectionType":1, - "ConnectedWireIndex":34, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":2.37536,"y":-0.44751},{"x":2.37532,"y":-1.42509},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":0, @@ -1081,34 +954,6 @@ "ConnectedWireSegmentIndex":0, "Points":[{"x":4.36891,"y":3.98071},{"x":4.36892,"y":7.03436},{"x":0.0,"y":0.0}] }, - { - "SourcePinAddress":{ - "PinID":128796038, - "PinOwnerID":1137372670 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":247733947 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":6.51219,"y":6.99579},{"x":6.51219,"y":5.85893},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1580367471, - "PinOwnerID":2092373440 - }, - "TargetPinAddress":{ - "PinID":1027672421, - "PinOwnerID":1137372670 - }, - "ConnectionType":1, - "ConnectedWireIndex":16, - "ConnectedWireSegmentIndex":2, - "Points":[{"x":4.69719,"y":4.33081},{"x":4.69719,"y":5.91079},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":1151713402, @@ -1165,20 +1010,6 @@ "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":-6.88907,"y":6.57451},{"x":-6.88907,"y":8.98738},{"x":11.72848,"y":8.98738},{"x":11.72848,"y":1.91077},{"x":8.02446,"y":1.91077},{"x":8.02446,"y":0.93603},{"x":0.0,"y":0.0}] }, - { - "SourcePinAddress":{ - "PinID":805153383, - "PinOwnerID":518660003 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":247733947 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":-6.08978,"y":6.25451},{"x":-6.08978,"y":3.45086},{"x":6.48437,"y":3.45086},{"x":6.48437,"y":5.04943},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":1401872117, @@ -1357,7 +1188,7 @@ "PinOwnerID":687931053 }, "ConnectionType":1, - "ConnectedWireIndex":60, + "ConnectedWireIndex":51, "ConnectedWireSegmentIndex":4, "Points":[{"x":3.21705,"y":0.11463},{"x":3.22904,"y":-0.08855},{"x":6.1216,"y":-0.06494},{"x":6.1098,"y":0.57261},{"x":0.0,"y":0.0}] }, @@ -1455,7 +1286,7 @@ "PinOwnerID":2085911674 }, "ConnectionType":1, - "ConnectedWireIndex":25, + "ConnectedWireIndex":21, "ConnectedWireSegmentIndex":2, "Points":[{"x":-6.93894,"y":0.86458},{"x":-6.93908,"y":-3.70234},{"x":9.74005,"y":-3.60917},{"x":9.77077,"y":-2.85651},{"x":0.0,"y":0.0}] }, @@ -1473,20 +1304,6 @@ "ConnectedWireSegmentIndex":-1, "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":769198515 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2085911674 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, { "SourcePinAddress":{ "PinID":1938418986, @@ -1511,37 +1328,9 @@ "PinOwnerID":2085911674 }, "ConnectionType":1, - "ConnectedWireIndex":37, + "ConnectedWireIndex":33, "ConnectedWireSegmentIndex":1, "Points":[{"x":8.22771,"y":-3.23403},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":657752229 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":769198515 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1049240007 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":769198515 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] } ], "Displays": null diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 733537f2..d5307007 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-05-31T17:34:26.079+02:00", + "LastSaveTime": "2025-06-04T18:32:00.636+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, diff --git a/TestData/Projects/ahic CHIPS/ProjectDescription.json b/TestData/Projects/ahic CHIPS/ProjectDescription.json index c11ebc45..061f275b 100644 --- a/TestData/Projects/ahic CHIPS/ProjectDescription.json +++ b/TestData/Projects/ahic CHIPS/ProjectDescription.json @@ -2,8 +2,9 @@ "ProjectName": "ahic CHIPS", "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-24T13:06:54.829+02:00", - "LastSaveTime": "2025-05-24T13:13:32.516+02:00", + "LastSaveTime": "2025-06-04T18:36:44.513+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, @@ -79,5 +80,24 @@ "IsToggledOpen":false, "Name":"OTHER" } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } ] } \ No newline at end of file diff --git a/TestData/Projects/ram test/ProjectDescription.json b/TestData/Projects/ram test/ProjectDescription.json index 9f37d5e7..4a49fdc6 100644 --- a/TestData/Projects/ram test/ProjectDescription.json +++ b/TestData/Projects/ram test/ProjectDescription.json @@ -2,8 +2,9 @@ "ProjectName": "ram test", "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-24T12:10:42.805+02:00", - "LastSaveTime": "2025-05-24T12:10:42.807+02:00", + "LastSaveTime": "2025-06-04T18:36:36.827+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, @@ -54,5 +55,24 @@ "IsToggledOpen":false, "Name":"MEMORY" } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } ] } \ No newline at end of file diff --git a/TestData/Projects/test/Chips/2NAND.json b/TestData/Projects/test/Chips/2NAND.json new file mode 100644 index 00000000..c40a582d --- /dev/null +++ b/TestData/Projects/test/Chips/2NAND.json @@ -0,0 +1,44 @@ +{ + "DLSVersion": "2.1.6", + "Name": "2NAND", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 0.875, + "y": 0.375 + }, + "Colour": { + "r": 0.372427016, + "g": 0.2604745, + "b": 0.931104362, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"NAND", + "ID":1232961147, + "Label":"", + "Position":{ + "x":-4.25481, + "y":-0.36058 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"NAND", + "ID":1369511411, + "Label":"", + "Position":{ + "x":-2.66827, + "y":-0.34455 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/test/Chips/4nand.json b/TestData/Projects/test/Chips/4nand.json new file mode 100644 index 00000000..91b8b357 --- /dev/null +++ b/TestData/Projects/test/Chips/4nand.json @@ -0,0 +1,44 @@ +{ + "DLSVersion": "2.1.6", + "Name": "4nand", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 0.875, + "y": 0.375 + }, + "Colour": { + "r": 0.390986025, + "g": 0.364759177, + "b": 0.5003054, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"2NAND", + "ID":408654408, + "Label":"", + "Position":{ + "x":-2.95673, + "y":-0.8734 + }, + "OutputPinColourInfo":[], + "InternalData":null + }, + { + "Name":"2NAND", + "ID":1245853887, + "Label":"", + "Position":{ + "x":-1.875, + "y":-0.875 + }, + "OutputPinColourInfo":[], + "InternalData":null + } + ], + "Wires":[], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/test/ProjectDescription.json b/TestData/Projects/test/ProjectDescription.json index 674c5501..18c88ee3 100644 --- a/TestData/Projects/test/ProjectDescription.json +++ b/TestData/Projects/test/ProjectDescription.json @@ -4,17 +4,19 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-19T11:48:01.969+02:00", - "LastSaveTime": "2025-06-04T14:57:40.593+02:00", + "LastSaveTime": "2025-06-04T18:32:00.638+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 100000000, + "Prefs_SimTargetStepsPerSecond": 98, "Prefs_SimStepsPerClockTick": 250, "AllCustomChipNames":[ - "128Nand" + "128Nand", + "2NAND", + "4nand" ], "StarredList":[ { @@ -28,6 +30,14 @@ { "Name":"128Nand", "IsCollection":false + }, + { + "Name":"2NAND", + "IsCollection":false + }, + { + "Name":"4nand", + "IsCollection":false } ], "ChipCollections":[ diff --git a/TestData/Projects/testz/ProjectDescription.json b/TestData/Projects/testz/ProjectDescription.json index 5f6c4c6e..c9d0d314 100644 --- a/TestData/Projects/testz/ProjectDescription.json +++ b/TestData/Projects/testz/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-30T15:28:02.070+02:00", - "LastSaveTime": "2025-05-30T15:28:02.070+02:00", + "LastSaveTime": "2025-06-04T18:32:00.638+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, @@ -60,5 +60,6 @@ "1", "4", "8" - ] + ], + "SplitMergePairs": null } \ No newline at end of file diff --git a/TestData/Projects/ztest/ProjectDescription.json b/TestData/Projects/ztest/ProjectDescription.json new file mode 100644 index 00000000..122c6176 --- /dev/null +++ b/TestData/Projects/ztest/ProjectDescription.json @@ -0,0 +1,60 @@ +{ + "ProjectName": "ztest", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-04T18:16:56.000+02:00", + "LastSaveTime": "2025-06-04T18:32:00.639+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs": null +} \ No newline at end of file From 915b3285b771cb4239fe2d4397bd08cf5213ed3a Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 4 Jun 2025 23:37:01 +0200 Subject: [PATCH 089/124] Procedural generation of Splits yeah pretty much the title --- .../Description/Helpers/ChipTypeHelper.cs | 5 ++ .../Scripts/Game/Elements/SubChipInstance.cs | 2 +- .../Game/Project/BuiltinChipCreator.cs | 55 ++++++++++++- Assets/Scripts/SaveSystem/UpgradeHelper.cs | 17 +++- Assets/Scripts/Simulation/BitArrayHelper.cs | 36 +++++++++ Assets/Scripts/Simulation/PinStateValue.cs | 62 +++++++++++++++ Assets/Scripts/Simulation/Simulator.cs | 8 ++ .../Projects/ATEST/ProjectDescription.json | 2 +- .../Projects/MainTest/ProjectDescription.json | 18 ++++- .../ahic CHIPS/ProjectDescription.json | 2 +- .../Projects/ram test/ProjectDescription.json | 2 +- .../Projects/test/ProjectDescription.json | 28 ++++++- .../Projects/testz/ProjectDescription.json | 2 +- .../test\303\251&/ProjectDescription.json" | 78 +++++++++++++++++++ .../Projects/ztest/ProjectDescription.json | 17 +++- 15 files changed, 318 insertions(+), 16 deletions(-) create mode 100644 "TestData/Projects/test\303\251&/ProjectDescription.json" diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 90a71301..96be7575 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -94,5 +94,10 @@ public static bool IsClickableDisplayType(ChipType type) { public static bool IsInternalDataModifiable(ChipType type) { return type == ChipType.EEPROM_256x16 || type == ChipType.Toggle; } + + public static bool IsMergeSplitChip(ChipType chipType) + { + return chipType == ChipType.Split_Pin || chipType == ChipType.Merge_Pin; + } } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index 7dbadc00..e0b1b670 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -200,7 +200,7 @@ public static (float chipHeight, float[] pinGridY) CalculateDefaultPinLayout(Pin PinBitCount.Bit1 => 2, PinBitCount.Bit4 => 3, PinBitCount.Bit8 => 4, - _ => Mathf.RoundToInt(0.43f / 8 * pinBitCount.BitCount / DrawSettings.GridSize) + _ => Mathf.RoundToInt(0.43f / 8 * pinBitCount.BitCount / DrawSettings.GridSize +0.5f) }; diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index cdea4f33..a00486f2 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -53,6 +53,8 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript CreateBuzzer() } .Concat(CreateInOutPins(description.pinBitCounts)) + .Concat(CreateSplitMergePins(description.SplitMergePairs)) + .ToArray(); } @@ -78,7 +80,56 @@ static ChipDescription[] CreateInOutPins(List pinBitCountsToLoad) return DevPinDescriptions; } - static ChipDescription CreateNand() + static ChipDescription[] CreateSplitMergePins(List> pairs) + { + char[] letters = new[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; + ChipDescription[] SplitMergeDescriptions = new ChipDescription[pairs.Count * 2]; + + + + for (int i = 0; i < pairs.Count; i++) + { + (PinBitCount a, PinBitCount b) counts = (pairs[i].Key, pairs[i].Value); + int smallInBig = counts.a / counts.b; + + PinDescription[] mergeIN = new PinDescription[smallInBig]; + PinDescription[] mergeOUT = new[] { CreatePinDescription("OUT", smallInBig, counts.a) }; + + PinDescription[] splitIN = new[] { CreatePinDescription("IN", 0, counts.a) }; + PinDescription[] splitOUT = new PinDescription[smallInBig]; + + for(int j = 0; j < smallInBig; j++) + { + mergeIN[^(j+1)] = CreatePinDescription("IN-" + letters[j], j, counts.b); + } + for (int j = 0; j < smallInBig; j++) + { + splitOUT[^(j+1)] = CreatePinDescription("OUT-" + letters[j], j+1, counts.b); + } + + + + + + + + + string mergeName = counts.b.ToString() + "-" + counts.a.ToString()+"BIT"; + string splitName = counts.a.ToString() + "-" + counts.b.ToString()+"BIT"; + + Vector2 minChipSize = SubChipInstance.CalculateMinChipSize(mergeIN, mergeOUT, mergeName); // both same size in the end anyway + float width = Mathf.Max(GridSize * 9, minChipSize.x); + + Vector2 size = new Vector2(width, minChipSize.y); + + + SplitMergeDescriptions[i * 2] = CreateBuiltinChipDescription(ChipType.Merge_Pin, size, GetColor(ChipCol_SplitMerge), mergeIN, mergeOUT, name:mergeName ); + SplitMergeDescriptions[i * 2+1] = CreateBuiltinChipDescription(ChipType.Split_Pin, size, GetColor(ChipCol_SplitMerge), splitIN, splitOUT, name:splitName); + } + + return SplitMergeDescriptions; + } + static ChipDescription CreateNand() { Color col = GetColor(new(0.73f, 0.26f, 0.26f)); Vector2 size = new(CalculateGridSnappedWidth(GridSize * 8), GridSize * 4); @@ -477,7 +528,7 @@ static ChipDescription CreateBusTerminus(PinBitCount bitCount) static ChipDescription CreateBuiltinChipDescription(ChipType type, Vector2 size, Color col, PinDescription[] inputs, PinDescription[] outputs, DisplayDescription[] displays = null, NameDisplayLocation nameLoc = NameDisplayLocation.Centre, string name = "") { - if (!ChipTypeHelper.IsDevPin(type)){name = ChipTypeHelper.GetName(type); } + if (!ChipTypeHelper.IsDevPin(type) && !ChipTypeHelper.IsMergeSplitChip(type)){name = ChipTypeHelper.GetName(type); } ValidatePinIDs(inputs, outputs, name); diff --git a/Assets/Scripts/SaveSystem/UpgradeHelper.cs b/Assets/Scripts/SaveSystem/UpgradeHelper.cs index 8c2057ec..6ad882cb 100644 --- a/Assets/Scripts/SaveSystem/UpgradeHelper.cs +++ b/Assets/Scripts/SaveSystem/UpgradeHelper.cs @@ -32,10 +32,15 @@ public static void ApplyVersionChangesToProject(ref ProjectDescription projectDe Main.Version defaultModdedVersion = new(1, 0, 0); Main.Version moddedVersion_1_1_0 = new(1, 1, 0); // Custom IN and OUTS version + bool canParseModdedVersion = Main.Version.TryParse(projectDescription.DLSVersion_LastSavedModdedVersion, out Main.Version projectVersion); + bool isVersionEarlierThan_1_1_0 = (!canParseModdedVersion) || projectVersion.ToInt() < moddedVersion_1_1_0.ToInt(); + + bool isSplitMergeInvalid = projectDescription.SplitMergePairs == null || projectDescription.SplitMergePairs.Count == 0; + bool isPinBitCountInvalid = projectDescription.pinBitCounts == null || projectDescription.pinBitCounts.Count == 0; - if ((!canParseModdedVersion) || projectVersion.ToInt() < moddedVersion_1_1_0.ToInt()) + if (isVersionEarlierThan_1_1_0 | isPinBitCountInvalid) { projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); projectDescription.pinBitCounts = new List {1,4,8}; @@ -44,9 +49,17 @@ public static void ApplyVersionChangesToProject(ref ProjectDescription projectDe new(8,1), new(4,1) }; + } + if(isVersionEarlierThan_1_1_0 | isSplitMergeInvalid) + { + projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); + projectDescription.SplitMergePairs = new(){ + new(8,4), + new(8,1), + new(4,1) + }; } - Saver.SaveProjectDescription(projectDescription); } static void UpdateChipPre_2_1_5(ChipDescription chipDesc) diff --git a/Assets/Scripts/Simulation/BitArrayHelper.cs b/Assets/Scripts/Simulation/BitArrayHelper.cs index 720b364a..d4c40b14 100644 --- a/Assets/Scripts/Simulation/BitArrayHelper.cs +++ b/Assets/Scripts/Simulation/BitArrayHelper.cs @@ -147,6 +147,31 @@ public static ushort GetFirstUShortFromByteArray(BitArray state) return n; } + public static ushort GetUShortAtIndexOfMaxLength(BitArray state, int index, int maxLength) + { + int len = Mathf.Min(maxLength + index, state.Count, 16 + index); + ushort n = 0; + for (int i = index; i < len ; i++) + { + if (state.Get(i)) + n |= (ushort)(1 << i); + } + return n; + } + + public static uint GetUIntAtIndexOfMaxLength(BitArray state, int index, int maxLength) + { + int len = Mathf.Min(maxLength + index, state.Count, 32 + index); + uint n = 0; + for (int i = index; i < len; i++) + { + if (state.Get(i)) + n |= (uint)(1 << i); + } + return n; + } + + public static uint GetFirstUIntFromByteArray(BitArray state) { int len = Math.Min(32, state.Count); @@ -204,6 +229,17 @@ public static byte[] GetByteArrayOfMaxLengthStartingAtIndex(BitArray state, int return bytes; } + public static BitArray GetBitArrayOfMaxLengthStartingAtIndex(BitArray state, int index, int length) + { + BitArray bitArray = new BitArray(length); + int len = Mathf.Min(length + index, state.Length); + for(int i = index;i < len;i++) + { + bitArray[i - index] = state[i]; + } + return bitArray; + } + public static void SetBitAtIndex(ref BitArray state, int index, bool value) { diff --git a/Assets/Scripts/Simulation/PinStateValue.cs b/Assets/Scripts/Simulation/PinStateValue.cs index ee44625a..f40f0bf8 100644 --- a/Assets/Scripts/Simulation/PinStateValue.cs +++ b/Assets/Scripts/Simulation/PinStateValue.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Specialized; using DLS.Description; +using JetBrains.Annotations; using Seb.Helpers; using UnityEngine; using static UnityEngine.Random; @@ -356,5 +357,66 @@ public bool HandleConflicts(PinStateValue other) return HandleConflictBig(other); } } + + public void HandleShortSplit(ref SimPin[] targets) + { + int targetSize = targets[0].State.size; + int mask = (1 << (targetSize))-1; + for (int i = 0; i < targets.Length; i++) { + targets[^(i+1)].State.a = (uint)(((GetShortValues() >> (i * targetSize) )& mask) | ((GetShortTristate() >> (i * targetSize)) & mask) << 16); + } + } + + public void HandleMediumSplit(ref SimPin[] targets) { + int targetSize = targets[0].State.size; + int mask = (1 << (targetSize)) - 1; + for (int i = 0; i < targets.Length; i++) + { + targets[^(i + 1)].State.a = ((uint)(a >> (i* targetSize) & mask)) | (uint)((b.Data>>(i*targetSize) & mask)<<16); + } + } + + public void HandleBigSplit(ref SimPin[] targets) + { + int targetSize = targets[0].State.size; + BitArray mask = BitArrayHelper.TrueBitArray(targetSize - 1); + + if (targetSize <= 16) + { + for (int i = 0; i < targets.Length; i++) + { + targets[^(i+1)].State.a = (uint)(BitArrayHelper.GetUShortAtIndexOfMaxLength(BigValues, i * targetSize, targetSize) + | BitArrayHelper.GetUShortAtIndexOfMaxLength(BigTristates, i * targetSize, targetSize) << 16); + } + } + + else if (targetSize <= 32) + { + for (int i = 0; i < targets.Length; i++) + { + targets[i].State.a = BitArrayHelper.GetUIntAtIndexOfMaxLength(BigValues, i * targetSize, targetSize); + targets[i].State.b = new BitVector32((int)BitArrayHelper.GetUIntAtIndexOfMaxLength(BigTristates, i * targetSize, targetSize)); + } + } + + else + { + for (int i = 0; i < targets.Length; i++) + { + targets[^(i + 1)].State.BigValues = new BitArray(BitArrayHelper.GetBitArrayOfMaxLengthStartingAtIndex(BigValues, i * targetSize, targetSize)); + targets[^(i + 1)].State.BigTristates = new BitArray(BitArrayHelper.GetBitArrayOfMaxLengthStartingAtIndex(BigTristates, i * targetSize, targetSize)); + } + } + + } + + public void HandleSplit(ref SimPin[] targets) + { + if (size <= 1) return; + else if (size <= 16) { HandleShortSplit(ref targets); } + else if (size <= 32) { HandleMediumSplit(ref targets); } + else { HandleBigSplit(ref targets); } + } + } } \ No newline at end of file diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index e284c785..20cbb79a 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -505,6 +505,14 @@ static void ProcessBuiltinChip(SimChip chip) chip.OutputPins[0].State.SetShort((ushort)chip.InternalState[0]); break; } + + case ChipType.Split_Pin: + { + chip.InputPins[0].State.HandleSplit(ref chip.OutputPins); + break; + } + + // ---- Bus types ---- default: { diff --git a/TestData/Projects/ATEST/ProjectDescription.json b/TestData/Projects/ATEST/ProjectDescription.json index ce5abca3..dbffa5e2 100644 --- a/TestData/Projects/ATEST/ProjectDescription.json +++ b/TestData/Projects/ATEST/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-06-04T18:32:03.724+02:00", - "LastSaveTime": "2025-06-04T18:36:36.826+02:00", + "LastSaveTime": "2025-06-04T20:26:12.664+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index d5307007..62788a58 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,14 +4,14 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-04T18:32:00.636+02:00", + "LastSaveTime": "2025-06-04T20:26:38.192+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 100000000, + "Prefs_SimTargetStepsPerSecond": 100, "Prefs_SimStepsPerClockTick": 6, "AllCustomChipNames":[ "AND", @@ -175,5 +175,19 @@ "1", "4", "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } ] } \ No newline at end of file diff --git a/TestData/Projects/ahic CHIPS/ProjectDescription.json b/TestData/Projects/ahic CHIPS/ProjectDescription.json index 061f275b..0acaa082 100644 --- a/TestData/Projects/ahic CHIPS/ProjectDescription.json +++ b/TestData/Projects/ahic CHIPS/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-24T13:06:54.829+02:00", - "LastSaveTime": "2025-06-04T18:36:44.513+02:00", + "LastSaveTime": "2025-06-04T20:26:12.664+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, diff --git a/TestData/Projects/ram test/ProjectDescription.json b/TestData/Projects/ram test/ProjectDescription.json index 4a49fdc6..a589ef3a 100644 --- a/TestData/Projects/ram test/ProjectDescription.json +++ b/TestData/Projects/ram test/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-24T12:10:42.805+02:00", - "LastSaveTime": "2025-06-04T18:36:36.827+02:00", + "LastSaveTime": "2025-06-04T20:26:12.665+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, diff --git a/TestData/Projects/test/ProjectDescription.json b/TestData/Projects/test/ProjectDescription.json index 18c88ee3..01313a39 100644 --- a/TestData/Projects/test/ProjectDescription.json +++ b/TestData/Projects/test/ProjectDescription.json @@ -4,14 +4,14 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-19T11:48:01.969+02:00", - "LastSaveTime": "2025-06-04T18:32:00.638+02:00", + "LastSaveTime": "2025-06-04T22:20:48.944+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 98, + "Prefs_SimTargetStepsPerSecond": 1000000000, "Prefs_SimStepsPerClockTick": 250, "AllCustomChipNames":[ "128Nand", @@ -72,7 +72,7 @@ "Name":"MEMORY" }, { - "Chips":["BUTTON","DIPSWITCH","CONST","RAM-8","BUZZER","128Nand","IN-32","OUT-32","IN-16","OUT-16","IN-24","OUT-24","IN-128","OUT-128","IN-1024","OUT-1024","IN-20736000","OUT-20736000","IN-345600","OUT-345600"], + "Chips":["BUTTON","DIPSWITCH","CONST","RAM-8","BUZZER","128Nand","IN-32","OUT-32","IN-16","OUT-16","IN-24","OUT-24","IN-128","OUT-128","IN-1024","OUT-1024","IN-20736000","OUT-20736000","IN-345600","OUT-345600","IN-15","OUT-15","4-16BIT","16-4BIT","16-32BIT","32-16BIT","2NAND","4nand"], "IsToggledOpen":true, "Name":"OTHER" } @@ -87,5 +87,27 @@ "128", "1024", "15" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + }, + { + "Key":"16", + "Value":"4" + }, + { + "Key":"32", + "Value":"16" + } ] } \ No newline at end of file diff --git a/TestData/Projects/testz/ProjectDescription.json b/TestData/Projects/testz/ProjectDescription.json index c9d0d314..541e64b9 100644 --- a/TestData/Projects/testz/ProjectDescription.json +++ b/TestData/Projects/testz/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-30T15:28:02.070+02:00", - "LastSaveTime": "2025-06-04T18:32:00.638+02:00", + "LastSaveTime": "2025-06-04T20:26:12.666+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, diff --git "a/TestData/Projects/test\303\251&/ProjectDescription.json" "b/TestData/Projects/test\303\251&/ProjectDescription.json" new file mode 100644 index 00000000..20c93f79 --- /dev/null +++ "b/TestData/Projects/test\303\251&/ProjectDescription.json" @@ -0,0 +1,78 @@ +{ + "ProjectName": "testé&", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-04T20:21:19.546+02:00", + "LastSaveTime": "2025-06-04T20:26:12.666+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + }, + { + "Chips":["DIPSWITCH","RAM-8","BUZZER","IN-1","OUT-1","IN-4","OUT-4","IN-8","OUT-8","4-8","8-4","1-8","8-1","1-4","4-1","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT"], + "IsToggledOpen":true, + "Name":"OTHER" + } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/ztest/ProjectDescription.json b/TestData/Projects/ztest/ProjectDescription.json index 122c6176..65479d8c 100644 --- a/TestData/Projects/ztest/ProjectDescription.json +++ b/TestData/Projects/ztest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-06-04T18:16:56.000+02:00", - "LastSaveTime": "2025-06-04T18:32:00.639+02:00", + "LastSaveTime": "2025-06-04T20:31:33.685+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, @@ -56,5 +56,18 @@ "4", "8" ], - "SplitMergePairs": null + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } + ] } \ No newline at end of file From cec40f0da5bb1325f12fdfa70af46e26217b1c1e Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Thu, 5 Jun 2025 15:18:57 +0700 Subject: [PATCH 090/124] Make close button drift less --- Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs | 4 ++-- Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs | 4 ++-- Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs | 4 ++-- TestData/Projects/MainTest/ProjectDescription.json | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs index 6fcfbf16..ac164998 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs @@ -73,8 +73,8 @@ public static void DrawMenu() } // Draw close - Vector2 buttonTopLeft = new(labelPosCurr.x * 2.223f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); - bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.115f, 0)); + Vector2 buttonTopLeft = new(labelPosCurr.x * 2.222f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); + bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.118f, 0)); // Draw menu background Bounds2D menuBounds = UI.GetCurrentBoundsScope(); diff --git a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs index 8b54ee07..5b3c6efb 100644 --- a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs @@ -43,8 +43,8 @@ public static void DrawMenu() UI.DrawText(GetCollectionChipsLength().ToString(), theme.FontBold, theme.FontSizeRegular, numOfChipsLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); // Draw close - Vector2 buttonTopLeft = new(labelPosCurr.x * 2.223f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); - bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.115f, 0)); + Vector2 buttonTopLeft = new(labelPosCurr.x * 2.222f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); + bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.118f, 0)); // Draw menu background Bounds2D menuBounds = UI.GetCurrentBoundsScope(); diff --git a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs index 236f89e9..d56beac3 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs @@ -76,8 +76,8 @@ public static void DrawMenu() UI.DrawText(GetTotalChipsUsed().ToString(), theme.FontBold, theme.FontSizeRegular, chipsUsedTotalLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); // Draw close - Vector2 buttonTopLeft = new(labelPosCurr.x * 2.223f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); - bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.115f, 0)); + Vector2 buttonTopLeft = new(labelPosCurr.x * 2.222f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); + bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.118f, 0)); // Draw menu background Bounds2D menuBounds = UI.GetCurrentBoundsScope(); diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index b4f3909e..dd23eb26 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-06-04T21:08:06.129+07:00", + "LastSaveTime": "2025-06-05T15:18:13.155+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -12,9 +12,9 @@ "Prefs_SimPaused": false, "Prefs_SimTargetStepsPerSecond": 150, "Prefs_SimStepsPerClockTick": 6, - "StepsRanSinceCreated": 548378, + "StepsRanSinceCreated": 715372, "TimeSpentSinceCreated": { - "StartFrom": "01:20:51.1831871" + "StartFrom": "01:40:50.2902316" }, "AllCustomChipNames":[ "AND", From c4fe4efa8d18cb56458cb513160b22b0d80fd9a1 Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Thu, 5 Jun 2025 16:47:42 +0700 Subject: [PATCH 091/124] Make drifting not possible, instead the size can be under or over --- Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs | 2 +- .../Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs | 2 +- Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs | 2 +- TestData/Projects/MainTest/ProjectDescription.json | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs index ac164998..45fef3c3 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs @@ -73,7 +73,7 @@ public static void DrawMenu() } // Draw close - Vector2 buttonTopLeft = new(labelPosCurr.x * 2.222f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); + Vector2 buttonTopLeft = new(50, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.118f, 0)); // Draw menu background diff --git a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs index 5b3c6efb..fabec8cb 100644 --- a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs @@ -43,7 +43,7 @@ public static void DrawMenu() UI.DrawText(GetCollectionChipsLength().ToString(), theme.FontBold, theme.FontSizeRegular, numOfChipsLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); // Draw close - Vector2 buttonTopLeft = new(labelPosCurr.x * 2.222f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); + Vector2 buttonTopLeft = new(50, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.118f, 0)); // Draw menu background diff --git a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs index d56beac3..bc9f24cc 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs @@ -76,7 +76,7 @@ public static void DrawMenu() UI.DrawText(GetTotalChipsUsed().ToString(), theme.FontBold, theme.FontSizeRegular, chipsUsedTotalLabelRight + new Vector2(inputTextPad - settingFieldSize.x, 0), Anchor.TextCentreLeft, Color.white); // Draw close - Vector2 buttonTopLeft = new(labelPosCurr.x * 2.222f, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); + Vector2 buttonTopLeft = new(50, UI.PrevBounds.Bottom - 1 * (DrawSettings.DefaultButtonSpacing * 6)); bool result = UI.Button("CLOSE", MenuHelper.Theme.ButtonTheme, buttonTopLeft, new Vector2(menuWidth / 1.118f, 0)); // Draw menu background diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index dd23eb26..800a8a6f 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,7 +3,7 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-06-05T15:18:13.155+07:00", + "LastSaveTime": "2025-06-05T16:46:49.335+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -12,9 +12,9 @@ "Prefs_SimPaused": false, "Prefs_SimTargetStepsPerSecond": 150, "Prefs_SimStepsPerClockTick": 6, - "StepsRanSinceCreated": 715372, + "StepsRanSinceCreated": 912542, "TimeSpentSinceCreated": { - "StartFrom": "01:40:50.2902316" + "StartFrom": "02:03:06.6299650" }, "AllCustomChipNames":[ "AND", @@ -116,12 +116,12 @@ "ChipCollections":[ { "Chips":["NAND","AND","NOT","NOR","XOR","OR","KEY","CLOCK","3-STATE BUFFER"], - "IsToggledOpen":true, + "IsToggledOpen":false, "Name":"BASICS" }, { "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], - "IsToggledOpen":true, + "IsToggledOpen":false, "Name":"IN/OUT" }, { From 937bd4090c0af71d7f2466f7298a95629ce190e4 Mon Sep 17 00:00:00 2001 From: Logic Mindful Date: Thu, 5 Jun 2025 22:02:23 +0200 Subject: [PATCH 092/124] Update .gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 94eef259..62c57e46 100644 --- a/.gitignore +++ b/.gitignore @@ -75,5 +75,4 @@ crashlytics-build.properties /.idea /.vsconfig -# Why not gitignore the f****** projectversion -ProjectSettings/ProjectVersion.txt +/TestData/* From 4f7f326bc62f4a0b884c113182f75205e2c613e8 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:28:03 +0200 Subject: [PATCH 093/124] Phew ! Merge + optimization! --- Assets/Scripts/Simulation/BitArrayHelper.cs | 105 ++++- Assets/Scripts/Simulation/PinStateValue.cs | 130 ++++-- Assets/Scripts/Simulation/Simulator.cs | 53 +-- ProjectSettings/ProjectSettings.asset | 5 +- .../Projects/MainTest/ProjectDescription.json | 6 +- .../Projects/test/Chips/MergeTestChip.json | 437 ++++++++++++++++++ .../Projects/test/ProjectDescription.json | 28 +- 7 files changed, 695 insertions(+), 69 deletions(-) create mode 100644 TestData/Projects/test/Chips/MergeTestChip.json diff --git a/Assets/Scripts/Simulation/BitArrayHelper.cs b/Assets/Scripts/Simulation/BitArrayHelper.cs index d4c40b14..588914db 100644 --- a/Assets/Scripts/Simulation/BitArrayHelper.cs +++ b/Assets/Scripts/Simulation/BitArrayHelper.cs @@ -24,6 +24,79 @@ public static class BitArrayHelper public static BitArray ShortMaskArray = new BitArray(new byte[] { 0b11111111, 0b11111111 }); public static BitArray IntMaskArray = new BitArray(new byte[] { 0b11111111, 0b11111111, 0b11111111, 0b11111111 }); + public static uint[] PreComputedUINTMasks = { + 0b0000_0000_0000_0000__0000_0000_0000_0000, + + 0b0000_0000_0000_0001__0000_0000_0000_0001, + 0b0000_0000_0000_0011__0000_0000_0000_0011, + 0b0000_0000_0000_0111__0000_0000_0000_0111, + 0b0000_0000_0000_1111__0000_0000_0000_1111, + + 0b0000_0000_0001_1111__0000_0000_0001_1111, + 0b0000_0000_0011_1111__0000_0000_0011_1111, + 0b0000_0000_0111_1111__0000_0000_0111_1111, + 0b0000_0000_1111_1111__0000_0000_1111_1111, + + 0b0000_0001_1111_1111__0000_0001_1111_1111, + 0b0000_0011_1111_1111__0000_0011_1111_1111, + 0b0000_0111_1111_1111__0000_0111_1111_1111, + 0b0000_1111_1111_1111__0000_1111_1111_1111, + + 0b0001_1111_1111_1111__0001_1111_1111_1111, + 0b0011_1111_1111_1111__0011_1111_1111_1111, + 0b0111_1111_1111_1111__0111_1111_1111_1111, + 0b1111_1111_1111_1111__1111_1111_1111_1111, + }; + + public static ushort[] PreComputedSHORTMasks = { + 0000_0000_0000_0000, + + 0b0000_0000_0000_0001, + 0b0000_0000_0000_0011, + 0b0000_0000_0000_0111, + 0b0000_0000_0000_1111, + + 0b0000_0000_0001_1111, + 0b0000_0000_0011_1111, + 0b0000_0000_0111_1111, + 0b0000_0000_1111_1111, + + 0b0000_0001_1111_1111, + 0b0000_0011_1111_1111, + 0b0000_0111_1111_1111, + 0b0000_1111_1111_1111, + + 0b0001_1111_1111_1111, + 0b0011_1111_1111_1111, + 0b0111_1111_1111_1111, + 0b1111_1111_1111_1111, + }; + + public static int[] PreComputedINTMasks = { + 0000_0000_0000_0000, + + 0b0000_0000_0000_0001, + 0b0000_0000_0000_0011, + 0b0000_0000_0000_0111, + 0b0000_0000_0000_1111, + + 0b0000_0000_0001_1111, + 0b0000_0000_0011_1111, + 0b0000_0000_0111_1111, + 0b0000_0000_1111_1111, + + 0b0000_0001_1111_1111, + 0b0000_0011_1111_1111, + 0b0000_0111_1111_1111, + 0b0000_1111_1111_1111, + + 0b0001_1111_1111_1111, + 0b0011_1111_1111_1111, + 0b0111_1111_1111_1111, + 0b1111_1111_1111_1111, + }; + + public static BitArray NonMutativeOR(BitArray A, BitArray B) { BitArray temp = new BitArray(A); @@ -154,7 +227,7 @@ public static ushort GetUShortAtIndexOfMaxLength(BitArray state, int index, int for (int i = index; i < len ; i++) { if (state.Get(i)) - n |= (ushort)(1 << i); + n |= (ushort)(1 << (i-index)); } return n; } @@ -166,7 +239,7 @@ public static uint GetUIntAtIndexOfMaxLength(BitArray state, int index, int maxL for (int i = index; i < len; i++) { if (state.Get(i)) - n |= (uint)(1 << i); + n |= (uint)(1 << (i - index)); } return n; } @@ -260,6 +333,34 @@ public static BitArray SetNBitsAtIndex(BitArray state, BitArray source, int inde return bitArray; } + public static void SetNBitsAtIndex(ref BitArray state, BitArray source, int index, int length) + { + int len = Mathf.Min(index + length, state.Length, index + source.Length); + for (int i = index; i < len; i++) + { + state.Set(i, source[i-index]); + } + } + + public static void SetUShortOfMaxLengthAtIndex(ref BitArray state, ushort value, int index, int length) + { + int len = Mathf.Min(index + length, state.Length, index + 16); + for(int i = index; i < len; i++) + { + state.Set(i, ((value >> (i-index)) & 1) == 1); + } + } + + public static void SetUIntOfMaxLengthAtIndex(ref BitArray state, uint value, int index, int length) + { + int len = Mathf.Min(index + length, state.Length, index + 32); + for (int i = index; i < len; i++) + { + state.Set(i, ((value >> (i - index)) & 1) == 1); + } + } + + public static void SetByteAtIndexWithLimit(ref BitArray state, int index, byte value, byte maxbits) diff --git a/Assets/Scripts/Simulation/PinStateValue.cs b/Assets/Scripts/Simulation/PinStateValue.cs index f40f0bf8..df702729 100644 --- a/Assets/Scripts/Simulation/PinStateValue.cs +++ b/Assets/Scripts/Simulation/PinStateValue.cs @@ -5,6 +5,7 @@ using JetBrains.Annotations; using Seb.Helpers; using UnityEngine; +using static UnityEngine.GraphicsBuffer; using static UnityEngine.Random; namespace DLS.Simulation @@ -69,19 +70,13 @@ public bool SmallHigh() public void SetAllDisconnected() { - if(size == 1) - { - a = 2; - return; - } - if(size <= 16) { a = 0xFFFF0000; return; } - if(size <= 32) + else if(size <= 32) { a = 0; b = new BitVector32(-1); @@ -125,7 +120,7 @@ public void SetFirstBit(bool firstBit) public void SetShortValue(ushort value) { - a = value | (a & 0xFFFF0000); + a = value| (a & 0xFFFF0000); } public void SetShortTristateAndValue(ushort tristate, ushort value) @@ -176,20 +171,17 @@ public uint GetValue() return BitArrayHelper.GetFirstUIntFromByteArray(BigValues); } - public ushort GetSmallTristatedValue() { - return (ushort)a; + return (ushort)((a & 1) | ((a >> 16) & 1) << 1); } public ushort GetTristatedValue(int index) { - if(size == 1) - { - return GetSmallTristatedValue(); + if (size == 1) { + GetSmallTristatedValue(); } - - else if (size <= 16) + if (size <= 16) { return GetShortBitTristatedValue(index); } @@ -361,32 +353,35 @@ public bool HandleConflicts(PinStateValue other) public void HandleShortSplit(ref SimPin[] targets) { int targetSize = targets[0].State.size; - int mask = (1 << (targetSize))-1; + uint fullMask = BitArrayHelper.PreComputedUINTMasks[targetSize]; + int offset = targets.Length - 1; + for (int i = 0; i < targets.Length; i++) { - targets[^(i+1)].State.a = (uint)(((GetShortValues() >> (i * targetSize) )& mask) | ((GetShortTristate() >> (i * targetSize)) & mask) << 16); + targets[offset - i].State.a = (a>>(i*targetSize)) & fullMask; } } public void HandleMediumSplit(ref SimPin[] targets) { int targetSize = targets[0].State.size; - int mask = (1 << (targetSize)) - 1; + uint mask = BitArrayHelper.PreComputedSHORTMasks[targetSize]; + int offset = targets.Length - 1; + for (int i = 0; i < targets.Length; i++) { - targets[^(i + 1)].State.a = ((uint)(a >> (i* targetSize) & mask)) | (uint)((b.Data>>(i*targetSize) & mask)<<16); + int off = (i * targetSize); + targets[offset - i].State.a = (uint)(((a>>off) & mask) | (((b.Data>>off) & mask) <<16)); } } public void HandleBigSplit(ref SimPin[] targets) { - int targetSize = targets[0].State.size; - BitArray mask = BitArrayHelper.TrueBitArray(targetSize - 1); - + int targetSize = targets[0].State.size; if (targetSize <= 16) { for (int i = 0; i < targets.Length; i++) { targets[^(i+1)].State.a = (uint)(BitArrayHelper.GetUShortAtIndexOfMaxLength(BigValues, i * targetSize, targetSize) - | BitArrayHelper.GetUShortAtIndexOfMaxLength(BigTristates, i * targetSize, targetSize) << 16); + | (BitArrayHelper.GetUShortAtIndexOfMaxLength(BigTristates, i * targetSize, targetSize) << 16)); } } @@ -394,8 +389,8 @@ public void HandleBigSplit(ref SimPin[] targets) { for (int i = 0; i < targets.Length; i++) { - targets[i].State.a = BitArrayHelper.GetUIntAtIndexOfMaxLength(BigValues, i * targetSize, targetSize); - targets[i].State.b = new BitVector32((int)BitArrayHelper.GetUIntAtIndexOfMaxLength(BigTristates, i * targetSize, targetSize)); + targets[^(i + 1)].State.a = BitArrayHelper.GetUIntAtIndexOfMaxLength(BigValues, i * targetSize, targetSize); + targets[^(i + 1)].State.b = new BitVector32((int)BitArrayHelper.GetUIntAtIndexOfMaxLength(BigTristates, i * targetSize, targetSize)); } } @@ -412,11 +407,92 @@ public void HandleBigSplit(ref SimPin[] targets) public void HandleSplit(ref SimPin[] targets) { - if (size <= 1) return; - else if (size <= 16) { HandleShortSplit(ref targets); } + if (size <= 16) { HandleShortSplit(ref targets); } else if (size <= 32) { HandleMediumSplit(ref targets); } else { HandleBigSplit(ref targets); } + + } + + + public void HandleShortMerge(SimPin[] sources) + { + int sourceSize = sources[0].State.size; + uint fullMask = BitArrayHelper.PreComputedUINTMasks[sourceSize]; + int offset = sources.Length - 1; + + a = sources[offset].State.a & fullMask; + + for (int i = 1; i < sources.Length; i++) + { + a = a | ( sources[offset - i].State.a & fullMask) << (i * sourceSize); + } + } + public void HandleMediumMerge(SimPin[] sources) + { + int sourceSize = sources[0].State.size; + uint mask = BitArrayHelper.PreComputedSHORTMasks[sourceSize]; + int offset = sources.Length - 1; + + + a = sources[offset].State.a & mask; + int tri = (int)(sources[offset].State.a >> 16 & mask); + + for (int i = 1; i < sources.Length; i++) + { + int shift = (i * sourceSize); + uint sourceState = sources[offset-i].State.a; + a |= (sourceState & mask) << shift; + tri |= (int)((sourceState >> 16)& mask) << shift; + } + + b = new BitVector32(tri); + } + + public void HandleBigMerge(SimPin[] sources) + { + int sourceSize = sources[0].State.size; // Always the same + BigValues = new BitArray(size); + BigTristates = BitArrayHelper.TrueBitArray(size); + + if (sourceSize <= 16) + { + uint mask = BitArrayHelper.PreComputedSHORTMasks[sourceSize]; + uint triMask = mask << 16; + for (int i = 0; i < sources.Length; i++) + { + uint sourceState = sources[^(i + 1)].State.a; + BitArrayHelper.SetUShortOfMaxLengthAtIndex(ref BigValues, (ushort)(sourceState & mask), (i * sourceSize), sourceSize); + BitArrayHelper.SetUShortOfMaxLengthAtIndex(ref BigTristates, (ushort)((sourceState & triMask)>>16), (i * sourceSize), sourceSize); + } + } + else if (sourceSize <= 32) + { + for (int i = 0; i < sources.Length; i++) + { + BitArrayHelper.SetUIntOfMaxLengthAtIndex(ref BigValues, sources[^(i + 1)].State.a, i * sourceSize, sourceSize); + BitArrayHelper.SetUIntOfMaxLengthAtIndex(ref BigTristates, (uint)sources[^(i + 1)].State.b.Data, i * sourceSize, sourceSize); + } + } + else + { + for (int i = 0; i < sources.Length; i++) + { + BitArrayHelper.SetNBitsAtIndex(ref BigValues, sources[^(i + 1)].State.BigValues, sourceSize * i, sourceSize); + BitArrayHelper.SetNBitsAtIndex(ref BigTristates, sources[^(i+1)].State.BigTristates, sourceSize * i, sourceSize); + } + } + } + + public void HandleMerge(SimPin[] sources) + { + if(size <= 16) { HandleShortMerge(sources); } + else if(size <= 32) { HandleMediumMerge(sources); } + else + { + HandleBigMerge(sources); + } + } } } \ No newline at end of file diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 20cbb79a..5347b2e2 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -238,7 +238,9 @@ static void ProcessBuiltinChip(SimChip chip) case ChipType.Nand: { uint nandOp = 1 ^ (chip.InputPins[0].State.a & chip.InputPins[1].State.a); + chip.OutputPins[0].State.a = (nandOp & 1); + break; } case ChipType.Clock: @@ -307,12 +309,10 @@ static void ProcessBuiltinChip(SimChip chip) case ChipType.TriStateBuffer: { - SimPin dataPin = chip.InputPins[0]; - SimPin enablePin = chip.InputPins[1]; SimPin outputPin = chip.OutputPins[0]; - if (enablePin.State.SmallHigh()) outputPin.State = dataPin.State; - else outputPin.State.a = 2; + if (chip.InputPins[1].State.SmallHigh()) outputPin.State = chip.InputPins[0].State; + else outputPin.State.a = 0b_0000_0000_0000_0001___0000_0000_0000_0000; break; } @@ -326,12 +326,7 @@ static void ProcessBuiltinChip(SimChip chip) { const uint addressSpace = 256; uint addressPin = chip.InputPins[0].State.GetShortValues(); - uint redPin = chip.InputPins[1].State.GetShortValues(); - uint greenPin = chip.InputPins[2].State.GetShortValues(); - uint bluePin = chip.InputPins[3].State.GetShortValues(); - bool resetPin = chip.InputPins[4].State.SmallHigh(); bool writePin = chip.InputPins[5].State.SmallHigh(); - bool refreshPin = chip.InputPins[6].State.SmallHigh(); bool clockPin = chip.InputPins[7].State.SmallHigh(); bool isRisingEdge = clockPin && chip.InternalState[^1] == 0; @@ -340,7 +335,7 @@ static void ProcessBuiltinChip(SimChip chip) if (isRisingEdge) { // Clear back buffer - if (resetPin) + if (chip.InputPins[4].State.SmallHigh()) { for (int i = 0; i < addressSpace; i++) { @@ -350,13 +345,12 @@ static void ProcessBuiltinChip(SimChip chip) // Write to back-buffer else if (writePin) { - uint addressIndex = addressPin + addressSpace; - uint data = (uint)(redPin | (greenPin << 4) | (bluePin << 8)); - chip.InternalState[addressIndex] = data; + uint data = (chip.InputPins[1].State.GetShortValues() | (chip.InputPins[2].State.GetShortValues() << 4) | (chip.InputPins[3].State.GetShortValues() << 8)); + chip.InternalState[addressPin + addressSpace] = data; } // Copy back-buffer to display buffer - if (refreshPin) + if (chip.InputPins[6].State.SmallHigh()) { for (int i = 0; i < addressSpace; i++) { @@ -378,10 +372,6 @@ static void ProcessBuiltinChip(SimChip chip) { const uint addressSpace = 256; uint addressPin = chip.InputPins[0].State.GetShortValues(); - bool pixelInputPin = chip.InputPins[1].State.SmallHigh(); - bool resetPin = chip.InputPins[2].State.SmallHigh(); - bool writePin = chip.InputPins[3].State.SmallHigh(); - bool refreshPin = chip.InputPins[4].State.SmallHigh(); bool clockPin = chip.InputPins[5].State.SmallHigh(); // Detect clock rising edge @@ -391,7 +381,7 @@ static void ProcessBuiltinChip(SimChip chip) if (isRisingEdge) { // Clear back buffer - if (resetPin) + if (chip.InputPins[2].State.SmallHigh()) { for (int i = 0; i < addressSpace; i++) { @@ -399,15 +389,14 @@ static void ProcessBuiltinChip(SimChip chip) } } // Write to back-buffer - else if (writePin) + else if (chip.InputPins[3].State.SmallHigh()) { - uint addressIndex = addressPin + addressSpace; - uint data = (uint)(pixelInputPin ? 1 : 0); - chip.InternalState[addressIndex] = data; + uint data = (uint)(chip.InputPins[1].State.SmallHigh() ? 1 : 0); + chip.InternalState[addressPin + addressSpace] = data; } // Copy back-buffer to display buffer - if (refreshPin) + if (chip.InputPins[4].State.SmallHigh()) { for (int i = 0; i < addressSpace; i++) { @@ -417,8 +406,7 @@ static void ProcessBuiltinChip(SimChip chip) } // Output current pixel colour - uint pixelState = chip.InternalState[addressPin]; - chip.OutputPins[0].State.SmallSet(pixelState); + chip.OutputPins[0].State.SmallSet(chip.InternalState[addressPin]); break; } case ChipType.dev_Ram_8Bit: @@ -459,8 +447,8 @@ static void ProcessBuiltinChip(SimChip chip) uint address = chip.InputPins[0].State.GetShortValues(); uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShort((ushort)(data << 8)); - chip.OutputPins[1].State.SetShort((ushort)data); + chip.OutputPins[0].State.SetShort((ushort)((data&0xFF00) >> 8)); + chip.OutputPins[1].State.SetShort((ushort)(data& 0x00FF)); break; } @@ -487,8 +475,8 @@ static void ProcessBuiltinChip(SimChip chip) uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShort((ushort)(data << 8)); - chip.OutputPins[1].State.SetShort((ushort)(data << 0)); + chip.OutputPins[0].State.SetShort((ushort)((data & 0xFF00) >> 8)); + chip.OutputPins[1].State.SetShort((ushort)(data & 0x00FF)); break; } @@ -512,6 +500,11 @@ static void ProcessBuiltinChip(SimChip chip) break; } + case ChipType.Merge_Pin: + { + chip.OutputPins[0].State.HandleMerge(chip.InputPins); + break; + } // ---- Bus types ---- default: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 9a58c4fb..bfcd58fe 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -714,13 +714,14 @@ PlayerSettings: webGLWebAssemblyBigInt: 0 webGLCloseOnQuit: 0 webWasm2023: 0 - scriptingDefineSymbols: {} + scriptingDefineSymbols: + Standalone: additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: Standalone: 1 il2cppCompilerConfiguration: - Standalone: 1 + Standalone: 2 il2cppCodeGeneration: Standalone: 0 il2cppStacktraceInformation: {} diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 62788a58..c76a7ea7 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,14 +4,14 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-04T20:26:38.192+02:00", + "LastSaveTime": "2025-06-07T13:27:37.756+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 100, + "Prefs_SimTargetStepsPerSecond": 10000000, "Prefs_SimStepsPerClockTick": 6, "AllCustomChipNames":[ "AND", @@ -166,7 +166,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","#","BuzzTest","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","ConstTest"], "IsToggledOpen":true, "Name":"OTHER" } diff --git a/TestData/Projects/test/Chips/MergeTestChip.json b/TestData/Projects/test/Chips/MergeTestChip.json new file mode 100644 index 00000000..7ed05959 --- /dev/null +++ b/TestData/Projects/test/Chips/MergeTestChip.json @@ -0,0 +1,437 @@ +{ + "DLSVersion": "2.1.6", + "Name": "MergeTestChip", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 2.075, + "y": 7.0 + }, + "Colour": { + "r": 0.8262435, + "g": 0.120347567, + "b": 0.5926981, + "a": 1 + }, + "InputPins":[ + { + "Name":"OUT", + "ID":1039825680, + "Position":{ + "x":-15.2975, + "y":-0.02996 + }, + "BitCount":"128", + "Colour":0, + "ValueDisplayMode":0 + } + ], + "OutputPins":[ + { + "Name":"IN", + "ID":1396246340, + "Position":{ + "x":33.9225, + "y":0.25 + }, + "BitCount":"128", + "Colour":0, + "ValueDisplayMode":0 + } + ], + "SubChips":[ + { + "Name":"128-64BIT", + "ID":2107078314, + "Label":"", + "Position":{ + "x":-4.2525, + "y":-0.14541 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], + "InternalData":null + }, + { + "Name":"64-32BIT", + "ID":1114783706, + "Label":"", + "Position":{ + "x":2.6821, + "y":1.90363 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], + "InternalData":null + }, + { + "Name":"64-16BIT", + "ID":942558436, + "Label":"", + "Position":{ + "x":2.6725, + "y":-1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], + "InternalData":null + }, + { + "Name":"16-64BIT", + "ID":1915053319, + "Label":"", + "Position":{ + "x":18.5475, + "y":-1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], + "InternalData":null + }, + { + "Name":"32-64BIT", + "ID":1797244266, + "Label":"", + "Position":{ + "x":18.5475, + "y":1.875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"64-128BIT", + "ID":635399602, + "Label":"", + "Position":{ + "x":26.7475, + "y":0.19729 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"32-16BIT", + "ID":823418772, + "Label":"", + "Position":{ + "x":5.9225, + "y":1.1875 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], + "InternalData":null + }, + { + "Name":"16-32BIT", + "ID":1630164785, + "Label":"", + "Position":{ + "x":15.0475, + "y":1.125 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + }, + { + "Name":"16-4BIT", + "ID":2049001141, + "Label":"", + "Position":{ + "x":8.48459, + "y":1.33853 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], + "InternalData":null + }, + { + "Name":"4-16BIT", + "ID":971537629, + "Label":"", + "Position":{ + "x":10.40326, + "y":1.31041 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], + "InternalData":null + } + ], + "Wires":[ + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":2107078314 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1114783706 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":2107078314 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":942558436 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1797244266 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":635399602 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":1915053319 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":635399602 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":635399602 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1396246340 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":0, + "PinOwnerID":1039825680 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2107078314 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":1114783706 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":823418772 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":823418772 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":2049001141 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1114783706 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1797244266 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":2049001141 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":971537629 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":2049001141 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":971537629 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":2049001141 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":971537629 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":2049001141 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":971537629 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":971537629 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1630164785 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":823418772 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1630164785 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":7.4375,"y":0.75},{"x":7.4375,"y":-0.25},{"x":13.625,"y":-0.25},{"x":13.625,"y":0.875},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":1630164785 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1797244266 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":4, + "PinOwnerID":942558436 + }, + "TargetPinAddress":{ + "PinID":3, + "PinOwnerID":1915053319 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.8125,"y":-0.5625},{"x":5.8125,"y":-1.3125},{"x":15.6875,"y":-1.3125},{"x":15.6875,"y":-0.5625},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":3, + "PinOwnerID":942558436 + }, + "TargetPinAddress":{ + "PinID":2, + "PinOwnerID":1915053319 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":5.0625,"y":-1.25},{"x":5.0625,"y":-2.1875},{"x":16.375,"y":-2.1875},{"x":16.375,"y":-1.4375},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":2, + "PinOwnerID":942558436 + }, + "TargetPinAddress":{ + "PinID":1, + "PinOwnerID":1915053319 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":4.375,"y":-2.3125},{"x":4.375,"y":-2.9375},{"x":17.25,"y":-2.9375},{"x":17.25,"y":-2.25},{"x":0.0,"y":0.0}] + }, + { + "SourcePinAddress":{ + "PinID":1, + "PinOwnerID":942558436 + }, + "TargetPinAddress":{ + "PinID":0, + "PinOwnerID":1915053319 + }, + "ConnectionType":0, + "ConnectedWireIndex":-1, + "ConnectedWireSegmentIndex":-1, + "Points":[{"x":0.0,"y":0.0},{"x":3.6875,"y":-3.125},{"x":3.6875,"y":-4.0},{"x":17.3125,"y":-4.0},{"x":17.3125,"y":-3.1875},{"x":0.0,"y":0.0}] + } + ], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/test/ProjectDescription.json b/TestData/Projects/test/ProjectDescription.json index 01313a39..e13a9612 100644 --- a/TestData/Projects/test/ProjectDescription.json +++ b/TestData/Projects/test/ProjectDescription.json @@ -4,19 +4,20 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-19T11:48:01.969+02:00", - "LastSaveTime": "2025-06-04T22:20:48.944+02:00", + "LastSaveTime": "2025-06-07T15:26:29.796+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000000000, + "Prefs_SimTargetStepsPerSecond": 100000000, "Prefs_SimStepsPerClockTick": 250, "AllCustomChipNames":[ "128Nand", "2NAND", - "4nand" + "4nand", + "MergeTestChip" ], "StarredList":[ { @@ -38,6 +39,10 @@ { "Name":"4nand", "IsCollection":false + }, + { + "Name":"MergeTestChip", + "IsCollection":false } ], "ChipCollections":[ @@ -72,7 +77,7 @@ "Name":"MEMORY" }, { - "Chips":["BUTTON","DIPSWITCH","CONST","RAM-8","BUZZER","128Nand","IN-32","OUT-32","IN-16","OUT-16","IN-24","OUT-24","IN-128","OUT-128","IN-1024","OUT-1024","IN-20736000","OUT-20736000","IN-345600","OUT-345600","IN-15","OUT-15","4-16BIT","16-4BIT","16-32BIT","32-16BIT","2NAND","4nand"], + "Chips":["BUTTON","DIPSWITCH","CONST","RAM-8","BUZZER","128Nand","IN-32","OUT-32","IN-16","OUT-16","IN-24","OUT-24","IN-128","OUT-128","IN-1024","OUT-1024","IN-20736000","OUT-20736000","IN-345600","OUT-345600","IN-15","OUT-15","4-16BIT","16-4BIT","16-32BIT","32-16BIT","2NAND","4nand","IN-64","OUT-64","64-128BIT","128-64BIT","32-64BIT","64-32BIT","16-64BIT","64-16BIT","MergeTestChip"], "IsToggledOpen":true, "Name":"OTHER" } @@ -86,7 +91,8 @@ "24", "128", "1024", - "15" + "15", + "64" ], "SplitMergePairs":[ { @@ -108,6 +114,18 @@ { "Key":"32", "Value":"16" + }, + { + "Key":"128", + "Value":"64" + }, + { + "Key":"64", + "Value":"32" + }, + { + "Key":"64", + "Value":"16" } ] } \ No newline at end of file From 7588c5c19148ad4c2ec38d66f2e0aeaecf3b7cbe Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:32:31 +0200 Subject: [PATCH 094/124] BitArrayHelper cleanup --- Assets/Scripts/Game/Elements/PinInstance.cs | 4 +- Assets/Scripts/Simulation/BitArrayHelper.cs | 287 -------------------- Assets/Scripts/Simulation/PinStateValue.cs | 4 - 3 files changed, 2 insertions(+), 293 deletions(-) diff --git a/Assets/Scripts/Game/Elements/PinInstance.cs b/Assets/Scripts/Game/Elements/PinInstance.cs index bef5938b..97819fc5 100644 --- a/Assets/Scripts/Game/Elements/PinInstance.cs +++ b/Assets/Scripts/Game/Elements/PinInstance.cs @@ -76,8 +76,8 @@ public Color GetStateCol(int bitIndex, bool hover = false, bool canUsePlayerStat { PinStateValue pinState = (IsSourcePin && canUsePlayerState) ? PlayerInputState : State; // dev input pin uses player state (so it updates even when sim is paused) uint state = pinState.GetTristatedValue(bitIndex); - if (state == BitArrayHelper.LogicDisconnected) return DrawSettings.ActiveTheme.StateDisconnectedCol; - return DrawSettings.GetStateColour(state == BitArrayHelper.LogicHigh, (uint)Colour, hover); + if (state == PinStateValue.LOGIC_DISCONNECTED) return DrawSettings.ActiveTheme.StateDisconnectedCol; + return DrawSettings.GetStateColour(state == PinStateValue.LOGIC_HIGH, (uint)Colour, hover); } diff --git a/Assets/Scripts/Simulation/BitArrayHelper.cs b/Assets/Scripts/Simulation/BitArrayHelper.cs index 588914db..7abdf2a8 100644 --- a/Assets/Scripts/Simulation/BitArrayHelper.cs +++ b/Assets/Scripts/Simulation/BitArrayHelper.cs @@ -10,20 +10,6 @@ namespace DLS.Simulation // Tristate flags (most significant 16 bits) | Bit states (least significant 16 bits) public static class BitArrayHelper { - // Each bit has three possible states (tri-state logic): - public const ushort LogicLow = 0; - public const ushort LogicHigh = 1; - public const ushort LogicDisconnected = 2; - - - // Mask for single bit value (bit state, and tristate flag) - public const uint SingleBitMask = 1 | (1 << 16); - - public static BitArray NibbleMaskArray = new BitArray(new byte[] { 0b1111}); - public static BitArray ByteMaskArray = new BitArray(new byte[] { 0b11111111 }); - public static BitArray ShortMaskArray = new BitArray(new byte[] { 0b11111111, 0b11111111 }); - public static BitArray IntMaskArray = new BitArray(new byte[] { 0b11111111, 0b11111111, 0b11111111, 0b11111111 }); - public static uint[] PreComputedUINTMasks = { 0b0000_0000_0000_0000__0000_0000_0000_0000, @@ -124,101 +110,6 @@ public static BitArray TrueBitArray(int length) array.SetAll(true); return array; } - public static BitArray FalseBitArray(int length) - { - BitArray array = new BitArray(length); - array.SetAll(false); - return array; - } - - public static BitArray GetBitStates(BitArray state) { - return GetFirstNBits(state, state.Length>>1); - } - - public static BitArray GetTristateFlags(BitArray state) - { - BitArray array = new BitArray(state).RightShift(state.Length >> 1); - return GetFirstNBits(array, array.Length >> 1); - } - - public static BitArray Concatenate(BitArray a, BitArray b) - { - BitArray newBitArray = SetNBitsAtIndex(a, b, a.Length); - return newBitArray; - } - - public static void Set(ref BitArray state, BitArray bitStates, BitArray tristateFlags) - { - state = Concatenate(bitStates, tristateFlags); - } - - - - public static void Set(ref BitArray state, BitArray other) - { - state = other; - } - - public static ushort GetBitTristatedValue(BitArray state, int bitIndex) - { - if(state is null || state.Length<=1) return LogicDisconnected; - bool bitState = GetBitStates(state).Get(bitIndex); - bool tri = GetTristateFlags(state).Get(bitIndex); - return (ushort)(bitState ? 1 : tri ? 2 : 0); // Combine to form tri-stated value: 0 = LOW, 1 = HIGH, 2 = DISCONNECTED - } - - public static bool FirstBitHigh(BitArray state) { - if (state.Length <=0) return false; - return state.Get(0); - } - - public static BitArray GetFirstNBits(BitArray state, int length) - { - int len = Math.Min(length, state.Count); - BitArray n = new BitArray(length); - for (byte i = 0; i < len; i++) - { - n.Set(i, state[i]); - } - return n; - } - - - public static byte GetFirstByteFromByteArray(BitArray state) - { - int len = Math.Min(8, state.Count); - byte n = 0; - for (byte i = 0; i < len; i++) - { - if (state.Get(i)) - n |= (byte)(1 << i); - } - return n; - } - - public static byte GetFirstOfMaxLengthFromByteArray(BitArray state, int maxLength) - { - int len = Math.Min(maxLength, state.Count); - byte n = 0; - for (byte i = 0; i < len; i++) - { - if (state.Get(i)) - n |= (byte)(1 << i); - } - return n; - } - - public static ushort GetFirstUShortFromByteArray(BitArray state) - { - int len = Math.Min(16, state.Count); - ushort n = 0; - for (byte i = 0; i < len; i++) - { - if (state.Get(i)) - n |= (ushort)(1 << i); - } - return n; - } public static ushort GetUShortAtIndexOfMaxLength(BitArray state, int index, int maxLength) { @@ -257,51 +148,6 @@ public static uint GetFirstUIntFromByteArray(BitArray state) return n; } - - public static byte GetByteOfMaxLengthStartingAtIndex(BitArray state, int index, int maxByteLength) // Gets the byte that starts at bit Index (ex GetByteStartingAtIndex(0b1001000111111111, 8) -> 0b10010001 - { - return GetFirstOfMaxLengthFromByteArray(state.RightShift(index).And(ByteMaskArray), maxByteLength); - } - - public static byte GetByteStartingAtIndex(BitArray state, int index) // Gets the byte that starts at bit Index (ex GetByteStartingAtIndex(0b1001000111111111, 8) -> 0b10010001 - { - return GetFirstByteFromByteArray(state.RightShift(index).And(ByteMaskArray)); - } - - public static ushort GetShortStartingAtIndex(BitArray state, int index) - { - return GetFirstUShortFromByteArray(state.RightShift(index).And(ShortMaskArray)); - } - - public static uint GetIntStartingAtIndex(BitArray state, int index) - { - return GetFirstUIntFromByteArray(state.RightShift(index).And(IntMaskArray)); - } - - public static byte[] GetByteArrayStartingAtIndex(BitArray state, int index, int length) - { - byte[] bytes = new byte[length]; - - for (int i = 0; i <= length; i++) - { - bytes[i] = GetByteStartingAtIndex(state, index + (i << 3)); - } - - return bytes; - } - - public static byte[] GetByteArrayOfMaxLengthStartingAtIndex(BitArray state, int index, int length, int maxByteLength) - { - byte[] bytes = new byte[length]; - - for (int i = 0; i <= length; i++) - { - bytes[i] = GetByteOfMaxLengthStartingAtIndex(state, index + (i * maxByteLength), maxByteLength); - } - - return bytes; - } - public static BitArray GetBitArrayOfMaxLengthStartingAtIndex(BitArray state, int index, int length) { BitArray bitArray = new BitArray(length); @@ -313,26 +159,6 @@ public static BitArray GetBitArrayOfMaxLengthStartingAtIndex(BitArray state, int return bitArray; } - - public static void SetBitAtIndex(ref BitArray state, int index, bool value) - { - state.Set(index, value); - } - - public static BitArray SetNBitsAtIndex(BitArray state, BitArray source, int index) - { - BitArray bitArray = new BitArray(Mathf.Max(state.Length, source.Length + index)); - for (int i = 0; i < state.Length; i++) - { - bitArray.Set(i, state[i]); - } - for (int i = 0; i < source.Length; i++) - { - bitArray.Set(index + i, source[i]); - } - return bitArray; - } - public static void SetNBitsAtIndex(ref BitArray state, BitArray source, int index, int length) { int len = Mathf.Min(index + length, state.Length, index + source.Length); @@ -360,118 +186,5 @@ public static void SetUIntOfMaxLengthAtIndex(ref BitArray state, uint value, int } } - - - - public static void SetByteAtIndexWithLimit(ref BitArray state, int index, byte value, byte maxbits) - { - byte max = Math.Min(maxbits, (byte)8); - for (int i = 0; i < max; i++) - { - state.Set(index + i, ((value >> i) & 1) == 1); - } - } - - public static void SetByteAtIndexWithlimitNoReplace(ref BitArray state, int index, byte value, byte maxbits) - { - byte max = Math.Min(maxbits, (byte)8); - for (int i = 0; i < max; i++) - { - bool set = ((value >> i) & 1) == 1; - if (set) state.Set(index + i, true); - } - } - - - public static void SetShortAtIndex(ref BitArray state, int index, ushort value) - { - for (int i = 0; i < 16; i++) - { - state.Set(index + i, ((value >> i) & 1) == 1); - } - } - - public static void SetIntAtIndex(ref BitArray state, int index, uint value) - { - for (int i = 0; i < 32; i++) - { - state.Set(index + i, ((value >> i) & 1) == 1); - } - } - - public static void SetByteArrayAtIndex (ref BitArray state, int index, byte[] value) - { - for(int i = 0; i < value.Length; i++) - { - SetByteAtIndexWithLimit(ref state, index + (i<<3), value[i], 8); - } - } - - public static void SetByteArrayAtIndexWithLimit(ref BitArray state, int index, byte[] value, byte limit) - { - for (int i = 0; i < value.Length; i++) - { - SetByteAtIndexWithLimit(ref state, index + (i * limit), value[i], limit); - } - } - - public static void MergeManyToOne(ref BitArray target, BitArray[] source) - { - BitArray tValue = new BitArray(target.Length); - BitArray tTristate = GetTristateFlags(target); - int sourceLength = source[0].Length >> 1; // Same one everywhere - for (int i = 0; i < source.Length; i++) { - tValue = tValue.Or(GetBitStates(source[i]).LeftShift(i*sourceLength)); - tTristate = tTristate.Or(GetTristateFlags(source[i]).LeftShift(i * sourceLength)); - - } - Set(ref target, tValue, tTristate); - } - - public static void SplitOneToMany(ref BitArray[] target, BitArray source) - { - int sourceLength = source.Length >> 1; // Divide by two (because half the array is dedicated to tristate) - int targetArrayCount = target.Length; // Take the amount of bitarrays. - int bitArrayLength = target[0].Length >> 1; //Same for any one. - int sizeofvaluebytearray = bitArrayLength / 8 + (bitArrayLength % 8 == 0 ? 0 : 1); - - for (int i = 0; i <= targetArrayCount; i++) - { - byte[] valueByteArray = new byte[sizeofvaluebytearray]; - byte[] tristateArray = new byte[sizeofvaluebytearray]; - - valueByteArray = GetByteArrayOfMaxLengthStartingAtIndex(source, i * sizeofvaluebytearray * bitArrayLength, valueByteArray.Length, bitArrayLength); - SetByteArrayAtIndexWithLimit(ref target[i], 0, valueByteArray, (byte)bitArrayLength); - - tristateArray = GetByteArrayOfMaxLengthStartingAtIndex(source, sourceLength + i * sizeofvaluebytearray * bitArrayLength, valueByteArray.Length, bitArrayLength); - SetByteArrayAtIndexWithLimit(ref target[i], bitArrayLength , valueByteArray, (byte)bitArrayLength); - } - } - - - public static void Toggle(ref BitArray state, int bitIndex) - { - UnityEngine.Debug.Log("State length : " + state.Length + "\n BitIndex : " + bitIndex); - BitArray bitStates = GetBitStates(state); - bitStates.Set(bitIndex, !bitStates[bitIndex]); - UnityEngine.Debug.Log("bitstate" + bitStates.Get(0)); - - // Clear tristate flags (can't be disconnected if toggling as only input dev pins are allowed) - Set(ref state, bitStates, FalseBitArray(bitStates.Length)); - UnityEngine.Debug.Log("state" + state.Get(0)); - - } - - public static void SetAllDisconnected(ref BitArray state, int length) - { - if(state == null) { state = new BitArray(length); } - BitArray bitStates = new BitArray(state.Length >> 1); - bitStates.SetAll(false); - BitArray tristates = new BitArray(state.Length >> 1); - tristates.SetAll(true); - - - Set(ref state, bitStates, tristates); - } } } \ No newline at end of file diff --git a/Assets/Scripts/Simulation/PinStateValue.cs b/Assets/Scripts/Simulation/PinStateValue.cs index df702729..deec07d9 100644 --- a/Assets/Scripts/Simulation/PinStateValue.cs +++ b/Assets/Scripts/Simulation/PinStateValue.cs @@ -2,10 +2,6 @@ using System.Collections; using System.Collections.Specialized; using DLS.Description; -using JetBrains.Annotations; -using Seb.Helpers; -using UnityEngine; -using static UnityEngine.GraphicsBuffer; using static UnityEngine.Random; namespace DLS.Simulation From 80fc1c1617b48a1812121db277a8f2d8b3eff4d6 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Sat, 7 Jun 2025 17:22:40 +0200 Subject: [PATCH 095/124] Order fix for compatibility between versions --- Assets/Scripts/Game/Project/BuiltinChipCreator.cs | 10 ++-------- TestData/Projects/MainTest/ProjectDescription.json | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index a00486f2..54127b98 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -100,20 +100,14 @@ static ChipDescription[] CreateSplitMergePins(List Date: Sat, 7 Jun 2025 20:19:42 +0200 Subject: [PATCH 096/124] Default chip collections for default pin/merge/split/bus --- .../Description/Helpers/ChipTypeHelper.cs | 35 +++--- .../Description/Types/ProjectDescription.cs | 12 ++ .../Description/Types/SubTypes/ChipTypes.cs | 8 +- .../Interaction/ChipInteractionController.cs | 3 +- .../Game/Project/BuiltinChipCreator.cs | 118 ++++++++---------- .../Game/Project/BuiltinCollectionCreator.cs | 45 +++++-- Assets/Scripts/Game/Project/ChipLibrary.cs | 13 ++ .../a/ProjectDescription.json | 83 ++++++++++++ .../aa/ProjectDescription.json | 83 ++++++++++++ .../coltest/ProjectDescription.json | 78 ++++++++++++ TestData/Projects/ge/ProjectDescription.json | 78 ++++++++++++ .../Projects/test/ProjectDescription.json | 2 +- TestData/Projects/za/ProjectDescription.json | 78 ++++++++++++ 13 files changed, 531 insertions(+), 105 deletions(-) create mode 100644 TestData/Deleted Projects/a/ProjectDescription.json create mode 100644 TestData/Deleted Projects/aa/ProjectDescription.json create mode 100644 TestData/Deleted Projects/coltest/ProjectDescription.json create mode 100644 TestData/Projects/ge/ProjectDescription.json create mode 100644 TestData/Projects/za/ProjectDescription.json diff --git a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs index 96be7575..880a2286 100644 --- a/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs +++ b/Assets/Scripts/Description/Helpers/ChipTypeHelper.cs @@ -35,13 +35,6 @@ public static class ChipTypeHelper { ChipType.Button, "BUTTON" }, { ChipType.Toggle, "DIPSWITCH" }, - // ---- Buses ---- - { ChipType.Bus_1Bit, "BUS-1" }, - { ChipType.Bus_4Bit, "BUS-4" }, - { ChipType.Bus_8Bit, "BUS-8" }, - { ChipType.BusTerminus_1Bit, "BUS-TERMINUS-1" }, - { ChipType.BusTerminus_4Bit, "BUS-TERMINUS-4" }, - { ChipType.BusTerminus_8Bit, "BUS-TERMINUS-8" } }; @@ -49,23 +42,12 @@ public static class ChipTypeHelper public static bool IsBusType(ChipType type) => IsBusOriginType(type) || IsBusTerminusType(type); - public static bool IsBusOriginType(ChipType type) => type is ChipType.Bus_1Bit or ChipType.Bus_4Bit or ChipType.Bus_8Bit; + public static bool IsBusOriginType(ChipType type) => type is ChipType.Bus; - public static bool IsBusTerminusType(ChipType type) => type is ChipType.BusTerminus_1Bit or ChipType.BusTerminus_4Bit or ChipType.BusTerminus_8Bit; + public static bool IsBusTerminusType(ChipType type) => type is ChipType.BusTerminus; public static bool IsRomType(ChipType type) => type == ChipType.Rom_256x16 || type == ChipType.EEPROM_256x16; - public static ChipType GetCorrespondingBusTerminusType(ChipType type) - { - return type switch - { - ChipType.Bus_1Bit => ChipType.BusTerminus_1Bit, - ChipType.Bus_4Bit => ChipType.BusTerminus_4Bit, - ChipType.Bus_8Bit => ChipType.BusTerminus_8Bit, - _ => throw new Exception("No corresponding bus terminus found for type: " + type) - }; - } - public static (bool isInput, bool isOutput, PinBitCount numBits) IsInputOrOutputPin(ChipDescription chip) { return chip.ChipType switch @@ -81,7 +63,18 @@ public static string GetDevPinName(bool isInput, PinBitCount numBits) return (isInput ? "IN-" : "OUT-") + numBits.BitCount.ToString(); } - public static bool IsDevPin(ChipType chipType) + public static string GetBusName(PinBitCount numBits) + { + return "BUS-" + numBits.ToString(); + } + + public static string GetBusTerminusName(PinBitCount numBits) + { + return "BUS-TERMINUS-" + numBits.ToString(); + } + + + public static bool IsDevPin(ChipType chipType) { return chipType == ChipType.In_Pin || chipType == ChipType.Out_Pin; } diff --git a/Assets/Scripts/Description/Types/ProjectDescription.cs b/Assets/Scripts/Description/Types/ProjectDescription.cs index ad594b87..ebce24aa 100644 --- a/Assets/Scripts/Description/Types/ProjectDescription.cs +++ b/Assets/Scripts/Description/Types/ProjectDescription.cs @@ -46,6 +46,18 @@ public bool IsStarred(string chipName, bool isCollection) return false; } + + public void AddChipToCollection(string collectionName, string chipName) { + if(collectionName == null) throw new ArgumentNullException(collectionName); + foreach(ChipCollection collection in ChipCollections) + { + if(collection.Name.Equals(chipName, StringComparison.OrdinalIgnoreCase)) + { + collection.Chips.Add(chipName); + } + } + + } } public struct StarredItem diff --git a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs index c552b185..87265d32 100644 --- a/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs +++ b/Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs @@ -37,12 +37,8 @@ public enum ChipType Constant_8Bit, // ---- Buses ---- - Bus_1Bit, - BusTerminus_1Bit, - Bus_4Bit, - BusTerminus_4Bit, - Bus_8Bit, - BusTerminus_8Bit, + Bus, + BusTerminus, // ---- Audio ---- Buzzer diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index bedb13bf..ff61ccb7 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -929,8 +929,7 @@ void StartPlacing(IMoveable elementToPlace, Vector2 position, bool isDuplicating { elementToPlace.MoveStartPosition -= Vector2.right * busPairSpacing / 2; - ChipType terminusType = ChipTypeHelper.GetCorrespondingBusTerminusType(chipType); - ChipDescription terminusDescription = Project.ActiveProject.chipLibrary.GetChipDescription(ChipTypeHelper.GetName(terminusType)); + ChipDescription terminusDescription = Project.ActiveProject.chipLibrary.GetTerminusDescription(((SubChipInstance)elementToPlace).OutputPins[0].bitCount); SubChipInstance terminus = (SubChipInstance)StartPlacing(terminusDescription, position, false); SubChipInstance busOrigin = (SubChipInstance)elementToPlace; diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 54127b98..924de9bf 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using DLS.Description; +using DLS.Simulation; using UnityEngine; using static DLS.Graphics.DrawSettings; @@ -42,42 +43,47 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript CreateDisplayRGB(), CreateDisplayDot(), CreateDisplayLED(), - // ---- Bus ---- - CreateBus((PinBitCount) PinBitCount.Bit1), - CreateBusTerminus((PinBitCount) PinBitCount.Bit1), - CreateBus((PinBitCount) PinBitCount.Bit4), - CreateBusTerminus((PinBitCount) PinBitCount.Bit4), - CreateBus((PinBitCount) PinBitCount.Bit8), - CreateBusTerminus((PinBitCount) PinBitCount.Bit8), // ---- Audio ---- CreateBuzzer() } .Concat(CreateInOutPins(description.pinBitCounts)) .Concat(CreateSplitMergePins(description.SplitMergePairs)) - + .Concat(CreateBusAndBusTerminus(description.pinBitCounts)) + .ToArray(); } static ChipDescription[] CreateInOutPins(List pinBitCountsToLoad) { ChipDescription[] DevPinDescriptions = new ChipDescription[pinBitCountsToLoad.Count * 2]; + for (int i = 0; i < pinBitCountsToLoad.Count; i++) { PinBitCount pinBitCount = pinBitCountsToLoad[i]; - PinDescription[] outPin = new[] { CreatePinDescription("OUT", 0, pinBitCount) }; - PinDescription[] inPin = new[] { CreatePinDescription("IN", 0, pinBitCount)}; + PinDescription[] outPin = new[] { CreatePinDescription("OUT", 0, pinBitCount) }; - ChipDescription InChip = CreateBuiltinChipDescription(ChipType.In_Pin, Vector2.zero, Color.clear, null, outPin, null, + + ChipDescription InChip = CreateBuiltinChipDescription(ChipType.In_Pin, Vector2.zero, Color.clear, null, outPin, null, NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(true, pinBitCount)); - ChipDescription OutChip = CreateBuiltinChipDescription(ChipType.Out_Pin, Vector2.zero, Color.clear, inPin, null, null, - NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(false, pinBitCount)); DevPinDescriptions[i * 2] = InChip; + + } + + for (int i = 0; i < pinBitCountsToLoad.Count; i++) + { + PinBitCount pinBitCount = pinBitCountsToLoad[i]; + PinDescription[] inPin = new[] { CreatePinDescription("IN", 0, pinBitCount) }; + + ChipDescription OutChip = CreateBuiltinChipDescription(ChipType.Out_Pin, Vector2.zero, Color.clear, inPin, null, null, + NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(false, pinBitCount)); + DevPinDescriptions[i * 2 + 1] = OutChip; + } - return DevPinDescriptions; + return DevPinDescriptions; } static ChipDescription[] CreateSplitMergePins(List> pairs) @@ -116,14 +122,34 @@ static ChipDescription[] CreateSplitMergePins(List pinBitCountsToLoad) + { + ChipDescription[] descriptions = new ChipDescription[pinBitCountsToLoad.Count*2]; + + + for(int i = 0; i < pinBitCountsToLoad.Count; i++) + { + descriptions[i] = CreateBus(pinBitCountsToLoad[i]); + } + for (int i = 0; i < pinBitCountsToLoad.Count; i++) + { + descriptions[i + pinBitCountsToLoad.Count] = CreateBusTerminus(pinBitCountsToLoad[i]); + } + + + return descriptions; + + } + static ChipDescription CreateNand() { Color col = GetColor(new(0.73f, 0.26f, 0.26f)); Vector2 size = new(CalculateGridSnappedWidth(GridSize * 8), GridSize * 4); @@ -303,36 +329,6 @@ static ChipDescription CreatePulse() return CreateBuiltinChipDescription(ChipType.Pulse, size, col, inputPins, outputPins); } - static ChipDescription CreateBitConversionChip(ChipType chipType, PinBitCount bitCountIn, PinBitCount bitCountOut, int numIn, int numOut) - { - PinDescription[] inputPins = new PinDescription[numIn]; - PinDescription[] outputPins = new PinDescription[numOut]; - - for (int i = 0; i < numIn; i++) - { - string pinName = GetPinName(i, numIn, true); - inputPins[i] = CreatePinDescription(pinName, i, bitCountIn); - } - - for (int i = 0; i < numOut; i++) - { - string pinName = GetPinName(i, numOut, false); - outputPins[i] = CreatePinDescription(pinName, numIn + i, bitCountOut); - } - - float height = SubChipInstance.MinChipHeightForPins(inputPins, outputPins); - Vector2 size = new(GridSize * 9, height); - - return CreateBuiltinChipDescription(chipType, size, GetColor(ChipCol_SplitMerge), inputPins, outputPins); - } - - static string GetPinName(int pinIndex, int pinCount, bool isInput) - { - string letter = " " + (char)('A' + pinCount - pinIndex - 1); - if (pinCount == 1) letter = ""; - return (isInput ? "IN" : "OUT") + letter; - } - static ChipDescription CreateDisplay7Seg() { PinDescription[] inputPins = @@ -450,28 +446,21 @@ static Vector2 BusChipSize(PinBitCount bitCount) PinBitCount.Bit1 => new Vector2(GridSize * 2, GridSize * 2), PinBitCount.Bit4 => new Vector2(GridSize * 2, GridSize * 3), PinBitCount.Bit8 => new Vector2(GridSize * 2, GridSize * 4), - _ => throw new Exception("Bus bit count not implemented") + _ => new Vector2(GridSize * 2, 0.5f * bitCount.BitCount * GridSize) }; } static ChipDescription CreateBus(PinBitCount bitCount) { - ChipType type = bitCount.BitCount switch - { - PinBitCount.Bit1 => ChipType.Bus_1Bit, - PinBitCount.Bit4 => ChipType.Bus_4Bit, - PinBitCount.Bit8 => ChipType.Bus_8Bit, - _ => throw new Exception("Bus bit count not implemented") - }; - string name = ChipTypeHelper.GetName(type); + string name = ChipTypeHelper.GetBusName(bitCount); PinDescription[] inputs = { CreatePinDescription(name + " (Hidden)", 0, bitCount) }; PinDescription[] outputs = { CreatePinDescription(name, 1, bitCount) }; Color col = GetColor(new(0.1f, 0.1f, 0.1f)); - return CreateBuiltinChipDescription(type, BusChipSize(bitCount), col, inputs, outputs, null, NameDisplayLocation.Hidden); + return CreateBuiltinChipDescription(ChipType.Bus, BusChipSize(bitCount), col, inputs, outputs, null, NameDisplayLocation.Hidden, name:name); } static ChipDescription CreateDisplayLED() @@ -505,24 +494,17 @@ static ChipDescription CreateDisplayLED() static ChipDescription CreateBusTerminus(PinBitCount bitCount) { - ChipType type = bitCount.BitCount switch - { - PinBitCount.Bit1 => ChipType.BusTerminus_1Bit, - PinBitCount.Bit4 => ChipType.BusTerminus_4Bit, - PinBitCount.Bit8 => ChipType.BusTerminus_8Bit, - _ => throw new Exception("Bus bit count not implemented") - }; - + string name = ChipTypeHelper.GetBusTerminusName(bitCount); ChipDescription busOrigin = CreateBus(bitCount); PinDescription[] inputs = { CreatePinDescription(busOrigin.Name, 0, bitCount) }; - return CreateBuiltinChipDescription(type, BusChipSize(bitCount), busOrigin.Colour, inputs, null, null, NameDisplayLocation.Hidden); + return CreateBuiltinChipDescription(ChipType.BusTerminus, BusChipSize(bitCount), busOrigin.Colour, inputs, null, null, NameDisplayLocation.Hidden, name); } static ChipDescription CreateBuiltinChipDescription(ChipType type, Vector2 size, Color col, PinDescription[] inputs, PinDescription[] outputs, DisplayDescription[] displays = null, NameDisplayLocation nameLoc = NameDisplayLocation.Centre, string name = "") { - if (!ChipTypeHelper.IsDevPin(type) && !ChipTypeHelper.IsMergeSplitChip(type)){name = ChipTypeHelper.GetName(type); } + if (!ChipTypeHelper.IsDevPin(type) && !ChipTypeHelper.IsMergeSplitChip(type) && !ChipTypeHelper.IsBusType(type)){name = ChipTypeHelper.GetName(type); } ValidatePinIDs(inputs, outputs, name); diff --git a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs index b0b5f840..3d6450c1 100644 --- a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs @@ -25,14 +25,33 @@ public static ChipCollection[] CreateDefaultChipCollections() ChipType.Key, ChipType.TriStateBuffer, ChipType.Constant_8Bit - ), + ), CreateChipCollection("IN/OUT", - ChipType.Button + ChipType.Button, + ChipType.Toggle + ).AddNames + ( + "IN-1", + "IN-4", + "IN-8", + "OUT-1", + "OUT-4", + "OUT-8" + ) + + , + CreateByNames("MERGE/SPLIT", + "1-4", + "1-8", + "4-8", + "4-1", + "8-4", + "8-1" ), - CreateChipCollection("BUS", - ChipType.Bus_1Bit, - ChipType.Bus_4Bit, - ChipType.Bus_8Bit + CreateByNames("BUS", + "BUS-1", + "BUS-4", + "BUS-8" ), CreateChipCollection("DISPLAY", ChipType.SevenSegmentDisplay, @@ -42,7 +61,8 @@ public static ChipCollection[] CreateDefaultChipCollections() ), CreateChipCollection("MEMORY", ChipType.Rom_256x16, - ChipType.EEPROM_256x16 + ChipType.EEPROM_256x16, + ChipType.dev_Ram_8Bit ) }; } @@ -51,5 +71,16 @@ static ChipCollection CreateChipCollection(string name, params ChipType[] chipTy { return new ChipCollection(name, chipTypes.Select(t => ChipTypeHelper.GetName(t)).ToArray()); } + + static ChipCollection CreateByNames(string name, params string[] chipNames) + { + return new ChipCollection(name, chipNames); + } + + static ChipCollection AddNames(this ChipCollection chipCollection, params string[] chipNames) + { + chipCollection.Chips.AddRange(chipNames); + return chipCollection; + } } } \ No newline at end of file diff --git a/Assets/Scripts/Game/Project/ChipLibrary.cs b/Assets/Scripts/Game/Project/ChipLibrary.cs index a05f4a1c..6ee509a2 100644 --- a/Assets/Scripts/Game/Project/ChipLibrary.cs +++ b/Assets/Scripts/Game/Project/ChipLibrary.cs @@ -55,6 +55,19 @@ void RebuildChipDescriptionLookup() public ChipDescription GetChipDescription(string name) => descriptionFromNameLookup[name]; + public ChipDescription GetTerminusDescription(PinBitCount bitCount) + { + foreach(ChipDescription desc in hiddenChips) + { + if(desc.ChipType == ChipType.BusTerminus && desc.InputPins[0].BitCount == bitCount) + { + return desc; + } + } + + throw new System.Exception("Bus terminus not found"); + } + public bool TryGetChipDescription(string name, out ChipDescription description) => descriptionFromNameLookup.TryGetValue(name, out description); public void RemoveChip(string chipName) diff --git a/TestData/Deleted Projects/a/ProjectDescription.json b/TestData/Deleted Projects/a/ProjectDescription.json new file mode 100644 index 00000000..a6570965 --- /dev/null +++ b/TestData/Deleted Projects/a/ProjectDescription.json @@ -0,0 +1,83 @@ +{ + "ProjectName": "a", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-07T19:40:42.191+02:00", + "LastSaveTime": "2025-06-07T19:41:40.346+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":[], + "IsToggledOpen":true, + "Name":"MERGE/SPLIT" + }, + { + "Chips":[], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + }, + { + "Chips":["DIPSWITCH","RAM-8","BUZZER","IN-1","OUT-1","IN-4","OUT-4","IN-8","OUT-8","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT","BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"OTHER" + } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } + ] +} \ No newline at end of file diff --git a/TestData/Deleted Projects/aa/ProjectDescription.json b/TestData/Deleted Projects/aa/ProjectDescription.json new file mode 100644 index 00000000..a268c8fc --- /dev/null +++ b/TestData/Deleted Projects/aa/ProjectDescription.json @@ -0,0 +1,83 @@ +{ + "ProjectName": "aa", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-07T19:41:43.175+02:00", + "LastSaveTime": "2025-06-07T20:05:36.891+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":[], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":[], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + }, + { + "Chips":["DIPSWITCH","RAM-8","BUZZER","IN-1","OUT-1","IN-4","OUT-4","IN-8","OUT-8","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT","BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"OTHER" + } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } + ] +} \ No newline at end of file diff --git a/TestData/Deleted Projects/coltest/ProjectDescription.json b/TestData/Deleted Projects/coltest/ProjectDescription.json new file mode 100644 index 00000000..632533f9 --- /dev/null +++ b/TestData/Deleted Projects/coltest/ProjectDescription.json @@ -0,0 +1,78 @@ +{ + "ProjectName": "coltest", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-07T19:39:15.134+02:00", + "LastSaveTime": "2025-06-07T19:39:15.136+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":[], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":[], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/ge/ProjectDescription.json b/TestData/Projects/ge/ProjectDescription.json new file mode 100644 index 00000000..c2e202de --- /dev/null +++ b/TestData/Projects/ge/ProjectDescription.json @@ -0,0 +1,78 @@ +{ + "ProjectName": "ge", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-07T20:16:17.213+02:00", + "LastSaveTime": "2025-06-07T20:16:17.215+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON","IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["1-4","1-8","4-8","4-1","8-4","8-1"], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/test/ProjectDescription.json b/TestData/Projects/test/ProjectDescription.json index e13a9612..aa11fc35 100644 --- a/TestData/Projects/test/ProjectDescription.json +++ b/TestData/Projects/test/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-05-19T11:48:01.969+02:00", - "LastSaveTime": "2025-06-07T15:26:29.796+02:00", + "LastSaveTime": "2025-06-07T17:52:35.836+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, diff --git a/TestData/Projects/za/ProjectDescription.json b/TestData/Projects/za/ProjectDescription.json new file mode 100644 index 00000000..909d575c --- /dev/null +++ b/TestData/Projects/za/ProjectDescription.json @@ -0,0 +1,78 @@ +{ + "ProjectName": "za", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-07T20:05:44.258+02:00", + "LastSaveTime": "2025-06-07T20:05:44.261+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":[], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":[], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16"], + "IsToggledOpen":false, + "Name":"MEMORY" + } + ], + "pinBitCounts":[ + "1", + "4", + "8" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + } + ] +} \ No newline at end of file From 948340103b23b5bf5a3a457b1773f93d7541178f Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Mon, 9 Jun 2025 18:26:00 +0200 Subject: [PATCH 097/124] Menu to add special Pins/MergeSplit/Bus --- .../Game/Project/BuiltinChipCreator.cs | 113 +++---- Assets/Scripts/Game/Project/ChipLibrary.cs | 6 +- Assets/Scripts/Game/Project/Project.cs | 45 ++- .../Scripts/Graphics/UI/Menus/BottomBarUI.cs | 10 +- .../Graphics/UI/Menus/ChipLibraryMenu.cs | 10 +- .../Graphics/UI/Menus/SpecialChipMakerMenu.cs | 284 ++++++++++++++++++ .../UI/Menus/SpecialChipMakerMenu.cs.meta | 2 + Assets/Scripts/Graphics/UI/UIDrawer.cs | 7 +- .../TestFinal/ProjectDescription.json | 99 ++++++ .../FinalFinalTest/ProjectDescription.json | 92 ++++++ .../Projects/aaaa/ProjectDescription.json | 93 ++++++ TestData/Projects/ge/Deleted Chips/a.json | 33 ++ TestData/Projects/ge/Deleted Chips/a_1.json | 33 ++ TestData/Projects/ge/ProjectDescription.json | 11 +- TestData/Projects/za/ProjectDescription.json | 11 +- 15 files changed, 780 insertions(+), 69 deletions(-) create mode 100644 Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs create mode 100644 Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs.meta create mode 100644 TestData/Deleted Projects/TestFinal/ProjectDescription.json create mode 100644 TestData/Projects/FinalFinalTest/ProjectDescription.json create mode 100644 TestData/Projects/aaaa/ProjectDescription.json create mode 100644 TestData/Projects/ge/Deleted Chips/a.json create mode 100644 TestData/Projects/ge/Deleted Chips/a_1.json diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 924de9bf..17bcf0e5 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -60,78 +60,89 @@ static ChipDescription[] CreateInOutPins(List pinBitCountsToLoad) for (int i = 0; i < pinBitCountsToLoad.Count; i++) { - PinBitCount pinBitCount = pinBitCountsToLoad[i]; - PinDescription[] outPin = new[] { CreatePinDescription("OUT", 0, pinBitCount) }; - - - ChipDescription InChip = CreateBuiltinChipDescription(ChipType.In_Pin, Vector2.zero, Color.clear, null, outPin, null, - NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(true, pinBitCount)); - - DevPinDescriptions[i * 2] = InChip; - + DevPinDescriptions[i * 2] = CreateInPin(pinBitCountsToLoad[i]); + DevPinDescriptions[i * 2 + 1] = CreateOutPin(pinBitCountsToLoad[i]); } + return DevPinDescriptions; + } - for (int i = 0; i < pinBitCountsToLoad.Count; i++) - { - PinBitCount pinBitCount = pinBitCountsToLoad[i]; - PinDescription[] inPin = new[] { CreatePinDescription("IN", 0, pinBitCount) }; - - ChipDescription OutChip = CreateBuiltinChipDescription(ChipType.Out_Pin, Vector2.zero, Color.clear, inPin, null, null, - NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(false, pinBitCount)); + public static ChipDescription CreateInPin(PinBitCount pinBitCount) + { + PinDescription[] outPin = new[] { CreatePinDescription("OUT", 0, pinBitCount) }; + ChipDescription InChip = CreateBuiltinChipDescription(ChipType.In_Pin, Vector2.zero, Color.clear, null, outPin, null, + NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(true, pinBitCount)); + return InChip; + } - DevPinDescriptions[i * 2 + 1] = OutChip; + public static ChipDescription CreateOutPin(PinBitCount pinBitCount) + { + PinDescription[] inPin = new[] { CreatePinDescription("IN", 0, pinBitCount) }; - } + ChipDescription OutChip = CreateBuiltinChipDescription(ChipType.Out_Pin, Vector2.zero, Color.clear, inPin, null, null, + NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(false, pinBitCount)); - return DevPinDescriptions; + return OutChip; } - static ChipDescription[] CreateSplitMergePins(List> pairs) + static ChipDescription[] CreateSplitMergePins(List> pairs) { - char[] letters = new[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; ChipDescription[] SplitMergeDescriptions = new ChipDescription[pairs.Count * 2]; - - for (int i = 0; i < pairs.Count; i++) { - (PinBitCount a, PinBitCount b) counts = (pairs[i].Key, pairs[i].Value); - int smallInBig = counts.a / counts.b; + SplitMergeDescriptions[i * 2] = CreateMergeChip(pairs[i]); + SplitMergeDescriptions[i * 2 + 1] = CreateSplitChip(pairs[i]); + } - PinDescription[] mergeIN = new PinDescription[smallInBig]; - PinDescription[] mergeOUT = new[] { CreatePinDescription("OUT", smallInBig, counts.a) }; + return SplitMergeDescriptions; + } - PinDescription[] splitIN = new[] { CreatePinDescription("IN", 0, counts.a) }; - PinDescription[] splitOUT = new PinDescription[smallInBig]; + public static ChipDescription CreateSplitChip(KeyValuePair pair) + { + (PinBitCount a, PinBitCount b) counts = (pair.Key, pair.Value); + int smallInBig = counts.a / counts.b; - for(int j = 0; j < smallInBig; j++) - { - mergeIN[j] = CreatePinDescription("IN-" + letters[smallInBig+1-j], j, counts.b); - } - for (int j = 0; j < smallInBig; j++) - { - splitOUT[j] = CreatePinDescription("OUT-" + letters[smallInBig + 1 - j], j+1, counts.b); - } + PinDescription[] splitIN = new[] { CreatePinDescription("IN", 0, counts.a) }; + PinDescription[] splitOUT = new PinDescription[smallInBig]; + for (int j = 0; j < smallInBig; j++) + { + string letter = " " + (char)('A' + smallInBig -1 - j); + splitOUT[j] = CreatePinDescription("OUT" + letter, j + 1, counts.b); + } + string splitName = counts.a.ToString() + "-" + counts.b.ToString(); - string mergeName = counts.b.ToString() + "-" + counts.a.ToString()+"BIT"; - string splitName = counts.a.ToString() + "-" + counts.b.ToString()+"BIT"; + Vector2 minChipSize = SubChipInstance.CalculateMinChipSize(splitIN, splitOUT, splitName); + float width = Mathf.Max(GridSize * 9, minChipSize.x); - Vector2 minChipSize = SubChipInstance.CalculateMinChipSize(mergeIN, mergeOUT, mergeName); // both same size in the end anyway - float width = Mathf.Max(GridSize * 9, minChipSize.x); + Vector2 size = new Vector2(width, minChipSize.y); + return CreateBuiltinChipDescription(ChipType.Split_Pin, size, GetColor(ChipCol_SplitMerge), splitIN, splitOUT, name: splitName); + } - Vector2 size = new Vector2(width, minChipSize.y); + public static ChipDescription CreateMergeChip(KeyValuePair pair) + { + (PinBitCount a, PinBitCount b) counts = (pair.Key, pair.Value); + int smallInBig = counts.a / counts.b; + + PinDescription[] mergeIN = new PinDescription[smallInBig]; + PinDescription[] mergeOUT = new[] { CreatePinDescription("OUT", smallInBig, counts.a) }; - ChipDescription mergeDesc = CreateBuiltinChipDescription(ChipType.Merge_Pin, size, GetColor(ChipCol_SplitMerge), mergeIN, mergeOUT, name: mergeName); - ChipDescription splitDesc = CreateBuiltinChipDescription(ChipType.Split_Pin, size, GetColor(ChipCol_SplitMerge), splitIN, splitOUT, name: splitName); - SplitMergeDescriptions[i * 2] = mergeDesc; - SplitMergeDescriptions[i * 2 + 1] = splitDesc; + for (int j = 0; j < smallInBig; j++) + { + string letter = " " + (char)('A' + smallInBig -1 - j); + mergeIN[j] = CreatePinDescription("IN" + letter, j, counts.b); } + string mergeName = counts.b.ToString() + "-" + counts.a.ToString(); + + Vector2 minChipSize = SubChipInstance.CalculateMinChipSize(mergeIN, mergeOUT, mergeName); + float width = Mathf.Max(GridSize * 9, minChipSize.x); + Vector2 size = new Vector2(width, minChipSize.y); + + return CreateBuiltinChipDescription(ChipType.Merge_Pin, size, GetColor(ChipCol_SplitMerge), mergeIN, mergeOUT, name: mergeName); + } - return SplitMergeDescriptions; - } - static ChipDescription[] CreateBusAndBusTerminus(List pinBitCountsToLoad) + static ChipDescription[] CreateBusAndBusTerminus(List pinBitCountsToLoad) { ChipDescription[] descriptions = new ChipDescription[pinBitCountsToLoad.Count*2]; @@ -450,7 +461,7 @@ static Vector2 BusChipSize(PinBitCount bitCount) }; } - static ChipDescription CreateBus(PinBitCount bitCount) + public static ChipDescription CreateBus(PinBitCount bitCount) { string name = ChipTypeHelper.GetBusName(bitCount); @@ -492,7 +503,7 @@ static ChipDescription CreateDisplayLED() } - static ChipDescription CreateBusTerminus(PinBitCount bitCount) + public static ChipDescription CreateBusTerminus(PinBitCount bitCount) { string name = ChipTypeHelper.GetBusTerminusName(bitCount); ChipDescription busOrigin = CreateBus(bitCount); diff --git a/Assets/Scripts/Game/Project/ChipLibrary.cs b/Assets/Scripts/Game/Project/ChipLibrary.cs index 6ee509a2..82f81552 100644 --- a/Assets/Scripts/Game/Project/ChipLibrary.cs +++ b/Assets/Scripts/Game/Project/ChipLibrary.cs @@ -76,7 +76,7 @@ public void RemoveChip(string chipName) RebuildChipDescriptionLookup(); } - public void NotifyChipSaved(ChipDescription description) + public void NotifyChipSaved(ChipDescription description, bool hidden = false) { // Replace chip description if already exists bool foundChip = false; @@ -92,11 +92,12 @@ public void NotifyChipSaved(ChipDescription description) } // Otherwise add as new description - if (!foundChip) AddChipToLibrary(description); + if (!foundChip) AddChipToLibrary(description, hidden); RebuildChipDescriptionLookup(); } + public void NotifyChipRenamed(ChipDescription description, string nameOld) { // Replace chip description @@ -146,6 +147,7 @@ public ChipDescription[] GetDirectParentChips(string chipName) void AddChipToLibrary(ChipDescription description, bool hidden = false) { + if(description.ChipType != ChipType.Custom) builtinChipNames.Add(description.Name); if (hidden) hiddenChips.Add(description); else allChips.Add(description); } diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index 8ba4cebd..85ac4712 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -9,6 +9,7 @@ using DLS.Simulation; using Seb.Helpers; using UnityEngine; +using UnityEngine.Windows; using Debug = UnityEngine.Debug; namespace DLS.Game @@ -724,5 +725,47 @@ void EnsureChipRemovedFromCollections(string chipNameToRemove) } } } - } + + public void AddNewPinSize(int pinSize) + { + PinBitCount pinBitCount = pinSize; + description.pinBitCounts.Add(pinBitCount); + ChipDescription inPin = BuiltinChipCreator.CreateInPin(pinBitCount); + ChipDescription outPin = BuiltinChipCreator.CreateOutPin(pinBitCount); + ChipDescription bus = BuiltinChipCreator.CreateBus(pinBitCount); + ChipDescription busTerminus = BuiltinChipCreator.CreateBusTerminus(pinBitCount); + chipLibrary.NotifyChipSaved(inPin); + chipLibrary.NotifyChipSaved(outPin); + chipLibrary.NotifyChipSaved(bus); + chipLibrary.NotifyChipSaved(busTerminus, true); + + + if (description.ChipCollections.Any(c => c.Name == "IN/OUT")) + { + description.ChipCollections.First(c => c.Name == "IN/OUT").Chips.Add(inPin.Name); + description.ChipCollections.First(c => c.Name == "IN/OUT").Chips.Add(outPin.Name); + } + + if(description.ChipCollections.Any(c => c.Name == "BUS")) + { + description.ChipCollections.First(c => c.Name == "BUS").Chips.Add(bus.Name); + } + } + + public void AddNewMergeSplit(int a, int b) + { + KeyValuePair pair = new(Math.Max(a,b), Math.Min(b,a)); + description.SplitMergePairs.Add(pair); + ChipDescription mergeChip = BuiltinChipCreator.CreateMergeChip(pair); + ChipDescription splitChip = BuiltinChipCreator.CreateSplitChip(pair); + chipLibrary.NotifyChipSaved(mergeChip); + chipLibrary.NotifyChipSaved(splitChip); + if (description.ChipCollections.Any(c => c.Name == "MERGE/SPLIT")) + { + description.ChipCollections.First(c => c.Name == "MERGE/SPLIT").Chips.Add(mergeChip.Name); + description.ChipCollections.First(c => c.Name == "MERGE/SPLIT").Chips.Add(splitChip.Name); + } + + } + } } \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs index 932230d8..b30c2a7e 100644 --- a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs +++ b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs @@ -23,6 +23,7 @@ public static class BottomBarUI $"NEW CHIP {shortcutTextCol}Ctrl+N", $"SAVE CHIP {shortcutTextCol}Ctrl+S", $"FIND CHIP {shortcutTextCol}Ctrl+F", + $"ADD SPECIAL {shortcutTextCol}Ctrl+B", $"LIBRARY {shortcutTextCol}Ctrl+L", $"PREFS {shortcutTextCol}Ctrl+P", $"QUIT {shortcutTextCol}Ctrl+Q" @@ -31,9 +32,10 @@ public static class BottomBarUI const int NewChipButtonIndex = 0; const int SaveChipButtonIndex = 1; const int FindChipButtonIndex = 2; - const int LibraryButtonIndex = 3; - const int OptionsButtonIndex = 4; - const int QuitButtonIndex = 5; + const int AddSpecialButtonIndex = 3; + const int LibraryButtonIndex = 4; + const int OptionsButtonIndex = 5; + const int QuitButtonIndex = 6; // ---- State ---- static float scrollX; @@ -110,6 +112,7 @@ void ButtonPressed(int i) if (i == NewChipButtonIndex) CreateNewChip(); else if (i == SaveChipButtonIndex) OpenSaveMenu(); else if (i == FindChipButtonIndex) OpenSearchMenu(); + else if (i == AddSpecialButtonIndex) OpenAddSpecialMenu(); else if (i == LibraryButtonIndex) OpenLibraryMenu(); else if (i == OptionsButtonIndex) OpenPreferencesMenu(); else if (i == QuitButtonIndex) ExitToMainMenu(); @@ -389,6 +392,7 @@ static void ExitIfTrue(bool exit) static void OpenSearchMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.Search); static void OpenLibraryMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.ChipLibrary); static void OpenPreferencesMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.Preferences); + static void OpenAddSpecialMenu() => UIDrawer.SetActiveMenu(UIDrawer.MenuType.SpecialChipMaker); static void CreateNewChip() { diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs index 4a333008..e06ef3bd 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipLibraryMenu.cs @@ -450,10 +450,11 @@ static void DrawSelectedItemPanel(Vector2 topLeft, Vector2 size) topLeft = UI.GetCurrentBoundsScope().BottomLeft + Vector2.down * SectionSpacing; MenuHelper.DrawReservedMenuPanel(panelID, UI.GetCurrentBoundsScope()); } - } - // Delete confirmation - if (isConfirmingChipDeletion || isConfirmingCollectionDeletion) + } + + // Delete confirmation + if (isConfirmingChipDeletion || isConfirmingCollectionDeletion) { using (UI.BeginBoundsScope(true)) { @@ -736,5 +737,6 @@ string FormatChipName(int index) } } } - } + + } } \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs new file mode 100644 index 00000000..ca95c736 --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs @@ -0,0 +1,284 @@ +using Seb.Vis.UI; +using Seb.Vis; +using UnityEngine; +using static DLS.Graphics.DrawSettings; +using System; +using System.Collections.Generic; +using DLS.Game; +using System.Linq; +using DLS.Description; +using static UnityEngine.LightTransport.IProbeIntegrator; +using UnityEditor.SearchService; + + + +namespace DLS.Graphics +{ + public static class SpecialChipMakerMenu + { + public static List PinBitCountsMade = new(); + public static List> MergeSplitsMade = new(); + + + const float textSpacing = 0.25f; + const float entrySpacing = 0.5f; + const float menuWidth = 55; + const float verticalOffset = 22; + + static readonly Vector2 entrySize = new(menuWidth, DrawSettings.SelectorWheelHeight); + public static readonly Vector2 settingFieldSize = new(entrySize.x / 3, entrySize.y); + + + static readonly string[] SpecialChipTypes = + { + "Pins", + "Merge/Split" + }; + const int OPTION_PIN = 0; + const int OPTION_MERGE_SPLIT = 1; + + + static readonly UIHandle ID_SpecialChipTypes = new("SPEC_SpecialChipTypes"); + static readonly UIHandle ID_PinSize = new("SPEC_PinSize"); + + static readonly UIHandle ID_FirstMergeSplit = new("SPEC_MergeSplitA"); + static readonly UIHandle ID_SecondMergeSplit = new("SPEC_MergeSplitB"); + + + + static readonly Func pinSizeInputValidator = ValidatePinSizeInput; + + static bool canAddChip; + static int currentlyAddingPinBitOfSize; + + static KeyValuePair currentlyAddingMergeSplit; + + public static void DrawMenu() + { + UI.DrawFullscreenPanel(ActiveUITheme.MenuBackgroundOverlayCol); + + UIThemeDLS theme = ActiveUITheme; + InputFieldTheme inputTheme = ActiveUITheme.ChipNameInputField; + Draw.ID panelID = UI.ReservePanel(); + + + const int inputTextPad = 1; + const float headerSpacing = 1.5f; + Vector2 topLeft = UI.Centre + new Vector2(-menuWidth / 2, verticalOffset); + Vector2 labelPosCurr = topLeft; + Color labelCol = Color.white; + Color headerCol = new(0.46f, 1, 0.54f); + Color errorCol = new(1, 0.4f, 0.45f); + + + + using (UI.BeginBoundsScope(true)) + { + DrawHeader("SPECIAL CHIPS:"); + int mainPinNamesMode = DrawNextWheel("Special chip type:", SpecialChipTypes, ID_SpecialChipTypes); + + if (mainPinNamesMode == OPTION_PIN) + { + DrawSpecialPinMenu(); + } + else if (mainPinNamesMode == OPTION_MERGE_SPLIT) + { + DrawSpecialMergeSplitMenu(); + } + + Vector2 buttonTopLeft = new(labelPosCurr.x, UI.PrevBounds.Bottom - 2.5f); + int addOrClose = UI.VerticalButtonGroup(new[] { "Add special chip", "Save and close" }, new[] {canAddChip, true }, + ActiveUITheme.ButtonTheme, buttonTopLeft + (menuWidth / 2) * Vector2.right, entrySize, false, false, entrySpacing); + + if(mainPinNamesMode == OPTION_PIN && canAddChip && addOrClose == 0) + { + AddNewBitSize(currentlyAddingPinBitOfSize); + } + if(mainPinNamesMode == OPTION_MERGE_SPLIT && canAddChip && addOrClose == 0) + { + AddNewMergeSplit(currentlyAddingMergeSplit.Key, currentlyAddingMergeSplit.Value); + } + + + if (addOrClose == 1) + { + // Save changes + Main.ActiveProject.SaveCurrentProjectDescription() ; + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); + } + + MenuHelper.DrawReservedMenuPanel(panelID, UI.GetCurrentBoundsScope()); + } + + void DrawSpecialMergeSplitMenu() + { + DrawHeader("NEW MERGE/SPLIT CHIP:"); + InputFieldState firstPinSize = MenuHelper.LabeledInputField("First pin size:", labelCol, labelPosCurr, entrySize, ID_FirstMergeSplit, pinSizeInputValidator, settingFieldSize.x); + AddSpacing(); + InputFieldState secondPinSize = MenuHelper.LabeledInputField("Second pin size:", labelCol, labelPosCurr, entrySize, ID_SecondMergeSplit, pinSizeInputValidator, settingFieldSize.x); + int firstPinSizeAttempt = int.TryParse(firstPinSize.text, out int a) ? a : -1; + int secondPinSizeAttempt = int.TryParse(secondPinSize.text, out int b) ? b : -1; + (bool valid, string reason) confirmation = RealMergeSplitConfirmation(firstPinSizeAttempt, secondPinSizeAttempt); + + if (firstPinSizeAttempt != -1 && secondPinSizeAttempt != -1 && !confirmation.valid) + { + AddSpacing(); + DrawErrorSection(confirmation.reason); + canAddChip = false; + } + + else if (firstPinSizeAttempt != -1 && secondPinSizeAttempt != -1 && confirmation.valid) + { + canAddChip = true; + currentlyAddingMergeSplit = new (Math.Max(firstPinSizeAttempt, secondPinSizeAttempt), Math.Min(firstPinSizeAttempt, secondPinSizeAttempt)); + return; + } + canAddChip = false; + } + + void DrawSpecialPinMenu() + { + DrawHeader("NEW PIN:"); + InputFieldState pinSizeInput = MenuHelper.LabeledInputField("Size of new pin:", labelCol, labelPosCurr,entrySize,ID_PinSize, pinSizeInputValidator, settingFieldSize.x); + int pinSizeAttempt = int.TryParse(pinSizeInput.text, out int a) ? a : -1; + (bool valid, string reason) confirmation = RealSizeConfirmation(pinSizeAttempt); + if (!confirmation.valid && pinSizeAttempt != -1) + { + AddSpacing(); + DrawErrorSection(confirmation.reason); + canAddChip = false; + } + else if (confirmation.valid && pinSizeAttempt != 1) { + canAddChip = true; + currentlyAddingPinBitOfSize = pinSizeAttempt; + return; + } + canAddChip = false; + } + + void DrawErrorSection(string reason) + { + AddHeaderSpacing(); + UI.DrawText("ERROR", theme.FontBold, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, errorCol); + AddHeaderSpacing(); + + AddTextSpacing(); + UI.DrawText(" "+reason, theme.FontRegular, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, errorCol); + AddTextSpacing(); + + + } + + int DrawNextWheel(string label, string[] options, UIHandle id) + { + int index = MenuHelper.LabeledOptionsWheel(label, labelCol, labelPosCurr, entrySize, id, options, settingFieldSize.x, true); + AddSpacing(); + return index; + } + + void DrawHeader(string text) + { + AddHeaderSpacing(); + UI.DrawText(text, theme.FontBold, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, headerCol); + AddHeaderSpacing(); + } + + void DrawLineOfText(string text) + { + AddTextSpacing(); + UI.DrawText(text, theme.FontRegular, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, labelCol); + AddTextSpacing(); + } + + + void AddSpacing() + { + labelPosCurr.y -= entrySize.y + entrySpacing; + } + + void AddHeaderSpacing() + { + labelPosCurr.y -= headerSpacing; + } + + void AddTextSpacing() + { + labelPosCurr.y -= textSpacing; + } + + } + + public static void OnMenuOpened() + { + RefreshPinBitCounts(); + RefreshMergeSplits(); + } + + public static void RefreshPinBitCounts() + { + PinBitCountsMade = new(); + foreach(var pinBit in Main.ActiveProject.description.pinBitCounts) + { + PinBitCountsMade.Add(pinBit.BitCount); + } + } + + public static void RefreshMergeSplits() + { + MergeSplitsMade = new(); + foreach (var PinBitPair in Main.ActiveProject.description.SplitMergePairs) + { + MergeSplitsMade.Add(new(PinBitPair.Key, PinBitPair.Value)); + } + } + + public static bool ValidatePinSizeInput(string s) + { + if (string.IsNullOrEmpty(s)) return true; + if (s.Contains(" ")) return false; + if (int.TryParse(s, out int a)) + { + if(a < 0) return false; + if(a > 4096) return false; + return true; + } + return false; + } + + public static (bool valid, string reason) RealSizeConfirmation(int a) + { + if(a < 1) { return (false, "Pin size must be at least 1 bit."); } + if (a > 64 && a % 8 != 0 && a< 512) { return (false, "Pin size > 64 and not a multiple of 8."); } + if(a > 512 && a % 64 != 0) { return (false, "Pin size > 512 and not a multiple of 64."); } + if (PinBitCountsMade.Contains(a)) { return (false, "Pins with this count already exist."); } + + return (true, ""); + } + + public static (bool valid, string reason) RealMergeSplitConfirmation(int a, int b) + { + if (MergeSplitsMade.Any(k => (k.Key == a && k.Value == b )||(k.Value == a && k.Key == b))){ return (false, "These Merge/Split chips already exist."); } + if (!PinBitCountsMade.Contains(a) && !PinBitCountsMade.Contains(b) ) { return (false, $"No pins with pinsize {a} and {b} exist. Create them first."); } + if (!PinBitCountsMade.Contains(a)) { return (false, $"No pin with pinsize {a} exist. Create it first, if valid."); } + if (!PinBitCountsMade.Contains(b)) { return (false, $"No pin with pinsize {b} exist. Create it first, if valid."); } + int bigger = Math.Max(a, b); + int smaller = Math.Min(a, b); + + if(bigger%smaller != 0) { return (false, $"{bigger} / {smaller} isn't an integer."); } + + return (true, ""); + } + + public static void AddNewBitSize(int a) + { + Main.ActiveProject.AddNewPinSize(a); + RefreshPinBitCounts(); + } + + public static void AddNewMergeSplit(int a, int b) + { + Main.ActiveProject.AddNewMergeSplit(a, b); + RefreshMergeSplits(); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs.meta b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs.meta new file mode 100644 index 00000000..f3e113d2 --- /dev/null +++ b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 343a789684b62a340a501dc405e29ef8 \ No newline at end of file diff --git a/Assets/Scripts/Graphics/UI/UIDrawer.cs b/Assets/Scripts/Graphics/UI/UIDrawer.cs index 802f9d2b..fa8a1f4b 100644 --- a/Assets/Scripts/Graphics/UI/UIDrawer.cs +++ b/Assets/Scripts/Graphics/UI/UIDrawer.cs @@ -21,7 +21,8 @@ public enum MenuType ConstantEdit, UnsavedChanges, Search, - ChipLabelPopup + ChipLabelPopup, + SpecialChipMaker } static MenuType activeMenuOld; @@ -70,6 +71,7 @@ static void DrawProjectMenus(Project project) else if (menuToDraw == MenuType.ChipLabelPopup) ChipLabelMenu.DrawMenu(); else if (menuToDraw == MenuType.PulseEdit) PulseEditMenu.DrawMenu(); else if (menuToDraw == MenuType.ConstantEdit) ConstantEditMenu.DrawMenu(); + else if (menuToDraw == MenuType.SpecialChipMaker) SpecialChipMakerMenu.DrawMenu(); else { bool showSimPausedBanner = project.simPaused; @@ -101,9 +103,10 @@ static void NotifyIfActiveMenuChanged() else if (ActiveMenu == MenuType.ChipLabelPopup) ChipLabelMenu.OnMenuOpened(); else if (ActiveMenu == MenuType.PulseEdit) PulseEditMenu.OnMenuOpened(); else if (ActiveMenu == MenuType.ConstantEdit) ConstantEditMenu.OnMenuOpened(); + else if (ActiveMenu == MenuType.SpecialChipMaker) SpecialChipMakerMenu.OnMenuOpened(); - if (InInputBlockingMenu() && Project.ActiveProject != null && Project.ActiveProject.controller != null) + if (InInputBlockingMenu() && Project.ActiveProject != null && Project.ActiveProject.controller != null) { Project.ActiveProject.controller.CancelEverything(); } diff --git a/TestData/Deleted Projects/TestFinal/ProjectDescription.json b/TestData/Deleted Projects/TestFinal/ProjectDescription.json new file mode 100644 index 00000000..458cbe7f --- /dev/null +++ b/TestData/Deleted Projects/TestFinal/ProjectDescription.json @@ -0,0 +1,99 @@ +{ + "ProjectName": "TestFinal", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-09T17:48:33.979+02:00", + "LastSaveTime": "2025-06-09T17:51:29.885+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[ + "8-16", + "16-8" + ], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON","DIPSWITCH","IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["1-4","1-8","4-8","4-1","8-4","8-1","4-16","16-4","1-16","16-1","8-16","16-8"], + "IsToggledOpen":true, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":true, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":true, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16","RAM-8"], + "IsToggledOpen":true, + "Name":"MEMORY" + }, + { + "Chips":["BUZZER","BUS-16"], + "IsToggledOpen":false, + "Name":"OTHER" + } + ], + "pinBitCounts":[ + "1", + "4", + "8", + "16" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + }, + { + "Key":"16", + "Value":"4" + }, + { + "Key":"16", + "Value":"1" + }, + { + "Key":"16", + "Value":"8" + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/FinalFinalTest/ProjectDescription.json b/TestData/Projects/FinalFinalTest/ProjectDescription.json new file mode 100644 index 00000000..744de5fc --- /dev/null +++ b/TestData/Projects/FinalFinalTest/ProjectDescription.json @@ -0,0 +1,92 @@ +{ + "ProjectName": "FinalFinalTest", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-09T17:56:29.965+02:00", + "LastSaveTime": "2025-06-09T18:18:17.307+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON","DIPSWITCH","IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16","IN-64","OUT-64"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["1-4","1-8","4-8","4-1","8-4","8-1","8-16","16-8","1-16","16-1","4-64","64-4"], + "IsToggledOpen":false, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16","RAM-8"], + "IsToggledOpen":false, + "Name":"MEMORY" + } + ], + "pinBitCounts":[ + "1", + "4", + "8", + "16", + "64" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + }, + { + "Key":"16", + "Value":"8" + }, + { + "Key":"16", + "Value":"1" + }, + { + "Key":"64", + "Value":"4" + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/aaaa/ProjectDescription.json b/TestData/Projects/aaaa/ProjectDescription.json new file mode 100644 index 00000000..f6b96ef8 --- /dev/null +++ b/TestData/Projects/aaaa/ProjectDescription.json @@ -0,0 +1,93 @@ +{ + "ProjectName": "aaaa", + "DLSVersion_LastSaved": "2.1.6", + "DLSVersion_EarliestCompatible": "2.0.0", + "DLSVersion_LastSavedModdedVersion": "1.1.0", + "CreationTime": "2025-06-09T16:46:13.873+02:00", + "LastSaveTime": "2025-06-09T17:45:23.829+02:00", + "Prefs_MainPinNamesDisplayMode": 1, + "Prefs_ChipPinNamesDisplayMode": 1, + "Prefs_GridDisplayMode": 0, + "Prefs_Snapping": 0, + "Prefs_StraightWires": 0, + "Prefs_SimPaused": false, + "Prefs_SimTargetStepsPerSecond": 1000, + "Prefs_SimStepsPerClockTick": 250, + "AllCustomChipNames":[], + "StarredList":[ + { + "Name":"IN/OUT", + "IsCollection":true + }, + { + "Name":"NAND", + "IsCollection":false + } + ], + "ChipCollections":[ + { + "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], + "IsToggledOpen":false, + "Name":"BASIC" + }, + { + "Chips":["BUTTON","DIPSWITCH","IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-12","OUT-12","IN-6","OUT-6"], + "IsToggledOpen":false, + "Name":"IN/OUT" + }, + { + "Chips":["1-4","1-8","4-8","4-1","8-4","8-1","4-12","12-4","1-12","12-1"], + "IsToggledOpen":true, + "Name":"MERGE/SPLIT" + }, + { + "Chips":["BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":false, + "Name":"BUS" + }, + { + "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], + "IsToggledOpen":false, + "Name":"DISPLAY" + }, + { + "Chips":["ROM 256×16","EEPROM 256×16","RAM-8"], + "IsToggledOpen":false, + "Name":"MEMORY" + }, + { + "Chips":["BUZZER","4-12","12-4","BUS-12","BUS-6"], + "IsToggledOpen":false, + "Name":"OTHER" + } + ], + "pinBitCounts":[ + "1", + "4", + "8", + "12", + "6" + ], + "SplitMergePairs":[ + { + "Key":"8", + "Value":"4" + }, + { + "Key":"8", + "Value":"1" + }, + { + "Key":"4", + "Value":"1" + }, + { + "Key":"12", + "Value":"4" + }, + { + "Key":"12", + "Value":"1" + } + ] +} \ No newline at end of file diff --git a/TestData/Projects/ge/Deleted Chips/a.json b/TestData/Projects/ge/Deleted Chips/a.json new file mode 100644 index 00000000..761f4ca9 --- /dev/null +++ b/TestData/Projects/ge/Deleted Chips/a.json @@ -0,0 +1,33 @@ +{ + "DLSVersion": "2.1.6", + "Name": "a", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 0.37, + "y": 0.375 + }, + "Colour": { + "r": 0.254495621, + "g": 0.060596846, + "b": 0.437861621, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"NAND", + "ID":1333565967, + "Label":"", + "Position":{ + "x":-5.64754, + "y":-1.83607 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/ge/Deleted Chips/a_1.json b/TestData/Projects/ge/Deleted Chips/a_1.json new file mode 100644 index 00000000..c91ccb6f --- /dev/null +++ b/TestData/Projects/ge/Deleted Chips/a_1.json @@ -0,0 +1,33 @@ +{ + "DLSVersion": "2.1.6", + "Name": "a", + "NameLocation": 0, + "ChipType": 0, + "Size": { + "x": 0.37, + "y": 0.375 + }, + "Colour": { + "r": 0.481921643, + "g": 0.346283436, + "b": 0.516404569, + "a": 1 + }, + "InputPins":[], + "OutputPins":[], + "SubChips":[ + { + "Name":"NAND", + "ID":1172801001, + "Label":"", + "Position":{ + "x":-4.90984, + "y":-1.04918 + }, + "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], + "InternalData":null + } + ], + "Wires":[], + "Displays": null +} \ No newline at end of file diff --git a/TestData/Projects/ge/ProjectDescription.json b/TestData/Projects/ge/ProjectDescription.json index c2e202de..5129755e 100644 --- a/TestData/Projects/ge/ProjectDescription.json +++ b/TestData/Projects/ge/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-06-07T20:16:17.213+02:00", - "LastSaveTime": "2025-06-07T20:16:17.215+02:00", + "LastSaveTime": "2025-06-09T15:57:44.031+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, @@ -42,18 +42,23 @@ }, { "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"BUS" }, { "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"DISPLAY" }, { "Chips":["ROM 256×16","EEPROM 256×16"], "IsToggledOpen":false, "Name":"MEMORY" + }, + { + "Chips":["DIPSWITCH","RAM-8","BUZZER","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT"], + "IsToggledOpen":true, + "Name":"OTHER" } ], "pinBitCounts":[ diff --git a/TestData/Projects/za/ProjectDescription.json b/TestData/Projects/za/ProjectDescription.json index 909d575c..38a09a61 100644 --- a/TestData/Projects/za/ProjectDescription.json +++ b/TestData/Projects/za/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", "CreationTime": "2025-06-07T20:05:44.258+02:00", - "LastSaveTime": "2025-06-07T20:05:44.261+02:00", + "LastSaveTime": "2025-06-09T16:46:02.153+02:00", "Prefs_MainPinNamesDisplayMode": 1, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 0, @@ -37,12 +37,12 @@ }, { "Chips":[], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"MERGE/SPLIT" }, { "Chips":[], - "IsToggledOpen":false, + "IsToggledOpen":true, "Name":"BUS" }, { @@ -54,6 +54,11 @@ "Chips":["ROM 256×16","EEPROM 256×16"], "IsToggledOpen":false, "Name":"MEMORY" + }, + { + "Chips":["DIPSWITCH","RAM-8","BUZZER","IN-1","OUT-1","IN-4","OUT-4","IN-8","OUT-8","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT","BUS-1","BUS-4","BUS-8"], + "IsToggledOpen":true, + "Name":"OTHER" } ], "pinBitCounts":[ From c30f57e1055f9904fb6caabff64e2935c8d15174 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Mon, 9 Jun 2025 18:29:21 +0200 Subject: [PATCH 098/124] Add keyboard shortcut --- Assets/Scripts/Game/Interaction/ChipInteractionController.cs | 3 ++- Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs | 2 +- Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs index ff61ccb7..0de8d511 100644 --- a/Assets/Scripts/Game/Interaction/ChipInteractionController.cs +++ b/Assets/Scripts/Game/Interaction/ChipInteractionController.cs @@ -232,7 +232,8 @@ void HandleKeyboardInput() { CancelEverything(); } - } + + } void HandleMouseInput() { diff --git a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs index 21f9dbd0..6a139a27 100644 --- a/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs +++ b/Assets/Scripts/Game/Interaction/KeyboardShortcuts.cs @@ -18,7 +18,7 @@ public static class KeyboardShortcuts public static bool CreateNewChipShortcutTriggered => CtrlShortcutTriggered(KeyCode.N); public static bool QuitToMainMenuShortcutTriggered => CtrlShortcutTriggered(KeyCode.Q); public static bool SearchShortcutTriggered => CtrlShortcutTriggered(KeyCode.F); - + public static bool SpecialChipsShortcutTriggered => CtrlShortcutTriggered(KeyCode.B); // ---- Misc shortcuts ---- public static bool DuplicateShortcutTriggered => MultiModeHeld && InputHelper.IsKeyDownThisFrame(KeyCode.D); diff --git a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs index b30c2a7e..d3d8d5c0 100644 --- a/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs +++ b/Assets/Scripts/Graphics/UI/Menus/BottomBarUI.cs @@ -419,6 +419,7 @@ static void HandleKeyboardShortcuts() if (KeyboardShortcuts.PreferencesShortcutTriggered) OpenPreferencesMenu(); if (KeyboardShortcuts.QuitToMainMenuShortcutTriggered) ExitToMainMenu(); + if (KeyboardShortcuts.SpecialChipsShortcutTriggered) OpenAddSpecialMenu(); } public static void Reset() From 781672a3f856b998563a475db1e4de209c5ca4e4 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Mon, 9 Jun 2025 20:07:08 +0200 Subject: [PATCH 099/124] delete some useless test data --- Assets/Scripts/SaveSystem/Loader.cs | 2 +- .../ATEST/ProjectDescription.json | 0 .../FinalFinalTest/ProjectDescription.json | 0 .../{Projects => Deleted Projects}/aaaa/ProjectDescription.json | 0 .../ahic CHIPS/ProjectDescription.json | 0 TestData/{Projects => Deleted Projects}/ge/Deleted Chips/a.json | 0 .../{Projects => Deleted Projects}/ge/Deleted Chips/a_1.json | 0 .../{Projects => Deleted Projects}/ge/ProjectDescription.json | 0 .../ram test/ProjectDescription.json | 0 TestData/{Projects => Deleted Projects}/test/Chips/128Nand.json | 0 TestData/{Projects => Deleted Projects}/test/Chips/2NAND.json | 0 TestData/{Projects => Deleted Projects}/test/Chips/4nand.json | 0 .../test/Chips/MergeTestChip.json | 0 .../{Projects => Deleted Projects}/test/ProjectDescription.json | 0 .../testz/ProjectDescription.json | 0 .../Deleted Projects/test\303\251&/ProjectDescription.json" | 0 .../{Projects => Deleted Projects}/za/ProjectDescription.json | 0 .../ztest/ProjectDescription.json | 0 18 files changed, 1 insertion(+), 1 deletion(-) rename TestData/{Projects => Deleted Projects}/ATEST/ProjectDescription.json (100%) rename TestData/{Projects => Deleted Projects}/FinalFinalTest/ProjectDescription.json (100%) rename TestData/{Projects => Deleted Projects}/aaaa/ProjectDescription.json (100%) rename TestData/{Projects => Deleted Projects}/ahic CHIPS/ProjectDescription.json (100%) rename TestData/{Projects => Deleted Projects}/ge/Deleted Chips/a.json (100%) rename TestData/{Projects => Deleted Projects}/ge/Deleted Chips/a_1.json (100%) rename TestData/{Projects => Deleted Projects}/ge/ProjectDescription.json (100%) rename TestData/{Projects => Deleted Projects}/ram test/ProjectDescription.json (100%) rename TestData/{Projects => Deleted Projects}/test/Chips/128Nand.json (100%) rename TestData/{Projects => Deleted Projects}/test/Chips/2NAND.json (100%) rename TestData/{Projects => Deleted Projects}/test/Chips/4nand.json (100%) rename TestData/{Projects => Deleted Projects}/test/Chips/MergeTestChip.json (100%) rename TestData/{Projects => Deleted Projects}/test/ProjectDescription.json (100%) rename TestData/{Projects => Deleted Projects}/testz/ProjectDescription.json (100%) rename "TestData/Projects/test\303\251&/ProjectDescription.json" => "TestData/Deleted Projects/test\303\251&/ProjectDescription.json" (100%) rename TestData/{Projects => Deleted Projects}/za/ProjectDescription.json (100%) rename TestData/{Projects => Deleted Projects}/ztest/ProjectDescription.json (100%) diff --git a/Assets/Scripts/SaveSystem/Loader.cs b/Assets/Scripts/SaveSystem/Loader.cs index c01ff479..d96626d0 100644 --- a/Assets/Scripts/SaveSystem/Loader.cs +++ b/Assets/Scripts/SaveSystem/Loader.cs @@ -105,7 +105,7 @@ static ChipLibrary LoadChipLibrary(ProjectDescription projectDescription) builtinChips = builtinChips.Where(b => !customChipNameHashset.Contains(b.Name)).ToArray(); UpgradeHelper.ApplyVersionChanges(loadedChips, builtinChips); - return new ChipLibrary(loadedChips, builtinChips); + return new ChipLibrary(loadedChips, builtinChips); } } } \ No newline at end of file diff --git a/TestData/Projects/ATEST/ProjectDescription.json b/TestData/Deleted Projects/ATEST/ProjectDescription.json similarity index 100% rename from TestData/Projects/ATEST/ProjectDescription.json rename to TestData/Deleted Projects/ATEST/ProjectDescription.json diff --git a/TestData/Projects/FinalFinalTest/ProjectDescription.json b/TestData/Deleted Projects/FinalFinalTest/ProjectDescription.json similarity index 100% rename from TestData/Projects/FinalFinalTest/ProjectDescription.json rename to TestData/Deleted Projects/FinalFinalTest/ProjectDescription.json diff --git a/TestData/Projects/aaaa/ProjectDescription.json b/TestData/Deleted Projects/aaaa/ProjectDescription.json similarity index 100% rename from TestData/Projects/aaaa/ProjectDescription.json rename to TestData/Deleted Projects/aaaa/ProjectDescription.json diff --git a/TestData/Projects/ahic CHIPS/ProjectDescription.json b/TestData/Deleted Projects/ahic CHIPS/ProjectDescription.json similarity index 100% rename from TestData/Projects/ahic CHIPS/ProjectDescription.json rename to TestData/Deleted Projects/ahic CHIPS/ProjectDescription.json diff --git a/TestData/Projects/ge/Deleted Chips/a.json b/TestData/Deleted Projects/ge/Deleted Chips/a.json similarity index 100% rename from TestData/Projects/ge/Deleted Chips/a.json rename to TestData/Deleted Projects/ge/Deleted Chips/a.json diff --git a/TestData/Projects/ge/Deleted Chips/a_1.json b/TestData/Deleted Projects/ge/Deleted Chips/a_1.json similarity index 100% rename from TestData/Projects/ge/Deleted Chips/a_1.json rename to TestData/Deleted Projects/ge/Deleted Chips/a_1.json diff --git a/TestData/Projects/ge/ProjectDescription.json b/TestData/Deleted Projects/ge/ProjectDescription.json similarity index 100% rename from TestData/Projects/ge/ProjectDescription.json rename to TestData/Deleted Projects/ge/ProjectDescription.json diff --git a/TestData/Projects/ram test/ProjectDescription.json b/TestData/Deleted Projects/ram test/ProjectDescription.json similarity index 100% rename from TestData/Projects/ram test/ProjectDescription.json rename to TestData/Deleted Projects/ram test/ProjectDescription.json diff --git a/TestData/Projects/test/Chips/128Nand.json b/TestData/Deleted Projects/test/Chips/128Nand.json similarity index 100% rename from TestData/Projects/test/Chips/128Nand.json rename to TestData/Deleted Projects/test/Chips/128Nand.json diff --git a/TestData/Projects/test/Chips/2NAND.json b/TestData/Deleted Projects/test/Chips/2NAND.json similarity index 100% rename from TestData/Projects/test/Chips/2NAND.json rename to TestData/Deleted Projects/test/Chips/2NAND.json diff --git a/TestData/Projects/test/Chips/4nand.json b/TestData/Deleted Projects/test/Chips/4nand.json similarity index 100% rename from TestData/Projects/test/Chips/4nand.json rename to TestData/Deleted Projects/test/Chips/4nand.json diff --git a/TestData/Projects/test/Chips/MergeTestChip.json b/TestData/Deleted Projects/test/Chips/MergeTestChip.json similarity index 100% rename from TestData/Projects/test/Chips/MergeTestChip.json rename to TestData/Deleted Projects/test/Chips/MergeTestChip.json diff --git a/TestData/Projects/test/ProjectDescription.json b/TestData/Deleted Projects/test/ProjectDescription.json similarity index 100% rename from TestData/Projects/test/ProjectDescription.json rename to TestData/Deleted Projects/test/ProjectDescription.json diff --git a/TestData/Projects/testz/ProjectDescription.json b/TestData/Deleted Projects/testz/ProjectDescription.json similarity index 100% rename from TestData/Projects/testz/ProjectDescription.json rename to TestData/Deleted Projects/testz/ProjectDescription.json diff --git "a/TestData/Projects/test\303\251&/ProjectDescription.json" "b/TestData/Deleted Projects/test\303\251&/ProjectDescription.json" similarity index 100% rename from "TestData/Projects/test\303\251&/ProjectDescription.json" rename to "TestData/Deleted Projects/test\303\251&/ProjectDescription.json" diff --git a/TestData/Projects/za/ProjectDescription.json b/TestData/Deleted Projects/za/ProjectDescription.json similarity index 100% rename from TestData/Projects/za/ProjectDescription.json rename to TestData/Deleted Projects/za/ProjectDescription.json diff --git a/TestData/Projects/ztest/ProjectDescription.json b/TestData/Deleted Projects/ztest/ProjectDescription.json similarity index 100% rename from TestData/Projects/ztest/ProjectDescription.json rename to TestData/Deleted Projects/ztest/ProjectDescription.json From 971905033069633765ec1c3faa9a293bf6aea91a Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Mon, 9 Jun 2025 20:08:16 +0200 Subject: [PATCH 100/124] Update .gitignore --- .gitignore | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 6ab61d28..a813f908 100644 --- a/.gitignore +++ b/.gitignore @@ -71,13 +71,4 @@ crashlytics-build.properties /[Aa]ssets/[Ss]treamingAssets/aa/* /.idea /.vsconfig -TestData/Projects/testea/ProjectDescription.json -TestData/Projects/sq/ProjectDescription.json -TestData/Projects/sq/Chips/rzqr.json -TestData/Projects/sq/Chips/qdzadzada.json -TestData/Projects/sq/Chips/q.json -TestData/Projects/MainTest/ProjectDescription.json -TestData/Deleted Projects/testPins/ProjectDescription.json -TestData/Deleted Projects/pintest/ProjectDescription.json -TestData/Deleted Projects/Pinners/ProjectDescription.json -TestData/Deleted Projects/aaa/ProjectDescription.json +TestData/* From c9ab0020dec80558805e54b0d630374b838498d7 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Tue, 10 Jun 2025 16:40:04 +0200 Subject: [PATCH 101/124] Deleting more useless Testdata --- .../ATEST/ProjectDescription.json | 73 - .../FinalFinalTest/ProjectDescription.json | 92 -- .../TestFinal/ProjectDescription.json | 99 -- .../a/ProjectDescription.json | 83 - .../aa/ProjectDescription.json | 83 - .../aaaa/ProjectDescription.json | 93 -- .../ahic CHIPS/ProjectDescription.json | 103 -- .../coltest/ProjectDescription.json | 78 - .../Deleted Projects/ge/Deleted Chips/a.json | 33 - .../ge/Deleted Chips/a_1.json | 33 - .../ge/ProjectDescription.json | 83 - .../ram test/ProjectDescription.json | 78 - .../Deleted Projects/test/Chips/128Nand.json | 1430 ----------------- .../Deleted Projects/test/Chips/2NAND.json | 44 - .../Deleted Projects/test/Chips/4nand.json | 44 - .../test/Chips/MergeTestChip.json | 437 ----- .../test/ProjectDescription.json | 131 -- .../testz/ProjectDescription.json | 65 - .../test\303\251&/ProjectDescription.json" | 78 - .../za/ProjectDescription.json | 83 - .../ztest/ProjectDescription.json | 73 - 21 files changed, 3316 deletions(-) delete mode 100644 TestData/Deleted Projects/ATEST/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/FinalFinalTest/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/TestFinal/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/a/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/aa/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/aaaa/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/ahic CHIPS/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/coltest/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/ge/Deleted Chips/a.json delete mode 100644 TestData/Deleted Projects/ge/Deleted Chips/a_1.json delete mode 100644 TestData/Deleted Projects/ge/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/ram test/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/test/Chips/128Nand.json delete mode 100644 TestData/Deleted Projects/test/Chips/2NAND.json delete mode 100644 TestData/Deleted Projects/test/Chips/4nand.json delete mode 100644 TestData/Deleted Projects/test/Chips/MergeTestChip.json delete mode 100644 TestData/Deleted Projects/test/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/testz/ProjectDescription.json delete mode 100644 "TestData/Deleted Projects/test\303\251&/ProjectDescription.json" delete mode 100644 TestData/Deleted Projects/za/ProjectDescription.json delete mode 100644 TestData/Deleted Projects/ztest/ProjectDescription.json diff --git a/TestData/Deleted Projects/ATEST/ProjectDescription.json b/TestData/Deleted Projects/ATEST/ProjectDescription.json deleted file mode 100644 index dbffa5e2..00000000 --- a/TestData/Deleted Projects/ATEST/ProjectDescription.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "ProjectName": "ATEST", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-04T18:32:03.724+02:00", - "LastSaveTime": "2025-06-04T20:26:12.664+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/FinalFinalTest/ProjectDescription.json b/TestData/Deleted Projects/FinalFinalTest/ProjectDescription.json deleted file mode 100644 index 744de5fc..00000000 --- a/TestData/Deleted Projects/FinalFinalTest/ProjectDescription.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "ProjectName": "FinalFinalTest", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-09T17:56:29.965+02:00", - "LastSaveTime": "2025-06-09T18:18:17.307+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON","DIPSWITCH","IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16","IN-64","OUT-64"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["1-4","1-8","4-8","4-1","8-4","8-1","8-16","16-8","1-16","16-1","4-64","64-4"], - "IsToggledOpen":false, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16","RAM-8"], - "IsToggledOpen":false, - "Name":"MEMORY" - } - ], - "pinBitCounts":[ - "1", - "4", - "8", - "16", - "64" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - }, - { - "Key":"16", - "Value":"8" - }, - { - "Key":"16", - "Value":"1" - }, - { - "Key":"64", - "Value":"4" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/TestFinal/ProjectDescription.json b/TestData/Deleted Projects/TestFinal/ProjectDescription.json deleted file mode 100644 index 458cbe7f..00000000 --- a/TestData/Deleted Projects/TestFinal/ProjectDescription.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "ProjectName": "TestFinal", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-09T17:48:33.979+02:00", - "LastSaveTime": "2025-06-09T17:51:29.885+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[ - "8-16", - "16-8" - ], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON","DIPSWITCH","IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["1-4","1-8","4-8","4-1","8-4","8-1","4-16","16-4","1-16","16-1","8-16","16-8"], - "IsToggledOpen":true, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":true, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":true, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16","RAM-8"], - "IsToggledOpen":true, - "Name":"MEMORY" - }, - { - "Chips":["BUZZER","BUS-16"], - "IsToggledOpen":false, - "Name":"OTHER" - } - ], - "pinBitCounts":[ - "1", - "4", - "8", - "16" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - }, - { - "Key":"16", - "Value":"4" - }, - { - "Key":"16", - "Value":"1" - }, - { - "Key":"16", - "Value":"8" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/a/ProjectDescription.json b/TestData/Deleted Projects/a/ProjectDescription.json deleted file mode 100644 index a6570965..00000000 --- a/TestData/Deleted Projects/a/ProjectDescription.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "ProjectName": "a", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-07T19:40:42.191+02:00", - "LastSaveTime": "2025-06-07T19:41:40.346+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":[], - "IsToggledOpen":true, - "Name":"MERGE/SPLIT" - }, - { - "Chips":[], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - }, - { - "Chips":["DIPSWITCH","RAM-8","BUZZER","IN-1","OUT-1","IN-4","OUT-4","IN-8","OUT-8","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT","BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"OTHER" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/aa/ProjectDescription.json b/TestData/Deleted Projects/aa/ProjectDescription.json deleted file mode 100644 index a268c8fc..00000000 --- a/TestData/Deleted Projects/aa/ProjectDescription.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "ProjectName": "aa", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-07T19:41:43.175+02:00", - "LastSaveTime": "2025-06-07T20:05:36.891+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":[], - "IsToggledOpen":false, - "Name":"MERGE/SPLIT" - }, - { - "Chips":[], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - }, - { - "Chips":["DIPSWITCH","RAM-8","BUZZER","IN-1","OUT-1","IN-4","OUT-4","IN-8","OUT-8","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT","BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"OTHER" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/aaaa/ProjectDescription.json b/TestData/Deleted Projects/aaaa/ProjectDescription.json deleted file mode 100644 index f6b96ef8..00000000 --- a/TestData/Deleted Projects/aaaa/ProjectDescription.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "ProjectName": "aaaa", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-09T16:46:13.873+02:00", - "LastSaveTime": "2025-06-09T17:45:23.829+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON","DIPSWITCH","IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-12","OUT-12","IN-6","OUT-6"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["1-4","1-8","4-8","4-1","8-4","8-1","4-12","12-4","1-12","12-1"], - "IsToggledOpen":true, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16","RAM-8"], - "IsToggledOpen":false, - "Name":"MEMORY" - }, - { - "Chips":["BUZZER","4-12","12-4","BUS-12","BUS-6"], - "IsToggledOpen":false, - "Name":"OTHER" - } - ], - "pinBitCounts":[ - "1", - "4", - "8", - "12", - "6" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - }, - { - "Key":"12", - "Value":"4" - }, - { - "Key":"12", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/ahic CHIPS/ProjectDescription.json b/TestData/Deleted Projects/ahic CHIPS/ProjectDescription.json deleted file mode 100644 index 0acaa082..00000000 --- a/TestData/Deleted Projects/ahic CHIPS/ProjectDescription.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "ProjectName": "ahic CHIPS", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-05-24T13:06:54.829+02:00", - "LastSaveTime": "2025-06-04T20:26:12.664+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - }, - { - "Name":"MERGE/SPLIT", - "IsCollection":true - }, - { - "Name":"BASIC", - "IsCollection":true - }, - { - "Name":"DISPLAY", - "IsCollection":true - }, - { - "Name":"MEMORY", - "IsCollection":true - }, - { - "Name":"OTHER", - "IsCollection":true - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER"], - "IsToggledOpen":true, - "Name":"BASIC" - }, - { - "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","BUTTON"], - "IsToggledOpen":true, - "Name":"IN/OUT" - }, - { - "Chips":["1-4BIT","1-8BIT","4-8BIT","4-1BIT","8-4BIT","8-1BIT"], - "IsToggledOpen":true, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":true, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - }, - { - "Chips":["DIPSWITCH","RAM-8","BUZZER"], - "IsToggledOpen":false, - "Name":"OTHER" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/coltest/ProjectDescription.json b/TestData/Deleted Projects/coltest/ProjectDescription.json deleted file mode 100644 index 632533f9..00000000 --- a/TestData/Deleted Projects/coltest/ProjectDescription.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "ProjectName": "coltest", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-07T19:39:15.134+02:00", - "LastSaveTime": "2025-06-07T19:39:15.136+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":[], - "IsToggledOpen":false, - "Name":"MERGE/SPLIT" - }, - { - "Chips":[], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/ge/Deleted Chips/a.json b/TestData/Deleted Projects/ge/Deleted Chips/a.json deleted file mode 100644 index 761f4ca9..00000000 --- a/TestData/Deleted Projects/ge/Deleted Chips/a.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "DLSVersion": "2.1.6", - "Name": "a", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 0.37, - "y": 0.375 - }, - "Colour": { - "r": 0.254495621, - "g": 0.060596846, - "b": 0.437861621, - "a": 1 - }, - "InputPins":[], - "OutputPins":[], - "SubChips":[ - { - "Name":"NAND", - "ID":1333565967, - "Label":"", - "Position":{ - "x":-5.64754, - "y":-1.83607 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[], - "Displays": null -} \ No newline at end of file diff --git a/TestData/Deleted Projects/ge/Deleted Chips/a_1.json b/TestData/Deleted Projects/ge/Deleted Chips/a_1.json deleted file mode 100644 index c91ccb6f..00000000 --- a/TestData/Deleted Projects/ge/Deleted Chips/a_1.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "DLSVersion": "2.1.6", - "Name": "a", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 0.37, - "y": 0.375 - }, - "Colour": { - "r": 0.481921643, - "g": 0.346283436, - "b": 0.516404569, - "a": 1 - }, - "InputPins":[], - "OutputPins":[], - "SubChips":[ - { - "Name":"NAND", - "ID":1172801001, - "Label":"", - "Position":{ - "x":-4.90984, - "y":-1.04918 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[], - "Displays": null -} \ No newline at end of file diff --git a/TestData/Deleted Projects/ge/ProjectDescription.json b/TestData/Deleted Projects/ge/ProjectDescription.json deleted file mode 100644 index 5129755e..00000000 --- a/TestData/Deleted Projects/ge/ProjectDescription.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "ProjectName": "ge", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-07T20:16:17.213+02:00", - "LastSaveTime": "2025-06-09T15:57:44.031+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON","IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["1-4","1-8","4-8","4-1","8-4","8-1"], - "IsToggledOpen":false, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":true, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":true, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - }, - { - "Chips":["DIPSWITCH","RAM-8","BUZZER","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT"], - "IsToggledOpen":true, - "Name":"OTHER" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/ram test/ProjectDescription.json b/TestData/Deleted Projects/ram test/ProjectDescription.json deleted file mode 100644 index a589ef3a..00000000 --- a/TestData/Deleted Projects/ram test/ProjectDescription.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "ProjectName": "ram test", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-05-24T12:10:42.805+02:00", - "LastSaveTime": "2025-06-04T20:26:12.665+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","BUTTON"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["1-4BIT","1-8BIT","4-8BIT","4-1BIT","8-4BIT","8-1BIT"], - "IsToggledOpen":false, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/test/Chips/128Nand.json b/TestData/Deleted Projects/test/Chips/128Nand.json deleted file mode 100644 index 67b1167b..00000000 --- a/TestData/Deleted Projects/test/Chips/128Nand.json +++ /dev/null @@ -1,1430 +0,0 @@ -{ - "DLSVersion": "2.1.6", - "Name": "128Nand", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 1.175, - "y": 0.375 - }, - "Colour": { - "r": 0.47345227, - "g": 0.368196636, - "b": 0.381946534, - "a": 1 - }, - "InputPins":[], - "OutputPins":[], - "SubChips":[ - { - "Name":"NAND", - "ID":1037436837, - "Label":"", - "Position":{ - "x":-4.25, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1782796312, - "Label":"", - "Position":{ - "x":-4.25, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1133947279, - "Label":"", - "Position":{ - "x":-4.25, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1958890484, - "Label":"", - "Position":{ - "x":-4.25, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":965887867, - "Label":"", - "Position":{ - "x":-2.875, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":984597380, - "Label":"", - "Position":{ - "x":-2.875, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":498409179, - "Label":"", - "Position":{ - "x":-2.875, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":821532349, - "Label":"", - "Position":{ - "x":-2.875, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":919153886, - "Label":"", - "Position":{ - "x":-1.625, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":225140029, - "Label":"", - "Position":{ - "x":-1.625, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1771476137, - "Label":"", - "Position":{ - "x":-1.625, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1416851458, - "Label":"", - "Position":{ - "x":-1.625, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":789313381, - "Label":"", - "Position":{ - "x":-0.25, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":972372965, - "Label":"", - "Position":{ - "x":-0.25, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":320459552, - "Label":"", - "Position":{ - "x":-0.25, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1198888161, - "Label":"", - "Position":{ - "x":-0.25, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1735152186, - "Label":"", - "Position":{ - "x":-4.25, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":689225101, - "Label":"", - "Position":{ - "x":-4.25, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1378839873, - "Label":"", - "Position":{ - "x":-4.25, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":218304152, - "Label":"", - "Position":{ - "x":-4.25, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1309809540, - "Label":"", - "Position":{ - "x":-2.875, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":473147561, - "Label":"", - "Position":{ - "x":-2.875, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":68554836, - "Label":"", - "Position":{ - "x":-2.875, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1076604979, - "Label":"", - "Position":{ - "x":-2.875, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1507775190, - "Label":"", - "Position":{ - "x":-1.625, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1469537882, - "Label":"", - "Position":{ - "x":-1.625, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":871636732, - "Label":"", - "Position":{ - "x":-1.625, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":4834403, - "Label":"", - "Position":{ - "x":-1.625, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":510679920, - "Label":"", - "Position":{ - "x":-0.25, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":516977451, - "Label":"", - "Position":{ - "x":-0.25, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":897031458, - "Label":"", - "Position":{ - "x":-0.25, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":807061339, - "Label":"", - "Position":{ - "x":-0.25, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":673550427, - "Label":"", - "Position":{ - "x":1.125, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1218477270, - "Label":"", - "Position":{ - "x":1.125, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1233863810, - "Label":"", - "Position":{ - "x":1.125, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1098021250, - "Label":"", - "Position":{ - "x":1.125, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":149803267, - "Label":"", - "Position":{ - "x":2.5, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":22682235, - "Label":"", - "Position":{ - "x":2.5, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":208806525, - "Label":"", - "Position":{ - "x":2.5, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":446006325, - "Label":"", - "Position":{ - "x":2.5, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":156585193, - "Label":"", - "Position":{ - "x":3.75, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":694871158, - "Label":"", - "Position":{ - "x":3.75, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":2056559915, - "Label":"", - "Position":{ - "x":3.75, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1467259146, - "Label":"", - "Position":{ - "x":3.75, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":100736233, - "Label":"", - "Position":{ - "x":5.125, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":315625149, - "Label":"", - "Position":{ - "x":5.125, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":688208241, - "Label":"", - "Position":{ - "x":5.125, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":822843206, - "Label":"", - "Position":{ - "x":5.125, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1115702660, - "Label":"", - "Position":{ - "x":1.125, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":88146244, - "Label":"", - "Position":{ - "x":1.125, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1161913772, - "Label":"", - "Position":{ - "x":1.125, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":591552654, - "Label":"", - "Position":{ - "x":1.125, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":402261656, - "Label":"", - "Position":{ - "x":2.5, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1078843262, - "Label":"", - "Position":{ - "x":2.5, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1366105353, - "Label":"", - "Position":{ - "x":2.5, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":974965131, - "Label":"", - "Position":{ - "x":2.5, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1059513122, - "Label":"", - "Position":{ - "x":3.75, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1093174171, - "Label":"", - "Position":{ - "x":3.75, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1692410214, - "Label":"", - "Position":{ - "x":3.75, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1178199252, - "Label":"", - "Position":{ - "x":3.75, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":775531381, - "Label":"", - "Position":{ - "x":5.125, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":298492642, - "Label":"", - "Position":{ - "x":5.125, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":837865283, - "Label":"", - "Position":{ - "x":5.125, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":677086361, - "Label":"", - "Position":{ - "x":5.125, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":2004489522, - "Label":"", - "Position":{ - "x":6.5, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1379473554, - "Label":"", - "Position":{ - "x":6.5, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":197423381, - "Label":"", - "Position":{ - "x":6.5, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":564271499, - "Label":"", - "Position":{ - "x":6.5, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":984341173, - "Label":"", - "Position":{ - "x":7.875, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1396005591, - "Label":"", - "Position":{ - "x":7.875, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1539729565, - "Label":"", - "Position":{ - "x":7.875, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1316692452, - "Label":"", - "Position":{ - "x":7.875, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1578371819, - "Label":"", - "Position":{ - "x":9.125, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1218308124, - "Label":"", - "Position":{ - "x":9.125, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1050295550, - "Label":"", - "Position":{ - "x":9.125, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1619813768, - "Label":"", - "Position":{ - "x":9.125, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":2003224764, - "Label":"", - "Position":{ - "x":10.5, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1999666308, - "Label":"", - "Position":{ - "x":10.5, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":123854344, - "Label":"", - "Position":{ - "x":10.5, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":749576642, - "Label":"", - "Position":{ - "x":10.5, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":908244702, - "Label":"", - "Position":{ - "x":6.5, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1334657778, - "Label":"", - "Position":{ - "x":6.5, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1734797205, - "Label":"", - "Position":{ - "x":6.5, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1900758407, - "Label":"", - "Position":{ - "x":6.5, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1644133108, - "Label":"", - "Position":{ - "x":7.875, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":687271831, - "Label":"", - "Position":{ - "x":7.875, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1008311304, - "Label":"", - "Position":{ - "x":7.875, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1661686302, - "Label":"", - "Position":{ - "x":7.875, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":751038039, - "Label":"", - "Position":{ - "x":9.125, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1884060458, - "Label":"", - "Position":{ - "x":9.125, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1587314380, - "Label":"", - "Position":{ - "x":9.125, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1171698609, - "Label":"", - "Position":{ - "x":9.125, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1907985727, - "Label":"", - "Position":{ - "x":10.5, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1600628976, - "Label":"", - "Position":{ - "x":10.5, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1613333627, - "Label":"", - "Position":{ - "x":10.5, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":510649831, - "Label":"", - "Position":{ - "x":10.5, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1259456591, - "Label":"", - "Position":{ - "x":11.875, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1365009594, - "Label":"", - "Position":{ - "x":11.875, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1656916817, - "Label":"", - "Position":{ - "x":11.875, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1619120880, - "Label":"", - "Position":{ - "x":11.875, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":112513099, - "Label":"", - "Position":{ - "x":13.25, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1768141617, - "Label":"", - "Position":{ - "x":13.25, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1520894910, - "Label":"", - "Position":{ - "x":13.25, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":194880103, - "Label":"", - "Position":{ - "x":13.25, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1630010703, - "Label":"", - "Position":{ - "x":14.5, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1632634376, - "Label":"", - "Position":{ - "x":14.5, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":719705280, - "Label":"", - "Position":{ - "x":14.5, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":597950580, - "Label":"", - "Position":{ - "x":14.5, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":705337560, - "Label":"", - "Position":{ - "x":15.875, - "y":1.0 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1460580221, - "Label":"", - "Position":{ - "x":15.875, - "y":0.375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1886449695, - "Label":"", - "Position":{ - "x":15.875, - "y":-0.25 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":189256, - "Label":"", - "Position":{ - "x":15.875, - "y":-0.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":135044335, - "Label":"", - "Position":{ - "x":11.875, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1436415133, - "Label":"", - "Position":{ - "x":11.875, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":295868041, - "Label":"", - "Position":{ - "x":11.875, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1290581537, - "Label":"", - "Position":{ - "x":11.875, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1590777362, - "Label":"", - "Position":{ - "x":13.25, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":2064683831, - "Label":"", - "Position":{ - "x":13.25, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":361443090, - "Label":"", - "Position":{ - "x":13.25, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1317217691, - "Label":"", - "Position":{ - "x":13.25, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":371162250, - "Label":"", - "Position":{ - "x":14.5, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":683220726, - "Label":"", - "Position":{ - "x":14.5, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1960717107, - "Label":"", - "Position":{ - "x":14.5, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1247764362, - "Label":"", - "Position":{ - "x":14.5, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1956174858, - "Label":"", - "Position":{ - "x":15.875, - "y":-1.4375 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":368030956, - "Label":"", - "Position":{ - "x":15.875, - "y":-2.0625 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1556190372, - "Label":"", - "Position":{ - "x":15.875, - "y":-2.6875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":2125226490, - "Label":"", - "Position":{ - "x":15.875, - "y":-3.3125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[], - "Displays": null -} \ No newline at end of file diff --git a/TestData/Deleted Projects/test/Chips/2NAND.json b/TestData/Deleted Projects/test/Chips/2NAND.json deleted file mode 100644 index c40a582d..00000000 --- a/TestData/Deleted Projects/test/Chips/2NAND.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "DLSVersion": "2.1.6", - "Name": "2NAND", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 0.875, - "y": 0.375 - }, - "Colour": { - "r": 0.372427016, - "g": 0.2604745, - "b": 0.931104362, - "a": 1 - }, - "InputPins":[], - "OutputPins":[], - "SubChips":[ - { - "Name":"NAND", - "ID":1232961147, - "Label":"", - "Position":{ - "x":-4.25481, - "y":-0.36058 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"NAND", - "ID":1369511411, - "Label":"", - "Position":{ - "x":-2.66827, - "y":-0.34455 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - } - ], - "Wires":[], - "Displays": null -} \ No newline at end of file diff --git a/TestData/Deleted Projects/test/Chips/4nand.json b/TestData/Deleted Projects/test/Chips/4nand.json deleted file mode 100644 index 91b8b357..00000000 --- a/TestData/Deleted Projects/test/Chips/4nand.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "DLSVersion": "2.1.6", - "Name": "4nand", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 0.875, - "y": 0.375 - }, - "Colour": { - "r": 0.390986025, - "g": 0.364759177, - "b": 0.5003054, - "a": 1 - }, - "InputPins":[], - "OutputPins":[], - "SubChips":[ - { - "Name":"2NAND", - "ID":408654408, - "Label":"", - "Position":{ - "x":-2.95673, - "y":-0.8734 - }, - "OutputPinColourInfo":[], - "InternalData":null - }, - { - "Name":"2NAND", - "ID":1245853887, - "Label":"", - "Position":{ - "x":-1.875, - "y":-0.875 - }, - "OutputPinColourInfo":[], - "InternalData":null - } - ], - "Wires":[], - "Displays": null -} \ No newline at end of file diff --git a/TestData/Deleted Projects/test/Chips/MergeTestChip.json b/TestData/Deleted Projects/test/Chips/MergeTestChip.json deleted file mode 100644 index 7ed05959..00000000 --- a/TestData/Deleted Projects/test/Chips/MergeTestChip.json +++ /dev/null @@ -1,437 +0,0 @@ -{ - "DLSVersion": "2.1.6", - "Name": "MergeTestChip", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 2.075, - "y": 7.0 - }, - "Colour": { - "r": 0.8262435, - "g": 0.120347567, - "b": 0.5926981, - "a": 1 - }, - "InputPins":[ - { - "Name":"OUT", - "ID":1039825680, - "Position":{ - "x":-15.2975, - "y":-0.02996 - }, - "BitCount":"128", - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"IN", - "ID":1396246340, - "Position":{ - "x":33.9225, - "y":0.25 - }, - "BitCount":"128", - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"128-64BIT", - "ID":2107078314, - "Label":"", - "Position":{ - "x":-4.2525, - "y":-0.14541 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], - "InternalData":null - }, - { - "Name":"64-32BIT", - "ID":1114783706, - "Label":"", - "Position":{ - "x":2.6821, - "y":1.90363 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], - "InternalData":null - }, - { - "Name":"64-16BIT", - "ID":942558436, - "Label":"", - "Position":{ - "x":2.6725, - "y":-1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], - "InternalData":null - }, - { - "Name":"16-64BIT", - "ID":1915053319, - "Label":"", - "Position":{ - "x":18.5475, - "y":-1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], - "InternalData":null - }, - { - "Name":"32-64BIT", - "ID":1797244266, - "Label":"", - "Position":{ - "x":18.5475, - "y":1.875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"64-128BIT", - "ID":635399602, - "Label":"", - "Position":{ - "x":26.7475, - "y":0.19729 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"32-16BIT", - "ID":823418772, - "Label":"", - "Position":{ - "x":5.9225, - "y":1.1875 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], - "InternalData":null - }, - { - "Name":"16-32BIT", - "ID":1630164785, - "Label":"", - "Position":{ - "x":15.0475, - "y":1.125 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":2}], - "InternalData":null - }, - { - "Name":"16-4BIT", - "ID":2049001141, - "Label":"", - "Position":{ - "x":8.48459, - "y":1.33853 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1}], - "InternalData":null - }, - { - "Name":"4-16BIT", - "ID":971537629, - "Label":"", - "Position":{ - "x":10.40326, - "y":1.31041 - }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":4}], - "InternalData":null - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":2107078314 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1114783706 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":2107078314 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":942558436 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1797244266 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":635399602 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1915053319 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":635399602 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":635399602 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1396246340 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1039825680 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2107078314 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1114783706 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":823418772 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":823418772 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":2049001141 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1114783706 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1797244266 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":2049001141 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":971537629 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":2049001141 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":971537629 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":2049001141 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":971537629 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":2049001141 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":971537629 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":971537629 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1630164785 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":823418772 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1630164785 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":7.4375,"y":0.75},{"x":7.4375,"y":-0.25},{"x":13.625,"y":-0.25},{"x":13.625,"y":0.875},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":1630164785 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1797244266 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":942558436 - }, - "TargetPinAddress":{ - "PinID":3, - "PinOwnerID":1915053319 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.8125,"y":-0.5625},{"x":5.8125,"y":-1.3125},{"x":15.6875,"y":-1.3125},{"x":15.6875,"y":-0.5625},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, - "PinOwnerID":942558436 - }, - "TargetPinAddress":{ - "PinID":2, - "PinOwnerID":1915053319 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":5.0625,"y":-1.25},{"x":5.0625,"y":-2.1875},{"x":16.375,"y":-2.1875},{"x":16.375,"y":-1.4375},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":2, - "PinOwnerID":942558436 - }, - "TargetPinAddress":{ - "PinID":1, - "PinOwnerID":1915053319 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":4.375,"y":-2.3125},{"x":4.375,"y":-2.9375},{"x":17.25,"y":-2.9375},{"x":17.25,"y":-2.25},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":942558436 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1915053319 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":3.6875,"y":-3.125},{"x":3.6875,"y":-4.0},{"x":17.3125,"y":-4.0},{"x":17.3125,"y":-3.1875},{"x":0.0,"y":0.0}] - } - ], - "Displays": null -} \ No newline at end of file diff --git a/TestData/Deleted Projects/test/ProjectDescription.json b/TestData/Deleted Projects/test/ProjectDescription.json deleted file mode 100644 index aa11fc35..00000000 --- a/TestData/Deleted Projects/test/ProjectDescription.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "ProjectName": "test", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-05-19T11:48:01.969+02:00", - "LastSaveTime": "2025-06-07T17:52:35.836+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 1, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 100000000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[ - "128Nand", - "2NAND", - "4nand", - "MergeTestChip" - ], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - }, - { - "Name":"128Nand", - "IsCollection":false - }, - { - "Name":"2NAND", - "IsCollection":false - }, - { - "Name":"4nand", - "IsCollection":false - }, - { - "Name":"MergeTestChip", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER"], - "IsToggledOpen":true, - "Name":"BASIC" - }, - { - "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["1-4BIT","1-8BIT","4-8BIT","4-1BIT","8-4BIT","8-1BIT"], - "IsToggledOpen":false, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":true, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":true, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":true, - "Name":"MEMORY" - }, - { - "Chips":["BUTTON","DIPSWITCH","CONST","RAM-8","BUZZER","128Nand","IN-32","OUT-32","IN-16","OUT-16","IN-24","OUT-24","IN-128","OUT-128","IN-1024","OUT-1024","IN-20736000","OUT-20736000","IN-345600","OUT-345600","IN-15","OUT-15","4-16BIT","16-4BIT","16-32BIT","32-16BIT","2NAND","4nand","IN-64","OUT-64","64-128BIT","128-64BIT","32-64BIT","64-32BIT","16-64BIT","64-16BIT","MergeTestChip"], - "IsToggledOpen":true, - "Name":"OTHER" - } - ], - "pinBitCounts":[ - "1", - "4", - "8", - "32", - "16", - "24", - "128", - "1024", - "15", - "64" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - }, - { - "Key":"16", - "Value":"4" - }, - { - "Key":"32", - "Value":"16" - }, - { - "Key":"128", - "Value":"64" - }, - { - "Key":"64", - "Value":"32" - }, - { - "Key":"64", - "Value":"16" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/testz/ProjectDescription.json b/TestData/Deleted Projects/testz/ProjectDescription.json deleted file mode 100644 index 541e64b9..00000000 --- a/TestData/Deleted Projects/testz/ProjectDescription.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "ProjectName": "testz", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-05-30T15:28:02.070+02:00", - "LastSaveTime": "2025-06-04T20:26:12.666+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["1-4BIT","1-8BIT","4-8BIT","4-1BIT","8-4BIT","8-1BIT"], - "IsToggledOpen":false, - "Name":"MERGE/SPLIT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs": null -} \ No newline at end of file diff --git "a/TestData/Deleted Projects/test\303\251&/ProjectDescription.json" "b/TestData/Deleted Projects/test\303\251&/ProjectDescription.json" deleted file mode 100644 index 20c93f79..00000000 --- "a/TestData/Deleted Projects/test\303\251&/ProjectDescription.json" +++ /dev/null @@ -1,78 +0,0 @@ -{ - "ProjectName": "testé&", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-04T20:21:19.546+02:00", - "LastSaveTime": "2025-06-04T20:26:12.666+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - }, - { - "Chips":["DIPSWITCH","RAM-8","BUZZER","IN-1","OUT-1","IN-4","OUT-4","IN-8","OUT-8","4-8","8-4","1-8","8-1","1-4","4-1","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT"], - "IsToggledOpen":true, - "Name":"OTHER" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/za/ProjectDescription.json b/TestData/Deleted Projects/za/ProjectDescription.json deleted file mode 100644 index 38a09a61..00000000 --- a/TestData/Deleted Projects/za/ProjectDescription.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "ProjectName": "za", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-07T20:05:44.258+02:00", - "LastSaveTime": "2025-06-09T16:46:02.153+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":[], - "IsToggledOpen":true, - "Name":"MERGE/SPLIT" - }, - { - "Chips":[], - "IsToggledOpen":true, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - }, - { - "Chips":["DIPSWITCH","RAM-8","BUZZER","IN-1","OUT-1","IN-4","OUT-4","IN-8","OUT-8","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT","BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":true, - "Name":"OTHER" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file diff --git a/TestData/Deleted Projects/ztest/ProjectDescription.json b/TestData/Deleted Projects/ztest/ProjectDescription.json deleted file mode 100644 index 65479d8c..00000000 --- a/TestData/Deleted Projects/ztest/ProjectDescription.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "ProjectName": "ztest", - "DLSVersion_LastSaved": "2.1.6", - "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-06-04T18:16:56.000+02:00", - "LastSaveTime": "2025-06-04T20:31:33.685+02:00", - "Prefs_MainPinNamesDisplayMode": 1, - "Prefs_ChipPinNamesDisplayMode": 1, - "Prefs_GridDisplayMode": 0, - "Prefs_Snapping": 0, - "Prefs_StraightWires": 0, - "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 1000, - "Prefs_SimStepsPerClockTick": 250, - "AllCustomChipNames":[], - "StarredList":[ - { - "Name":"IN/OUT", - "IsCollection":true - }, - { - "Name":"NAND", - "IsCollection":false - } - ], - "ChipCollections":[ - { - "Chips":["NAND","CLOCK","PULSE","KEY","3-STATE BUFFER","CONST"], - "IsToggledOpen":false, - "Name":"BASIC" - }, - { - "Chips":["BUTTON"], - "IsToggledOpen":false, - "Name":"IN/OUT" - }, - { - "Chips":["BUS-1","BUS-4","BUS-8"], - "IsToggledOpen":false, - "Name":"BUS" - }, - { - "Chips":["7-SEGMENT","DOT DISPLAY","RGB DISPLAY","LED"], - "IsToggledOpen":false, - "Name":"DISPLAY" - }, - { - "Chips":["ROM 256×16","EEPROM 256×16"], - "IsToggledOpen":false, - "Name":"MEMORY" - } - ], - "pinBitCounts":[ - "1", - "4", - "8" - ], - "SplitMergePairs":[ - { - "Key":"8", - "Value":"4" - }, - { - "Key":"8", - "Value":"1" - }, - { - "Key":"4", - "Value":"1" - } - ] -} \ No newline at end of file From 8b0adeebbec388c5d867ee8980a9f5e15b8dc4a3 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Tue, 10 Jun 2025 16:41:10 +0200 Subject: [PATCH 102/124] Delete s.json --- TestData/Projects/sq/Chips/s.json | 136 ------------------------------ 1 file changed, 136 deletions(-) delete mode 100644 TestData/Projects/sq/Chips/s.json diff --git a/TestData/Projects/sq/Chips/s.json b/TestData/Projects/sq/Chips/s.json deleted file mode 100644 index 7b0f73a8..00000000 --- a/TestData/Projects/sq/Chips/s.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "DLSVersion": "2.1.6", - "Name": "s", - "NameLocation": 0, - "ChipType": 0, - "Size": { - "x": 0.37, - "y": 0.5 - }, - "Colour": { - "r": 0.607444167, - "g": 0.0234385636, - "b": 0.439777076, - "a": 1 - }, - "InputPins":[ - { - "Name":"OUT", - "ID":898096517, - "Position":{ - "x":-6.01407, - "y":-1.6823 - }, - "BitCount":"1", - "Colour":0, - "ValueDisplayMode":0 - }, - { - "Name":"OUT", - "ID":1296796487, - "Position":{ - "x":-6.0, - "y":-2.25 - }, - "BitCount":"1", - "Colour":0, - "ValueDisplayMode":0 - } - ], - "OutputPins":[ - { - "Name":"IN", - "ID":1536622727, - "Position":{ - "x":2.28605, - "y":-1.79953 - }, - "BitCount":"1", - "Colour":0, - "ValueDisplayMode":0 - } - ], - "SubChips":[ - { - "Name":"BUS-1", - "ID":1525428923, - "Label":"", - "Position":{ - "x":-5.31829, - "y":-0.09965 - }, - "OutputPinColourInfo":null, - "InternalData":[385429360,0] - }, - { - "Name":"BUS-TERMINUS-1", - "ID":385429360, - "Label":"", - "Position":{ - "x":1.885, - "y":-0.09965 - }, - "OutputPinColourInfo":null, - "InternalData":[1525428923,0] - } - ], - "Wires":[ - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1525428923 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":385429360 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":898096517 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1525428923 - }, - "ConnectionType":2, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":-4.0625,"y":-1.6875},{"x":-4.0625,"y":-0.09965}] - }, - { - "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1525428923 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1536622727 - }, - "ConnectionType":1, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.5,"y":-0.09965},{"x":0.5,"y":-1.8125},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, - "PinOwnerID":1296796487 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":1525428923 - }, - "ConnectionType":2, - "ConnectedWireIndex":0, - "ConnectedWireSegmentIndex":0, - "Points":[{"x":0.0,"y":0.0},{"x":-3.0625,"y":-2.25},{"x":-3.0625,"y":-0.09965}] - } - ], - "Displays": null -} \ No newline at end of file From e1b182f20c6c50f06f08c86faca20f25dfb2d49d Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Sun, 15 Jun 2025 05:32:51 +0200 Subject: [PATCH 103/124] Bigger wires and pins use less space --- .../Types/SubTypes/PinDescription.cs | 16 ++++++-- Assets/Scripts/Game/Elements/PinInstance.cs | 4 +- .../Scripts/Game/Elements/SubChipInstance.cs | 9 ++++- Assets/Scripts/Game/Elements/WireInstance.cs | 7 ++-- Assets/Scripts/Game/Helpers/GridHelper.cs | 4 +- .../Game/Project/BuiltinChipCreator.cs | 4 +- Assets/Scripts/Graphics/DrawSettings.cs | 38 +++++++++++++++++-- .../Graphics/UI/Menus/SpecialChipMakerMenu.cs | 7 ++-- .../Scripts/Graphics/World/DevSceneDrawer.cs | 13 ++++++- .../Graphics/World/WireLayoutHelper.cs | 5 ++- Assets/Scripts/Simulation/PinStateValue.cs | 2 +- 11 files changed, 82 insertions(+), 27 deletions(-) diff --git a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs index 96d28e55..3d8bdc3b 100644 --- a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs @@ -30,7 +30,7 @@ public struct PinBitCount public const int Bit4 = 4; public const int Bit8 = 8; - public ushort BitCount; + public int BitCount; public override string ToString() { @@ -42,7 +42,7 @@ public PinBitCount(ushort BitCount = 1) } public readonly BitArray GetEmptyBitArray() { - return new BitArray(BitCount<<1); + return new BitArray(length: (int)BitCount<<1); } public override bool Equals(System.Object @object) @@ -58,6 +58,14 @@ public override int GetHashCode() { return HashCode.Combine(BitCount); } + + public int GetTier() + { + if (BitCount <= 64) return 0; + else if (BitCount <= 512) return 1; + else if (BitCount <= 4096) return 2; + else return 3; + } public static bool operator ==(PinBitCount a, PinBitCount b) => a.BitCount == b.BitCount; public static bool operator !=(PinBitCount a, PinBitCount b) => a.BitCount != b.BitCount; @@ -71,9 +79,9 @@ public override int GetHashCode() public static bool operator !=(PinBitCount a, int number) => number != a.BitCount; - public static implicit operator uint(PinBitCount b) => b.BitCount; + public static implicit operator uint(PinBitCount b) => (uint)b.BitCount; public static implicit operator int(PinBitCount b) => b.BitCount; - public static implicit operator ushort(PinBitCount b) => b.BitCount; + public static implicit operator ushort(PinBitCount b) => (ushort)b.BitCount; public static implicit operator PinBitCount(Int64 b) => new PinBitCount((ushort)b); diff --git a/Assets/Scripts/Game/Elements/PinInstance.cs b/Assets/Scripts/Game/Elements/PinInstance.cs index 97819fc5..457fc910 100644 --- a/Assets/Scripts/Game/Elements/PinInstance.cs +++ b/Assets/Scripts/Game/Elements/PinInstance.cs @@ -72,15 +72,15 @@ public void SetBusFlip(bool flipped) public Color GetColLow() => DrawSettings.ActiveTheme.StateLowCol[(int)Colour]; public Color GetColHigh() => DrawSettings.ActiveTheme.StateHighCol[(int)Colour]; - public Color GetStateCol(int bitIndex, bool hover = false, bool canUsePlayerState = true) + public Color GetStateCol(int bitIndex, bool hover = false, bool canUsePlayerState = true, bool forWires = false) { PinStateValue pinState = (IsSourcePin && canUsePlayerState) ? PlayerInputState : State; // dev input pin uses player state (so it updates even when sim is paused) uint state = pinState.GetTristatedValue(bitIndex); if (state == PinStateValue.LOGIC_DISCONNECTED) return DrawSettings.ActiveTheme.StateDisconnectedCol; + if(forWires && bitCount >= 64) { return DrawSettings.GetFlatColour(state == PinStateValue.LOGIC_HIGH, (uint)Colour, hover); } return DrawSettings.GetStateColour(state == PinStateValue.LOGIC_HIGH, (uint)Colour, hover); } - public void ChangeBitCount(int NewBitCount) { bitCount.BitCount = (ushort)NewBitCount; diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index e0b1b670..5c2fd873 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -200,7 +200,7 @@ public static (float chipHeight, float[] pinGridY) CalculateDefaultPinLayout(Pin PinBitCount.Bit1 => 2, PinBitCount.Bit4 => 3, PinBitCount.Bit8 => 4, - _ => Mathf.RoundToInt(0.43f / 8 * pinBitCount.BitCount / DrawSettings.GridSize +0.5f) + _ => Mathf.RoundToInt((GetPinDepthMultiplier(pinBitCount) * pinBitCount.BitCount * DrawSettings.PinHeightPerBit + 0.03f)/DrawSettings.GridSize) }; @@ -311,10 +311,15 @@ public static float PinHeightFromBitCount(PinBitCount bitCount) PinBitCount.Bit1 => DrawSettings.PinRadius * 2, PinBitCount.Bit4 => DrawSettings.PinHeight4Bit, PinBitCount.Bit8 => DrawSettings.PinHeight8Bit, - _ => 0.43f/8 * bitCount.BitCount, + _ => (GetPinDepthMultiplier(bitCount) * bitCount.BitCount * DrawSettings.PinHeightPerBit) + 0.03f, }; } + public static float GetPinDepthMultiplier(PinBitCount bitCount) + { + return (float)Math.Pow(8, -bitCount.GetTier()); + } + // Split chip name into two lines (if contains a space character) static string CreateMultiLineName(string name) { diff --git a/Assets/Scripts/Game/Elements/WireInstance.cs b/Assets/Scripts/Game/Elements/WireInstance.cs index afe28ec4..6e7371e3 100644 --- a/Assets/Scripts/Game/Elements/WireInstance.cs +++ b/Assets/Scripts/Game/Elements/WireInstance.cs @@ -312,16 +312,15 @@ public void RemoveConnectionDependency() public Color GetColour(int bitIndex) { - Color col = IsFullyConnected ? SourcePin.GetStateCol(bitIndex, false, false) : DrawSettings.ActiveTheme.StateDisconnectedCol; + Color col = IsFullyConnected ? SourcePin.GetStateCol(bitIndex, false, false, true) : DrawSettings.ActiveTheme.StateDisconnectedCol; - if (bitCount != PinBitCount.Bit1 && bitIndex % 2 == 0) + if (bitCount != PinBitCount.Bit1 && bitIndex % 2 == 0 && bitCount <= 64) { Color alternatingWireHighlightDisconnected = Color.white * 0.075f; Color alternatingWireHighlightConnected = Color.white * 0.01f; col += IsFullyConnected ? alternatingWireHighlightConnected : alternatingWireHighlightDisconnected; } - - return col; + return col; } public static Vector2 ClosestPointOnLineSegment(Vector2 p, Vector2 a1, Vector2 a2) diff --git a/Assets/Scripts/Game/Helpers/GridHelper.cs b/Assets/Scripts/Game/Helpers/GridHelper.cs index 21969dc1..0c0d19f9 100644 --- a/Assets/Scripts/Game/Helpers/GridHelper.cs +++ b/Assets/Scripts/Game/Helpers/GridHelper.cs @@ -53,10 +53,10 @@ public static Vector2 ForceStraightLine(Vector2 prev, Vector2 curr) return prev + offset; } - public static Vector2Int GetStateGridDimension(uint bitcount) + public static Vector2Int GetStateGridDimension(int bitcount) { int h = 1; - int w = (int)bitcount; + int w = bitcount; int bestH = h; int bestW = w; diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 17bcf0e5..42994ede 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -68,7 +68,7 @@ static ChipDescription[] CreateInOutPins(List pinBitCountsToLoad) public static ChipDescription CreateInPin(PinBitCount pinBitCount) { - PinDescription[] outPin = new[] { CreatePinDescription("OUT", 0, pinBitCount) }; + PinDescription[] outPin = new[] { CreatePinDescription("IN", 0, pinBitCount) }; ChipDescription InChip = CreateBuiltinChipDescription(ChipType.In_Pin, Vector2.zero, Color.clear, null, outPin, null, NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(true, pinBitCount)); return InChip; @@ -76,7 +76,7 @@ public static ChipDescription CreateInPin(PinBitCount pinBitCount) public static ChipDescription CreateOutPin(PinBitCount pinBitCount) { - PinDescription[] inPin = new[] { CreatePinDescription("IN", 0, pinBitCount) }; + PinDescription[] inPin = new[] { CreatePinDescription("OUT", 0, pinBitCount) }; ChipDescription OutChip = CreateBuiltinChipDescription(ChipType.Out_Pin, Vector2.zero, Color.clear, inPin, null, null, NameDisplayLocation.Hidden, name: ChipTypeHelper.GetDevPinName(false, pinBitCount)); diff --git a/Assets/Scripts/Graphics/DrawSettings.cs b/Assets/Scripts/Graphics/DrawSettings.cs index 3f3ff864..c6301cff 100644 --- a/Assets/Scripts/Graphics/DrawSettings.cs +++ b/Assets/Scripts/Graphics/DrawSettings.cs @@ -1,4 +1,5 @@ using System.Linq; +using DLS.SaveSystem; using Seb.Vis; using Seb.Vis.UI; using UnityEngine; @@ -13,6 +14,7 @@ public static class DrawSettings public const float PinHeight1Bit = 0.185f; public const float PinHeight4Bit = 0.3f; public const float PinHeight8Bit = 0.43f; + public const float PinHeightPerBit = 0.05f; public const float PinRadius = PinHeight1Bit / 2; public const FontType FontBold = FontType.JetbrainsMonoBold; @@ -49,14 +51,20 @@ public static class DrawSettings public static readonly ThemeDLS ActiveTheme = CreateTheme(); public static readonly UIThemeDLS ActiveUITheme = CreateUITheme(); - // ---- Helper functions ---- - public static Color GetStateColour(bool isHigh, uint index, bool hover = false) + // ---- Helper functions ---- + public static Color GetStateColour(bool isHigh, uint index,bool hover = false) { index = (uint)Mathf.Min(index, ActiveTheme.StateHighCol.Length - 1); // clamp just to be safe... if (!isHigh && hover) return ActiveTheme.StateHoverCol[index]; return isHigh ? ActiveTheme.StateHighCol[index] : ActiveTheme.StateLowCol[index]; } + public static Color GetFlatColour(bool isHigh, uint index, bool hover = false) { + index = (uint)Mathf.Min(index, ActiveTheme.FlatColors.Length - 1); // clamp just to be safe... + if (!isHigh && hover) return ActiveTheme.FlatColorsHover[index]; + return ActiveTheme.FlatColors[index]; + } + static ThemeDLS CreateTheme() { const float whiteLow = 0.35f; @@ -85,9 +93,22 @@ static ThemeDLS CreateTheme() new(whiteHigh, whiteHigh, whiteHigh) }; + Color[] flatColors = + { + MakeCol255(155, 34, 38), + MakeCol255(202, 103, 2), + MakeCol255(238, 155, 0), + MakeCol255(233, 216, 166), + MakeCol255(0, 205, 226), + MakeCol255(238, 130, 238), + MakeCol255(212, 4, 116), + new(whiteHigh, whiteHigh, whiteHigh) + }; Color[] stateHover = stateLow.Select(c => Brighten(c, 0.075f)).ToArray(); + Color[] flatHover = flatColors.Select(c => Brighten(c, 0.075f)).ToArray(); + - return new ThemeDLS + return new ThemeDLS { SelectionBoxCol = new Color(1, 1, 1, 0.1f), SelectionBoxMovingCol = new Color(1, 1, 1, 0.125f), @@ -110,6 +131,14 @@ static ThemeDLS CreateTheme() }, BackgroundCol = MakeCol255(66, 66, 69), GridCol = MakeCol255(49, 49, 51), + FlatColors = flatColors, + FlatColorsHover = flatHover, + PinSizeIndicatorColors = new Color[] { + new(0,0,0,0), // Depth 0 -- UNUSED + MakeCol255(153, 102, 51), // Depth 1 + MakeCol255(255, 0, 0), // Depth 2 + MakeCol255(255, 153, 0) // Depth 3 + } }; } @@ -237,6 +266,9 @@ public class ThemeDLS public Color[] StateHighCol; public Color[] StateHoverCol; public Color[] StateLowCol; + public Color[] FlatColors; + public Color[] FlatColorsHover; + public Color[] PinSizeIndicatorColors; } public class UIThemeDLS diff --git a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs index ca95c736..9cf6902e 100644 --- a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs @@ -239,7 +239,7 @@ public static bool ValidatePinSizeInput(string s) if (int.TryParse(s, out int a)) { if(a < 0) return false; - if(a > 4096) return false; + if(a > 65536) return false; return true; } return false; @@ -248,8 +248,9 @@ public static bool ValidatePinSizeInput(string s) public static (bool valid, string reason) RealSizeConfirmation(int a) { if(a < 1) { return (false, "Pin size must be at least 1 bit."); } - if (a > 64 && a % 8 != 0 && a< 512) { return (false, "Pin size > 64 and not a multiple of 8."); } - if(a > 512 && a % 64 != 0) { return (false, "Pin size > 512 and not a multiple of 64."); } + if (a > 64 && a % 8 != 0 && a<= 512) { return (false, "Pin size > 64 and not a multiple of 8."); } + if(a > 512 && a % 64 != 0 && a <= 4096) { return (false, "Pin size > 512 and not a multiple of 64."); } + if (a > 4096 && a % 512 != 0) { return (false, "Pin size > 4096 and not a multiple of 512."); } if (PinBitCountsMade.Contains(a)) { return (false, "Pins with this count already exist."); } return (true, ""); diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index e4adeff3..6eaba96c 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -893,8 +893,9 @@ static void DrawMultiBitWire(WireInstance wire) WireLayoutHelper.CreateMultiBitWireLayout(wire.BitWires, wire, WireThickness); + int length = wire.BitWires.Length / (wire.bitCount <= 64 ? 1 : wire.bitCount <=512 ? 8 : 64); // Draw - for (int bitIndex = 0; bitIndex < wire.BitWires.Length; bitIndex++) + for (int bitIndex = 0; bitIndex < length; bitIndex++) { WireInstance.BitWire bitWire = wire.BitWires[bitIndex]; Color col = wire.GetColour(bitIndex); @@ -1000,6 +1001,8 @@ static void DrawMultiBitPin(PinInstance pin) bool canInteract = controller.CanInteractWithPin; Color pinCol = mouseOverPin && canInteract ? ActiveTheme.PinHighlightCol : ActiveTheme.PinCol; + + // If hovering over pin while creating a wire, colour should indicate whether it is a valid connection if (mouseOverPin && canInteract && controller.IsCreatingWire && !controller.CanCompleteWireConnection(pin)) { @@ -1007,7 +1010,13 @@ static void DrawMultiBitPin(PinInstance pin) } Draw.Quad(pinPos, pinSize, pinCol); - } + + if(pin.bitCount <= 64 || mouseOverPin) { return; } + + Vector2 depthIndicatorSize = new(pinWidth / 8f, pinHeight); + Draw.Quad(pinPos + pin.ForwardDir * 0.25f * pinWidth, depthIndicatorSize, ActiveTheme.PinSizeIndicatorColors[pin.bitCount.GetTier()]); + + } public static void DrawGrid(Color gridCol) { diff --git a/Assets/Scripts/Graphics/World/WireLayoutHelper.cs b/Assets/Scripts/Graphics/World/WireLayoutHelper.cs index 5aa63d37..125c72e8 100644 --- a/Assets/Scripts/Graphics/World/WireLayoutHelper.cs +++ b/Assets/Scripts/Graphics/World/WireLayoutHelper.cs @@ -22,6 +22,7 @@ public static void CreateMultiBitWireLayout(WireInstance.BitWire[] bitWires, Wir Vector2 dirPrev = Vector2.zero; int numBits = bitWires.Length; + int wiresToDraw = (int)(numBits * (SubChipInstance.GetPinDepthMultiplier(wire.bitCount))); float offsetSign = 1; // Create layout @@ -36,10 +37,10 @@ public static void CreateMultiBitWireLayout(WireInstance.BitWire[] bitWires, Wir // This gives appearance of wires flipping over, rather than bending at an uncomfortable angle, which I think looks better... if (i > 0) offsetSign *= Flip(wireDir, dirPrev); - for (int bitIndex = 0; bitIndex < numBits; bitIndex++) + for (int bitIndex = 0; bitIndex < wiresToDraw; bitIndex++) { WireInstance.BitWire bitWire = bitWires[bitIndex]; - float bitOffsetDst = (bitIndex - (numBits - 1) / 2f) * thickness * 2 * thicknessOffsetT; + float bitOffsetDst = (bitIndex - (wiresToDraw - 1) / 2f) * thickness * 2 * thicknessOffsetT; Vector2 bitWireOffset = wirePerpDir * bitOffsetDst; Vector2 posA = i == 0 ? wireCentreA + bitWireOffset : bitWire.Points[i]; diff --git a/Assets/Scripts/Simulation/PinStateValue.cs b/Assets/Scripts/Simulation/PinStateValue.cs index deec07d9..42ab0fa8 100644 --- a/Assets/Scripts/Simulation/PinStateValue.cs +++ b/Assets/Scripts/Simulation/PinStateValue.cs @@ -17,7 +17,7 @@ public struct PinStateValue public BitVector32 b; // If 16 < bitcount <=32 : use this too -- medium public BitArray BigValues; // If bitcount >= 32 use this INSTEAD -- SLOWEST public BitArray BigTristates; // Goes with it - public ushort size; + public int size; const short maxSigned16bitValue = 0x7FFF; public void MakeFromPinBitCount(PinBitCount pinBitCount) From a2986a809b6845a749327a845bc8afa63d376129 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Sun, 15 Jun 2025 06:07:38 +0200 Subject: [PATCH 104/124] Compat fixes I think --- Assets/Scripts/Game/Project/BuiltinChipCreator.cs | 2 +- .../Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs | 1 - Assets/Scripts/Simulation/Simulator.cs | 14 +++++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index e255ddb6..3ce63ab5 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -56,7 +56,7 @@ public static ChipDescription[] CreateAllBuiltinChipDescriptions(ProjectDescript .Concat(CreateBusAndBusTerminus(description.pinBitCounts)) .ToArray(); - }; + } static ChipDescription[] CreateInOutPins(List pinBitCountsToLoad) diff --git a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs index bc9f24cc..a8ad1cb1 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs @@ -7,7 +7,6 @@ using Seb.Types; using Seb.Vis; using Seb.Vis.UI; -using Unity.Android.Gradle; using UnityEngine; namespace DLS.Graphics diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index d58c0221..b3e9d704 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -475,7 +475,7 @@ static void ProcessBuiltinChip(SimChip chip) } uint data = chip.InternalState[address]; - hip.OutputPins[0].State.SetShort((ushort)((data & 0xFF00) >> 8)); + chip.OutputPins[0].State.SetShort((ushort)((data & 0xFF00) >> 8)); chip.OutputPins[1].State.SetShort((ushort)(data & 0x00FF)); break; } @@ -494,8 +494,8 @@ static void ProcessBuiltinChip(SimChip chip) ushort sps = (ushort)tps; ushort spc = (ushort)stepsPerClockTransition; - chip.OutputPins[5].State.SmallSet(tps >= 65536 ? 1 : 0); - chip.OutputPins[4].State.SmallSet( stepsPerClockTransition > 65535 ? PinState.1 : 0.LogicLow); + chip.OutputPins[5].State.SmallSet((uint)(tps >= 65536 ? 1 : 0)); + chip.OutputPins[4].State.SmallSet((uint)(stepsPerClockTransition > 65535 ? 1 : 0)); chip.OutputPins[3].State.SetShort((ushort)(sps & ByteMask)); chip.OutputPins[2].State.SetShort((ushort)((sps >> 8) & ByteMask)); chip.OutputPins[1].State.SetShort((ushort)(spc & ByteMask)); @@ -521,11 +521,15 @@ static void ProcessBuiltinChip(SimChip chip) case ChipType.Split_Pin: { chip.InputPins[0].State.HandleSplit(ref chip.OutputPins); + break; } case ChipType.Detector: { - uint state = PinState.GetBitTristatedValue(chip.InputPin[0].State) - chip.OutputPins[state] = 1 + uint state = chip.InputPins[0].State.GetSmallTristatedValue(); + chip.OutputPins[0].State.SmallSet(1 << 16); + chip.OutputPins[1].State.SmallSet(1 << 16); + chip.OutputPins[2].State.SmallSet(1 << 16); + chip.OutputPins[state].State.SmallSet(1); break; } From e7e9828221f32b4034693dd452c0e2864bde6910 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Sun, 15 Jun 2025 15:07:16 +0200 Subject: [PATCH 105/124] Removed unnecessary and build breaking imports in SpecialChipMakerMenu.cs --- Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs index 9cf6902e..4e69edd4 100644 --- a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs @@ -6,9 +6,6 @@ using System.Collections.Generic; using DLS.Game; using System.Linq; -using DLS.Description; -using static UnityEngine.LightTransport.IProbeIntegrator; -using UnityEditor.SearchService; From 7411e211af26ea1f296e49afd19a156092b3300e Mon Sep 17 00:00:00 2001 From: BeboKhouja Date: Mon, 16 Jun 2025 17:38:58 +0700 Subject: [PATCH 106/124] Fix SPS flags --- Assets/Scripts/Game/Project/BuiltinChipCreator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 3ce63ab5..43762791 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -202,8 +202,8 @@ static ChipDescription CreateSPSChip() CreatePinDescription("SPCT_A", 4, PinBitCount.Bit8), CreatePinDescription("SPS_B", 3, PinBitCount.Bit8), CreatePinDescription("SPS_A", 2, PinBitCount.Bit8), - CreatePinDescription("SPS_OVERFLOW", 1, PinBitCount.Bit1), - CreatePinDescription("SPCT_OVERFLOW", 0, PinBitCount.Bit1), + CreatePinDescription("SPCT_OVERFLOW", 1, PinBitCount.Bit1), + CreatePinDescription("SPS_OVERFLOW", 0, PinBitCount.Bit1), }; float height = SubChipInstance.MinChipHeightForPins(outputPins, null); @@ -637,4 +637,4 @@ static Color GetColor(Color color) return AllBlack ? AllBlackColor : color; } } -} \ No newline at end of file +} From 8a0df44d8a8b77a132a8c301d4f008dadf5e3d66 Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Mon, 16 Jun 2025 18:13:20 +0700 Subject: [PATCH 107/124] Fix stats and clock down sps --- Assets/Scripts/Description/CustomStopwatch.cs | 14 +++++++++++--- TestData/Projects/MainTest/ProjectDescription.json | 12 ++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/Description/CustomStopwatch.cs b/Assets/Scripts/Description/CustomStopwatch.cs index 633a361f..8fec4cf5 100644 --- a/Assets/Scripts/Description/CustomStopwatch.cs +++ b/Assets/Scripts/Description/CustomStopwatch.cs @@ -3,7 +3,7 @@ using System.Runtime.Serialization; using Newtonsoft.Json; -// Originally on DLS.SaveSystem, now on DLS.Description because of you bad C# does not allow ProjectDescription to use classes from outside its namespace +// Originally on DLS.SaveSystem, now on DLS.Description because of assembly definitions. namespace DLS.Description { public class CustomStopwatch { [JsonIgnore] @@ -17,8 +17,16 @@ public CustomStopwatch(TimeSpan StartFrom) { this.StartFrom = StartFrom; } [OnSerializing] - public void Save(StreamingContext unused) => StartFrom = Elapsed; - public void Save() => StartFrom = Elapsed; + public void Save(StreamingContext unused) + { + StartFrom = Elapsed; + Stopwatch = Stopwatch.StartNew(); + } + public void Save() + { + StartFrom = Elapsed; + Stopwatch = Stopwatch.StartNew(); + } public CustomStopwatch() { Stopwatch = Stopwatch.StartNew(); StartFrom = new(); diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 2d4dd54d..af9e4386 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,19 +3,19 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-07T15:33:42.141+02:00", + "CreationTime": "2025-03-15T00:23:30.404+07:00", + "LastSaveTime": "2025-06-16T18:12:51.785+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 10000000, + "Prefs_SimTargetStepsPerSecond": 150, "Prefs_SimStepsPerClockTick": 6, - "StepsRanSinceCreated": 912542, + "StepsRanSinceCreated": 77755719, "TimeSpentSinceCreated": { - "StartFrom": "02:03:06.6299650" + "StartFrom": "02:04:55.4138021" }, "AllCustomChipNames":[ "AND", @@ -154,7 +154,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","#AA","StatsTest","StatsTest1","StatsTest2","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","DETECTOR","RTC","ConstTest"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","#AA","StatsTest","StatsTest1","StatsTest2","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","DETECTOR","RTC","ConstTest","4-8","8-4","1-8","8-1","1-4","4-1"], "IsToggledOpen":true, "Name":"OTHER" } From 877e0a5570d9db669fcb70c31a78df75f6a6fe09 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Mon, 16 Jun 2025 13:48:48 +0200 Subject: [PATCH 108/124] Fix for display of 32bit pins and higher --- .../Scripts/Game/Elements/DevPinInstance.cs | 2 +- .../Scripts/Graphics/World/DevSceneDrawer.cs | 23 ++++++++++++++++++- Assets/Scripts/Simulation/PinStateValue.cs | 8 +++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Game/Elements/DevPinInstance.cs b/Assets/Scripts/Game/Elements/DevPinInstance.cs index 377dac13..9b1c0f07 100644 --- a/Assets/Scripts/Game/Elements/DevPinInstance.cs +++ b/Assets/Scripts/Game/Elements/DevPinInstance.cs @@ -84,7 +84,7 @@ public int GetStateDecimalDisplayValue() if (pinValueDisplayMode == PinValueDisplayMode.SignedDecimal) { - displayValue = Maths.TwosComplement(rawValue, (int)BitCount); + displayValue = Maths.TwosComplement(rawValue, Math.Min((int)BitCount,32)); } return displayValue; diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 6eaba96c..23db2281 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -220,13 +220,32 @@ public static void DrawSubChipLabel(SubChipInstance chip) Draw.Text(font, text, FontSizePinLabel, centre, Anchor.TextFirstLineCentre, Color.white); } + static void CopyToCharBuffer(DevPinInstance pin, string text) + { + char[] chars = text.ToCharArray(); + for (int i = 0; i < chars.Length; i++) { + pin.decimalDisplayCharBuffer[i] = chars[i]; + } + } public static void DrawPinDecValue(DevPinInstance pin) { if (pin.pinValueDisplayMode == PinValueDisplayMode.Off) return; int charCount; - if (pin.pinValueDisplayMode != PinValueDisplayMode.HEX) + if (pin.Pin.State.IsValueBiggerThanInt() || (((pin.GetStateDecimalDisplayValue()&(1<<31)) == (1<<31)) && pin.pinValueDisplayMode!=PinValueDisplayMode.SignedDecimal) ) + { + charCount = 7; + CopyToCharBuffer(pin, "TOO BIG"); + } + + else if (pin.GetStateDecimalDisplayValue() == int.MinValue) + { + charCount = 11; + CopyToCharBuffer(pin, "-2147483648"); + } + + else if (pin.pinValueDisplayMode != PinValueDisplayMode.HEX) { charCount = StringHelper.CreateIntegerStringNonAlloc(pin.decimalDisplayCharBuffer, pin.GetStateDecimalDisplayValue()); } @@ -236,6 +255,8 @@ public static void DrawPinDecValue(DevPinInstance pin) charCount = StringHelper.CreateHexStringNonAlloc(pin.decimalDisplayCharBuffer, pin.GetStateDecimalDisplayValue()); } + + FontType font = FontBold; Bounds2D parentBounds = pin.BoundingBox; const float offsetY = 0.225f; diff --git a/Assets/Scripts/Simulation/PinStateValue.cs b/Assets/Scripts/Simulation/PinStateValue.cs index 42ab0fa8..ddf39ff5 100644 --- a/Assets/Scripts/Simulation/PinStateValue.cs +++ b/Assets/Scripts/Simulation/PinStateValue.cs @@ -490,5 +490,13 @@ public void HandleMerge(SimPin[] sources) HandleBigMerge(sources); } } + + public bool IsValueBiggerThanInt() { + if (size <= 32) { return false; } + for (int i = 33; i < BigValues.Length; i++) { + if (BigValues[i]) return true; + } + return false; + } } } \ No newline at end of file From 1312f00f8d91284cff82bcbfcac5cd1e1f4974fd Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Mon, 16 Jun 2025 19:48:45 +0700 Subject: [PATCH 109/124] Update chips with 16 and 32 bit wires --- Assets/Build/DLS.unity | 2 +- .../Types/SubTypes/PinDescription.cs | 8 +- Assets/Scripts/Game/Main/Main.cs | 6 +- .../Game/Project/BuiltinChipCreator.cs | 24 ++---- Assets/Scripts/Game/Project/Project.cs | 8 +- Assets/Scripts/SaveSystem/UpgradeHelper.cs | 56 ++++++++----- Assets/Scripts/Simulation/Simulator.cs | 53 +++++------- TestData/Projects/MainTest/Chips/SPSTest.json | 84 ++++--------------- .../Projects/MainTest/ProjectDescription.json | 48 +++++++++-- 9 files changed, 137 insertions(+), 152 deletions(-) diff --git a/Assets/Build/DLS.unity b/Assets/Build/DLS.unity index 234e1985..677f1b78 100644 --- a/Assets/Build/DLS.unity +++ b/Assets/Build/DLS.unity @@ -241,7 +241,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: openSaveDirectory: 0 - openInMainMenu: 1 + openInMainMenu: 0 testProjectName: MainTest openA: 1 chipToOpenA: SPSTest diff --git a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs index 3d8bdc3b..9547c376 100644 --- a/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs +++ b/Assets/Scripts/Description/Types/SubTypes/PinDescription.cs @@ -29,6 +29,8 @@ public struct PinBitCount public const int Bit1 = 1; public const int Bit4 = 4; public const int Bit8 = 8; + public const int Bit16 = 16; + public const int Bit32 = 32; public int BitCount; @@ -42,10 +44,10 @@ public PinBitCount(ushort BitCount = 1) } public readonly BitArray GetEmptyBitArray() { - return new BitArray(length: (int)BitCount<<1); + return new BitArray(length: BitCount<<1); } - public override bool Equals(System.Object @object) + public override bool Equals(object @object) { if(@object is uint number) { @@ -82,7 +84,7 @@ public int GetTier() public static implicit operator uint(PinBitCount b) => (uint)b.BitCount; public static implicit operator int(PinBitCount b) => b.BitCount; public static implicit operator ushort(PinBitCount b) => (ushort)b.BitCount; - public static implicit operator PinBitCount(Int64 b) => new PinBitCount((ushort)b); + public static implicit operator PinBitCount(long b) => new PinBitCount((ushort)b); public static explicit operator PinBitCount(ushort number) => new PinBitCount(number); diff --git a/Assets/Scripts/Game/Main/Main.cs b/Assets/Scripts/Game/Main/Main.cs index d4fedff3..226da591 100644 --- a/Assets/Scripts/Game/Main/Main.cs +++ b/Assets/Scripts/Game/Main/Main.cs @@ -14,7 +14,7 @@ public static class Main { public static readonly Version DLSVersion = new(2, 1, 6); public static readonly Version DLSVersion_EarliestCompatible = new(2, 0, 0); - public static readonly Version DLSVersion_ModdedID = new(1, 1, 0); + public static readonly Version DLSVersion_ModdedID = new(1, 1, 1); public const string LastUpdatedString = "5 May 2025"; public static AppSettings ActiveAppSettings; @@ -93,8 +93,8 @@ static Project CreateProject(string projectName) AllCustomChipNames = Array.Empty(), StarredList = BuiltinCollectionCreator.GetDefaultStarredList().ToList(), ChipCollections = new List(BuiltinCollectionCreator.CreateDefaultChipCollections()), - pinBitCounts = new List { 1, 4, 8 }, - SplitMergePairs = new() { new(8,4), new(8,1), new(4,1) } + pinBitCounts = Project.PinBitCounts, + SplitMergePairs = Project.SplitMergePairs }; Saver.SaveProjectDescription(initialDescription); diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 43762791..b02a2803 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -198,10 +198,8 @@ static ChipDescription CreateSPSChip() PinDescription[] outputPins = { - CreatePinDescription("SPCT_B", 5, PinBitCount.Bit8), - CreatePinDescription("SPCT_A", 4, PinBitCount.Bit8), - CreatePinDescription("SPS_B", 3, PinBitCount.Bit8), - CreatePinDescription("SPS_A", 2, PinBitCount.Bit8), + CreatePinDescription("SPCT", 3, PinBitCount.Bit16), + CreatePinDescription("SPS", 2, PinBitCount.Bit16), CreatePinDescription("SPCT_OVERFLOW", 1, PinBitCount.Bit1), CreatePinDescription("SPS_OVERFLOW", 0, PinBitCount.Bit1), }; @@ -218,10 +216,7 @@ static ChipDescription CreateRTC() PinDescription[] outputPins = { - CreatePinDescription("D", 3, PinBitCount.Bit8), - CreatePinDescription("C", 2, PinBitCount.Bit8), - CreatePinDescription("B", 1, PinBitCount.Bit8), - CreatePinDescription("A", 0, PinBitCount.Bit8), + CreatePinDescription("TIME", 0, PinBitCount.Bit32), }; float height = SubChipInstance.MinChipHeightForPins(outputPins, null); @@ -256,8 +251,7 @@ static ChipDescription CreateROM_8() }; PinDescription[] outputPins = { - CreatePinDescription("OUT B", 1, PinBitCount.Bit8), - CreatePinDescription("OUT A", 2, PinBitCount.Bit8) + CreatePinDescription("OUT", 1, PinBitCount.Bit16), }; Color col = GetColor(new(0.25f, 0.35f, 0.5f)); @@ -271,15 +265,13 @@ static ChipDescription CreateEEPROM_8() PinDescription[] inputPins = { CreatePinDescription("ADDRESS", 0, PinBitCount.Bit8), - CreatePinDescription("WRITE B", 1, PinBitCount.Bit8), - CreatePinDescription("WRITE A", 2, PinBitCount.Bit8), - CreatePinDescription("WRITE", 3, PinBitCount.Bit1), - CreatePinDescription("CLOCK", 4, PinBitCount.Bit1) + CreatePinDescription("DATA", 1, PinBitCount.Bit16), + CreatePinDescription("WRITE", 2, PinBitCount.Bit1), + CreatePinDescription("CLOCK", 3, PinBitCount.Bit1) }; PinDescription[] outputPins = { - CreatePinDescription("OUT B", 5, PinBitCount.Bit8), - CreatePinDescription("OUT A", 6, PinBitCount.Bit8) + CreatePinDescription("OUT", 5, PinBitCount.Bit16) }; Color col = GetColor(new(0.25f, 0.35f, 0.5f)); diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index 5c645056..ed848bdb 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -22,7 +22,13 @@ public enum SaveMode Rename, SaveAs } - + public static readonly List> SplitMergePairs = new() { + new(32,16), new(32,8), new(32,4), new(32,1), + new(16,8), new(16,4), new(16,1), + new(8,4), new(8,1), + new(4,1) + }; + public static readonly List PinBitCounts = new List { 1, 4, 8, 16, 32 }; public static Project ActiveProject; public readonly ChipLibrary chipLibrary; diff --git a/Assets/Scripts/SaveSystem/UpgradeHelper.cs b/Assets/Scripts/SaveSystem/UpgradeHelper.cs index 6ad882cb..9ab304b8 100644 --- a/Assets/Scripts/SaveSystem/UpgradeHelper.cs +++ b/Assets/Scripts/SaveSystem/UpgradeHelper.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using DLS.Description; using DLS.Game; using UnityEngine; @@ -7,6 +8,9 @@ namespace DLS.SaveSystem { public static class UpgradeHelper { + public static readonly string[] OldMergeSplits = { + "1-4BIT","1-8BIT","4-8BIT","8-4BIT","8-1BIT","4-1BIT", + }; public static void ApplyVersionChanges(ChipDescription[] customChips, ChipDescription[] builtinChips) { Main.Version defaultVersion = new(2, 0, 0); @@ -30,38 +34,50 @@ public static void ApplyVersionChanges(ChipDescription[] customChips, ChipDescri public static void ApplyVersionChangesToProject(ref ProjectDescription projectDescription) { Main.Version defaultModdedVersion = new(1, 0, 0); - Main.Version moddedVersion_1_1_0 = new(1, 1, 0); // Custom IN and OUTS version + Main.Version moddedVersion_1_1_0 = new(1, 1, 1); // Custom IN and OUTS version + Main.Version moddedVersion_1_1_1 = new(1, 1, 1); // New 16 and 32 bit pins bool canParseModdedVersion = Main.Version.TryParse(projectDescription.DLSVersion_LastSavedModdedVersion, out Main.Version projectVersion); bool isVersionEarlierThan_1_1_0 = (!canParseModdedVersion) || projectVersion.ToInt() < moddedVersion_1_1_0.ToInt(); + bool isVersionEarlierThan_1_1_1 = (!canParseModdedVersion) || projectVersion.ToInt() < moddedVersion_1_1_1.ToInt(); - bool isSplitMergeInvalid = projectDescription.SplitMergePairs == null || projectDescription.SplitMergePairs.Count == 0; + bool isSplitMergeInvalid = projectDescription.SplitMergePairs == null || projectDescription.SplitMergePairs.Count == 0; bool isPinBitCountInvalid = projectDescription.pinBitCounts == null || projectDescription.pinBitCounts.Count == 0; - if (isVersionEarlierThan_1_1_0 | isPinBitCountInvalid) + if (isVersionEarlierThan_1_1_0 | isPinBitCountInvalid) { - projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); - projectDescription.pinBitCounts = new List {1,4,8}; - projectDescription.SplitMergePairs = new(){ - new(8,4), - new(8,1), - new(4,1) - }; - } - - if(isVersionEarlierThan_1_1_0 | isSplitMergeInvalid) + projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); + RemoveOldMergeSplits(ref projectDescription.ChipCollections); + projectDescription.pinBitCounts = Project.PinBitCounts; + projectDescription.SplitMergePairs = Project.SplitMergePairs; + } + + if (isVersionEarlierThan_1_1_0 | isSplitMergeInvalid) { - projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); - projectDescription.SplitMergePairs = new(){ - new(8,4), - new(8,1), - new(4,1) - }; - } + projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); + RemoveOldMergeSplits(ref projectDescription.ChipCollections); + projectDescription.SplitMergePairs = Project.SplitMergePairs; + } + + if (isVersionEarlierThan_1_1_1) + { + projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); + RemoveOldMergeSplits(ref projectDescription.ChipCollections); + projectDescription.pinBitCounts.Union(Project.PinBitCounts); + projectDescription.SplitMergePairs.Union(Project.SplitMergePairs); + } } + static void RemoveOldMergeSplits(ref List chips) + { + foreach (ChipCollection chip in chips) + { + chip.Chips.RemoveAll(e => OldMergeSplits.Contains(e)); + } + } + static void UpdateChipPre_2_1_5(ChipDescription chipDesc) { string ledName = ChipTypeHelper.GetName(ChipType.DisplayLED); diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index b3e9d704..305ae260 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -450,34 +450,30 @@ static void ProcessBuiltinChip(SimChip chip) uint address = chip.InputPins[0].State.GetShortValues(); uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShort((ushort)((data&0xFF00) >> 8)); - chip.OutputPins[1].State.SetShort((ushort)(data& 0x00FF)); + chip.OutputPins[0].State.SetShort(data); break; } case ChipType.EEPROM_256x16: { - const int ByteMask = 0b11111111; - - uint address = chip.InputPins[0].State.GetShortValues(); - bool isWriting = chip.InputPins[3].State.SmallHigh(); - bool clockHigh = chip.InputPins[4].State.SmallHigh(); - bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; - chip.InternalState[^1] = clockHigh ? 1u : 0; + uint address = chip.InputPins[0].State.GetShortValues(); + bool isWriting = chip.InputPins[2].State.SmallHigh(); + bool clockHigh = chip.InputPins[3].State.SmallHigh(); + bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; + chip.InternalState[^1] = clockHigh ? 1u : 0; - if (isWriting && isRisingEdge) - { - uint writeData = (ushort)(((chip.InputPins[1].State.GetShortValues() << 8) & (ByteMask<<8)) | (chip.InputPins[2].State.GetShortValues() & ByteMask)); - chip.InternalState[address] = writeData; - Project.ActiveProject.NotifyRomContentsEditedRuntime(chip); - } + if (isWriting && isRisingEdge) + { + uint writeData = (ushort)chip.InputPins[1].State.a;//(ushort)(((chip.InputPins[1].State.GetShortValues() << 8) & (ByteMask<<8)) | (chip.InputPins[2].State.GetShortValues() & ByteMask)) + chip.InternalState[address] = writeData; + Project.ActiveProject.NotifyRomContentsEditedRuntime(chip); + } - uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShort((ushort)((data & 0xFF00) >> 8)); - chip.OutputPins[1].State.SetShort((ushort)(data & 0x00FF)); - break; + uint data = chip.InternalState[address]; + chip.OutputPins[0].State.SetShort(data); + break; } case ChipType.Buzzer: @@ -489,27 +485,20 @@ static void ProcessBuiltinChip(SimChip chip) } case ChipType.SPS: { - const int ByteMask = 0b11111111; double tps = Project.ActiveProject.simAvgTicksPerSec; ushort sps = (ushort)tps; ushort spc = (ushort)stepsPerClockTransition; - chip.OutputPins[5].State.SmallSet((uint)(tps >= 65536 ? 1 : 0)); - chip.OutputPins[4].State.SmallSet((uint)(stepsPerClockTransition > 65535 ? 1 : 0)); - chip.OutputPins[3].State.SetShort((ushort)(sps & ByteMask)); - chip.OutputPins[2].State.SetShort((ushort)((sps >> 8) & ByteMask)); - chip.OutputPins[1].State.SetShort((ushort)(spc & ByteMask)); - chip.OutputPins[0].State.SetShort((ushort)((spc >> 8) & ByteMask)); + chip.OutputPins[3].State.SmallSet((uint)(tps >= 65536 ? 1 : 0)); + chip.OutputPins[2].State.SmallSet((uint)(stepsPerClockTransition > 65535 ? 1 : 0)); + chip.OutputPins[1].State.SetShort(sps); + chip.OutputPins[0].State.SetShort(spc); break; } case ChipType.RTC: { - const uint ByteMask = 0b11111111; - int unixTime = (int)DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - chip.OutputPins[0].State.SetShort((ushort)((unixTime >> 24) & ByteMask)); - chip.OutputPins[1].State.SetShort((ushort)((unixTime >> 16) & ByteMask)); - chip.OutputPins[2].State.SetShort((ushort)((unixTime >> 8) & ByteMask)); - chip.OutputPins[3].State.SetShort((ushort)(unixTime & ByteMask)); + uint unixTime = (uint)DateTimeOffset.UtcNow.ToUnixTimeSeconds(); + chip.OutputPins[0].State.SetMedium(unixTime, 0); break; } case ChipType.Constant_8Bit: diff --git a/TestData/Projects/MainTest/Chips/SPSTest.json b/TestData/Projects/MainTest/Chips/SPSTest.json index 3a098220..968bad34 100644 --- a/TestData/Projects/MainTest/Chips/SPSTest.json +++ b/TestData/Projects/MainTest/Chips/SPSTest.json @@ -17,45 +17,23 @@ "OutputPins":[ { "Name":"OUT", - "ID":908310544, + "ID":1947288272, "Position":{ - "x":1.125, - "y":0.6875 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"OUT", - "ID":86585601, - "Position":{ - "x":1.125, - "y":0.1875 - }, - "BitCount":8, - "Colour":0, - "ValueDisplayMode":1 - }, - { - "Name":"OUT", - "ID":1415148896, - "Position":{ - "x":1.125, - "y":-0.3125 + "x":1.1525, + "y":0.4375 }, - "BitCount":8, + "BitCount":"16", "Colour":0, "ValueDisplayMode":1 }, { "Name":"OUT", - "ID":405999015, + "ID":307217692, "Position":{ - "x":1.125, - "y":-0.8125 + "x":1.1525, + "y":-0.5 }, - "BitCount":8, + "BitCount":"16", "Colour":0, "ValueDisplayMode":1 }, @@ -66,7 +44,7 @@ "x":1.125, "y":-1.3125 }, - "BitCount":1, + "BitCount":"1", "Colour":0, "ValueDisplayMode":0 }, @@ -77,7 +55,7 @@ "x":1.125, "y":-1.8125 }, - "BitCount":1, + "BitCount":"1", "Colour":0, "ValueDisplayMode":0 } @@ -91,19 +69,19 @@ "x":-1.25, "y":-0.3125 }, - "OutputPinColourInfo":[{"PinColour":0,"PinID":5},{"PinColour":0,"PinID":4},{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":0}], + "OutputPinColourInfo":[{"PinColour":0,"PinID":3},{"PinColour":0,"PinID":2},{"PinColour":0,"PinID":1},{"PinColour":0,"PinID":0}], "InternalData":null } ], "Wires":[ { "SourcePinAddress":{ - "PinID":5, + "PinID":1, "PinOwnerID":1380022051 }, "TargetPinAddress":{ "PinID":0, - "PinOwnerID":908310544 + "PinOwnerID":917260170 }, "ConnectionType":0, "ConnectedWireIndex":-1, @@ -112,26 +90,12 @@ }, { "SourcePinAddress":{ - "PinID":4, - "PinOwnerID":1380022051 - }, - "TargetPinAddress":{ "PinID":0, - "PinOwnerID":86585601 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":3, "PinOwnerID":1380022051 }, "TargetPinAddress":{ "PinID":0, - "PinOwnerID":1415148896 + "PinOwnerID":2003410447 }, "ConnectionType":0, "ConnectedWireIndex":-1, @@ -145,7 +109,7 @@ }, "TargetPinAddress":{ "PinID":0, - "PinOwnerID":405999015 + "PinOwnerID":307217692 }, "ConnectionType":0, "ConnectedWireIndex":-1, @@ -154,26 +118,12 @@ }, { "SourcePinAddress":{ - "PinID":1, - "PinOwnerID":1380022051 - }, - "TargetPinAddress":{ - "PinID":0, - "PinOwnerID":917260170 - }, - "ConnectionType":0, - "ConnectedWireIndex":-1, - "ConnectedWireSegmentIndex":-1, - "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] - }, - { - "SourcePinAddress":{ - "PinID":0, + "PinID":3, "PinOwnerID":1380022051 }, "TargetPinAddress":{ "PinID":0, - "PinOwnerID":2003410447 + "PinOwnerID":1947288272 }, "ConnectionType":0, "ConnectedWireIndex":-1, diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index af9e4386..601b9759 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -2,9 +2,9 @@ "ProjectName": "MainTest", "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", - "DLSVersion_LastSavedModdedVersion": "1.1.0", + "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-06-16T18:12:51.785+07:00", + "LastSaveTime": "2025-06-16T19:47:54.797+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -13,9 +13,9 @@ "Prefs_SimPaused": false, "Prefs_SimTargetStepsPerSecond": 150, "Prefs_SimStepsPerClockTick": 6, - "StepsRanSinceCreated": 77755719, + "StepsRanSinceCreated": 77969812, "TimeSpentSinceCreated": { - "StartFrom": "02:04:55.4138021" + "StartFrom": "02:28:47.6187409" }, "AllCustomChipNames":[ "AND", @@ -119,12 +119,12 @@ "Name":"BASICS" }, { - "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8"], + "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16","IN-32","OUT-32"], "IsToggledOpen":true, "Name":"IN/OUT" }, { - "Chips":["1-4BIT","1-8BIT","4-8BIT","8-4BIT","8-1BIT","4-1BIT"], + "Chips":["32-16","32-8","32-4","32-1","16-32","16-8","16-4","16-1","8-32","8-16","8-4","8-1","4-32","4-16","4-8","4-1","1-32","1-16","1-8","1-4"], "IsToggledOpen":true, "Name":"MERGE/SPLIT" }, @@ -134,7 +134,7 @@ "Name":"DISPLAY" }, { - "Chips":["BUS-1","BUS-4","BUS-8"], + "Chips":["BUS-1","BUS-4","BUS-8","BUS-16","BUS-32"], "IsToggledOpen":true, "Name":"BUS" }, @@ -154,7 +154,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","#AA","StatsTest","StatsTest1","StatsTest2","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","DETECTOR","RTC","ConstTest","4-8","8-4","1-8","8-1","1-4","4-1"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","#AA","StatsTest","StatsTest1","StatsTest2","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","DETECTOR","RTC","ConstTest"], "IsToggledOpen":true, "Name":"OTHER" } @@ -162,9 +162,39 @@ "pinBitCounts":[ "1", "4", - "8" + "8", + "16", + "32" ], "SplitMergePairs":[ + { + "Key":"32", + "Value":"16" + }, + { + "Key":"32", + "Value":"8" + }, + { + "Key":"32", + "Value":"4" + }, + { + "Key":"32", + "Value":"1" + }, + { + "Key":"16", + "Value":"8" + }, + { + "Key":"16", + "Value":"4" + }, + { + "Key":"16", + "Value":"1" + }, { "Key":"8", "Value":"4" From 17e8797d3caeb2d6361f833306e1a73a102e6c87 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Tue, 17 Jun 2025 21:09:56 +0200 Subject: [PATCH 110/124] Fixed name of generated Split/Merge For compatibility issues with previously created projects --- Assets/Scripts/Game/Project/BuiltinChipCreator.cs | 4 ++-- TestData/Projects/MainTest/ProjectDescription.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index 3ce63ab5..5e961a64 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -116,7 +116,7 @@ public static ChipDescription CreateSplitChip(KeyValuePair Date: Wed, 18 Jun 2025 16:47:25 +0700 Subject: [PATCH 111/124] Do not remove old merge/splits --- Assets/Scripts/SaveSystem/UpgradeHelper.cs | 15 +------------ .../Projects/MainTest/ProjectDescription.json | 22 +++++-------------- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/Assets/Scripts/SaveSystem/UpgradeHelper.cs b/Assets/Scripts/SaveSystem/UpgradeHelper.cs index 9ab304b8..2ba2ba52 100644 --- a/Assets/Scripts/SaveSystem/UpgradeHelper.cs +++ b/Assets/Scripts/SaveSystem/UpgradeHelper.cs @@ -8,9 +8,7 @@ namespace DLS.SaveSystem { public static class UpgradeHelper { - public static readonly string[] OldMergeSplits = { - "1-4BIT","1-8BIT","4-8BIT","8-4BIT","8-1BIT","4-1BIT", - }; + public static void ApplyVersionChanges(ChipDescription[] customChips, ChipDescription[] builtinChips) { Main.Version defaultVersion = new(2, 0, 0); @@ -49,7 +47,6 @@ public static void ApplyVersionChangesToProject(ref ProjectDescription projectDe if (isVersionEarlierThan_1_1_0 | isPinBitCountInvalid) { projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); - RemoveOldMergeSplits(ref projectDescription.ChipCollections); projectDescription.pinBitCounts = Project.PinBitCounts; projectDescription.SplitMergePairs = Project.SplitMergePairs; } @@ -57,27 +54,17 @@ public static void ApplyVersionChangesToProject(ref ProjectDescription projectDe if (isVersionEarlierThan_1_1_0 | isSplitMergeInvalid) { projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); - RemoveOldMergeSplits(ref projectDescription.ChipCollections); projectDescription.SplitMergePairs = Project.SplitMergePairs; } if (isVersionEarlierThan_1_1_1) { projectDescription.DLSVersion_LastSavedModdedVersion = Main.DLSVersion_ModdedID.ToString(); - RemoveOldMergeSplits(ref projectDescription.ChipCollections); projectDescription.pinBitCounts.Union(Project.PinBitCounts); projectDescription.SplitMergePairs.Union(Project.SplitMergePairs); } } - static void RemoveOldMergeSplits(ref List chips) - { - foreach (ChipCollection chip in chips) - { - chip.Chips.RemoveAll(e => OldMergeSplits.Contains(e)); - } - } - static void UpdateChipPre_2_1_5(ChipDescription chipDesc) { string ledName = ChipTypeHelper.GetName(ChipType.DisplayLED); diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index a2d35b0d..a5a4209a 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -2,15 +2,9 @@ "ProjectName": "MainTest", "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", -<<<<<<< HEAD "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-06-16T19:47:54.797+07:00", -======= - "DLSVersion_LastSavedModdedVersion": "1.1.0", - "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-17T21:09:27.388+02:00", ->>>>>>> e5c9f0a74d1a5f92e8be1abc7c9503d9ce3ca0d0 + "LastSaveTime": "2025-06-18T16:46:43.402+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -19,15 +13,9 @@ "Prefs_SimPaused": false, "Prefs_SimTargetStepsPerSecond": 150, "Prefs_SimStepsPerClockTick": 6, -<<<<<<< HEAD - "StepsRanSinceCreated": 77969812, + "StepsRanSinceCreated": 77972165, "TimeSpentSinceCreated": { - "StartFrom": "02:28:47.6187409" -======= - "StepsRanSinceCreated": 20570869, - "TimeSpentSinceCreated": { - "StartFrom": "02:03:12.7083871" ->>>>>>> e5c9f0a74d1a5f92e8be1abc7c9503d9ce3ca0d0 + "StartFrom": "02:29:03.8432934" }, "AllCustomChipNames":[ "AND", @@ -136,7 +124,7 @@ "Name":"IN/OUT" }, { - "Chips":["32-16","32-8","32-4","32-1","16-32","16-8","16-4","16-1","8-32","8-16","8-4","8-1","4-32","4-16","4-8","4-1","1-32","1-16","1-8","1-4"], + "Chips":["32-16BIT","32-8BIT","32-4BIT","32-1BIT","16-32BIT","16-8BIT","16-4BIT","16-1BIT","8-32BIT","8-16BIT","4-32BIT","4-16BIT","1-32BIT","1-16BIT"], "IsToggledOpen":true, "Name":"MERGE/SPLIT" }, @@ -166,7 +154,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","#AA","StatsTest","StatsTest1","StatsTest2","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","DETECTOR","RTC","ConstTest"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","#AA","StatsTest","StatsTest1","StatsTest2","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","DETECTOR","RTC","ConstTest","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT"], "IsToggledOpen":true, "Name":"OTHER" } From 17b7611f502eb64d7264f84226df6a7e7a583534 Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Wed, 18 Jun 2025 16:49:50 +0700 Subject: [PATCH 112/124] Fix proj description --- TestData/Projects/MainTest/ProjectDescription.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index a5a4209a..e5ac4c5f 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-06-18T16:46:43.402+07:00", + "LastSaveTime": "2025-06-18T16:49:42.362+07:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -13,9 +13,9 @@ "Prefs_SimPaused": false, "Prefs_SimTargetStepsPerSecond": 150, "Prefs_SimStepsPerClockTick": 6, - "StepsRanSinceCreated": 77972165, + "StepsRanSinceCreated": 77973032, "TimeSpentSinceCreated": { - "StartFrom": "02:29:03.8432934" + "StartFrom": "02:29:09.3105859" }, "AllCustomChipNames":[ "AND", @@ -124,7 +124,7 @@ "Name":"IN/OUT" }, { - "Chips":["32-16BIT","32-8BIT","32-4BIT","32-1BIT","16-32BIT","16-8BIT","16-4BIT","16-1BIT","8-32BIT","8-16BIT","4-32BIT","4-16BIT","1-32BIT","1-16BIT"], + "Chips":["32-16BIT","32-8BIT","32-4BIT","32-1BIT","16-32BIT","16-8BIT","16-4BIT","16-1BIT","8-32BIT","8-16BIT","8-4BIT","8-1BIT","4-32BIT","4-16BIT","4-8BIT","4-1BIT","1-32BIT","1-16BIT","1-8BIT","1-4BIT"], "IsToggledOpen":true, "Name":"MERGE/SPLIT" }, @@ -154,7 +154,7 @@ "Name":"TEST" }, { - "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","#AA","StatsTest","StatsTest1","StatsTest2","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","DETECTOR","RTC","ConstTest","4-8BIT","8-4BIT","1-8BIT","8-1BIT","1-4BIT","4-1BIT"], + "Chips":["PULSE","TEST MergeSplit","BUZZER","SPS","#","BuzzTest","SPSTest","#AA","StatsTest","StatsTest1","StatsTest2","EEPROM 256×16","EEPROM_test","BUTTON","BUTTON_test","BUTTON_test2","DIPSWITCH","4sw","RAM-8","DETECTOR","RTC","ConstTest"], "IsToggledOpen":true, "Name":"OTHER" } From 8439fe1d2fc3ee2d1ac9d514e4494c97fcc4edd5 Mon Sep 17 00:00:00 2001 From: BeboKhouja <73379481+BeboKhouja@users.noreply.github.com> Date: Wed, 18 Jun 2025 16:58:37 +0700 Subject: [PATCH 113/124] Fix modded version --- Assets/Scripts/SaveSystem/UpgradeHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/SaveSystem/UpgradeHelper.cs b/Assets/Scripts/SaveSystem/UpgradeHelper.cs index 2ba2ba52..e852a322 100644 --- a/Assets/Scripts/SaveSystem/UpgradeHelper.cs +++ b/Assets/Scripts/SaveSystem/UpgradeHelper.cs @@ -32,7 +32,7 @@ public static void ApplyVersionChanges(ChipDescription[] customChips, ChipDescri public static void ApplyVersionChangesToProject(ref ProjectDescription projectDescription) { Main.Version defaultModdedVersion = new(1, 0, 0); - Main.Version moddedVersion_1_1_0 = new(1, 1, 1); // Custom IN and OUTS version + Main.Version moddedVersion_1_1_0 = new(1, 1, 0); // Custom IN and OUTS version Main.Version moddedVersion_1_1_1 = new(1, 1, 1); // New 16 and 32 bit pins From eff7175dffc53c58dad8eb3f3df95d9b608fc2b1 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 18 Jun 2025 15:29:57 +0200 Subject: [PATCH 114/124] Adaptations for higher bitcount + snap --- Assets/Scripts/Game/Elements/PinInstance.cs | 5 ++- .../Scripts/Game/Elements/SubChipInstance.cs | 8 +++-- Assets/Scripts/Game/Helpers/GridHelper.cs | 5 +++ .../UI/Menus/ChipCustomizationMenu.cs | 8 +++-- .../Scripts/Graphics/World/DevSceneDrawer.cs | 17 +++++----- TestData/Projects/MainTest/Chips/SPSTest.json | 19 +++++++++--- .../Projects/MainTest/ProjectDescription.json | 31 +++++++++++++------ 7 files changed, 63 insertions(+), 30 deletions(-) diff --git a/Assets/Scripts/Game/Elements/PinInstance.cs b/Assets/Scripts/Game/Elements/PinInstance.cs index 9eb2037d..e88978ed 100644 --- a/Assets/Scripts/Game/Elements/PinInstance.cs +++ b/Assets/Scripts/Game/Elements/PinInstance.cs @@ -40,16 +40,15 @@ public PinInstance(PinDescription desc, PinAddress address, IMoveable parent, bo faceRight = isSourcePin; desc.face = faceRight ? 1 : 3; // 1 for right, 3 for left face = faceRight ? 1 : 3; - PinState.SetAllDisconnected(ref State); + State.SetAllDisconnected(); ID = desc.ID; LocalPosY = desc.LocalOffset; - } State.MakeFromPinBitCount(bitCount); PlayerInputState.MakeFromPinBitCount(bitCount); } public Vector2 ForwardDir => faceRight ? Vector2.right : Vector2.left; - + public Vector2 FacingDir => face == 1 ? Vector2.right : face == 3 ? Vector2.left : face == 2 ? Vector2.down : Vector2.up; public Vector2 GetWorldPos() { diff --git a/Assets/Scripts/Game/Elements/SubChipInstance.cs b/Assets/Scripts/Game/Elements/SubChipInstance.cs index 0f7ee384..1f9410ff 100644 --- a/Assets/Scripts/Game/Elements/SubChipInstance.cs +++ b/Assets/Scripts/Game/Elements/SubChipInstance.cs @@ -278,12 +278,14 @@ public void updateMinSize() foreach (PinInstance pin in pins) { - int pinGridHeight = pin.bitCount switch + int pinGridHeight = pin.bitCount.BitCount switch { PinBitCount.Bit1 => 2, PinBitCount.Bit4 => 3, - _ => 4 + PinBitCount.Bit8 => 4, + _ => Mathf.RoundToInt(PinHeightFromBitCount(pin.bitCount) /DrawSettings.GridSize) }; + if (pin.face == 0) { Min0 += pinGridHeight; @@ -333,7 +335,7 @@ public static (float chipHeight, float[] pinGridY) CalculateDefaultPinLayout(Pin PinBitCount.Bit1 => 2, PinBitCount.Bit4 => 3, PinBitCount.Bit8 => 4, - _ => Mathf.RoundToInt((GetPinDepthMultiplier(pinBitCount) * pinBitCount.BitCount * DrawSettings.PinHeightPerBit + 0.03f)/DrawSettings.GridSize) + _ => Mathf.RoundToInt(PinHeightFromBitCount(pinBitCount) / DrawSettings.GridSize) }; diff --git a/Assets/Scripts/Game/Helpers/GridHelper.cs b/Assets/Scripts/Game/Helpers/GridHelper.cs index 0c0d19f9..22789851 100644 --- a/Assets/Scripts/Game/Helpers/GridHelper.cs +++ b/Assets/Scripts/Game/Helpers/GridHelper.cs @@ -20,6 +20,11 @@ public static Vector2 SnapMovingElementToGrid(Vector2 centrePos, Vector2 anchorP return centrePos_Snapped; } + public static float ClampToGrid(float number, float min, float max) + { + return Mathf.Clamp(SnapToGrid(number), Mathf.Max(min,SnapToGrid(min)), Mathf.Min(max,SnapToGrid(max))); + } + public static float SnapToGrid(float v) { int intV = Mathf.RoundToInt(v / GridSize); diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs index c7fea0d0..a2e22025 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipCustomizationMenu.cs @@ -316,17 +316,21 @@ static void HandlePinDragging() float maxOffset; float offsetAlongFace; + bool shouldSnapToGrid = Project.ActiveProject.ShouldSnapToGrid; + if (closestFace == 0 || closestFace == 2) { // Horizontal face - move along X axis maxOffset = chipHalfSize.x - pinHeight / 2f; - offsetAlongFace = Mathf.Clamp(localMouse.x, -maxOffset, maxOffset); + offsetAlongFace = shouldSnapToGrid ? GridHelper.ClampToGrid(localMouse.x, -maxOffset, maxOffset) : + Mathf.Clamp(localMouse.x, -maxOffset, maxOffset); } else { // Vertical face - move along Y axis maxOffset = chipHalfSize.y - pinHeight / 2f; - offsetAlongFace = Mathf.Clamp(localMouse.y, -maxOffset, maxOffset); + offsetAlongFace = shouldSnapToGrid ? GridHelper.ClampToGrid(localMouse.y, -maxOffset, maxOffset) : + Mathf.Clamp(localMouse.y, -maxOffset, maxOffset); } selectedPin.LocalPosY = offsetAlongFace; diff --git a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs index 6a50e6f6..0a552743 100644 --- a/Assets/Scripts/Graphics/World/DevSceneDrawer.cs +++ b/Assets/Scripts/Graphics/World/DevSceneDrawer.cs @@ -199,7 +199,7 @@ public static void DrawPinLabel(PinInstance pin) FontType font = FontBold; Vector2 size = Draw.CalculateTextBoundsSize(text, FontSizePinLabel, font) + LabelBackgroundPadding; - Vector2 centre = pin.GetWorldPos() + pin.ForwardDir * (size.x / 2 + offsetX); + Vector2 centre = pin.GetWorldPos() + pin.FacingDir * (size.x / 2 + offsetX); Draw.Quad(centre, size, ActiveTheme.PinLabelCol); Draw.Text(font, text, FontSizePinLabel, centre, Anchor.TextFirstLineCentre, Color.white); @@ -1132,6 +1132,7 @@ static void DrawMultiBitPin(PinInstance pin) case 3: offsetDir = Vector2.right; break; // left face } + Vector2 pinSelectionBoundsPos = pinPos + offsetDir * 0.02f; bool mouseOverPin = !InteractionState.MouseIsOverUI && InputHelper.MouseInsideBounds_World(pinSelectionBoundsPos, pinSize); @@ -1149,6 +1150,14 @@ static void DrawMultiBitPin(PinInstance pin) Draw.Quad(pinPos, pinSize, pinCol); + + // Draw pin indicator + if (pin.bitCount >= 64 && !mouseOverPin) + { + Vector2 depthIndicatorSize = isHorizontal ? new(pinHeight, pinWidth / 8f) : new(pinWidth / 8f, pinHeight); + Draw.Quad(pinPos + pin.FacingDir * 0.25f * pinWidth, depthIndicatorSize, ActiveTheme.PinSizeIndicatorColors[pin.bitCount.GetTier()]); + } + // Draws input/output indicators on subchip pins only bool isOnCustomChip = pin.parent is SubChipInstance; if (isOnCustomChip) @@ -1216,12 +1225,6 @@ static void DrawMultiBitPin(PinInstance pin) } } - Draw.Quad(pinPos, pinSize, pinCol); - - if(pin.bitCount <= 64 || mouseOverPin) { return; } - - Vector2 depthIndicatorSize = new(pinWidth / 8f, pinHeight); - Draw.Quad(pinPos + pin.ForwardDir * 0.25f * pinWidth, depthIndicatorSize, ActiveTheme.PinSizeIndicatorColors[pin.bitCount.GetTier()]); } public static void DrawGrid(Color gridCol) diff --git a/TestData/Projects/MainTest/Chips/SPSTest.json b/TestData/Projects/MainTest/Chips/SPSTest.json index 968bad34..e38b63a1 100644 --- a/TestData/Projects/MainTest/Chips/SPSTest.json +++ b/TestData/Projects/MainTest/Chips/SPSTest.json @@ -24,7 +24,9 @@ }, "BitCount":"16", "Colour":0, - "ValueDisplayMode":1 + "ValueDisplayMode":1, + "face":1, + "LocalOffset":0.0 }, { "Name":"OUT", @@ -35,7 +37,9 @@ }, "BitCount":"16", "Colour":0, - "ValueDisplayMode":1 + "ValueDisplayMode":1, + "face":1, + "LocalOffset":0.0 }, { "Name":"OUT", @@ -46,7 +50,9 @@ }, "BitCount":"1", "Colour":0, - "ValueDisplayMode":0 + "ValueDisplayMode":0, + "face":1, + "LocalOffset":0.0 }, { "Name":"OUT", @@ -57,7 +63,9 @@ }, "BitCount":"1", "Colour":0, - "ValueDisplayMode":0 + "ValueDisplayMode":0, + "face":1, + "LocalOffset":0.0 } ], "SubChips":[ @@ -131,5 +139,6 @@ "Points":[{"x":0.0,"y":0.0},{"x":0.0,"y":0.0}] } ], - "Displays": null + "Displays": null, + "HasCustomLayout": false } \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index db5c0830..103fc481 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -3,20 +3,20 @@ "DLSVersion_LastSaved": "2.1.6", "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.1", - "CreationTime": "2025-03-15T00:23:30.404+07:00", - "LastSaveTime": "2025-06-18T16:49:42.362+07:00", + "CreationTime": "2025-03-14T18:23:30.404+01:00", + "LastSaveTime": "2025-06-18T15:29:44.388+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, "Prefs_Snapping": 0, "Prefs_StraightWires": 0, "Prefs_SimPaused": false, - "Prefs_SimTargetStepsPerSecond": 150, + "Prefs_SimTargetStepsPerSecond": 15, "Prefs_SimStepsPerClockTick": 6, - "Perfs_PinIndicators": 0, - "StepsRanSinceCreated": 77973032, + "Perfs_PinIndicators": 4, + "StepsRanSinceCreated": 105855705, "TimeSpentSinceCreated": { - "StartFrom": "02:29:09.3105859" + "StartFrom": "02:41:51.9372009" }, "AllCustomChipNames":[ "AND", @@ -77,7 +77,9 @@ "BUTTON_test", "BUTTON_test2", "4sw", - "ConstTest" + "ConstTest", + "_", + "IndicatorTest" ], "StarredList":[ { @@ -111,6 +113,14 @@ { "Name":"BuzzTest", "IsCollection":false + }, + { + "Name":"_", + "IsCollection":false + }, + { + "Name":"IndicatorTest", + "IsCollection":false } ], "ChipCollections":[ @@ -120,7 +130,7 @@ "Name":"BASICS" }, { - "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16","IN-32","OUT-32"], + "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16","IN-32","OUT-32","IN-128","OUT-128"], "IsToggledOpen":true, "Name":"IN/OUT" }, @@ -135,7 +145,7 @@ "Name":"DISPLAY" }, { - "Chips":["BUS-1","BUS-4","BUS-8","BUS-16","BUS-32"], + "Chips":["BUS-1","BUS-4","BUS-8","BUS-16","BUS-32","BUS-128"], "IsToggledOpen":true, "Name":"BUS" }, @@ -165,7 +175,8 @@ "4", "8", "16", - "32" + "32", + "128" ], "SplitMergePairs":[ { From a10556fb6512a05e2b76267da416cef0c0a89a15 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:14:00 +0200 Subject: [PATCH 115/124] Quick bugfix, also removes clutter --- .../Scripts/Game/Project/BuiltinCollectionCreator.cs | 12 ++++++------ Assets/Scripts/Game/Project/Project.cs | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs index 3d6450c1..abc2290e 100644 --- a/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinCollectionCreator.cs @@ -41,12 +41,12 @@ public static ChipCollection[] CreateDefaultChipCollections() , CreateByNames("MERGE/SPLIT", - "1-4", - "1-8", - "4-8", - "4-1", - "8-4", - "8-1" + "1-4BIT", + "1-8BIT", + "4-8BIT", + "4-1BIT", + "8-4BIT", + "8-1BIT" ), CreateByNames("BUS", "BUS-1", diff --git a/Assets/Scripts/Game/Project/Project.cs b/Assets/Scripts/Game/Project/Project.cs index ed848bdb..cc871ef5 100644 --- a/Assets/Scripts/Game/Project/Project.cs +++ b/Assets/Scripts/Game/Project/Project.cs @@ -23,12 +23,10 @@ public enum SaveMode SaveAs } public static readonly List> SplitMergePairs = new() { - new(32,16), new(32,8), new(32,4), new(32,1), - new(16,8), new(16,4), new(16,1), new(8,4), new(8,1), new(4,1) }; - public static readonly List PinBitCounts = new List { 1, 4, 8, 16, 32 }; + public static readonly List PinBitCounts = new List { 1, 4, 8}; public static Project ActiveProject; public readonly ChipLibrary chipLibrary; From c9ead6ab32db62121657dfb1c80a205d6f7c2c22 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:27:46 +0200 Subject: [PATCH 116/124] Reassign base sizes to ROM and EEPROM otherwise it breaks preexisting projects bruh --- .../Scripts/Game/Project/BuiltinChipCreator.cs | 16 ++++++++++------ Assets/Scripts/Simulation/Simulator.cs | 10 +++++++--- .../Projects/MainTest/ProjectDescription.json | 6 +++--- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs index c19caedf..2d6a72b6 100644 --- a/Assets/Scripts/Game/Project/BuiltinChipCreator.cs +++ b/Assets/Scripts/Game/Project/BuiltinChipCreator.cs @@ -251,8 +251,9 @@ static ChipDescription CreateROM_8() }; PinDescription[] outputPins = { - CreatePinDescription("OUT", 1, PinBitCount.Bit16), - }; + CreatePinDescription("OUT B", 1, PinBitCount.Bit8), + CreatePinDescription("OUT A", 2, PinBitCount.Bit8) + }; Color col = GetColor(new(0.25f, 0.35f, 0.5f)); Vector2 size = new(GridSize * 12, SubChipInstance.MinChipHeightForPins(inputPins, outputPins)); @@ -265,13 +266,16 @@ static ChipDescription CreateEEPROM_8() PinDescription[] inputPins = { CreatePinDescription("ADDRESS", 0, PinBitCount.Bit8), - CreatePinDescription("DATA", 1, PinBitCount.Bit16), - CreatePinDescription("WRITE", 2, PinBitCount.Bit1), - CreatePinDescription("CLOCK", 3, PinBitCount.Bit1) + CreatePinDescription("DATA B", 1, PinBitCount.Bit8), + CreatePinDescription("DATA A", 2, PinBitCount.Bit8), + CreatePinDescription("WRITE", 3, PinBitCount.Bit1), + CreatePinDescription("CLOCK", 4, PinBitCount.Bit1) }; PinDescription[] outputPins = { - CreatePinDescription("OUT", 5, PinBitCount.Bit16) + CreatePinDescription("OUT B", 5, PinBitCount.Bit8), + CreatePinDescription("OUT A", 6, PinBitCount.Bit8) + }; Color col = GetColor(new(0.25f, 0.35f, 0.5f)); diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index 305ae260..df714e1d 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -447,16 +447,19 @@ static void ProcessBuiltinChip(SimChip chip) } case ChipType.Rom_256x16: { + const uint mask = 0x00ff; uint address = chip.InputPins[0].State.GetShortValues(); uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShort(data); - + chip.OutputPins[0].State.SetShort((data>>16) & mask); + chip.OutputPins[1].State.SetShort(data & mask); + break; } case ChipType.EEPROM_256x16: { + const uint mask = 0x00ff; uint address = chip.InputPins[0].State.GetShortValues(); bool isWriting = chip.InputPins[2].State.SmallHigh(); bool clockHigh = chip.InputPins[3].State.SmallHigh(); @@ -472,7 +475,8 @@ static void ProcessBuiltinChip(SimChip chip) } uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShort(data); + chip.OutputPins[0].State.SetShort((data >> 16) & mask); + chip.OutputPins[1]. State.SetShort(data & mask); break; } diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 103fc481..6a4a360a 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-18T15:29:44.388+02:00", + "LastSaveTime": "2025-06-18T18:27:12.537+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -14,9 +14,9 @@ "Prefs_SimTargetStepsPerSecond": 15, "Prefs_SimStepsPerClockTick": 6, "Perfs_PinIndicators": 4, - "StepsRanSinceCreated": 105855705, + "StepsRanSinceCreated": 105856187, "TimeSpentSinceCreated": { - "StartFrom": "02:41:51.9372009" + "StartFrom": "02:42:24.1369074" }, "AllCustomChipNames":[ "AND", From 0f76fca285734ee27d05db171bc253b48b0ee4a8 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:30:51 +0200 Subject: [PATCH 117/124] Fixing the fix Forgot to fix EEPROM write --- Assets/Scripts/Simulation/Simulator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index df714e1d..d07e78ab 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -461,15 +461,15 @@ static void ProcessBuiltinChip(SimChip chip) { const uint mask = 0x00ff; uint address = chip.InputPins[0].State.GetShortValues(); - bool isWriting = chip.InputPins[2].State.SmallHigh(); - bool clockHigh = chip.InputPins[3].State.SmallHigh(); + bool isWriting = chip.InputPins[3].State.SmallHigh(); + bool clockHigh = chip.InputPins[4].State.SmallHigh(); bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; chip.InternalState[^1] = clockHigh ? 1u : 0; if (isWriting && isRisingEdge) { - uint writeData = (ushort)chip.InputPins[1].State.a;//(ushort)(((chip.InputPins[1].State.GetShortValues() << 8) & (ByteMask<<8)) | (chip.InputPins[2].State.GetShortValues() & ByteMask)) + uint writeData = (ushort)(((chip.InputPins[1].State.GetShortValues() & mask) << 8) | (chip.InputPins[2].State.GetShortValues() & mask)); chip.InternalState[address] = writeData; Project.ActiveProject.NotifyRomContentsEditedRuntime(chip); } From 40ff09b0d5c24cefe4c761ac1adc9987433a07db Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 18 Jun 2025 19:24:51 +0200 Subject: [PATCH 118/124] Makes the special chip maker more reassuring Confirms when a pin size is added Adds the option to close without saving just in case. --- .../Graphics/UI/Menus/SpecialChipMakerMenu.cs | 54 +++++++++++++++---- .../Projects/MainTest/ProjectDescription.json | 19 ++++--- 2 files changed, 57 insertions(+), 16 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs index 4e69edd4..0efa02d1 100644 --- a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs @@ -25,6 +25,9 @@ public static class SpecialChipMakerMenu static readonly Vector2 entrySize = new(menuWidth, DrawSettings.SelectorWheelHeight); public static readonly Vector2 settingFieldSize = new(entrySize.x / 3, entrySize.y); + static int previousValue; + public static bool changeToBeAdded; + public static bool displayDone; static readonly string[] SpecialChipTypes = { @@ -66,7 +69,7 @@ public static void DrawMenu() Color labelCol = Color.white; Color headerCol = new(0.46f, 1, 0.54f); Color errorCol = new(1, 0.4f, 0.45f); - + Color doneCol = new(128, 128, 0); using (UI.BeginBoundsScope(true)) @@ -83,17 +86,22 @@ public static void DrawMenu() DrawSpecialMergeSplitMenu(); } - Vector2 buttonTopLeft = new(labelPosCurr.x, UI.PrevBounds.Bottom - 2.5f); - int addOrClose = UI.VerticalButtonGroup(new[] { "Add special chip", "Save and close" }, new[] {canAddChip, true }, + AddSpacing(); + DrawDoneSection(displayDone); + + Vector2 buttonTopLeft = new(labelPosCurr.x, UI.PrevBounds.Bottom - 2f); + int addOrClose = UI.VerticalButtonGroup(new[] { "Add special chip", "Save", "Close" }, new[] {canAddChip, true, true }, ActiveUITheme.ButtonTheme, buttonTopLeft + (menuWidth / 2) * Vector2.right, entrySize, false, false, entrySpacing); if(mainPinNamesMode == OPTION_PIN && canAddChip && addOrClose == 0) { AddNewBitSize(currentlyAddingPinBitOfSize); + changeToBeAdded = false; } if(mainPinNamesMode == OPTION_MERGE_SPLIT && canAddChip && addOrClose == 0) { AddNewMergeSplit(currentlyAddingMergeSplit.Key, currentlyAddingMergeSplit.Value); + changeToBeAdded = false; } @@ -101,6 +109,10 @@ public static void DrawMenu() { // Save changes Main.ActiveProject.SaveCurrentProjectDescription() ; + } + + if (addOrClose == 2) + { UIDrawer.SetActiveMenu(UIDrawer.MenuType.None); } @@ -116,6 +128,8 @@ void DrawSpecialMergeSplitMenu() int firstPinSizeAttempt = int.TryParse(firstPinSize.text, out int a) ? a : -1; int secondPinSizeAttempt = int.TryParse(secondPinSize.text, out int b) ? b : -1; (bool valid, string reason) confirmation = RealMergeSplitConfirmation(firstPinSizeAttempt, secondPinSizeAttempt); + + if (firstPinSizeAttempt != -1 && secondPinSizeAttempt != -1 && !confirmation.valid) { @@ -128,8 +142,10 @@ void DrawSpecialMergeSplitMenu() { canAddChip = true; currentlyAddingMergeSplit = new (Math.Max(firstPinSizeAttempt, secondPinSizeAttempt), Math.Min(firstPinSizeAttempt, secondPinSizeAttempt)); + displayDone = DisplayDone(false); return; } + displayDone = DisplayDone(firstPinSizeAttempt == -1 && secondPinSizeAttempt == -1); canAddChip = false; } @@ -145,14 +161,24 @@ void DrawSpecialPinMenu() DrawErrorSection(confirmation.reason); canAddChip = false; } - else if (confirmation.valid && pinSizeAttempt != 1) { + else if (confirmation.valid && pinSizeAttempt != -1) { canAddChip = true; currentlyAddingPinBitOfSize = pinSizeAttempt; + displayDone = DisplayDone(false); return; } + displayDone = DisplayDone(pinSizeAttempt == -1); canAddChip = false; } + void DrawDoneSection(bool done) { + if(!done) { return; } + AddHeaderSpacing(); + UI.DrawText("DONE !", theme.FontBold, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, doneCol); + AddHeaderSpacing(); + + } + void DrawErrorSection(string reason) { AddHeaderSpacing(); @@ -237,6 +263,8 @@ public static bool ValidatePinSizeInput(string s) { if(a < 0) return false; if(a > 65536) return false; + changeToBeAdded = previousValue != a; + previousValue = a; return true; } return false; @@ -244,26 +272,27 @@ public static bool ValidatePinSizeInput(string s) public static (bool valid, string reason) RealSizeConfirmation(int a) { - if(a < 1) { return (false, "Pin size must be at least 1 bit."); } + if (a < 1) { return (false, "Pin size must be at least 1 bit."); } if (a > 64 && a % 8 != 0 && a<= 512) { return (false, "Pin size > 64 and not a multiple of 8."); } if(a > 512 && a % 64 != 0 && a <= 4096) { return (false, "Pin size > 512 and not a multiple of 64."); } if (a > 4096 && a % 512 != 0) { return (false, "Pin size > 4096 and not a multiple of 512."); } - if (PinBitCountsMade.Contains(a)) { return (false, "Pins with this count already exist."); } + if (PinBitCountsMade.Contains(a) && changeToBeAdded) { return (false, "Pins with this count already exist."); } + return (true, ""); } public static (bool valid, string reason) RealMergeSplitConfirmation(int a, int b) { - if (MergeSplitsMade.Any(k => (k.Key == a && k.Value == b )||(k.Value == a && k.Key == b))){ return (false, "These Merge/Split chips already exist."); } + if (MergeSplitsMade.Any(k => (k.Key == a && k.Value == b) || (k.Value == a && k.Key == b)) && changeToBeAdded) { return (false, "These Merge/Split chips already exist."); } if (!PinBitCountsMade.Contains(a) && !PinBitCountsMade.Contains(b) ) { return (false, $"No pins with pinsize {a} and {b} exist. Create them first."); } - if (!PinBitCountsMade.Contains(a)) { return (false, $"No pin with pinsize {a} exist. Create it first, if valid."); } - if (!PinBitCountsMade.Contains(b)) { return (false, $"No pin with pinsize {b} exist. Create it first, if valid."); } + if (!PinBitCountsMade.Contains(a) ) { return (false, $"No pin with pinsize {a} exist. Create it first, if valid."); } + if (!PinBitCountsMade.Contains(b) ) { return (false, $"No pin with pinsize {b} exist. Create it first, if valid."); } int bigger = Math.Max(a, b); int smaller = Math.Min(a, b); - if(bigger%smaller != 0) { return (false, $"{bigger} / {smaller} isn't an integer."); } + return (true, ""); } @@ -278,5 +307,10 @@ public static void AddNewMergeSplit(int a, int b) Main.ActiveProject.AddNewMergeSplit(a, b); RefreshMergeSplits(); } + + public static bool DisplayDone(bool empty) + { + return !changeToBeAdded && !empty; + } } } \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index 6a4a360a..e2d22ee7 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-18T18:27:12.537+02:00", + "LastSaveTime": "2025-06-18T19:24:20.700+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -14,9 +14,9 @@ "Prefs_SimTargetStepsPerSecond": 15, "Prefs_SimStepsPerClockTick": 6, "Perfs_PinIndicators": 4, - "StepsRanSinceCreated": 105856187, + "StepsRanSinceCreated": 105858504, "TimeSpentSinceCreated": { - "StartFrom": "02:42:24.1369074" + "StartFrom": "02:44:58.9754495" }, "AllCustomChipNames":[ "AND", @@ -130,7 +130,7 @@ "Name":"BASICS" }, { - "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16","IN-32","OUT-32","IN-128","OUT-128"], + "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16","IN-32","OUT-32","IN-128","OUT-128","IN-2","OUT-2","IN-6","OUT-6","IN-5","OUT-5","IN-7","OUT-7","IN-9","OUT-9","IN-31","OUT-31","IN-37","OUT-37"], "IsToggledOpen":true, "Name":"IN/OUT" }, @@ -145,7 +145,7 @@ "Name":"DISPLAY" }, { - "Chips":["BUS-1","BUS-4","BUS-8","BUS-16","BUS-32","BUS-128"], + "Chips":["BUS-1","BUS-4","BUS-8","BUS-16","BUS-32","BUS-128","BUS-2","BUS-6","BUS-5","BUS-7","BUS-9","BUS-31","BUS-37"], "IsToggledOpen":true, "Name":"BUS" }, @@ -176,7 +176,14 @@ "8", "16", "32", - "128" + "128", + "2", + "6", + "5", + "7", + "9", + "31", + "37" ], "SplitMergePairs":[ { From 4bb616f2d3132d17c39999c79a242662bcd17906 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 18 Jun 2025 19:50:13 +0200 Subject: [PATCH 119/124] Special chip maker saving fix Now, closing without saving actually closes without saving. Saving only happens when saving. --- .../Graphics/UI/Menus/SpecialChipMakerMenu.cs | 60 ++++++++++++++++--- .../Projects/MainTest/ProjectDescription.json | 18 ++++-- 2 files changed, 63 insertions(+), 15 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs index 0efa02d1..580f59bc 100644 --- a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs @@ -16,6 +16,10 @@ public static class SpecialChipMakerMenu public static List PinBitCountsMade = new(); public static List> MergeSplitsMade = new(); + public static List PinBitCountsAwaitingSave = new(); + public static List> MergeSplitsAwaitingSave = new(); + + public static bool saved; const float textSpacing = 0.25f; const float entrySpacing = 0.5f; @@ -90,7 +94,7 @@ public static void DrawMenu() DrawDoneSection(displayDone); Vector2 buttonTopLeft = new(labelPosCurr.x, UI.PrevBounds.Bottom - 2f); - int addOrClose = UI.VerticalButtonGroup(new[] { "Add special chip", "Save", "Close" }, new[] {canAddChip, true, true }, + int addOrClose = UI.VerticalButtonGroup(new[] { "Add special chip", "Save", "Close" }, new[] {canAddChip && !displayDone, !saved, true }, ActiveUITheme.ButtonTheme, buttonTopLeft + (menuWidth / 2) * Vector2.right, entrySize, false, false, entrySpacing); if(mainPinNamesMode == OPTION_PIN && canAddChip && addOrClose == 0) @@ -107,8 +111,9 @@ public static void DrawMenu() if (addOrClose == 1) { - // Save changes + SaveChanges(); Main.ActiveProject.SaveCurrentProjectDescription() ; + saved = true; } if (addOrClose == 2) @@ -131,7 +136,7 @@ void DrawSpecialMergeSplitMenu() - if (firstPinSizeAttempt != -1 && secondPinSizeAttempt != -1 && !confirmation.valid) + if (firstPinSizeAttempt != -1 && secondPinSizeAttempt != -1 && !confirmation.valid && !displayDone) { AddSpacing(); DrawErrorSection(confirmation.reason); @@ -155,7 +160,7 @@ void DrawSpecialPinMenu() InputFieldState pinSizeInput = MenuHelper.LabeledInputField("Size of new pin:", labelCol, labelPosCurr,entrySize,ID_PinSize, pinSizeInputValidator, settingFieldSize.x); int pinSizeAttempt = int.TryParse(pinSizeInput.text, out int a) ? a : -1; (bool valid, string reason) confirmation = RealSizeConfirmation(pinSizeAttempt); - if (!confirmation.valid && pinSizeAttempt != -1) + if (!confirmation.valid && pinSizeAttempt != -1 && !displayDone) { AddSpacing(); DrawErrorSection(confirmation.reason); @@ -233,8 +238,15 @@ void AddTextSpacing() public static void OnMenuOpened() { + PinBitCountsAwaitingSave = new(); + MergeSplitsAwaitingSave = new(); + RefreshPinBitCounts(); RefreshMergeSplits(); + saved = true; + changeToBeAdded = true; + displayDone = false; + previousValue = -1; } public static void RefreshPinBitCounts() @@ -244,6 +256,10 @@ public static void RefreshPinBitCounts() { PinBitCountsMade.Add(pinBit.BitCount); } + foreach(var pinBit in PinBitCountsAwaitingSave) + { + PinBitCountsMade.Add(pinBit); + } } public static void RefreshMergeSplits() @@ -253,11 +269,16 @@ public static void RefreshMergeSplits() { MergeSplitsMade.Add(new(PinBitPair.Key, PinBitPair.Value)); } + + foreach(var pair in MergeSplitsAwaitingSave) + { + MergeSplitsAwaitingSave.Add(pair); + } } public static bool ValidatePinSizeInput(string s) { - if (string.IsNullOrEmpty(s)) return true; + if (string.IsNullOrEmpty(s)){ changeToBeAdded = false; return true; } if (s.Contains(" ")) return false; if (int.TryParse(s, out int a)) { @@ -276,7 +297,7 @@ public static (bool valid, string reason) RealSizeConfirmation(int a) if (a > 64 && a % 8 != 0 && a<= 512) { return (false, "Pin size > 64 and not a multiple of 8."); } if(a > 512 && a % 64 != 0 && a <= 4096) { return (false, "Pin size > 512 and not a multiple of 64."); } if (a > 4096 && a % 512 != 0) { return (false, "Pin size > 4096 and not a multiple of 512."); } - if (PinBitCountsMade.Contains(a) && changeToBeAdded) { return (false, "Pins with this count already exist."); } + if (PinBitCountsMade.Contains(a)) { return (false, "Pins with this count already exist."); } return (true, ""); @@ -284,7 +305,7 @@ public static (bool valid, string reason) RealSizeConfirmation(int a) public static (bool valid, string reason) RealMergeSplitConfirmation(int a, int b) { - if (MergeSplitsMade.Any(k => (k.Key == a && k.Value == b) || (k.Value == a && k.Key == b)) && changeToBeAdded) { return (false, "These Merge/Split chips already exist."); } + if (MergeSplitsMade.Any(k => (k.Key == a && k.Value == b) || (k.Value == a && k.Key == b))) { return (false, "These Merge/Split chips already exist."); } if (!PinBitCountsMade.Contains(a) && !PinBitCountsMade.Contains(b) ) { return (false, $"No pins with pinsize {a} and {b} exist. Create them first."); } if (!PinBitCountsMade.Contains(a) ) { return (false, $"No pin with pinsize {a} exist. Create it first, if valid."); } if (!PinBitCountsMade.Contains(b) ) { return (false, $"No pin with pinsize {b} exist. Create it first, if valid."); } @@ -298,19 +319,40 @@ public static (bool valid, string reason) RealMergeSplitConfirmation(int a, int public static void AddNewBitSize(int a) { - Main.ActiveProject.AddNewPinSize(a); + PinBitCountsAwaitingSave.Add(a); RefreshPinBitCounts(); + saved = false; + } public static void AddNewMergeSplit(int a, int b) { - Main.ActiveProject.AddNewMergeSplit(a, b); + MergeSplitsAwaitingSave.Add(new(a,b)); RefreshMergeSplits(); + saved = false; } public static bool DisplayDone(bool empty) { return !changeToBeAdded && !empty; } + + public static void SaveChanges() + { + if (!saved) + { + foreach (int a in PinBitCountsAwaitingSave) + { + Main.ActiveProject.AddNewPinSize(a); + } + foreach (var pair in MergeSplitsAwaitingSave) + { + Main.ActiveProject.AddNewMergeSplit(pair.Key, pair.Value); + } + saved = true; + PinBitCountsAwaitingSave = new(); + MergeSplitsAwaitingSave = new(); + } + } } } \ No newline at end of file diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index e2d22ee7..d545b228 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-18T19:24:20.700+02:00", + "LastSaveTime": "2025-06-18T19:49:26.838+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -14,9 +14,9 @@ "Prefs_SimTargetStepsPerSecond": 15, "Prefs_SimStepsPerClockTick": 6, "Perfs_PinIndicators": 4, - "StepsRanSinceCreated": 105858504, + "StepsRanSinceCreated": 105862117, "TimeSpentSinceCreated": { - "StartFrom": "02:44:58.9754495" + "StartFrom": "02:49:00.3085637" }, "AllCustomChipNames":[ "AND", @@ -130,7 +130,7 @@ "Name":"BASICS" }, { - "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16","IN-32","OUT-32","IN-128","OUT-128","IN-2","OUT-2","IN-6","OUT-6","IN-5","OUT-5","IN-7","OUT-7","IN-9","OUT-9","IN-31","OUT-31","IN-37","OUT-37"], + "Chips":["IN-1","IN-4","IN-8","OUT-1","OUT-4","OUT-8","IN-16","OUT-16","IN-32","OUT-32","IN-128","OUT-128","IN-2","OUT-2","IN-6","OUT-6","IN-5","OUT-5","IN-7","OUT-7","IN-9","OUT-9","IN-31","OUT-31","IN-37","OUT-37","IN-12","OUT-12","IN-13","OUT-13","IN-21","OUT-21","IN-23","OUT-23","IN-17","OUT-17","IN-56","OUT-56"], "IsToggledOpen":true, "Name":"IN/OUT" }, @@ -145,7 +145,7 @@ "Name":"DISPLAY" }, { - "Chips":["BUS-1","BUS-4","BUS-8","BUS-16","BUS-32","BUS-128","BUS-2","BUS-6","BUS-5","BUS-7","BUS-9","BUS-31","BUS-37"], + "Chips":["BUS-1","BUS-4","BUS-8","BUS-16","BUS-32","BUS-128","BUS-2","BUS-6","BUS-5","BUS-7","BUS-9","BUS-31","BUS-37","BUS-12","BUS-13","BUS-21","BUS-23","BUS-17","BUS-56"], "IsToggledOpen":true, "Name":"BUS" }, @@ -183,7 +183,13 @@ "7", "9", "31", - "37" + "37", + "12", + "13", + "21", + "23", + "17", + "56" ], "SplitMergePairs":[ { From aff4e22889fc25ae94e2158253bee7d29dac96f5 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 18 Jun 2025 19:52:28 +0200 Subject: [PATCH 120/124] Pressing escape closes the special chip maker menu Pretty nifty huh ? --- Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs | 5 +++++ TestData/Projects/MainTest/ProjectDescription.json | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs index 580f59bc..614821cc 100644 --- a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs @@ -123,6 +123,11 @@ public static void DrawMenu() MenuHelper.DrawReservedMenuPanel(panelID, UI.GetCurrentBoundsScope()); } + + if(KeyboardShortcuts.CancelShortcutTriggered) + { + UIDrawer.SetActiveMenu(UIDrawer.MenuType.None) ; + } void DrawSpecialMergeSplitMenu() { diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index d545b228..aac18ec5 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-18T19:49:26.838+02:00", + "LastSaveTime": "2025-06-18T19:52:05.242+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -14,9 +14,9 @@ "Prefs_SimTargetStepsPerSecond": 15, "Prefs_SimStepsPerClockTick": 6, "Perfs_PinIndicators": 4, - "StepsRanSinceCreated": 105862117, + "StepsRanSinceCreated": 105862272, "TimeSpentSinceCreated": { - "StartFrom": "02:49:00.3085637" + "StartFrom": "02:49:10.6845784" }, "AllCustomChipNames":[ "AND", From dcdc258050c6b7cb81a44248515f6a7671c7fa0e Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Wed, 18 Jun 2025 23:39:14 +0200 Subject: [PATCH 121/124] Rom Fix --- Assets/Scripts/Simulation/Simulator.cs | 4 ++-- TestData/Projects/MainTest/ProjectDescription.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index d07e78ab..c9311d5d 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -451,7 +451,7 @@ static void ProcessBuiltinChip(SimChip chip) uint address = chip.InputPins[0].State.GetShortValues(); uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShort((data>>16) & mask); + chip.OutputPins[0].State.SetShort((data>>8) & mask); chip.OutputPins[1].State.SetShort(data & mask); break; @@ -475,7 +475,7 @@ static void ProcessBuiltinChip(SimChip chip) } uint data = chip.InternalState[address]; - chip.OutputPins[0].State.SetShort((data >> 16) & mask); + chip.OutputPins[0].State.SetShort((data >> 8) & mask); chip.OutputPins[1]. State.SetShort(data & mask); break; } diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index aac18ec5..e4951aae 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-18T19:52:05.242+02:00", + "LastSaveTime": "2025-06-18T19:53:06.195+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -14,9 +14,9 @@ "Prefs_SimTargetStepsPerSecond": 15, "Prefs_SimStepsPerClockTick": 6, "Perfs_PinIndicators": 4, - "StepsRanSinceCreated": 105862272, + "StepsRanSinceCreated": 105862287, "TimeSpentSinceCreated": { - "StartFrom": "02:49:10.6845784" + "StartFrom": "02:49:11.6953872" }, "AllCustomChipNames":[ "AND", From a6a5b4d18d50c45e8915881152f3ba8434c5fa2e Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 19 Jun 2025 14:55:39 +0200 Subject: [PATCH 122/124] M/S maker fixed (was a typo) --- Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs | 2 +- TestData/Projects/MainTest/ProjectDescription.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs index 614821cc..aa066c0b 100644 --- a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs @@ -277,7 +277,7 @@ public static void RefreshMergeSplits() foreach(var pair in MergeSplitsAwaitingSave) { - MergeSplitsAwaitingSave.Add(pair); + MergeSplitsMade.Add(pair); } } diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index e4951aae..ca39015b 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-18T19:53:06.195+02:00", + "LastSaveTime": "2025-06-19T14:54:53.304+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -14,9 +14,9 @@ "Prefs_SimTargetStepsPerSecond": 15, "Prefs_SimStepsPerClockTick": 6, "Perfs_PinIndicators": 4, - "StepsRanSinceCreated": 105862287, + "StepsRanSinceCreated": 105862339, "TimeSpentSinceCreated": { - "StartFrom": "02:49:11.6953872" + "StartFrom": "02:49:15.3345600" }, "AllCustomChipNames":[ "AND", From 059f4224df8d5af94927a08c6ff018e8b2f5edb1 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Thu, 19 Jun 2025 16:58:34 +0200 Subject: [PATCH 123/124] Removes unused code + fixes i/o alignment --- Assets/Scripts/Game/Elements/DevPinInstance.cs | 8 ++++++-- .../Scripts/Graphics/UI/Menus/ChipStatsMenu.cs | 13 ------------- .../Graphics/UI/Menus/CollectionStatsMenu.cs | 17 ----------------- .../Graphics/UI/Menus/ProjectStatsMenu.cs | 11 ----------- .../Graphics/UI/Menus/SpecialChipMakerMenu.cs | 10 ---------- .../Projects/MainTest/ProjectDescription.json | 6 +++--- 6 files changed, 9 insertions(+), 56 deletions(-) diff --git a/Assets/Scripts/Game/Elements/DevPinInstance.cs b/Assets/Scripts/Game/Elements/DevPinInstance.cs index 9b1c0f07..b698a09d 100644 --- a/Assets/Scripts/Game/Elements/DevPinInstance.cs +++ b/Assets/Scripts/Game/Elements/DevPinInstance.cs @@ -49,8 +49,12 @@ public Vector2 PinPosition { get { - float gridDst = BitCount == 1 || BitCount == 4 ? 6 : ((StateGridDimensions.x* MultiBitPinStateDisplaySquareSize) / GridSize + 2.5f); - return HandlePosition + faceDir * (GridSize * gridDst); + if(BitCount.BitCount is 1 or 4 or 8) + { + return HandlePosition + faceDir * (GridSize * (BitCount.BitCount is 1 or 4 ? 6 : 9)); + } + + return StateDisplayPosition + faceDir * (StateGridSize.x / 2 + 2 * GridSize); } } diff --git a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs index 45fef3c3..2666dc96 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ChipStatsMenu.cs @@ -42,7 +42,6 @@ public static void DrawMenu() Draw.ID panelID = UI.ReservePanel(); const int inputTextPad = 1; - const float headerSpacing = 1.5f; Color labelCol = Color.white; Color headerCol = new(0.46f, 1, 0.54f); Vector2 topLeft = UI.Centre + new Vector2(-menuWidth / 2, verticalOffset); @@ -87,22 +86,10 @@ public static void DrawMenu() return; - void DrawHeader(string text) - { - AddHeaderSpacing(); - UI.DrawText(text, theme.FontBold, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, headerCol); - AddHeaderSpacing(); - } - void AddSpacing() { labelPosCurr.y -= entrySize.y + entrySpacing; } - - void AddHeaderSpacing() - { - labelPosCurr.y -= headerSpacing; - } } private static uint GetChipUses() { diff --git a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs index fabec8cb..a667e895 100644 --- a/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/CollectionStatsMenu.cs @@ -29,7 +29,6 @@ public static void DrawMenu() Draw.ID panelID = UI.ReservePanel(); const int inputTextPad = 1; - const float headerSpacing = 1.5f; Color labelCol = Color.white; Color headerCol = new(0.46f, 1, 0.54f); Vector2 topLeft = UI.Centre + new Vector2(-menuWidth / 2, verticalOffset); @@ -57,22 +56,6 @@ public static void DrawMenu() return; - void DrawHeader(string text) - { - AddHeaderSpacing(); - UI.DrawText(text, theme.FontBold, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, headerCol); - AddHeaderSpacing(); - } - - void AddSpacing() - { - labelPosCurr.y -= entrySize.y + entrySpacing; - } - - void AddHeaderSpacing() - { - labelPosCurr.y -= headerSpacing; - } } private static int GetCollectionChipsLength() => diff --git a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs index a8ad1cb1..5309006f 100644 --- a/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/ProjectStatsMenu.cs @@ -36,7 +36,6 @@ public static void DrawMenu() Draw.ID panelID = UI.ReservePanel(); const int inputTextPad = 1; - const float headerSpacing = 1.5f; Color labelCol = Color.white; Color headerCol = new(0.46f, 1, 0.54f); Vector2 topLeft = UI.Centre + new Vector2(-menuWidth / 2, verticalOffset); @@ -89,22 +88,12 @@ public static void DrawMenu() return; - void DrawHeader(string text) - { - AddHeaderSpacing(); - UI.DrawText(text, theme.FontBold, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, headerCol); - AddHeaderSpacing(); - } void AddSpacing() { labelPosCurr.y -= entrySize.y + entrySpacing; } - void AddHeaderSpacing() - { - labelPosCurr.y -= headerSpacing; - } } static int GetTotalChipsUsed() { int uses = 0; diff --git a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs index aa066c0b..607b0c9a 100644 --- a/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs +++ b/Assets/Scripts/Graphics/UI/Menus/SpecialChipMakerMenu.cs @@ -65,8 +65,6 @@ public static void DrawMenu() InputFieldTheme inputTheme = ActiveUITheme.ChipNameInputField; Draw.ID panelID = UI.ReservePanel(); - - const int inputTextPad = 1; const float headerSpacing = 1.5f; Vector2 topLeft = UI.Centre + new Vector2(-menuWidth / 2, verticalOffset); Vector2 labelPosCurr = topLeft; @@ -216,14 +214,6 @@ void DrawHeader(string text) AddHeaderSpacing(); } - void DrawLineOfText(string text) - { - AddTextSpacing(); - UI.DrawText(text, theme.FontRegular, theme.FontSizeRegular, labelPosCurr, Anchor.TextCentreLeft, labelCol); - AddTextSpacing(); - } - - void AddSpacing() { labelPosCurr.y -= entrySize.y + entrySpacing; diff --git a/TestData/Projects/MainTest/ProjectDescription.json b/TestData/Projects/MainTest/ProjectDescription.json index ca39015b..1da83914 100644 --- a/TestData/Projects/MainTest/ProjectDescription.json +++ b/TestData/Projects/MainTest/ProjectDescription.json @@ -4,7 +4,7 @@ "DLSVersion_EarliestCompatible": "2.0.0", "DLSVersion_LastSavedModdedVersion": "1.1.1", "CreationTime": "2025-03-14T18:23:30.404+01:00", - "LastSaveTime": "2025-06-19T14:54:53.304+02:00", + "LastSaveTime": "2025-06-19T16:58:18.880+02:00", "Prefs_MainPinNamesDisplayMode": 2, "Prefs_ChipPinNamesDisplayMode": 1, "Prefs_GridDisplayMode": 1, @@ -14,9 +14,9 @@ "Prefs_SimTargetStepsPerSecond": 15, "Prefs_SimStepsPerClockTick": 6, "Perfs_PinIndicators": 4, - "StepsRanSinceCreated": 105862339, + "StepsRanSinceCreated": 105863230, "TimeSpentSinceCreated": { - "StartFrom": "02:49:15.3345600" + "StartFrom": "02:50:15.0946759" }, "AllCustomChipNames":[ "AND", From b9cf2b7240f256d7a2bda7f05a2bb9e29808eb09 Mon Sep 17 00:00:00 2001 From: firecerne <105079722+firecerne@users.noreply.github.com> Date: Fri, 20 Jun 2025 14:06:03 +0200 Subject: [PATCH 124/124] Fix RAM performance --- Assets/Scripts/Simulation/Simulator.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Simulation/Simulator.cs b/Assets/Scripts/Simulation/Simulator.cs index c9311d5d..be8cc2eb 100644 --- a/Assets/Scripts/Simulation/Simulator.cs +++ b/Assets/Scripts/Simulation/Simulator.cs @@ -415,10 +415,7 @@ static void ProcessBuiltinChip(SimChip chip) case ChipType.dev_Ram_8Bit: { uint addressPin = chip.InputPins[0].State.GetShortValues(); - uint dataPin = chip.InputPins[1].State.GetShortValues(); - bool writeEnablePin = chip.InputPins[2].State.SmallHigh(); - bool resetPin = chip.InputPins[3].State.SmallHigh(); // Detect clock rising edge bool clockHigh = chip.InputPins[4].State.SmallHigh(); bool isRisingEdge = clockHigh && chip.InternalState[^1] == 0; @@ -427,16 +424,16 @@ static void ProcessBuiltinChip(SimChip chip) // Write/Reset on rising edge if (isRisingEdge) { - if (resetPin) + if (chip.InputPins[3].State.SmallHigh()) { for (int i = 0; i < 256; i++) { chip.InternalState[i] = 0; } } - else if (writeEnablePin) + else if (chip.InputPins[2].State.SmallHigh()) { - chip.InternalState[addressPin] = dataPin; + chip.InternalState[addressPin] = chip.InputPins[1].State.GetShortValues(); } }