Jump to content

Interesting, and not immediately obvious, uses of new and old logic


Recommended Posts

Let's start with the counter.

If set to 1 and the output connected to the reset it functions as a replacement for the old positive edge detector NOT-AND set up.

InstantGif_2020_03.10-17_50.thumb.gif.7572b3384c858583edfccb812ea55fc3.gif

If set to 2 and the reset not connected it functions as a replacement for the old toggle switch NOT-AND-XOR set up

InstantGif_2020_03.10-17_52.thumb.gif.3d09b97e3468a6f03b59505b5e70bf26.gif

The ribbon writer functions as a bit shifter if connected across the ribbon and set to 2

You can use this to write the same logic output on all lines at the same time provided it's not time sensitive since there is a propagation delay. If it is time sensitive then use 4 ribbon writers instead.

InstantGif_2020_03.10-17_37.thumb.gif.aa2b430ed09acaf5cfb9a68c89343054.gif

The AND, OR, XOR, and NOT gates all work directly with ribbons so you can have 4 gates in one essentially. Here's an AND gate as an example.

InstantGif_2020_03.10-18_11.thumb.gif.886bd7c1c5544d84ebd32f0e8bb59775.gif

Here's another example. This time a double AND gate on one ribbon using a ribbon writer (bit shifter) set to 3. In this case the input 1 and 3 is paired and the input line 2 and 4 is paired, and outputs on line 3 and 4 respectively.

5e67e1fcd85f1_doubleAND.thumb.png.0e3d463fad636a33e7fe919e8f1f149f.png

So that also means that the counter does not work with ribbons so in cases where you need positive edge detectors on all 4 lines it is an advantage to use the old set up like this (sorry for the stuttering in the gif).

InstantGif_2020_03.10-17_55.thumb.gif.2d19f6c73305fc10460997e7c3d6b64e.gif

Similarly if you need multiple toggle switches you can do the same

InstantGif_2020_03.10-17_57.thumb.gif.05130fefc4701ecd6856428b241feb29.gif

Note memory toggles do not work with ribbons but since they are NOT-AND-OR S-R latches that we used to build before memory toggles was introduced in the game and those work with ribbons you can make the set up much more compact than having 4 memory toggles and various ribbon inputs and outputs.

Here's the equivalent circuit of a memory toggle

5e67d042b51b3_memorytoggle.thumb.png.18fa94df6efdf1d263a3513dc65973c2.png

And here it is working with ribbons

InstantGif_2020_03.10-18_08.thumb.gif.c9995698b750ffb4fad1a950507d6bbd.gif

What is your interesting (and useful) discovery in regards to the new automation and ribbons?

EDIT: added double AND example.

Link to comment
Share on other sites

I am sooooo bad with the more complex automations. :)

OK, so with the new stuff that's available, is there a better/more compact/easier to hide/etc way to setup the automation for a door pump?

Here's what I currently use:

Not gate to first door, then a buffer to each other door but the last, then a filter to the last door, and another buffer back to the not gate.

image.thumb.png.f82cdcbb783d9fb7fd4900afaceb36bf.png

Link to comment
Share on other sites

I was waiting for someone to build a topic to put together the ribbon logic.
Almost all the useful information I know is already introduced, but I would like to introduce two new information.

 

1. Bit judgment using buffer / filter

The buffer / filter works if any one of the input bits has green.
So the buffer / filter set to 0.1s can be used to determine the bit presence of the ribbon cable.
For example, by sandwiching between NOT gates in this way, if all bits are green, a circuit that outputs a single cable green signal can be created.
20200311154850_1.thumb.jpg.19262f5f5eb0e66e47493433e8bcaa4c.jpg

 

2.Ribbon cable information amount is 32bit instead of 4bit

There is a vacancy in the upper bits, so if you shift by 4 bits with Ribbon Writer, you can combine up to 32 bits (8 ribbons) into one.

20200311154946_1.thumb.jpg.ccf628b66ac73ca2dd8540c94e208b9a.jpg

By the way, it is not clear whether all logic gates process up to 32 bits.
After a bit of testing,
 - The AND / OR / XOR gate seemed to process up to the 32-bits.
 - The filter / buffer seemed to be responding if there was at least one green including the 32 bits.
 - The NOT gate seemed to process only up to 4 bits.
There is not much evidence, so if you are interested, please check it yourself.
 

