Minecraft CPU performing DIVISIONSalajapaju2011-04-09 | in this video, my minecraft CPU runs a program i wrote for it that divides two numbers given by the user.
this is the code i used: 00: 1011000000000000 load(0)=$0 01: 1011000000010001 load(1)=$1 02: 1011100000000010 load(128)=$2 03: 1011111111110011 load(255)=$3 04: 1011000000001110 load(user_input_2)=$14 05: 1011000000001111 load(user_input_1)=$15 06: 0111111100000100 or($15,$0)=$4 07: 0000001100010011 add($3,$1)=$3 08: 0001010011100100 subtract($4,$14)=$4 09: 0110010000100101 and($4,$2)=$5 10: 1100010101010111 if($5,$5)=#7 11: 0000010011100100 add($4,$14)=$4 12: 1010001101001111 print($3,$4)=all screens 13: 1100000000001101 if($0,$0)=#13Building a Minecraft Computer part 6 - ALUSalajapaju2012-05-30 | I begin work on the ALU.
this video includes building two mux's for the registers, and saving the results from addition operations to a register.
i run a simple program at the end.Building a Minecraft Computer part 5 - On Off SwitchSalajapaju2012-05-30 | I add an on/off switch to the tutorial computer.Building a Minecraft Computer part 4 - RegistersSalajapaju2011-12-17 | part 4 of the tutorial series. this one shows how to implement registers (memory that holds values/numbers used by programs). It also shows values being loaded into the registers from an instruction.
the instructions are now 8-bits long, the first 2 control which action is performed. For loading a value into a register, the next 4 represent the value to be saved, and the last 2 represent the index of a register to store the value.
because people have asked, here is the schematic of the cpu/computer after ep 4: http://www.2shared.com/file/_YhnKw7O/salaja_tutorial_cpu_ep4.html keep a copy of this file, the computer doesn't have the ability to "turn on", ie, it wont re-set itself after you let the program counter run off the edge of the memory block. you can get around this by ensuring that the last instruction, is an instruction to jump to line 0. But if it does go off the edge, you can either perform a manual jump/branch (difficult if you don't know what your doing) or just re-import the schematic.Building a Minecraft Computer part 3 - branching in softwareSalajapaju2011-07-26 | part 3 of my tutorial series on how to build a computer in minecraft. this video covers the interactions that allow a branch / goto / jump instruction to perform its task of going to a different instruction in memory.
for this video, i use an instruction length of 6-bits, where the first 2 (on the left) are the op-code. the number of bits isn't important, and more or fewer bits can be used.
the timing circuit i made may not be needed in some situations. slowing down the clock is a more effective way to ensure the program counter spends long enough on each instruction. however, this will result in a slower computer, and really should only be done when the computer is finished so the clock can be tested with all of the components.
also, the audio a the end seems to be a little out of sync. :(Minecraft Music Box - Ode to JoySalajapaju2011-05-02 | a demo of a music box i built in minecraft. it uses a memory block to store the song.
unfortunately, complex redstone mechanisms tend to be slow and that's about as fast as i could get it to go. as a result, it sounds like a 2 year old learning to play the guitar. :(
i don't plan on making more of these note block videos, but if someone has a good (and free) song they would like to see, send me a link to a sheet of music for the song, and i may make it if i feel like it.Building a Minecraft Computer part 2 - branching in hardwareSalajapaju2011-04-19 | i show the hardware side of how my computer will control branching. this component wont really be used until the computer is almost finished, but because it physically sits inside the program memory, it needs to be dealt with immediately.
this will likely be my last video for a few weeks.Building a Minecraft Computer part 1 - D flip flops and program countersSalajapaju2011-04-17 | my first video in a series that will show people how i made the components of my first cpu in minecraft.
this video shows how i use D flip flops as a program counter to control which instruction is being read from a memory bank.CPU self destructSalajapaju2011-04-11 | a countdown to self destruct
and can someone give me a link in the comments to a website where i can get some free music for this?random number methodSalajapaju2011-04-11 | THIS IS NOT ACTUALLY RANDOM. it was just a bunch of clocks that run at different speeds. it gives the illusion of some randomness, but that's all.Minecraft CPU performing ADD and SUBTRACTSalajapaju2011-04-08 | demonstrating the ADD and SUBTRACT functions of my minecraft cpu.
i put the code on the cpu before i made the video, here it is: 0: 1011000000001111 load(user_input_1)=$15 1: 1011000000001110 load(user_input_2)=$14 2: 0000111111100001 add($15,$14)=$1 2: 0001111111100001 subtract($15,$14)=$1 3: 1010000000010011 print($0,$1)=only the left two screens 4: 1011000000000000 load(0)=$0 5: 1100000000000101 if($0,$0)=#5
*note: there are two line 2's, this shows how i toggled the op code to swap between addition and subtraction. *note: line 4 and 5 cause the program to enter an infinite while loop. similar to making the CPU perform a ' wait ' command.Minecraft CPU how to load a program, also random num. gen.Salajapaju2011-04-07 | i demonstrate how to load code into the CPU, show the IF operation (branching), and get it to display random numbers.
the code i used: 0: 1011000000000000 load(0)=$0 1: 1101000000000001 rand()=$1 2: 1101000000000010 rand()=$2 3: 1010000100101111 print($1,$2)=screen 4: 1100000000000001 if($0,$0)=#1Minecraft CPU brief overviewSalajapaju2011-04-07 | a CPU i made inside Minecraft.
32-Bytes of program memory (can hold 16x 2-Byte instructions) 2-Byte instruction words 14-Bytes of RAM (14x 1-Byte registers) 2-Bytes of user input (2x 1-Byte input registers) 8-Bit ALU (add, subtract, and, or, not, xor, left/right shift/rotate, random number) 0.208 Hz (4.8s period/ 24 clock) 4x 7-Segment Displays (with 4x 4-Bit display registers) carry select adder/subtractor (thanks to Cananatra for pointing this out) Can load 8-bit values into registers Can branch conditionally Can print 2-Bytes to the display in hexadecimal