v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Editing 40d Talk:Computing
Jump to navigation
Jump to search
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "40d"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 24: | Line 24: | ||
: This would make that person my favoritest ever. --[[User:Geofferic|Geofferic]] 01:36, 9 December 2007 (EST) | : This would make that person my favoritest ever. --[[User:Geofferic|Geofferic]] 01:36, 9 December 2007 (EST) | ||
: Agreed. [[User:Madmadmadmage|Madmadmadmage]] 15:13, 9 December 2007 (EST) | : Agreed. [[User:Madmadmadmage|Madmadmadmage]] 15:13, 9 December 2007 (EST) | ||
− | |||
== Fluid logic gates == | == Fluid logic gates == | ||
− | + | I got bored, so here, have some gates. I don't know the offical DF format for fortress snippets, so I've posted them here and hoped someone will be bored enough to format them correctly. I also don't really post on Wikis very much, so if this isn't the kind of thing you're all looking for, delete it. There might also be a few errors; I haven't actually tested any of these, and I'm not exactly sure about the XORs. I know that I could have made a few of these more compact by having the fluid perform the OR themselves, but that would have caused backwash into any dry inputs, possibly corrupting the system. If you have yours set up right, you don't need that. | |
+ | :Edit:Also, you might want to connect your reservoir to the floodgates on the other side with another, lever-controlled, floodgate in between. That way you don't have problems with mechanical delays and fluid getting through where it's not supposed to because a gate hasn't closed yet. [[User:Madmadmadmage|Madmadmadmage]] 18:05, 9 December 2007 (EST) | ||
− | + | Notation: | |
+ | . : channel | ||
+ | + : ground | ||
+ | # : wall | ||
+ | n : floodgate connected to plate number n | ||
+ | p : pressure plate true when depth 1-3 | ||
+ | q : pressure plate true when depth 4-7 | ||
+ | I : input channel 1 | ||
+ | J : input channel 2 | ||
+ | O : output channel | ||
+ | D : to runoff tank, so it doesn’t all jam. I’ve assumed a single level for the basic design,<br /> but a far more efficient model (presented below) assumes that this tank is two levels down,<br /> and that D is a two-z-level pit. | ||
+ | H : from full reservoir. Again, basic designs are for a single level, but a far more efficient<br /> model (presented below) assumes that this tank is one level up, and H is a hole in the ceiling. | ||
+ | Water == true; no water == false | ||
− | + | Pressure plates are numbered top to bottom, and then left to right within rows with multiple plates. For example: | |
+ | ##1####2### | ||
+ | #+++34++++# | ||
+ | #++++++56+# | ||
+ | ##7######## | ||
− | + | '''Single-level designs:'''<br /> | |
+ | NOT gate: | ||
+ | ##### | ||
+ | H...# | ||
+ | #++.# | ||
+ | Ip+1O | ||
+ | #D### | ||
− | + | OR gate: | |
+ | ########## | ||
+ | H........# | ||
+ | #++++++12# | ||
+ | D.+...+..# | ||
+ | #q+q+.++.O | ||
+ | #I#J#D#### | ||
− | + | NOR gate: | |
+ | ########## | ||
+ | H........# | ||
+ | #++++++12# | ||
+ | D.+...+..# | ||
+ | #p+p+.++.O | ||
+ | #I#J#D#### | ||
− | : | + | AND gate: |
− | + | ######### | |
+ | H.......# | ||
+ | #++++++1# | ||
+ | D.+...+2# | ||
+ | #q+q+.+.O | ||
+ | #I#J#D### | ||
− | + | NAND gate: | |
+ | ######### | ||
+ | H.......# | ||
+ | #++++++1# | ||
+ | D.+...+2# | ||
+ | #p+p+.+.O | ||
+ | #I#J#D### | ||
− | + | XOR gate: | |
− | + | ############# | |
− | # | + | H...........# |
− | + | #+++++++13++# | |
− | + | #++++++++.24O | |
− | + | J.pq+pq.++++# | |
− | + | ###D#I#D##### | |
− | |||
− | |||
− | |||
− | + | Alternative XOR gate: | |
− | + | ############ | |
− | + | H..........# | |
− | + | #++++++12++# | |
− | ############## | + | #+++++++.12O |
− | + | J.p+p..++++# | |
− | + | ##D#I#D##### | |
− | ################ | + | The pair of floodgates closest to the output (the ones in series) are open when they’re connected to the plates, and the pair of floodgates closest to the reservoir are closed when they’re connected to the plates. Additionally, if the two in series are connected to a lever, this setup can be turned into an AND gate simply by pulling the lever. |
+ | |||
+ | '''Multi-level designs:'''<br /> | ||
+ | Note that in any of these designs, any floodgates connected directly to the H can have an H moved directly above them, making the designs of the OR, NOR, and XOR gates much more compact (and probably faster). | ||
+ | NOT gate: | ||
+ | ###H# | ||
+ | #++1O | ||
+ | Ip++# | ||
+ | #D### | ||
− | : | + | OR gate: |
+ | ####### | ||
+ | IqD+H.# | ||
+ | #+++12# | ||
+ | JqD+..O | ||
+ | ####### | ||
− | + | NOR gate: | |
− | + | ####### | |
− | + | IpD+H.# | |
− | + | #+++12# | |
+ | JpD+..O | ||
####### | ####### | ||
− | + | ||
− | + | AND gate: | |
− | |||
####### | ####### | ||
− | + | IqD+D+# | |
− | + | #+++12O | |
− | + | JqD+++# | |
− | |||
− | # | ||
− | # | ||
− | |||
####### | ####### | ||
− | + | ||
+ | NAND gate: | ||
####### | ####### | ||
− | ## | + | IpD+D+# |
+ | #+++12O | ||
+ | JpD+++# | ||
####### | ####### | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | : | + | XOR gate: |
+ | ########## | ||
+ | IpqD+H.++# | ||
+ | #++++13++# | ||
+ | JpqD+..24O | ||
+ | ########## | ||
− | + | Alternative XOR gate: | |
− | + | ######### | |
+ | IpD+H.++# | ||
+ | #+++12++# | ||
+ | JpD+..12O | ||
+ | ######### | ||
+ | The pair of floodgates closest to the output (the ones in series) are open when they’re connected to the plates, and the pair of floodgates closest to the reservoir are closed when they’re connected to the plates. Additionally, if the two in series are connected to a lever, this setup can be turned into an AND gate by pulling the lever. | ||
− | + | [[User:Madmadmadmage|Madmadmadmage]] 16:53, 9 December 2007 (EST) | |
− | |||
− |