Minecraft Maps / Redstone Device

8 bit CPU that can draw lines![MAP DOWNLOAD]

  • 1,357 views, 3 today
  • 125 downloads, 0 today
  • 4
  • 2
  • 2
TheWildJarvi's Avatar TheWildJarvi
Level 10 : Journeyman Engineer
3
Hello everyone, I'm TheWildJarvi, host of WildEngineering on YouTube!

Last year I made a tutorial series on how to design an 8 Bit CPU, and recently a friend of mine got his server to run at like 200tps so I decided to run some programs on it.
**MAKE SURE TO HIT THAT DIAMOND NEXT TO THE POST <3**
Currently the CPU is programmed to draw a line in the form of a y = mx + b equation, where 'm' and 'b' are defined by the user before the program is ran.



The map is available for download, its a 1.12.2 map file, unzip it and the map is inside.

How it works(for those of you that made it this far!)

Its an 8 bit Harvard architecture CPU which means program memory and data memory are separate. It has 7 GPRs(general purpose registers, and a zero register. It has 3 flags, BEQ, BLT, BGT. There is no RAM yet but there is room for 3 more instructions plus buses at the back that you can access for data in/out if you wanted to modify this basic CPU.

The program ROM or PROM is 16 bit the structure is as followed,

[3 bit blue] [4 bit yellow] [3 bit green] [3 bit red] [3 bit light blue] = 16 bits

[Arg 1].......[Op code]......[Write addr]..[Arg 2].....[Immediate]

That is the instruction format, the instructions are listed on the wall with how to program them. The current code has labels above each line to make understanding how the CPU works easier. I have he register map defined on the wall with the line drawing pseudo code next to it.

For instance if I wrote 'get slope', you would look at what register I defined to be slope(lets pretend I wrote r1 = intercept, r2 = slope), and that the User input for slope was in address 3 of the UI panel. The instruction for input is number 9 or 1001 in binary.

The format for the input instruction is below:

[UI 3] [ Input ] [r2] [null] [null]
the machine code for that looks like:
[011] [1001] [010] [000] [000]

Hopefully you can look at the comments of the code and decode the instructions to see how they work.
Lastly, I have no unconditional jumps but I have a pseudo unconditional jump, this is performed by doing a comparison on the zero registers, [compare r0, r0], the zero register always hold 0 so 0 = 0 therefore if you do a BEQ(branch if equal) it will always take the branch.

Cheers
-
TheWildJarvi
Creditpinkfluffyllama for making the server hack plugin and hosting a server.
Progress100% complete
Tags

Create an account or sign in to comment.

2
07/27/2019 1:12 pm
Level 41 : Master Mountaineer
DeltaResearch
DeltaResearch's Avatar
Nice! Great job making even a simple CPU in minecraft! That is not easy to do!
1
07/27/2019 1:14 pm
Level 10 : Journeyman Engineer
TheWildJarvi
TheWildJarvi's Avatar
Thanks man, try the map out if you have a chance :)
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome