MightyPirates / TIS-3D

TIS-100 inspired low-tech computing in Minecraft.
https://www.curseforge.com/minecraft/mc-mods/tis-3d
Other
104 stars 35 forks source link

[Bug? Quirk?] Output instructions "borrow" ticks from the next instruction, causing rare #199

Open Sobsz opened 3 months ago

Sobsz commented 3 months ago

Tested on Minecraft 1.20.1 with Fabric Loader 0.14.22 and no mods other than dependencies.

When a MOV instruction outputs to a port, it visually takes 3 ticks to complete and the instruction after it appears to be skipped (though it still executes internally). When it's the last instruction in a program, it actually does take 3 ticks before looping around, which is 1 tick more than usual.

I'm not sure if the latter should be fixed (it feels like a realistic quirk), but I'm documenting it here in case it causes an issue for anyone else.

In this example setup, I expected the execution modules to stay perfectly synchronized, outputting ABABABAB.... However, due to the above behavior, the bottom-right one loops every 5 ticks instead of 4, making the output ABABAABABA.... (In this case, moving one of the NOPs to the end keeps the modules in sync.) 2024-03-18_12 44 08