Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Hardware Games

This 8-bit Processor Built in Minecraft Can Run Its Own Games (pcworld.com) 60

The months-long project demonstrates the physics behind the CPUs we take for granted. From a report: Computer chips have become so tiny and complex that it's sometimes hard to remember that there are real physical principles behind them. They aren't just a bunch of ever-increasing numbers. For a practical (well, virtual) example, check out the latest version of a computer processor built exclusively inside the Minecraft game engine. Minecraft builder "Sammyuri" spent seven months building what they call the Chungus 2, an enormously complex computer processor that exists virtually inside the Minecraft game engine. This project isn't the first time a computer processor has been virtually rebuilt inside Minecraft, but the Chungus 2 (Computation Humongous Unconventional Number and Graphics Unit) might very well be the largest and most complex, simulating an 8-bit processor with a one hertz clock speed and 256 bytes of RAM. Minecraft processors use the physics engine of the game to recreate the structure of real processors on a macro scale, with materials including redstone dust, torches, repeaters, pistons, levers, and other simple machines. For a little perspective, each "block" inside the game is one virtual meter on each side, so recreating this build in the real world would make it approximately the size of a skyscraper or cruise ship.
This discussion has been archived. No new comments can be posted.

This 8-bit Processor Built in Minecraft Can Run Its Own Games

Comments Filter:
  • Someone clearly had too much time on their hands :).

    My only quibble is having a hardware call stack. I wonder how often one needs more than a 31-call deep return stack. I don't know how often a small program would need that. It also seems you need a second stack for parameters and locals so you might as well put the return pointer there too.

    • Re:Wow. Impressive. (Score:5, Interesting)

      by crow ( 16139 ) on Monday December 20, 2021 @12:01PM (#62099791) Homepage Journal

      The 6502 used page 1 of memory as the stack (addresses 256--511), and had no user control. That system addressed 64K of RAM, far more than this processor, so the stack size seems reasonable.

    • Unless you want to in-line almost everything in the code you'll want a stack and it's going to be a power of two unless there's some really weird design choices being made. Maybe they could have gotten away with half the size or decided that doubling it again wasn't practical.
      • Unless you want to in-line almost everything in the code you'll want a stack and it's going to be a power of two unless there's some really weird design choices being made. Maybe they could have gotten away with half the size or decided that doubling it again wasn't practical.

        If it's just a return pointer stack in hardware, I don't see why it needs to be power-of-two deep. You don't need to address the registers so each just needs to be able to copy to/from it's neighbors. You could make that as deep as you have room. If you do want to address RPs, then yeah, it makes sense to make it a power of two so you're not wasting address bits. OTOH, that stack seemed pretty huge so maybe you can address 64 registers but only implement 40 of them.

        In some cases, inlining doesn't help. If c

    • Re:Wow. Impressive. (Score:5, Interesting)

      by Kisai ( 213879 ) on Monday December 20, 2021 @01:00PM (#62099951)

      You're over thinking it. What Minecraft players are essentially doing is creating a babbages's difference engine at a scale that works inside minecraft.

      Or in other words, it's not a replica of a "silicon transistor cpu" but a "replica of a mechanical cpu that simulates a digital one"

      So it's basically two orders of simulation. One because the game logic doesn't actually contain all the gates necessary to produce a complex cpu, and has a fixed clock, and you can only make something so big before the "server" starts culling things. Two, the blocks represent physical things, wires and switches, not digital things.

      Minecraft is really not the thing you want to build a cpu inside, but because it is what it is, minecraft's creative mode does give you access to enough tools to create a primative transistor. Look up "Redstone computer"

      "However, in Minecraft, they are extremely slow and with their large size, redstone computers are difficult to find practical applications for. Even the fastest redstone computers take seconds to complete one calculation and take up a few thousand blocks of space. Command blocks are far superior to computers in Minecraft because of their speed and legible, higher-level commands."
      https://minecraft.fandom.com/wiki/Tutorials/Redstone_computers

    • It also seems you need a second stack for parameters and locals so you might as well put the return pointer there too.

      Two stacks are a typical feature of FORTH processors. With two stacks you can pass data between multiple subroutines without having to cut around return pointers or call frames. Both the input and output of a function is the data stack. Unlike a more traditional register based CPU which typically uses a register for return, even if it places a call's input parameters on the stack. As a bonus, you can use the return stack as temporary storage to reorder the data stack.

  • Been there (Score:4, Interesting)

    by monkeyxpress ( 4016725 ) on Monday December 20, 2021 @11:58AM (#62099773)

    We had this in the early 2000s during the Java-everything craze. People would write a microcontroller simulator in Java running on the latest x86 machine. The thing would literally run as slow as a real 8-bit 16MHz Z80 on the latest Pentium.

    At least it was kinda cool. The menu bar that took 5 seconds to render out each icon when you clicked or hovered was just plain annoying.

    • by NFN_NLN ( 633283 )

      > microcontroller simulator in Java
      > The thing would literally run as slow as a real 8-bit 16MHz Z80 on the latest Pentium.

      This story checks out.

    • by Dadoo ( 899435 )

      The thing would literally run as slow as a real 8-bit 16MHz Z80 on the latest Pentium

      I find that hard to believe. I wrote an emulator for a 6502-based machine, back in the early 90s. It ran about as fast as the original 6502 on a 386, even though it emulated every memory cycle. (It read 16-bit values as two operations, instead of combining them.)

      • You find it hard to believe that someone programmed something less efficiently than you might have? You aren't giving yourself much credit!
        • by Dadoo ( 899435 )

          You find it hard to believe that someone programmed something less efficiently than you might have?

          That's just it: I didn't program it efficiently. I hacked it together in a weekend and didn't optimize it, at all.

  • by jd ( 1658 ) <imipakNO@SPAMyahoo.com> on Monday December 20, 2021 @12:01PM (#62099787) Homepage Journal

    You can port ZX80 games to it.

  • Here's (turing complete) conway's game of life playing itself on a larger scale: https://www.youtube.com/watch?... [youtube.com]

    • Now make it in Minecraft
    • GOL did this long before and there are countless examples of it doing it for different architectures.

      What the example of Minecraft illustrates is in a way paying homage to it. Showing the beauty of more complex games still seeking to be Turing complete and how nerds can build some funny stuff in such games.

      Conway's Game of Life is so beautifully simplistic it will always be the classic reference for this kind of recursive simulation showing the power of being Turing complete.

  • by MooseTick ( 895855 ) on Monday December 20, 2021 @12:13PM (#62099827) Homepage

    You know someone sooner or later is going to build a functioning computer within Minecraft that can play Minecraft.

    Maybe the universe is not moving towards max entropy, but is actually trying to achieve max recursion.

    • There is that GOL implementation that simulates a Gameboy playing Tetris. The classic quote from it's discussion is that if our existence is a simulation, this is exactly what would get someone to powered down our instance.

      Someone can likely do the calculations but even with the relative low graphic quality of Minecraft, I have a feeling a single scene's rendering would take months if not years in a Minecraft simulation of the CPU game Minecraft on a decent machine. Remember none of this is really getting s

    • Yes, we need a stack of Minecraft interpreters so that we can determine the eigenratio [blogspot.com] of Minecraft.

  • We knew that minecraft was Turing complete -- why is this a surprise?

    What's amazing is that jbig decompression can be made turing complete. What else is lurking in our systems that can be used this way? Probably more than we think.

    • by Tablizer ( 95088 )

      I suspect our universe is an emulation; we are an ant-farm on steroids. God may be an Asperger neckbeard; that's why we have to sing hymns him to kiss his ass so that he doesn't delete us. More likely God(s) is a giant 5D slug with 9 eyes, 4 dicks, and 6 vaginas.

      Perhaps we should rework our hymns:

      "You are the greatest of slugs, so many wonderous eyes, and more genitals than we lowly humans could ever dream of, oh great sluggy slug, oh great sluggy slug, Sluggalleluiah! Sluggalleluiah!"

    • by truedfx ( 802492 )
      It doesn't need to be a surprise to be impressive. We knew this was possible, it's still amazing that someone actually does it.
    • We knew that minecraft was Turing complete -- why is this a surprise?

      It's not a surprise that it's possible. It's a surprise that it was done and to what extent.

  • How would Minecraft emulating Minecraft work? Do we live in a simulation?
  • universal simulators all the way down.

  • by sjames ( 1099 ) on Monday December 20, 2021 @12:42PM (#62099913) Homepage Journal

    In the 19th century, Babbage tried to make a computer from mechanical parts. His thinking was good, but the materials and fabrication techniques of the time weren't really up to it.

    Years later, computers actually came into being using various tubes and electro-mechanical components. Eventually this lead to computers built in semi-conductors which eventually became small and cheap. Then big enough to simulate a physical world. In that world they have built a mechanical computer that actually works thanks to simplified and idealized physics.

  • ooh the power of redstone
  • While very impressive, I'd say it's more a demonstration of a CPU's architecture, its complexity, how many low-level elements are needed to build a high(er) level construct, etc. Very educational in its own right. But apart from that, the 'physics' it builds on, are those of the Minecraft virtual world it's constructed inside of. That is: implicit / effectively invisible. Only the effects of those 'physics' is visible.

    For a "physics demonstration", I would think more along the lines of a mechan

  • I was really impressed (and terrified) at how the NSO Group's zero-click iOS compromise used an embedded virtual processor similar to what was achieved here in Minecraft. Evidently virtualization is all the rage these days. Who knew? https://googleprojectzero.blog... [blogspot.com]
  • That the Minecraft engine is this flexible is quite interesting in and of itself. While I kind of echo the sentiments that it seems some people have too much time on their hands, there are plenty of worse things they could be wasting that time doing.

  • minecraft to be banned for apple store in ??

  • The largest and most complex simulation of an 8 bit processor running at 1 Hz inside a stupid game.
    Or for a reality check have a look at a 16 bit J1, not a game

    • Its large and complex because you have to manually build the clocks and instruction decoder/state machine. You can't just type verilog and push out blocks:P No disrepect to J1 (I use it as well), just that stack machines are hard to build with minimal chips.
  • by stevenm86 ( 780116 ) on Monday December 20, 2021 @04:55PM (#62100801)
    A CPU in Minecraft can play "some" genes, but there exists a CPU built in Factorio that will, in fact, play Factorio FOR YOU. Granted, that game allows a ton of in-game logic-based control of most units. Still though.
  • by catmistake ( 814204 ) on Monday December 20, 2021 @08:08PM (#62101277) Journal

    The project is an incredible application of computer science in action,

    Computer scientists do not build computers. It's virtual computer engineering, not computer science, except for the modeling part, which I suppose is technically computer science, but that's not what the author of the article meant. Processor design is not computer science. Neither is programming. CS is math, so if it isn't math, it isn't CS.

Adding features does not necessarily increase functionality -- it just makes the manuals thicker.

Working...