However, the fact that this 32 bit can be used may be a bug in the first place.
It is personal feeling that we want you to keep it as 32-bit because it is interesting in various ways. (Of course, I won't complain if it gets modified)

Link to comment
Share on other sites

2 hours ago, kbn said:

2.Ribbon cable information amount is 32bit instead of 4bit

That is indeed very interesting. I don't have any immediately obvious uses for 32 bit beyond slow memory but maybe something will come up..

The upper 16 bits is for most uses prohibitively slow and spacious to encode and decode but a 16 bit display decoder can be built into a 4x4 pixel pack with a 2 tile wide border on one side so you can drive it with a single ribbon cable. Put two top and bottom, and as many as you need side by side and you can have a real 8 pixel high display as wide as you like in 4 pixel steps.

image.thumb.png.0d8f1822c82fef0e7770b0964e52c21b.png 

Link to comment
Share on other sites

4 hours ago, kbn said:

2.Ribbon cable information amount is 32bit instead of 4bit

In connection with the use of 32bit, I noticed a bug in the automation wire that I could not miss a bit ...
If the 32nd bit is green, the automation wire will not be overloaded.
This is a guess, but you may be overloading the automation wire with a program like "if (signal_value> 1)".
In other words, overload can be avoided by setting the most significant bit to True and making the signal negative.
This makes it possible to send the same signal as the ribbon without breaking the wire.

20200311211344_1.thumb.jpg.972faa21145f461b2a48db9f5db0d5ea.jpg

I post this on a bug tracker because I think this is a bug exploit.
I don't know how the developers will work on bugs, but it may even make it impossible to use 32bit on the ribbon.

4 hours ago, kbn said:

It is personal feeling that we want you to keep it as 32-bit because it is interesting in various ways.

After saying this, I never imagined that I would help myself disable it ...

Link to comment
Share on other sites

Another one which is also of ancient origin is the 4 bit random number generator.

It's just gaseous element sensors in a room with oxygen and polluted oxygen taking advantage of the fact that oxygen and polluted oxygen exchange place at random horizontally but never vertically.

InstantGif_2020.03.11-13.51.gif

Link to comment
Share on other sites

18 hours ago, Soulwind said:

I am sooooo bad with the more complex automations. :)

OK, so with the new stuff that's available, is there a better/more compact/easier to hide/etc way to setup the automation for a door pump?

Here's what I currently use:

Not gate to first door, then a buffer to each other door but the last, then a filter to the last door, and another buffer back to the not gate.

image.thumb.png.f82cdcbb783d9fb7fd4900afaceb36bf.png

Use a weight plate at the end of the door pump to reset the automation it’s easier.

Link to comment
Share on other sites

6 minutes ago, DonDegow said:

@Badpip You can go way overboard with the new timer instead of filter/buffer/not.

Put it in cycle mode, enjoy !

the problem with the new timer is there is no reset port so the delay can't be the same every time

Link to comment
Share on other sites

3 minutes ago, DonDegow said:

I thought you simply wanted a very slow pulse maker. Connected to an AND with the memory output it would read the timer only when on, approximating a reset on it. I apparently misunderstood, my bad:)

 it don't make a pulse it delay an existing pulse , when a pulse is send to the circuit, it start the clock and when 9 is reached ( or another number, depend of the duration you want) it send a pulse in the output and reset the clock

Link to comment
Share on other sites

It's basically a variation of the cycle counter I posted last month in which it might be easier to see what is going on.

image.png.cfbf69062a1a50f31c6714632bbef0

The difference between a counter and the timer is that you can reset it and that it starts counting from that precise moment. The timer can't be reset with automation so you have no way of automating anything based on it that requires a specific time frame.

Link to comment
Share on other sites

I improved this 4-bit memory circuit.
Each time an input is added, it is stacked by shifting by 4 bits, and up to 32 bits can be recorded.

20200312222026_1.thumb.jpg.64a90fe12aabf2d4452c883412f9f40a.jpg

1.thumb.gif.6c491914ac881172dd9aab4d4bd387cd.gif

 

By the way, the right shift by Ribbon Reader seems to be an arithmetic shift.
If you shift right when the 32nd bit is True, True will be added.
2.thumb.gif.e901ca61e9b44497d764c428bbdbecb0.gif

Link to comment
Share on other sites

4 minutes ago, TheEvilMango said:

What does it do and what is its purpose and what can they be used for?

That is a very simple question that has a very complex answer.  

Bit shifting has a very large number of uses in computers  In the context above, it basically means that you can send 32 bits of data down a ribbon cable.  1 bit is either TRUE or FALSE, green or red, on or off.  Multiple bits can be used in groups to represent numbers, letters, or pixels on a display.  In the examples above, the bits are being sent to pixel packs, so they're basically representing individual pixels within a display.

Therefore, one answer to your question is that "They can be used to make an automated display that can be seen by the player."

Link to comment
Share on other sites

12 minutes ago, Alexander Block said:

How the bit shifting of ribbon writers works? Is there any logic, or is it a pure bug?

 

The expectation is that it would mask out all but the first bit in the input, then shift that single bit into the new position, and finally mask the output value to the bit width of the output wire, but most of the logic devices ignore the bit width of all connections.
 

Link to comment
Share on other sites

Here is a SerDes that can pack up to 32 bits from one ribbon onto a single line at 2.5 bits per second and turn it back into the ribbon on the other side, the example only does 16 bits, but with 2 counters 32 is easy.. Synchronization is achieved by holding the clock high for at least 0.3 seconds to reset the counters.Hidden automation wires behind the new counters were indicated manually. One of these can run on each wire of the ribbon cable, along with the clock that's 32 * 31 or 991 bits of data theoretically capable on one ribbon, each additional ribbon would be 1024 bits if the clock is shared, and you can share the space with static signals, or place these serdes units where they are needed.

Data out will be bit reversed from data in. Least significant bit becomes most significant bit.

serdes.jpg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...