Posts

TFG part 2 - cgreate

Image
 Next on the agenda is create. the todo list is 1) get horse power 2) finish backpack 3) find a real source of EMC in winter 4) figure out how to reach steel? maybe make progress getting there? Our first order of business, however, was getting more food, we ran across half the continent while starving, and managed to find some pumpkins, boars and fish, we also eventually got a harvest of barley and garlic, Some of this even yielded some resources to burn for EMC, mainly bones and some flowers, but our new buffer of 10,000 wouldn't last long and we'll soon need to gather more... We then tamed a horse, and hooked it up to our grinder, threw some hardwood strips into the grinder, some ash into our boiling pot, and built a stomping pot in order to start to create the paper needed for our backpack Waiting 25 minutes for the pulp to dry, until finally we get our backpack, and with it, twice as much inventory space. I'm normally very bad about using things like this, but with the ...

TFG part 1 - Wrought iron

Image
     Let's see if i like writing a progress log for this playthrough in this form. it'll be very raw just basically narrating my journey This is TerraFirmaGreg, one of the most complex modpacks that minecraft has to offer. I've added projectE and a connector to AE2, i may end up not using it much because the modpack makes so many changes to the base game that there's almost nothing for which EMC works. I like being able to convert some basic resources over, though i have decided not to use any form of EMC generation provided by projectE, so i'm allowed to feed a tree farm into a condenser, but no power flowers. At this point i'm mainly using it because it provides easy access to minerals like copper, bronze and cast iron, very helpful since i'm not finding much of it in the environment and i'm still scared to go mining due to cave-ins.  Before this post, i've already progressed through the stone, copper and bronze ages, and although cast iron ingots ...

Building SIC-1 in VCB Part 4: Multiplexing clock

Image
 So, last time we built the RAM timing and full-adders, this time i found another important part that we're still missing The Multiplexer, or MUX, This circuit is sort of the opposite of the demuxer, where instead of turning an address into a selection of a RAM bank, we can switch between two signals. As you can see, the circuit has some very nice stacking behavior for the switching input (in blue) which lets us switch between a number of signals (selected in red) with just one input Of course we can also switch between multiple sets of input in a similar way to how we did with the demuxer, though here we get a rapidly shrinking set of data, and lots of inputs Of course, this way of looking at it is somewhat abstract, but it forms the basis for something i think most of us are familiar with but more generally, it allows us to "program" a sequence of outputs if instead of manually changing the selection pins, we attach this to a clock with a small counter circuit, Perhaps ...

Building SIC-1 in VCB Part 3: Fadder and auto-RAM

Image
 Last time i finished the RAM, an early design for registers and did some initial trial and error with reading data from RAM via registers Next i began some early ALU work, starting from the "traditional" full-adder i made a while back I translated it into a NAND-only version,  which, after some compression, ended up being the exact same size as the original so i could easily hook it into the same test rig Then i started working on automating the RAM read/write cycle, so i could write with registers G/H and read with F/H (H will become the program counter register) This process was somewhat painful since the RAM read signal is just barely long enough to fully store the data, so the write line has to be active before the data arrives, but stop on the same tick that the data line turns off so there's still some leftover wiring from when i tried to have it re-write its own data (which doesn't work since hysteresis can't easily set its own data when the circuit turns ...

Building SIC-1 in VCB Part 2: DEMUX and Registers

Image
 Last part we built the basic components needed, and a RAM prototype, the next step: a demuxer A demuxer is a circuit that can convert an address into a selection, in this case, it's turning a binary address value into a selection from a "bank" of RAM I then refined the RAM prototype to squash it as much as possible, since i was going to have to find a way to squash 256 cells into a workspace that's only about 2048 cells tall, i ended up with this circuit that's just 8 cells tall, though it meant i wouldn't be able to read the data non-destructively, since the circuit reads and writes simultaneously, destroying the old data, but then trying to separate reading and writing would effectively double the amount of wiring as well  Quite some time wiring later, here's the initial design of the full demuxer plus the RAM bank: Initially i made the "read" bus exit on the bottom, before deciding i'd prefer to have all the inputs in the same place for w...

Building SIC-1 in VCB Part 1: RAM

Image
 So i've started a (hopefully) short, and fun side-project again. I'm going to try to emulate the SIC-1 CPU within Virtual circuit board. The SIC-1 CPU is an 8 bit CPU with 256 bytes of addressable RAM i just realized i'm currently making it 256 bits but i'll fix that later (incorrect, turns out i was working on 8*8 bytes) And a single instruction: SUBLEQ A, B, [C] it's a S ingle I nstruction C omputer that should be relatively simple to emulate. As an added challenge, however, i'm also limited to using a Universal gate  to do so,  A universal gate, then, is able to "emulate" other gates, these are the NAND and NOR gates. I've chosen to use the NAND gate, Here's a comparison with their "standard" gates I then added some more designs that might come in handy, a pulse-former seemed useful, and i needed some way to delay signals, an R/S latch also seemed like it'd be needed for RAM, and i also added in a D-flip flop and a manual cloc...

On the intricacies of affordance-based interfaces in C++

Image
Well that's a rather obscure title, isn't it, and it'll require some explanation about some non-standard C++ structures i've been building at work. First, i've done a little bit of work in the GO programming language, and i really enjoyed the mechanics of it's non-inheriting interface polymorphism (i've called them affordance-based interfaces) Next, i found this talk explaining how to do type erasure in C++ in order to essentially emulate these affordance-based interfaces: I wrote a prototype of this system such that i could make a set of affordance classes that describe a specific member function, and might serve as a "delegate" for that function, and an interface class that could combine several of these affordance classes into a single type-erasing interface. This part actually uses a bit of "regular" polymorphism to attain it's goal, but since i've written macros that generate all the required code for you, you can effec...