Skip to content

Creating ALX PC Parts

AlexALX edited this page Aug 11, 2026 · 19 revisions

Creating ALX PC Parts

Warning: This documentation is incomplete and may not cover all current ALX PC features.

Manual creation parts and PC from source code

  1. Copy folder alx_pc from expression2 to "Steam\steamapps\common\GarrysMod\garrysmod\data\expression2".
  2. Start the game.
  3. Get Wiremod tab - Chips, Gates - Expression 2 Tool in hands.
  4. Open folder "alx_pc" in e2 editor.

BIOS / Chipset

  1. Place an E2 chip somewhere with the BIOS_Chipset.txt file.
  2. Spawn one DHDD (it is in the Wiremod - Memory tab) which will be used as the BIOS ROM.
  3. Spawn any prop or entity which will be used as the Beep Speaker.
  4. Get the Plugs tool from the Wiremod tab.
  5. 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.
  6. Use the following information to connect the BIOS inputs:

Note: Each Plug provides letters from A to H. 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.

BIOS Inputs

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 (AH) A
PCIE_SOCKET[0-1] number Select the letter of each PCIe socket (AH) A
PCI_SOCKET[0-3] number Select the letter of each PCI socket (AH) A
KeyboardSocket entity Keyboard socket using a letter from (AH) 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

Power and Reset buttons 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 the TOGGLE option is disabled.

Legacy: The NullByte input 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.

BIOS Outputs

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

PowerInd and HDDInd output 1 or 0. They can be connected to Wire Indicators, available under Visuals → Indicators → Indicator.

CPU

  1. Spawn a Plug using the same socket model selected for CPU_SOCKET.
  2. Spawn a CPU.txt E2 chip on this Plug.
  3. Insert the Plug into the CPU socket.
  4. 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 (AH) A

Note: The Plug entity acts as the board and is inserted into the CPU socket. InA must use the same letter selected for the CPU socket and the Plug. A is used by default in ALX PC.

GPU

  1. Spawn a Plug using the same socket model selected for PCIE_SOCKET.
  2. Spawn a GPU.txt E2 chip on this Plug.
  3. Insert the Plug into the PCIe socket.
  4. Use the following information to connect the GPU inputs and output:

Inputs

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 (AH) A
ScreenSockG_0 number Letter of the first screen socket (AH) G
ScreenSockG_1 number Letter of the second screen socket (AH) G
Output Type Connection ALX PC Default
EntID number Connect to the selected letter input of both screen sockets G

Note: Board and InA work the same way as on the CPU. The GPU provides two screen sockets for connecting compatible screen devices. Both screen sockets use G by default in ALX PC. EntID must be connected to the selected letter input of both screen sockets.

HDD Controller

  1. Spawn a Plug using the same socket model selected for PCIE_SOCKET or PCI_SOCKET.
  2. Spawn an HDD_Controller.txt E2 chip on the Plug.
  3. 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_init inside the HDD Controller code.
  4. Insert the Plug into the corresponding PCIe or PCI socket.
  5. Use the following information to connect the HDD Controller inputs and outputs:

Inputs

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 (AH) A
SATA_[0-3] number The selected letter input of the SATA sockets (AH) A

Outputs

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_0SATA_3 must be set to the letter selected for the corresponding SATA Plug/board. EntID must be connected to the selected letter input of all SATA sockets.

Ind indicates whether the HDD Controller is powered. This can be useful for devices such as flash drives that have their own indicators. Busy indicates HDD Controller activity and works similarly to the motherboard HDD activity indicator.

HDD

  1. Spawn an HDD.txt E2 chip on any prop or other entity.
  2. 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.
  3. Each DHDD can hold up to 1 MB of data.
  4. Spawn a socket using the same socket model used for the HDD Controller.
  5. Use the following information to connect the HDD inputs and output:

Inputs

Input Type Connection ALX PC Default
PlugSocket wirelink The socket used to connect the HDD
InA number The selected letter input of the socket (AH) A
Bank[1-4] wirelink DHDD used as a storage bank

Outputs

Output Type Connection ALX PC Default
EntID number Connect to the selected letter input of the HDD socket A

Other Components

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. :) **

Clone this wiki locally