Skip to content
Draft
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2e7ced6
trying to make a 16 bit inputs and outputs
parshwa282011 Apr 24, 2025
668df02
Merge branch 'SebLague:main' into main
parshwa282011 Apr 25, 2025
4b4646e
Merge branch 'SebLague:main' into main
parshwa282011 Apr 27, 2025
7cbe789
RGBLED working + added 16 Bit Bus, and 16 Bit IN?OUT the 16 Bit merge…
Apr 27, 2025
bde3e55
ALL 16-BIT merge and Splits work now
Apr 27, 2025
7a80580
fixed a few bugs
May 5, 2025
253e3c4
Merge branch 'main' into merge
parshwa282011 May 5, 2025
c0925da
Merging for new updates
parshwa282011 May 5, 2025
0cba679
changed 0b11111111111111111111111111111111 to 0xFFFFFFFF as suggested
parshwa282011 May 5, 2025
0cf294e
Removing vscode files
parshwa282011 May 5, 2025
628175f
Create main.yml
parshwa282011 May 5, 2025
aa68418
My mistake i ment for this to be on test branch
parshwa282011 May 5, 2025
2365be1
Works with Ascii 8bit
May 7, 2025
dc74672
Made Ascii 8Bit work
parshwa282011 May 7, 2025
f0632ab
reworked key chip and text display chip
Jun 16, 2025
40630d9
port http server
Jun 18, 2025
7bfbd41
tons of updates also realistic internet interface
Jul 5, 2025
af63d5d
trying to make a 16 bit inputs and outputs
parshwa282011 Apr 24, 2025
9cf7592
RGBLED working + added 16 Bit Bus, and 16 Bit IN?OUT the 16 Bit merge…
Apr 27, 2025
6480791
ALL 16-BIT merge and Splits work now
Apr 27, 2025
5756e71
fixed a few bugs
May 5, 2025
8bbc087
changed 0b11111111111111111111111111111111 to 0xFFFFFFFF as suggested
parshwa282011 May 5, 2025
07a9bc9
Removing vscode files
parshwa282011 May 5, 2025
f0cafcc
Create main.yml
parshwa282011 May 5, 2025
8dfa717
My mistake i ment for this to be on test branch
parshwa282011 May 5, 2025
df89059
Works with Ascii 8bit
May 7, 2025
e7c4938
reworked key chip and text display chip
Jun 16, 2025
a89d39d
port http server
Jun 18, 2025
68993fe
tons of updates also realistic internet interface
Jul 5, 2025
3607bce
Merge pull request #7 from parshwa282011/squigglesdev-main
parshwa282011 Jul 5, 2025
729bb1f
finally merged all modding api
Jul 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions Assets/Scripts/Description/Helpers/ChipTypeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,29 @@ public static class ChipTypeHelper
{ ChipType.TriStateBuffer, "3-STATE BUFFER" },
// ---- Memory ----
{ ChipType.dev_Ram_8Bit, "dev.RAM-8" },
{ ChipType.Rom_256x2x8, $"ROM 256{mulSymbol}x2x8" },
{ ChipType.Rom_256x16, $"ROM 256{mulSymbol}16" },
{ ChipType.Rom_256x32, $"ROM 256{mulSymbol}32" },
// ---- Split / Merge ----
{ ChipType.Split_4To1Bit, "4-1BIT" },
{ ChipType.Split_8To1Bit, "8-1BIT" },
{ ChipType.Split_8To4Bit, "8-4BIT" },
{ ChipType.Split_16To1Bit, "16-1BIT" },
{ ChipType.Split_16To4Bit, "16-4BIT" },
{ ChipType.Split_16To8Bit, "16-8BIT" },
{ ChipType.Merge_4To8Bit, "4-8BIT" },
{ ChipType.Merge_1To8Bit, "1-8BIT" },
{ ChipType.Merge_1To4Bit, "1-4BIT" },
{ ChipType.Merge_1To16Bit, "1-16BIT" },
{ ChipType.Merge_4To16Bit, "4-16BIT" },
{ ChipType.Merge_8To16Bit, "8-16BIT" },

// ---- Displays -----
{ ChipType.DisplayRGB, "RGB DISPLAY" },
{ ChipType.DisplayDot, "DOT DISPLAY" },
{ ChipType.SevenSegmentDisplay, "7-SEGMENT" },
{ ChipType.DisplayLED, "LED" },
{ ChipType.DisplayRGBLED, "RGBLED" },

{ ChipType.Buzzer, "BUZZER" },

Expand All @@ -39,28 +48,32 @@ public static class ChipTypeHelper
{ ChipType.In_1Bit, "IN-1" },
{ ChipType.In_4Bit, "IN-4" },
{ ChipType.In_8Bit, "IN-8" },
{ ChipType.In_16Bit, "IN-16" },
{ ChipType.Out_1Bit, "OUT-1" },
{ ChipType.Out_4Bit, "OUT-4" },
{ ChipType.Out_8Bit, "OUT-8" },
{ ChipType.Out_16Bit, "OUT-16" },
{ ChipType.Key, "KEY" },
// ---- Buses ----
{ ChipType.Bus_1Bit, "BUS-1" },
{ ChipType.Bus_4Bit, "BUS-4" },
{ ChipType.Bus_8Bit, "BUS-8" },
{ ChipType.Bus_16Bit, "BUS-16" },
{ ChipType.BusTerminus_1Bit, "BUS-TERMINUS-1" },
{ ChipType.BusTerminus_4Bit, "BUS-TERMINUS-4" },
{ ChipType.BusTerminus_8Bit, "BUS-TERMINUS-8" }
{ ChipType.BusTerminus_8Bit, "BUS-TERMINUS-8" },
{ ChipType.BusTerminus_16Bit, "BUS-TERMINUS-16" }
};

