Hacker News new | past | comments | ask | show | jobs | submit login

Pretty cool.

The program itself was written in an existing intermediate language called URCL, which was then compiled to CHUNGUS2 assembly. CHUNGUS2 is the processor made with Minecraft's redstone mechanics. The processor was emulated for development, but the demo is running on MCHPRS, a Minecraft server that uses Wasmtime's Cranelift to JIT the redstone operations, which are represented as a weighted directed graph. Before MCHPRS, optimizing redstone performance using compiler techniques was not thought to be possible. With MCHPRS the demo takes 9 hours to run, it would take decades using Minecraft.

https://github.com/sammyuri/minecraft

https://github.com/MCHPR/MCHPRS

As for CHUNGUS2 itself, it's a proper RISC processor, it has a 4-stage instruction pipeline, 64 byte 8-way associative data cache, even branch prediction.

https://www.youtube.com/watch?v=FDiapbD0Xfg




With MCHPRS the demo takes 9 hours to run, it would take decades using Minecraft.

Ok, to clarify, is MCHPRS a functioning Minecraft Server that can support a player logging in and mining? This story is seeming a lot more like "A 1Hz CPU made on something that has mechanical similarities to Minecraft".


Seems like splitting hairs. The redstone mechanics needed to run the computer are implemented exactly the same as the real game. The computer can be loaded into real minecraft and runs as expected.

MCHPRS just takes out what the computer doesn't use and optimizes the simulation of it.

I would call that a computer running in minecraft, but you could argue either way.


this may be a stupid question:

is it CPU or GPU dependent,

Can it be "sharded" and run on multiple machines in cloud?


There are no stupid questions ;)

To my understanding, this is almost a pure CPU task, like how normal minecraft currently works. Which would actually make sharding a little easier if they implemented it (sounds like they haven't).

The GPU is an interesting point though. There's probably a ton of simple matrix multiplying in the machine's design that could benefit from a GPU.


Imagine a “meta” compute environment that only runs embedded with Minecraft built circuits like this - someone needs to craft a crypto-mining circuit within Minecraft :-)


There are no stupid questions? I’ve seen a grown man ask a pregnant teenager whether she was the mother.


Almost like running a game in a NES emulator at 10,000x speed and claiming it's implemented exactly like the NES.


If the NES game in question ran at 18 hours per frame on real hardware, then I think people would give it a pass. This project is beyond awesome, we can spare it the usual HN nitpicks.


The project is awesome. These comments (include mine) need correction.


Not quite. Almost all NES emulators just emulate the inputs and outputs of the chips involved, they don't actually model the chip layout exactly. That's a limitation of emulating hardware in software for the most part. Without perfectly implementing the chips involved with all their associated timing and clocks there's no guarantee that some behavior might be slightly different.

When emulating software in software, it's much easier to confirm that the exact same operations are done, and you can in some cases fully verify the solution.


Yeah I would say that your example is implemented exactly like the NES.


Yes it is a real Minecraft server implementation you can connect a standard client to but it is not a vanilla survival implementation. It's a redstone sandbox.


Just for context if you've ever logged into a hosted multiplayer server it's almost guaranteed to not be the vanilla Minecraft server. The stock server falls down pretty quickly in multiplayer. Patched servers with various optimizations (like Paper, Spigot etc) are the standard and most people still consider that to be playing vanilla Minecraft, even if some mechanics are slightly tweaked (e.g. entity collapsing).


It's more like a more efficient implementation of Minecraft. It's not wrong or cheating, it's no worse than that one mod that did nothing but optimize the game engine better than the actual Devs.


> Before MCHPRS optimizing redstone performance using compiler techniques was not thought to be possible.

They created a virtual machine with a custom instruction set. Why wouldn't an optimized JIT work?


To my knowledge, MCHPRS is not a full Minecraft server implementation; it only contains just enough subset of the game to run redstone circuits. The upside is that this subset can be run a lot faster than the full game server.


The rest of the game remains unimplemented not because it couldn't be done, but just because it's a lot of work. World generation, mob logic, all the different crafting recipes, world generation, etc wouldn't impact the performance of the redstone system, but it's not necessary for the use-case of running CPUs fast.


> not necessary for the use-case of running CPUs fast.

Unless your CPU is esoteric enough for mob mechanics or otherwise to be useful :).


Because they're simulating redstone circuits and logic gates, not the instruction set itself (the point is that they built a CPU with redstone circuits)


You might be an excellent person to ask:

How many layers of abstraction is that in total, including (probable virtualization > VM OS > JVM)?


Please ELI5 how people are able to make a CPU/anything-logic-gate etc inminecraft


Minecraft has a feature called redstone. It's "dust" that you can pour on blocks to create wires. These wires can be powered from in-game items. Combining two or more of these powered wires with some spatial positioning can give you an OR gate. Some of these power sources can be turned off if they receive power themselves. Those are NOT gates. With an OR and a NOT gate, the world's your oyster.


Tank you for explaining how stupid I am <3


I wouldn't consider being uninformed and taking the initiative to fix that stupid.


Inexperience is not stupidity.

I will die on that hill.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: