Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Working CPU with RAM, branching, etc... (save added)


  • Please log in to reply
404 replies to this topic

#1

the1laz
    the1laz

    Zombie Killer

  • Members
  • 247 posts
  • Location: Perth, Australia

Posted 30 October 2010 - 03:55 PM

{Update} Sorry for the lack of updates, I've been graduating and getting a job.  New stuff should be added soon. :)

The CPU is done!  It could do with some more memory still, but it'll run a basic program.
I post updates more frequently on my minecraft blog, but I should post any major changes here too.




There's a thread about programming it here: http://www.minecraft...hp?f=35&t=78889
There's a thread about the screen I'm making for it here: http://www.minecraft...hp?f=35&t=98559
It's an 8 bit processor with 8 bytes of RAM, an output register, a code-loader and the ability to branch conditionally and unconditionally.

This is what it looks like from above:

Posted Image

You can't see the code loader as it's on the other side and is shorter than everything else.  The clock is the shorter thing at the bottom right of screen.  ALU on the left, memory at the top right, and the rest is registers for the accumulator, program counter, code and addresses.

This is the list of op codes:
    0 NOT
    1 - memory
    2 + memory
    3 OR memory
    4 WRITE memory
    5 BRANCH if Accumulator = 0
    6 AND memory
    7 LOAD memory
    8 NOT
    9 - constant
    10 + constant
    11 OR constant
    12 WRITE out
    13 BRANCH unconditionally
    14 AND constant
    15 LOAD constant

I've been putting more frequent updates on my minecraft blog, but I'll post some things here as well.  Post here or on the blog if you have any questions, or requests for diagrams. :D

You can download save files here:http://site.lazcraft...o/downloads.php
Other Videos:


Original post:

I've almost finished my CPU, all it's missing is the clock and some more memory (only have 4 bytes at the moment :S), but I've tested the rest and it all works.

Posted Image
This is it from above.  The clock is going at the bottom of the screen, and more memory is being added next to what's currently there.  It can potentially take up to 256 bytes of memory, but I don't think I'll put that much in, given how much work it is.  This is what 2 bytes of it looks like:
Posted Image

This image shows all the parts labelled:
Posted Image

This is what it can do:
Load from memory
Add 2 values
Subtract 2 values
Invert 1 value
And 2 values
Or 2 values
Branch conditionally
Branch unconditionally
Write to memory

Watch this spot, I'll update once the clock is in so that I can show it in action.

More pics: http://lazcraft.info/tagged/cpu

Register or log in to remove.

#2

iLevex
    iLevex

    Stone Miner

  • Curse Premium
  • Curse Premium
  • 94 posts
  • Minecraft: Levex

Posted 30 October 2010 - 03:58 PM

:P! Really nice! Save please? :P
Redstone is my way of Minecraft Life.
Posted Image

#3

the1laz
    the1laz

    Zombie Killer

  • Members
  • 247 posts
  • Location: Perth, Australia

Posted 30 October 2010 - 03:59 PM

Haha, sorry, not yet.  I'll put it up when it's finished. :)

#4

IronicAlbatross

Posted 30 October 2010 - 04:02 PM

gasp.... it's... so... beautiful!

#5

iLevex
    iLevex

    Stone Miner

  • Curse Premium
  • Curse Premium
  • 94 posts
  • Minecraft: Levex

Posted 30 October 2010 - 04:07 PM

Ok, I'll wait for the save, I wanna develop applications for this CPU. xD You will need more memory, try using MCEdit to c&p the memory units. :D
Redstone is my way of Minecraft Life.
Posted Image

#6

the1laz
    the1laz

    Zombie Killer

  • Members
  • 247 posts
  • Location: Perth, Australia

Posted 30 October 2010 - 04:08 PM

IronicAlbatross said:

gasp.... it's... so... beautiful!

Only from the outside.  I built it on peaceful mode, so I didn't bother filling it with torches, so it's dark and scary with flashing red lights when you're inside it. :D

#7

College Smart

Posted 30 October 2010 - 04:09 PM

I can't wait to see a video demonstration.

#8

College Smart

Posted 30 October 2010 - 04:11 PM

Also, this reminds me of the Xhibit meme.

"Yo dawg, we herd u leik computing, so we put a computer in your computer so you can compute while you compute."

#9

JobbyM
    JobbyM

    Out of the Water

  • Members
  • 5 posts

Posted 30 October 2010 - 04:11 PM

That's just incredible.

#10

the1laz
    the1laz

    Zombie Killer

  • Members
  • 247 posts
  • Location: Perth, Australia

Posted 30 October 2010 - 04:13 PM

iLevex said:

Ok, I'll wait for the save, I wanna develop applications for this CPU. xD You will need more memory, try using MCEdit to c&p the memory units. :D
Yeah, I'm doing that.  It still takes a while though, because I have to hook up the in, out, address and write lines, as well as adjusting the addresses so that everything's in order. :S  Should be easy to program once I'm done, I'm adding a bit that'll load things directly into memory.  Armed with that, and a table of op codes, it should be easy to start programming. :SSSS:

#11

baizuo
    baizuo

    Iron Miner

  • Members
  • 255 posts

Posted 30 October 2010 - 04:15 PM

Oh,my
EPIC POST!
Find me on Posted Image

#12

the_raptor

Posted 30 October 2010 - 04:16 PM

You sir are a king among geeks!

#13

the1laz
    the1laz

    Zombie Killer

  • Members
  • 247 posts
  • Location: Perth, Australia

Posted 30 October 2010 - 04:47 PM

College Smart said:

I can't wait to see a video demonstration.

I'll make sure I do one when it's done and post it here, with the save.

#14

Plasma_Panda

Posted 30 October 2010 - 04:49 PM

Good Lord.

#15

WagglyFurball

Posted 30 October 2010 - 04:51 PM

Sweet God...I think I just...I need more pants.
Posted Image

Pestilence said:

Plankerman said:

I disagree!

However i do like some sort of chocolate food/candy with milk.
Reported, you monster.

#16

ttsci
    ttsci

    Tree Puncher

  • Members
  • 33 posts

Posted 30 October 2010 - 04:53 PM

Oh wow. That's impressive, hats off to you sir. Can't wait to see the final product!

#17

rolfdavid
    rolfdavid

    Lapis Lazuli Collector

  • Members
  • 946 posts

Posted 30 October 2010 - 04:54 PM

E P I C

#18

yummycookies

Posted 30 October 2010 - 05:06 PM

Speech less ...

This is beautiful

damn And I was happy when I got my ultimate annoyance machine built...


...Pulls out some old circuitry books.

#19

Adarr
    Adarr

    Iron Miner

  • Members
  • 288 posts
  • Location: Ontario, Canada

Posted 30 October 2010 - 05:08 PM

To quote Troll 2:

"OOOOOHHHHH MMMYYYYYY GAAWWWWWWWWWWWWW............"
If you're a furry or just want someone friendly to chat with, shoot me a PM! :)
My Minecraft Calculator: http://www.youtube.c...h?v=DEwUirAcmFo

#20

Azar
    Azar

    Carpenter

  • Members
  • 67 posts

Posted 30 October 2010 - 05:25 PM

omfg