public static string GetName(ChipType type) => Names[type];

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_1Bit or ChipType.Bus_4Bit or ChipType.Bus_8Bit or ChipType.Bus_16Bit;

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_1Bit or ChipType.BusTerminus_4Bit or ChipType.BusTerminus_8Bit or ChipType.BusTerminus_16Bit;

public static bool IsRomType(ChipType type) => type == ChipType.Rom_256x16;
public static bool IsRomType(ChipType type) => type is ChipType.Rom_256x2x8 or ChipType.Rom_256x16 or ChipType.Rom_256x32;

public static ChipType GetCorrespondingBusTerminusType(ChipType type)
{
Expand All @@ -69,6 +82,7 @@ public static ChipType GetCorrespondingBusTerminusType(ChipType type)
ChipType.Bus_1Bit => ChipType.BusTerminus_1Bit,
ChipType.Bus_4Bit => ChipType.BusTerminus_4Bit,
ChipType.Bus_8Bit => ChipType.BusTerminus_8Bit,
ChipType.Bus_16Bit => ChipType.BusTerminus_16Bit,
_ => throw new Exception("No corresponding bus terminus found for type: " + type)
};
}
Expand All @@ -82,6 +96,7 @@ public static ChipType GetPinType(bool isInput, PinBitCount numBits)
PinBitCount.Bit1 => ChipType.In_1Bit,
PinBitCount.Bit4 => ChipType.In_4Bit,
PinBitCount.Bit8 => ChipType.In_8Bit,
PinBitCount.Bit16 => ChipType.In_16Bit,
_ => throw new Exception("No input pin type found for bitcount: " + numBits)
};
}
Expand All @@ -91,6 +106,7 @@ public static ChipType GetPinType(bool isInput, PinBitCount numBits)
PinBitCount.Bit1 => ChipType.Out_1Bit,
PinBitCount.Bit4 => ChipType.Out_4Bit,
PinBitCount.Bit8 => ChipType.Out_8Bit,
PinBitCount.Bit16 => ChipType.Out_16Bit,
_ => throw new Exception("No output pin type found for bitcount: " + numBits)
};
}
Expand All @@ -105,6 +121,8 @@ public static (bool isInput, bool isOutput, PinBitCount numBits) IsInputOrOutput
ChipType.Out_4Bit => (false, true, PinBitCount.Bit4),
ChipType.In_8Bit => (true, false, PinBitCount.Bit8),
ChipType.Out_8Bit => (false, true, PinBitCount.Bit8),
ChipType.In_16Bit => (true, false, PinBitCount.Bit16),
ChipType.Out_16Bit => (false, true, PinBitCount.Bit16),
_ => (false, false, PinBitCount.Bit1)
};
}
Expand Down
14 changes: 13 additions & 1 deletion Assets/Scripts/Description/Types/SubTypes/ChipTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,40 @@ public enum ChipType

// ---- Memory ----
dev_Ram_8Bit,
Rom_256x2x8,
Rom_256x16,
Rom_256x32,

// ---- Displays ----
SevenSegmentDisplay,
DisplayRGB,
DisplayDot,
DisplayLED,
DisplayRGBLED,

// ---- Merge / Split ----
Merge_1To4Bit,
Merge_1To8Bit,
Merge_4To8Bit,
Merge_1To16Bit,
Merge_4To16Bit,
Merge_8To16Bit,
Split_4To1Bit,
Split_8To4Bit,
Split_8To1Bit,
Split_16To1Bit,
Split_16To4Bit,
Split_16To8Bit,

// ---- In / Out Pins ----
In_1Bit,
In_4Bit,
In_8Bit,
In_16Bit,
Out_1Bit,
Out_4Bit,
Out_8Bit,
Out_16Bit,

Key,

Expand All @@ -45,9 +56,10 @@ public enum ChipType
BusTerminus_4Bit,
Bus_8Bit,
BusTerminus_8Bit,
Bus_16Bit,
BusTerminus_16Bit,

// ---- Audio ----
Buzzer

}
}
3 changes: 2 additions & 1 deletion Assets/Scripts/Description/Types/SubTypes/PinDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public enum PinBitCount
{
Bit1 = 1,
Bit4 = 4,
Bit8 = 8
Bit8 = 8,
Bit16 = 16
}

public enum PinColour
Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/Game/Elements/DevPinInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public DevPinInstance(PinDescription pinDescription, bool isInput)
PinBitCount.Bit1 => new Vector2Int(1, 1),
PinBitCount.Bit4 => new Vector2Int(2, 2),
PinBitCount.Bit8 => new Vector2Int(4, 2),
PinBitCount.Bit16 => new Vector2Int(4, 4),
_ => throw new Exception("Bit count not implemented")
};
StateGridSize = BitCount switch
Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/Game/Elements/SubChipInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ public static float PinHeightFromBitCount(PinBitCount bitCount)
PinBitCount.Bit1 => DrawSettings.PinRadius * 2,
PinBitCount.Bit4 => DrawSettings.PinHeight4Bit,
PinBitCount.Bit8 => DrawSettings.PinHeight8Bit,
PinBitCount.Bit16 => DrawSettings.PinHeight16Bit,
_ => throw new Exception("Bit count not implemented " + bitCount)
};
}
Expand Down
Loading