fCPU :: SE Fix :: Memory fix + Improvements deprecated


Original: Factorio Customizable Processing Unit. SpaceExploration FIx: Fixed fCPU to continue operation while a space ship is jumping between surfaces. Extra: Fixed fCPU indexing in memory read/write. (NO SIMD) Extra improvements have been added

Content
1 year, 7 months ago
1.1
889
Circuit network

i [IMPL] validity check for the connected wire.

1 year, 7 months ago

About nil: can you create a validity check for the connected wire? So you don't get errors and stop the combiner.

1 year, 7 months ago
(updated 1 year, 7 months ago)

About nil: can you create a validity check for the connected wire? So you don't get errors and stop the combiner.

Could you show me an example of the problem? (If you share a blueprint much better)
So I analyze the problem and apply the correction.

Thank you!

1 year, 7 months ago
(updated 1 year, 7 months ago)

Actually, nothing complicated (I guess). It would just be possible to make a more elaborate logic. For example: if the red wire is on, logic1 is executed. If the green wire is on, logic2 is executed. If both wires are on, logic3 is executed. If neither, then logic4.
So, there was no such thing as just getting an error and that's it. After all, in idea, to check whether there is a wire or not, we need to read it. And in this case we get an error in the second line: Tried to access red wire when it is not connected.

I may not have found an existing function for this, but I really wish there was one. That is, we either get nil instead of error when there is no wire, or just 0, so that we can compare to this and build logic further.

clr
ble red1 80 :turn_off

:check
mov reg1 red1
sst reg1 [virtual-signal=signal-at]
ble reg1 50 :turn_off
bge red1 80 :turn_on
mov out2 reg1
jmp :check

:turn_on
mov out1 1[virtual-signal=active-state-on]
mov out2 reg1
mov out3 255[virtual-signal=signal-green]
jmp :check

:turn_off
mov out1 1[virtual-signal=active-state-off]
mov out2 reg1
mov out3 255[virtual-signal=signal-red]
jmp :check

Video: https://youtu.be/3yOEdmv4ZnM

1 year, 7 months ago

I will not create a new branch, or there will be a dozen of them... The icon in the informatron is not the right resolution. I think you are aware of this problem. Also, I think you could add a corrected description and information to the informatron. This would be very handy, as some operations may not be available or work correctly.

1 year, 7 months ago
(updated 1 year, 7 months ago)

I'm thinking of creating a new command/opcode called "wc" (wire check) which admits 2 branch type parameters

example:

clr
wc red :wire_exists :wire_not_exists

:wire_exists
mov r1 1[virtual-signal=signal-green]
jmp :end

:wire_not_exists
mov r1 1[virtual-signal=signal-red]

:end

If the red cable exists it jumps to the first branch (:wire_exists), if the cable does not exist it jumps to the second branch (:wire_not_exists)
What do you think of this solution?

1 year, 7 months ago

That would be the perfect solution. That's exactly what you need!
By the way, some of the functions don't work. Either I don't fully understand how they work. For example xunit (Merge two memory channels into unite one).

And in general, I would like to ask you, is it possible to contact you in discord? I find it much more convenient to discuss there.

1 year, 7 months ago

Excellent, I'm doing some tests to check that everything is OK to publish the version with this implemented.

You can contact me on the official KonStg dicord or by DM MaTaXeToS#9108

1 year, 7 months ago

The functionality has been added in version 0.4.22

This thread has been locked.