1. Please be advised of a few specific rules and guidelines for this section.

RELEASED Macrochip and Logic Upgrades V4.11

Virtual Circuitry

  1. claudekennilol

    claudekennilol Cosmic Narwhal

    The yellow color for some of the key words in the mod description doesn't play nice with the forum's default color scheme.
  2. Storm_UK

    Storm_UK Existential Complex

    Changed to green, which should be better for the default scheme - I've always used the old CF forum style, a dark background is easier on the eyes for me.
  3. claudekennilol

    claudekennilol Cosmic Narwhal

    I agree, I just noticed it because I wasn't logged in.
  4. Storm_UK

    Storm_UK Existential Complex

  5. Pilchenstein

    Pilchenstein Ketchup Robot

    This mod is amazing and I am in awe of the effort you've put in. I do have one suggestion though, would it be possible to have the definable button work as a remote input node?
  6. EvgEniRus

    EvgEniRus Void-Bound Voyager

    I took a liberty to fix the definable button a bit. Patch file is attached.
    Mostly, now its "pressed" state and time left to depress (for buttons) are persisted correctly on world load instead of being reset.

    Attached Files:

  7. Jonmcbane

    Jonmcbane Void-Bound Voyager

  8. Tini_weni

    Tini_weni Scruffy Nerf-Herder

    Good Work,
    Storm will be pleased that you've made use of the ALU.
    it took a long time to get that implemented,
    storm has done a fantastic job with this mod.
    Last edited: Dec 6, 2017
  9. Jonmcbane

    Jonmcbane Void-Bound Voyager

    Hey, I'm not sure if you'd add this to your mod, but I think that a User Interface components would be really interesting to add to the macrochip mod, all it would do is have around 16 input pins that would function similarly to an LCD screen, so that if you interact with the Interface object, it would have a screen similar to how the Mazebound64 is made, but has 12x8 tiles of 8x8 (96x64 pixels) screen, with a small settings button in the corner to change computer style and window size, along with Screen colors, like orange, and an ASCII editor. where you could click and for example "X" square and change the monochrome tile so that inputs like 01001000 {H} could look like any image you design, and can save it similarly to the "e" button on the macrochips,

    one more thing that would be interesting is that it would check what buttons you press on it and send out an 8-bit ASCII output to another macrochip possibly.
    I know this seems daft and ambitious but Id really like this along with the macrochip mod and just make the game that much better
    (I can probably explain better with images)

    Here's a Mockup:
    megamacrochip (2).png untitled.png
    Sorry if for ever reason I seem rude.
  10. Storm_UK

    Storm_UK Existential Complex

  11. EvgEniRus

    EvgEniRus Void-Bound Voyager

    This is interesting, but IMO it doesn't exactly fit with the mod's overall design. Sure, powerful computers are cool, but there's some gap between logic circuit simulator (with actual realistic ALU chip, shift registers, etc.) and a nice fully-fledged (VT100-compatible?) terminal UI that could as well have been backed by LUA interpreter instead of circuitry.

    Also, you can do something like that already! Here's my lighting control panel:
    (Click to view)
    The UI already starts with "Inspect" tool selected, so you can click the buttons right away. Convenient & neat!

    My current suggestion targeted towards using circuits as UI / control panels is to pick the low-hanging fruit:
    1. Add "Lock circuitry" checkbox to settings. It would hide tool selector and only allow clicking buttons. Checking it also enables the next two checkboxes:
    2. "Hide circuitry" checkbox. It would hide all non-interactive components and wires.
    3. "Disable scrolling" checkbox. Self-explanatory, also hides scrolling arrows.
    I have other suggestions, but they may be more difficult to implement:

    First, a few improvements that should mostly require copy-pasting to implement: 16-segment displays, maybe with (optional) in-built character generator; colored buttons (LEDs are already colored), smaller and faster buttons (Those present are huge! And they stay pressed too long for my taste.)

    For general purpose alpha-numeric display needs, the obvious candidate that fits look&feel of this mod is a standard LCD text display, like this one:
    They are very well documented and easy to interface. There should be several different-sized variants, of course, since their operation logic is the same no matter how many characters they have. Might want to depart from standards a bit, like not implementing reading data from display (it would require a lot of extra pins and is seldom used anyway), not requiring initialization commands after power-on, maybe adding/re-purposing some commands to control backlight and text colors (not sure if there are standard commands for that).
    Also, an in-world variant would be cool. The interface is just 10 pins, so they can be rather compact. Even more compact if limited to 4-bit mode and thus 6 pins.

    Keypads already can be constructed with buttons, smaller buttons would allow for larger keypads. However, a special "Keyboard interface" component might prove useful in some cases. I think it should look like this:
    A PS/2 keyboard connector! It would be operational only when "Lock circuitry" is checked in settings, and then it will capture all keyboard input from user when UI is open, and expose it through its pins. My idea of pinout is as follows: 7-bit scancode (top right), pressed/released flag (bottom right), current Ctrl/Alt/Shift state (bottom left), event pending signal (top left, activates right after all other pins are updated according to the next event) and the only input to signal "done processing event" (on rising edge, outputs except modifier key states are cleared; after falling edge, the next event is processed as soon as it is available; there should be a reasonably sized cyclic buffer for pending events, I'd say 32 is enough).
    (Note: I know that PS/2 is serial, let's just pretend there is a deserializer inside this component. And a small buffer to hold events yet to be processed.)

    An alternative solution to the "keyboard connector" would be binding keys to buttons. Like with keyboard connector, hotkeys would only be captured when circuitry is locked. On a second thought, it would probably be better than the connector, definitely easier to use when only few keys are needed. When the whole keyboard is needed, scan-codes can be encoded manually, with all the buttons and circuitry placed out of view. It might be slightly more difficult to implement though, with the extra UI needed to set the hotkey.
    Last edited: Jan 2, 2018
  12. EvgEniRus

    EvgEniRus Void-Bound Voyager

    Use a 5-second timer and a few daisy-chained sync. counters? I don't quite understand what the problem is.
  13. EvgEniRus

    EvgEniRus Void-Bound Voyager

    Well, I might have yet again overestimated what is obvious to other people.
    Those counters probably are a bit counter-intuitive.

    Here's what I've thrown together (click to enlarge):
    The timer at the bottom is set to 5s. It means that it toggles every 5s, so it goes from off to on every 10 seconds.
    Each of the 2 counters counts from zero to value input from the left inclusive. The button has to be pressed to apply the values. The connected output pulses when counter overflows and resets to zero.
    Switches on the left have binary values 0100 and 0101 on them, which are 4 and 5, so counters overflow every 5th and 6th time their input is turned on.
    So, the bottom counter's output is turned on 6 times less often than its input, or once every minute.
    The top counter's output is, similarly, turned on 5 times less often, or once every 5 minutes.
    The output pulse is as long as input pulse, so I use edge detector to make that pulse momentary.
    After that there is a countdown timer that prolongs that pulse to 5 seconds. You can chain several to get longer pulse.
    Two counters are used because one can count up to at most 15, so the maximum multiplier would be 16, and timer can be set to 5s at most, which would give final period of 160 seconds, or 2 minutes 40 seconds. With both counters the maximum is 2560 seconds, or 42 minutes 40 seconds.

    Aside from building that circuit "because we can", I suspect it might turn out pretty useless.
    The problem is, circuits, sprinklers, plants, etc. are mostly frozen while there's no player nearby.
    This circuit will trigger approximately once every 5 minutes you spend near it.
    And since plants simply check how long it has been since the last time they grown, upon your arrival they will grow instantly and then spend up to 5 minutes in dry soil.
    And besides that, I don't think sprinklers could cause much lag.
    Last edited: Jan 2, 2018
  14. EvgEniRus

    EvgEniRus Void-Bound Voyager

    Well, I know for a fact that when everyone leaves specific location (ship / planet for sure, maybe going far away on the same planet counts too), it is unloaded. Every object is then rebuilt from stored information when you return.
    Plants get around this (mostly) by keeping track of when they last grown, and check time when they are loaded.
    I'm pretty sure those circuits (or vanilla ones, for that matter) don't compensate for the time they were unloaded. It would be extremely lag-prone among other things.
    And at least vanilla sprinkler is actually a "projectile trap" that shoots water droplets. Definitely won't work when unloaded.

    As for the lag, how many of those ceiling sprinklers do you have? I have a somewhat crappy old GPU (GT730m, "m" means laptop variant) and I play at max settings (2x, color lighting, etc.) on 1920x1080 screen and FPS seems to be around 25-35 usually.
    After placing around 60 vanilla sprinklers in a row it dropped to ~15fps, that's 2 times slower than without them. FPS is still stable, with no stutters, so it's still quite playable by my standards. And I don't expect my farm to get to even 20 sprinklers total.
    From screenshots I estimate each ceiling sprinkler produces twice as much droplets in the same time, so you would need around 30 of them around your screen for the same slowdown.
    If your GPU is apparently much stronger than that, something fishy is going on. It's not unheard of for weirdly installed drivers or various crapware to make some games slow as hell at random and for no good reason.
    Definitely disable Steam overlay if it's enabled. (Right click the game in Steam library list, choose "Properties" and untick "Enable Steam overlay" there.) Make sure the game runs on the faster GPU if you have several. Try clean-reinstalling GPU drivers if everything else fails.
    Last edited: Jan 2, 2018
  15. EvgEniRus

    EvgEniRus Void-Bound Voyager

    Cursory glance at benchmark results tells that on average your GPU should give at least about 4 times as much FPS as mine, so almost 60fps with a crapton of sprinklers onscreen. (Unless you have much much more sprinklers than I expect, that is.)

    One other thing I may suggest off the bat is disabling VSync. I've just disabled it completely myself and my FPS more than doubled. Might as well do this whole guide while you are at it (includes disabling VSync):
    https://community.playstarbound.com...d-fps-if-youre-having-trouble-with-it.131240/ ("Install Notepad++" part is important. Any sane plain-text editor would be fine, actually, but don't use the default Windows Notepad. Also, don't do the "Mods" part if anything else helps, it's just cutting out features to decrease GPU load.)
    Also, if you force-enabled VSync somewhere in NVidia settings, disable it there too.

    As for the irrigation system on your screenshot, I don't think it works anymore at all, and it certainly never worked without anybody nearby (Its period is less than a minute, so it doesn't make a big difference.).
    But it sure looks cool xD (if you omit the part where it washes away all the crops in the latest version of the game)

    And finally, this discussion went a bit off topic for this thread. Any further questions not related to the mod should go to PM or different (relevant) forum thread.
  16. Jonmcbane

    Jonmcbane Void-Bound Voyager

    Well I think what is most important right now would be a copy/paste function.
    and when right clicking it on the side would change it from just copying
    components, to copying the components AND their wiring
    as well as memory chips
    but yeah. just a copy paste function.
  17. EvgEniRus

    EvgEniRus Void-Bound Voyager

    Even with a copy-paste function, I wouldn't expect much to come out of your idea. I once wanted a properly working copy-paste function for Minecraft to build a computer with enough RAM for something useful. I built a 1KiB ram chip with RedLogic mod, without the copy-paste... aaand it failed to compile the java class that would represent the circuitry. Apparently, it's hard to deduce that a whole building full of wires is actually a 1024-byte array, and Java cannot have megabyte-sized functions. Not to mention that if it worked, it would lag the hell out of the game.

    And even if everything works and does not lag too badly, you still get at most one virtual CPU clock per game world tick, so filling a whole KiB of memory one byte at a time would take around a minute at least.

    Edit: Actually, I've just went and checked. It's 60 ticks per second. (Unless the game lags, that is.) And every tick every component registers its input and updates its output accordingly. So, a loop of 29 buffers and 1 invertor would have oscillation period of 1 second. To make it through 1K words of memory in a minute, you have 3.5 ticks per access. A shorted invertor takes 2 ticks per oscillation, so I'd say it's pretty much impossible.
    Last edited: Jan 6, 2018
  18. Jonmcbane

    Jonmcbane Void-Bound Voyager

    I have dreams you know...
  19. Antej

    Antej Void-Bound Voyager

    So is this something like whole for example under-water base system in one chip?
    Like airlock (which requires some of the logic gates) can be made inside one macrochip?
  20. Tini_weni

    Tini_weni Scruffy Nerf-Herder

    yes exactly that

Share This Page