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, 8 months ago
1.1
889
Circuit network

b idx ignored after xmov

1 year, 7 months ago

version 0.5.0

100% repeatable.

see test program.

idx instruction is ignored when data was set up by a prior xmov. works fine when data was set up by mov instead.

xadd instead of xmov also has the same symptom.

here :test2 shows the symptom, r1,2,3,4 not populated.
but :test3 has no symptom. r1,2,3,4 populated OK.
remember this will also trigger the mem1 display bug i also posted. don't let that fool you. use the workaround i gave.

test program:

:test2
clr
mov mem2[1] 1[virtual-signal=signal-R]
mov mem2[2] -32[virtual-signal=crafting_combinator:recipe-time]
mov mem2[3] -1[item=iron-ore]
mov mem2[4] -1[item=iron-plate]
xmov mem1 mem2
nop
nop
nop
idx r1 mem1 [virtual-signal=signal-R]
idx r2 mem1 [virtual-signal=crafting_combinator:recipe-time]
idx r3 mem1 [item=iron-ore]
idx r4 mem1 [item=iron-plate]

:test3
clr
mov mem1[1] 1[virtual-signal=signal-R]
mov mem1[2] -32[virtual-signal=crafting_combinator:recipe-time]
mov mem1[3] -1[item=iron-ore]
mov mem1[4] -1[item=iron-plate]
idx r1 mem1 [virtual-signal=signal-R]
idx r2 mem1 [virtual-signal=crafting_combinator:recipe-time]
idx r3 mem1 [item=iron-ore]
idx r4 mem1 [item=iron-plate]

:halt
jmp :halt

1 year, 7 months ago

could this be a matter of the program not waiting long enough for the xmov to complete?
fCPU doc vaguely states "some vector instructions... take 3 ticks... retrieving effective data... is possible only after completion of a vector instruction."
that's pretty ambiguous. any clarification would be helpful.
by default i'd expect the device to not begin the next instruction until the previous one has completed. any other way is asking for trouble.

New response