…am so addicted to playing with the simulator now, I keep forgetting to build & do stuff in the game…
But anyway, I put together a combination lock & was hoping somebody could help me shrink it down a bit as right now it is much too large for it's own good.
<snip>
hrm, was going to attach the schematic file for easier use but the uploader hates me. so, heres a link to it: http://thesizer.net/files/Combo5btn.zip
Does anyone think Notch might have recently modified redstone behavior?
There are a few strange behaviors I've been seeing:
- When I right-click on a redstone line with dirt, it places the dirt above the redstone, in air. (Did it always do that?)
- I can't get the 1-wide pulse generator from the wiki to work anymore.
- Some repeater propagation times are behaving oddly in a way that indicates a timing bug other than the usual NS vertical delay trick. I built a variable-width pulse generator and tried sending single pulses down chains of repeaters. The pulses don't propagate down all the repeaters as expected, but die off, with longer pulses surviving through more repeaters.
It appears that the trailing edge of the pulse is catching up to the front edge and the pulse eventually dies once it passes through enough repeaters. That one baffles me, because it implies that torches turn off somehow faster or slower than torches turn on for he configurations I've tried.
I'm going to have to find a way of precisely timing pulses so I can determine which repeater arrangements shorten pulses and by how much. If nothing else, that implies that there's another way to synchronize signals besides the NS trick.
A one-tick pulse is not sufficient to deactivate a torch - by the next tick when they would actually react to it, it's gone again, so they don't change state. Try adding an extra inverter in the delay chain of your pulse generators to make it two ticks (you'll probably have to invert the input and output to it as well), or use a north/south stacked pair to add a single tick delay without inverting it?
I’ve found the direction-dependent behaviours confusing, and even irrational, but I think I know what’s going on. I’ve been thinking of redstone updates as a two-pass process: first update the torches, then update the wires based on the torches, as two passes in a single tick. (I think this is how Redstone Simulator works; Baezon?)
Minecraft, I now believe, does it differently: clear the wires, then update the torches and propagate charges in one pass. When it does this, it passes from northeast to southwest – in Minecraft’s coordinate system, from low X and Z values to high ones. This opens some avenues of exploration:
[*:3kh63bir] Does it also pass from low values to high ones? Predicition: yes. A vertical version of xgkkp’s test would work downwards, but not upwards.
[*:3kh63bir] Is the traversal X-major or Z-major? That is, after a given torch is updated, does one to its north get updated before one to its east? What type of circuit would detect this distinction?
[*:3kh63bir] Is the traversal one sweep across all chunks in range, or per-chunk? What type of circuit would behave differently at chunk boundaries if it was per-chunk? Could a boundary detector be made that works in both directions at once? Could boundary effects be exploited?
I just tried sending a 3 tick (I think) pulse through a long chain of horizontal inverters. (block, torch on the side, single redstone dust leading to the next inverter). It passed through 7 or 8 repeaters in each direction (all chained together into one giant switchback) and definitely was not shortened.
I tried it again, placing unnecessary redstone dust on top of each inverter block. The very brief pulse was still transmitted without shortening.
The behavior we're seeing might be directional, but it's also specific to certain arrangements of redstone and/or torches, and there definitely isn't a universal directionality to all redstone resolution.
I suspect at the root of this we will see one or a few glitches as specific as the known NS glitch.
I propose that we look more closely at the interactions between torches on the side of blocks vs torches on top of blocks. Since the rules for vertical torches are slightly different than for horizontal torches, maybe each one is getting their own step in the state machine. (like, update redstone, update horizontal torches, update vertical torches?)
Okay, I have one example circuit that definitely repeats ON pulses faster than OFF pulses, and the behavior IS directional.
Eight repeaters is enough that you can easily see the speed difference. (this is my runway light animation repeater, where the goal was to get the vertical torches adjacent.)
I've tried it pointing all four directions and it only showed the glitch when pointed east or west. I estimate that the ON pulse traveled about twice as fast as the off pulse. (ON and OFF referring to the vertical torch states.)
Place a block above the last vertical torch and you can run a redstone wire back to the first torch, making this a fun clock design to watch cycle itself, and trivial to see that the east- and west-pointing ones ares running faster than the north- and south-pointing ones.
Here's a slightly shorter version of my 2x4x5 D-latch. This one is 2x3x5, but unlike the other one it can't be chained horizontally so if you're using them side by side you're better off using that one.
Working more on my cpu. Since my program counter is 9-bit, I needed a a separate adder. Then I wondered what it would take to make it a decrmenter as well. So here it is.
Essentially its an xor that takes the add bit of it and outputs it to the input of the next xor. I put an inverter at the end, and fed it into another half-adder you now have a decmenter! Good for a stack pointer.
I also added a +2 function. I figure it be faster to increment a program counter by 2 for a skip rather than execute a nop on a skip.
Now if I can just figure out how to put in a flip-flop and make it a self incrementing regester:P
PS - What font does everyone use for putting the text in? I can't seem to find it.
This may be the easiest question some of you circuit geniuses answer all day.
I checked out the wiki about MineCraft circuit designs and the descriptions are very, annoyingly technical. Based on the wordings there, I built my first T flip-flop. It's cute, but that's not at all what I thought I'd be getting. Dealing with Q, not-Q, and all that garbage is not helpful and I can already use diagrams on the wiki as a guide; what I need is a simple English explanation of what D flip-flops and JK flip-flops actually do. Examples of their uses, if clear, may even be enough. Just trying to avoid more wasted effort. Thanks for your time, guys.
This may be the easiest question some of you circuit geniuses answer all day.
I checked out the wiki about MineCraft circuit designs and the descriptions are very, annoyingly technical. Based on the wordings there, I built my first T flip-flop. It's cute, but that's not at all what I thought I'd be getting. Dealing with Q, not-Q, and all that garbage is not helpful and I can already use diagrams on the wiki as a guide; what I need is a simple English explanation of what D flip-flops and JK flip-flops actually do. Examples of their uses, if clear, may even be enough. Just trying to avoid more wasted effort. Thanks for your time, guys.
D Flip-Flops are used for memory. It's used instead of an RS-NOR latch if you want to store both on and off data, and control when it is saved (like a save button or something). JK Flip-Flop, I'm still figuring out...
This may be the easiest question some of you circuit geniuses answer all day.
I checked out the wiki about MineCraft circuit designs and the descriptions are very, annoyingly technical. Based on the wordings there, I built my first T flip-flop. It's cute, but that's not at all what I thought I'd be getting. Dealing with Q, not-Q, and all that garbage is not helpful and I can already use diagrams on the wiki as a guide; what I need is a simple English explanation of what D flip-flops and JK flip-flops actually do. Examples of their uses, if clear, may even be enough. Just trying to avoid more wasted effort. Thanks for your time, guys.
This may be the easiest question some of you circuit geniuses answer all day.
I checked out the wiki about MineCraft circuit designs and the descriptions are very, annoyingly technical. Based on the wordings there, I built my first T flip-flop. It's cute, but that's not at all what I thought I'd be getting. Dealing with Q, not-Q, and all that garbage is not helpful and I can already use diagrams on the wiki as a guide; what I need is a simple English explanation of what D flip-flops and JK flip-flops actually do. Examples of their uses, if clear, may even be enough. Just trying to avoid more wasted effort. Thanks for your time, guys.
bump. Anybody?
Quote from bleachisback »
D Flip-Flops are used for memory. It's used instead of an RS-NOR latch if you want to store both on and off data, and control when it is saved (like a save button or something). JK Flip-Flop, I'm still figuring out...
Think I'm gonna expirement right now.
EDIT: I have no Idea why you would want to use a JK-FF instead of an RS-NOR latch.
A JK flip-flop can be used as both a T and a D flip-flop. it’s useful for a counter where you want to be able to increment (by chaining Ts together) and also load a specific value. It’s also handy as a universal component because you can wire it to work as a D, T or RS-type flip-flop – not very practical with redstone ones, but it might be if we got a flip-flop component block.
This may be the easiest question some of you circuit geniuses answer all day.
I checked out the wiki about MineCraft circuit designs and the descriptions are very, annoyingly technical. Based on the wordings there, I built my first T flip-flop. It's cute, but that's not at all what I thought I'd be getting. Dealing with Q, not-Q, and all that garbage is not helpful and I can already use diagrams on the wiki as a guide; what I need is a simple English explanation of what D flip-flops and JK flip-flops actually do. Examples of their uses, if clear, may even be enough. Just trying to avoid more wasted effort. Thanks for your time, guys.?
First off, the reason Q and ~Q (not Q) is important is more for an electrical reason. Usually in a chip you want to have both outputs so you save space and gates. But think it more that you have an option for either out.
For a D Flip-Flop, It is a device that can hold a 1 or a 0. You can only set that 1/0 once you put a 1 to a clock. Imagine a teenager who isn't caring what you are saying. But you give them a dollar they will care, at-least till the gift of money goes away. That is a clock. You use this so you can have a line with data on and that the memory will only "read and store" it when you want.
JK flipflop is a bit different. Think of it as memory block that needs commands. When JK=0, it is told to hold state and do not change its output. When K=1, J=0 Its told to change its output to a 1. J=1, K=0 to change it to 0. When JK=1, then its told to "flip" the output. A clocked JK flip-flop, only cares about the JK inputs when the clock is set.
I've been wanting a good JK flip-flop design for a while. If you put an inverter between the J and K lines, you have a D-latch. If you combine the JK lines into an input, you have a toggle switch. You can stack JK flip-flip flops to make a counter, shift-register etc.
The 'clock' is only really necessary if you're planning large-scale, time-sensitive digital operations, though, right? You could make the flip-flops 'care' all the time pretty easily, I assume.
So, to be clear, JK's have four "commands:"
00 - hold state
01 - set to 1
10 - set to 0
11 - toggle state from what it was previously
Something like that? I actually have taken a course on circuits, but it has been a while and we mostly tried to program in Assembly (which loves to change registers without telling you about it, lol). We didn't spend a ton of time memorizing flip-flop/latch properties and, like I said, the descriptions on the wiki were a bit ambiguous.
I just finished my 1-wide combo lock:
http://www.megaupload.com/?d=CZNXXDRT
(if at first it starts blinking, just press the button on the far right)
Code is 5-6-7-8 and then hit Enter (far-right)
There are a few strange behaviors I've been seeing:
- When I right-click on a redstone line with dirt, it places the dirt above the redstone, in air. (Did it always do that?)
- I can't get the 1-wide pulse generator from the wiki to work anymore.
- Some repeater propagation times are behaving oddly in a way that indicates a timing bug other than the usual NS vertical delay trick. I built a variable-width pulse generator and tried sending single pulses down chains of repeaters. The pulses don't propagate down all the repeaters as expected, but die off, with longer pulses surviving through more repeaters.
It appears that the trailing edge of the pulse is catching up to the front edge and the pulse eventually dies once it passes through enough repeaters. That one baffles me, because it implies that torches turn off somehow faster or slower than torches turn on for he configurations I've tried.
It's always done that. Very convenient for making contraptions.
I'm going to have to find a way of precisely timing pulses so I can determine which repeater arrangements shorten pulses and by how much. If nothing else, that implies that there's another way to synchronize signals besides the NS trick.
Minecraft, I now believe, does it differently: clear the wires, then update the torches and propagate charges in one pass. When it does this, it passes from northeast to southwest – in Minecraft’s coordinate system, from low X and Z values to high ones. This opens some avenues of exploration:
[*:3kh63bir] Does it also pass from low values to high ones? Predicition: yes. A vertical version of xgkkp’s test would work downwards, but not upwards.
[*:3kh63bir] Is the traversal X-major or Z-major? That is, after a given torch is updated, does one to its north get updated before one to its east? What type of circuit would detect this distinction?
[*:3kh63bir] Is the traversal one sweep across all chunks in range, or per-chunk? What type of circuit would behave differently at chunk boundaries if it was per-chunk? Could a boundary detector be made that works in both directions at once? Could boundary effects be exploited?
Imitating greatness: 16-bit Hack ALU design
KEEP CALM AND EAT CAKE
I tried it again, placing unnecessary redstone dust on top of each inverter block. The very brief pulse was still transmitted without shortening.
The behavior we're seeing might be directional, but it's also specific to certain arrangements of redstone and/or torches, and there definitely isn't a universal directionality to all redstone resolution.
I suspect at the root of this we will see one or a few glitches as specific as the known NS glitch.
I propose that we look more closely at the interactions between torches on the side of blocks vs torches on top of blocks. Since the rules for vertical torches are slightly different than for horizontal torches, maybe each one is getting their own step in the state machine. (like, update redstone, update horizontal torches, update vertical torches?)
Eight repeaters is enough that you can easily see the speed difference. (this is my runway light animation repeater, where the goal was to get the vertical torches adjacent.)
I've tried it pointing all four directions and it only showed the glitch when pointed east or west. I estimate that the ON pulse traveled about twice as fast as the off pulse. (ON and OFF referring to the vertical torch states.)
Place a block above the last vertical torch and you can run a redstone wire back to the first torch, making this a fun clock design to watch cycle itself, and trivial to see that the east- and west-pointing ones ares running faster than the north- and south-pointing ones.
Essentially its an xor that takes the add bit of it and outputs it to the input of the next xor. I put an inverter at the end, and fed it into another half-adder you now have a decmenter! Good for a stack pointer.
I also added a +2 function. I figure it be faster to increment a program counter by 2 for a skip rather than execute a nop on a skip.
Now if I can just figure out how to put in a flip-flop and make it a self incrementing regester:P
PS - What font does everyone use for putting the text in? I can't seem to find it.
My new version of Redstone Simulator
Main Code Site: http://code.google.com/p/red-stone-simulator/
It almost looks like there's a specific program they all use. Also, how do you get it to display vertically?
I use Arial Black (14 pt, bold). To my knowledge there isn't a program to put these in, someone just started using it and everyone else copied them.
I checked out the wiki about MineCraft circuit designs and the descriptions are very, annoyingly technical. Based on the wordings there, I built my first T flip-flop. It's cute, but that's not at all what I thought I'd be getting. Dealing with Q, not-Q, and all that garbage is not helpful and I can already use diagrams on the wiki as a guide; what I need is a simple English explanation of what D flip-flops and JK flip-flops actually do. Examples of their uses, if clear, may even be enough. Just trying to avoid more wasted effort. Thanks for your time, guys.
D Flip-Flops are used for memory. It's used instead of an RS-NOR latch if you want to store both on and off data, and control when it is saved (like a save button or something). JK Flip-Flop, I'm still figuring out...
Sadly, we're all making the vertical diagrams by hand. Vertical display on the redstone sim would be great!
bump. Anybody?
Think I'm gonna expirement right now.
EDIT: I have no Idea why you would want to use a JK-FF instead of an RS-NOR latch.
Imitating greatness: 16-bit Hack ALU design
KEEP CALM AND EAT CAKE
First off, the reason Q and ~Q (not Q) is important is more for an electrical reason. Usually in a chip you want to have both outputs so you save space and gates. But think it more that you have an option for either out.
For a D Flip-Flop, It is a device that can hold a 1 or a 0. You can only set that 1/0 once you put a 1 to a clock. Imagine a teenager who isn't caring what you are saying. But you give them a dollar they will care, at-least till the gift of money goes away. That is a clock. You use this so you can have a line with data on and that the memory will only "read and store" it when you want.
JK flipflop is a bit different. Think of it as memory block that needs commands. When JK=0, it is told to hold state and do not change its output. When K=1, J=0 Its told to change its output to a 1. J=1, K=0 to change it to 0. When JK=1, then its told to "flip" the output. A clocked JK flip-flop, only cares about the JK inputs when the clock is set.
I've been wanting a good JK flip-flop design for a while. If you put an inverter between the J and K lines, you have a D-latch. If you combine the JK lines into an input, you have a toggle switch. You can stack JK flip-flip flops to make a counter, shift-register etc.
Not sure if I got the point as much as I could:P
My new version of Redstone Simulator
Main Code Site: http://code.google.com/p/red-stone-simulator/
The 'clock' is only really necessary if you're planning large-scale, time-sensitive digital operations, though, right? You could make the flip-flops 'care' all the time pretty easily, I assume.
So, to be clear, JK's have four "commands:"
00 - hold state
01 - set to 1
10 - set to 0
11 - toggle state from what it was previously
Something like that? I actually have taken a course on circuits, but it has been a while and we mostly tried to program in Assembly (which loves to change registers without telling you about it, lol). We didn't spend a ton of time memorizing flip-flop/latch properties and, like I said, the descriptions on the wiki were a bit ambiguous.