This is an old revision of the document!
Our computers and laptops are literally a big black box with a monitor, keyboard, and mouse. What is going on inside? Circuit diagrams have all the answers…except they are impossible to figure out unless you spend an entire semester trying to understand them. Our solution is to build a CPU in Minecraft, a popular sandbox game in which players can build various types of “blocks” and “objects” which interact with each other and the player.
Our goals for this project are to:
There are three major reasons we wanted to create an 8-bit CPU in Minecraft.
Expect this section to be fairly long. We will explain to you EXACTLY how we did everything. This includes designing our 8-bit architecture, writing assembly language to execute certain tasks, building our designed CPU in Minecraft, and setting up our world so that it is easy for non-specialized individuals to learn about how a CPU works.
Before we started designing our architecture, we needed to decide on the specifications of our architecture. The following describes our CPU using words:
The following is the list of registers we have. We have a total of 8 registers, each having the size of a single byte. The first four registers are reserved for the CPU and each serves a specific purpose for the execution of each instruction. The remaining registers are general purpose registers for the programmer to manipulate however he/she pleases.
Register: $ACC
Purpose: This is the ACCumulator register. Certain operations, such as adding immediates, can only be done to the accumulator register. This is necessary in order to accomodate all possible operations possible.
Register:$DMP
Purpose: This is the Data Memory Pointer. The user will only be able to access the address in the data memory indicated by the Data Memory Pointer.
Register:$JP
Purpose: This is the Jump Pointer. Whenever we need to jump to or branch to a specific point in the data memory, the program counter will change to the value located in $JP.
Register:
Purpose:
Register: $G0
Purpose: General purpose register 0
Register: $G1
Purpose: General purpose register 1
Register: $G2
Purpose: General purpose register 2
Register: $G3
Purpose: General purpose register 3
Our CPU will be able to execute the following instructions. If you want to make a program, the following section will serve as the documentation required to create the program.
Instruction: SW
Format: | 000 | x | aaa | x |
Description: [Store word] Store a word from the register to the data memory. The