-
Notifications
You must be signed in to change notification settings - Fork 7
Creating ALX PC Parts
Warning: This documentation is incomplete and may not cover all current ALX PC features.
- Copy folder alx_pc from expression2 to "Steam\steamapps\common\GarrysMod\garrysmod\data\expression2".
- Start the game.
- Get Wiremod tab - Chips, Gates - Expression 2 Tool in hands.
- Open folder "alx_pc" in e2 editor.
- Place an E2 chip somewhere with the
BIOS_Chipset.txtfile. - Spawn one DHDD (it is in the Wiremod - Memory tab) which will be used as the BIOS ROM.
- Spawn any prop or entity which will be used as the Beep Speaker.
- Get the Plugs tool from the Wiremod tab.
- Spawn different types of sockets by right-clicking with the Plugs tool for the different bus types. The socket model can be changed to any model you prefer.
- Use the following information to connect the BIOS inputs:
Note: Each Plug provides letters from
AtoH. The letter can be chosen freely, but it must match the letter of the corresponding Plug used as the board. All sockets of the same type must use the same letter. For example, if the PCI socket uses A, all PCI sockets must use A. PCIe sockets may also use A, while all PCIe sockets must use the same letter.
| Input | Type | Connection | ALX PC Default |
|---|---|---|---|
ROM |
wirelink |
DHDD used as BIOS ROM | — |
Speaker |
entity |
Entity used as Beep Speaker | — |
CPU_SOCKET |
number |
Select the letter of the CPU socket (A–H) |
A |
PCIE_SOCKET[0-1] |
number |
Select the letter of each PCIe socket (A–H) |
A |
PCI_SOCKET[0-3] |
number |
Select the letter of each PCI socket (A–H) |
A |
KeyboardSocket |
entity |
Keyboard socket using a letter from (A–H) |
A |
Power |
number |
Power button, can be connected directly or through a socket | H |
Reset |
number |
Reset button, can be connected directly or through a socket | G |
NoFanSound |
number |
Optional. Set to 1 to disable fan sound |
0 |
NullByte |
string |
Legacy. Null byte input for compatibility with older Wiremod versions | — |
PowerandResetbuttons can be connected directly to the BIOS inputs. Alternatively, they can be connected through a socket, as used in the ALX PC setup. When using Wire Buttons, make sure theTOGGLEoption is disabled.
Legacy: The
NullByteinput is from an older version of the BIOS. A Wire Gate "To Character" was previously required to provide it, but this is no longer needed.
| Output | Type | Connection | ALX PC Default |
|---|---|---|---|
BIOS |
entity |
BIOS/Chipset entity | — |
BIOS_ID |
number |
Connect to the selected letter input of all CPU, PCIe, PCI and Keyboard sockets | A |
PowerInd |
number |
Connect to a Wire Indicator or other device | — |
HDDInd |
number |
Connect to a Wire Indicator or other device | — |
PowerIndandHDDIndoutput1or0. They can be connected to Wire Indicators, available under Visuals → Indicators → Indicator.
- Spawn a Plug using the same socket model selected for
CPU_SOCKET. - Spawn a
CPU.txtE2 chip on this Plug. - Insert the Plug into the CPU socket.
- Use the following information to connect the CPU inputs:
| Input | Type | Connection | ALX PC Default |
|---|---|---|---|
Board |
wirelink |
The Plug entity used as the CPU board | — |
InA |
number |
The selected letter input of the CPU Plug (A–H) |
A |
Note: The Plug entity acts as the board and is inserted into the CPU socket.
InAmust use the same letter selected for the CPU socket and the Plug.Ais used by default in ALX PC.
- Spawn a Plug using the same socket model selected for
PCIE_SOCKET. - Spawn a
GPU.txtE2 chip on this Plug. - Insert the Plug into the PCIe socket.
- Use the following information to connect the GPU inputs and output:
| Input | Type | Connection | ALX PC Default |
|---|---|---|---|
Board |
wirelink |
The Plug entity used as the GPU board | — |
InA |
number |
The selected letter input of the GPU Plug (A–H) |
A |
ScreenSockG_0 |
number |
Letter of the first screen socket (A–H) |
G |
ScreenSockG_1 |
number |
Letter of the second screen socket (A–H) |
G |
| Output | Type | Connection | ALX PC Default |
|---|---|---|---|
EntID |
number |
Connect to the selected letter input of both screen sockets | G |
Note:
BoardandInAwork the same way as on the CPU. The GPU provides two screen sockets for connecting compatible screen devices. Both screen sockets useGby default in ALX PC.EntIDmust be connected to the selected letter input of both screen sockets.
- Spawn a Plug using the same socket model selected for
PCIE_SOCKETorPCI_SOCKET. - Spawn an
HDD_Controller.txtE2 chip on the Plug. - Spawn 1–4 sockets on the board to be used as SATA ports. If you are building a PCI card, the maximum number of SATA sockets is 2 by default. This limit can be changed in function
pcie_initinside the HDD Controller code. - Insert the Plug into the corresponding PCIe or PCI socket.
- Use the following information to connect the HDD Controller inputs and outputs:
| Input | Type | Connection | ALX PC Default |
|---|---|---|---|
Board |
wirelink |
The Plug entity used as the HDD Controller board | — |
InA |
number |
The selected letter input of the Plug (A–H) |
A |
SATA_[0-3] |
number |
The selected letter input of the SATA sockets (A–H) |
A |
| Output | Type | Connection | ALX PC Default |
|---|---|---|---|
CurTask |
table |
Current task progress: [1] = current value, [2] = maximum value |
— |
EntID |
number |
Connect to the selected letter input of all SATA sockets | A |
Ind |
number |
Controller power indicator, 1 when the controller is powered, 0 otherwise |
— |
Busy |
number |
Activity indicator; 1 when a task is active, 0 otherwise |
— |
Note: All SATA sockets must use the same letter.
SATA_0–SATA_3must be set to the letter selected for the corresponding SATA Plug/board.EntIDmust be connected to the selected letter input of all SATA sockets.
Indindicates whether the HDD Controller is powered. This can be useful for devices such as flash drives that have their own indicators.Busyindicates HDD Controller activity and works similarly to the motherboard HDD activity indicator.
- Spawn an
HDD.txtE2 chip on any prop or other entity. - Spawn a DHDD near it. You can spawn up to 4 DHDDs in the default configuration. This limit can be extended by editing the HDD code.
- Each DHDD can hold up to 1 MB of data.
- Spawn a socket using the same socket model used for the HDD Controller.
- Use the following information to connect the HDD inputs and output:
| Input | Type | Connection | ALX PC Default |
|---|---|---|---|
PlugSocket |
wirelink |
The socket used to connect the HDD | — |
InA |
number |
The selected letter input of the socket (A–H) |
A |
Bank[1-4] |
wirelink |
DHDD used as a storage bank | — |
| Output | Type | Connection | ALX PC Default |
|---|---|---|---|
EntID |
number |
Connect to the selected letter input of the HDD socket | A |
Other ALX PC components can be created using the same general approach described above. The exact connections depend on the component.
Check the source code of the corresponding E2 chip for its @inputs and @outputs definitions, then connect each input and output according to its type and purpose.
The source code can be found in the expression2/alx_pc directory.
Have fun. :)