fCPU


Factorio Customizable Processing Unit. Allow to write any logic on low level machine code. The fCPU acts like a programmable microcontroller with a vector coprocessor that supports many useful instructions.

Content
18 days ago
0.18 - 2.0
10.2K
Logistic network Circuit network

g Step-by-step debug mode and btic

3 years ago

On 1.1 + 4.12

  1. mov r1 0[item=armor-piercing-rifle-magazine]
  2. btic r1
  3. inc r2
  4. inc r2

With step-by-step debugging, debugger jumps from line 2 to line 4 instead line 3. Line 3 is executed but there no pause before executing line 3.

3 years ago
(updated 3 years ago)

Hello, thank you for report!
I've added information for bk*, bt* and bt*c mnemonics.

Here is the quote (it will be available in-game in v4.13):

Block execution until condition met

Instructions execute the next line immediately after them (in the same tick) as soon as the condition is met.
This allows them to be used to copy the input signal that triggered continuation.
For example:

mov r1 0[virtual-signal=signal-green]
btrc r1
xmov m1 red
  • bkr cnt[C/R]
    bkg cnt[C/R]
    Block until there are at least cnt signals on red/green wires.

  • btr type[T/R]
    btg type[T/R]
    bti type[T/R]
    Block until signal type found on red/green/both_input wires.

  • btrc reg[R]
    btgc reg[R]
    btic reg[R]
    Block while reference register have same value as in red/green/both_input wires.
    After red/green/input value were changed, assign new value to register and continue execution.

New response