Published Aug 2nd, 2011, 8/2/11 4:10 pm
- 2,024 views, 0 today
- 151 downloads, 0 today
6
While working on my ALU, I found TheInternetFTW's own CPU. It is, by far, the most impressive redstone device I've ever seen. Unfortunately, he moved on and wasn't able to share his CPU with Planet Minecraft. I know this is in no way my work whatsoever; I don't want any likes, any favorites, any subscribers, nothing. I just want all of you to see it.
Be sure to check out his channel on YouTube: http://www.youtube.com/user/theinternetftw
Also here is his Instruction Set he gave to show you how to use his CPU:
Hi guys, theinternetftw here. Hope you enjoy playing with the CPU! (I've included the ALU from the original video as a bonus)
If you add/change anything, please let me know and send me a copy, I'd love to see it.
(PM me on youtube/reddit, find me on twitter, or if absolutely necessary email me by guessing my email address)
Contact me with any questions by using the same channels.
I'm planning to start a new project soon. (I might even release a video talking about it when I release this)
I think it's really worthwhile. I'll need some people who agree. So look for that.
Also, let me leave you with something I just realized. Forget a memory mapped screen.
There's no reason why you couldn't have memory mapped DOORS, TRACKS, TNT, LAVA, WATER, etc.
Anything activatable by redstone is a potential CPU output. That's just awesome.
But enough of that. Documentation starts....NOW!
----------------------------------------------------------------------------------------------
Stuff you should know about the Hack spec:
2 registers (A register, D register)
The A register handles memory addressing and instruction loading
(so you have to have your instruction's ROM address in A before you jump, for instance)
15bits available for RAM addressing (according to the spec)
Lots more detailed information found at the TECS website:
www.idc.ac.il/tecs/
Including a WORKING ASSEMBLER (not that there's RAM/ROM hooked up yet or anything)
and a compiler (Though that will probably have to be tweaked due to memory/screen resolution constraints)
------------------------------
Hack Instruction Set Breakdown:
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
X X X X X X X X X X X X X X X X
15th bit: 0 = A-mode, A-mode means the remaining 15bits form a number to be sent to the A register
1 = c-mode, c-mode is compute mode, the remaining bits form an instruction for the CPU.
the remaining documentation applies only to c-mode (because what else is there to say about A-mode?)
14th bit/13th bit: ignored, but left on by convention in a Hack CPU instruction (i.e. every c-mode instruction begins with 111)
12th bit: Replaces the A register in the below ALU instructions with Memory
(which uses the A register as the address of the value to provide)
------ALU INSTRUCTIONS------
11th bit: zeros the D Register
10th bit: inverts the D Register
09th bit: zeros the A register (Memory in A-mode)
08th bit: inverts the A register (Memory in A-mode)
07th bit: if 1: A+D
if 0: A&D
06th bit: inverts ALU output
------DESTINATION INSTRUCTIONS------
(Clearly any combination of these can be on at once)
05th bit: send to A register
04th bit: send to D register
03rd bit: send to Memory (using value in A as memory address)
------JUMP CONDITION INSTRUCTIONS------
(remember the address you want to jump to must be in A)
02nd bit: JUMP if ALU output is less than zero
01st bit: JUMP if ALU output equals zero
00th bit: JUMP if ALU output is greater than zero
(again, clearly any combination of these bits may be on, for instance, a jump instruction of 101 is JUMP if output != 0
Be sure to check out his channel on YouTube: http://www.youtube.com/user/theinternetftw
Also here is his Instruction Set he gave to show you how to use his CPU:
Hi guys, theinternetftw here. Hope you enjoy playing with the CPU! (I've included the ALU from the original video as a bonus)
If you add/change anything, please let me know and send me a copy, I'd love to see it.
(PM me on youtube/reddit, find me on twitter, or if absolutely necessary email me by guessing my email address)
Contact me with any questions by using the same channels.
I'm planning to start a new project soon. (I might even release a video talking about it when I release this)
I think it's really worthwhile. I'll need some people who agree. So look for that.
Also, let me leave you with something I just realized. Forget a memory mapped screen.
There's no reason why you couldn't have memory mapped DOORS, TRACKS, TNT, LAVA, WATER, etc.
Anything activatable by redstone is a potential CPU output. That's just awesome.
But enough of that. Documentation starts....NOW!
----------------------------------------------------------------------------------------------
Stuff you should know about the Hack spec:
2 registers (A register, D register)
The A register handles memory addressing and instruction loading
(so you have to have your instruction's ROM address in A before you jump, for instance)
15bits available for RAM addressing (according to the spec)
Lots more detailed information found at the TECS website:
www.idc.ac.il/tecs/
Including a WORKING ASSEMBLER (not that there's RAM/ROM hooked up yet or anything)
and a compiler (Though that will probably have to be tweaked due to memory/screen resolution constraints)
------------------------------
Hack Instruction Set Breakdown:
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
X X X X X X X X X X X X X X X X
15th bit: 0 = A-mode, A-mode means the remaining 15bits form a number to be sent to the A register
1 = c-mode, c-mode is compute mode, the remaining bits form an instruction for the CPU.
the remaining documentation applies only to c-mode (because what else is there to say about A-mode?)
14th bit/13th bit: ignored, but left on by convention in a Hack CPU instruction (i.e. every c-mode instruction begins with 111)
12th bit: Replaces the A register in the below ALU instructions with Memory
(which uses the A register as the address of the value to provide)
------ALU INSTRUCTIONS------
11th bit: zeros the D Register
10th bit: inverts the D Register
09th bit: zeros the A register (Memory in A-mode)
08th bit: inverts the A register (Memory in A-mode)
07th bit: if 1: A+D
if 0: A&D
06th bit: inverts ALU output
------DESTINATION INSTRUCTIONS------
(Clearly any combination of these can be on at once)
05th bit: send to A register
04th bit: send to D register
03rd bit: send to Memory (using value in A as memory address)
------JUMP CONDITION INSTRUCTIONS------
(remember the address you want to jump to must be in A)
02nd bit: JUMP if ALU output is less than zero
01st bit: JUMP if ALU output equals zero
00th bit: JUMP if ALU output is greater than zero
(again, clearly any combination of these bits may be on, for instance, a jump instruction of 101 is JUMP if output != 0
Credit | TheInternetFTW |
Progress | 100% complete |
Tags |
tools/tracking
100517
2
theinternetftws-16-bit-cpu
Create an account or sign in to comment.