5 ms·
Pretty cool. The program itself was written in an existing intermediate language called URCL, which was then compiled to CHUNGUS2 assembly. CHUNGUS2 is the pro
by Comevius 4y ago
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/sammyuri/minecraft
https://github.com/MCHPR/MCHPRS 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 https://www.youtube.com/watch?v=FDiapbD0Xfg
- acchow 4y ago> 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?
- lifthrasiir 4y agoTo 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.
- mort96 4y agoThe 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.
- zamalek 4y ago> not necessary for the use-case of running CPUs fast. Unless your CPU is esoteric enough for mob mechanics or otherwise to be useful :).
- deleted 4y ago[deleted]
- circuit10 4y agoBecause they're simulating redstone circuits and logic gates, not the instruction set itself (the point is that they built a CPU with redstone circuits)
- causality0 4y agoWith 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".
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- __alexs 4y agoYes 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.
- spicybright 4y agoSeems 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.
- postalrat 4y agoAlmost like running a game in a NES emulator at 10,000x speed and claiming it's implemented exactly like the NES.
- kibwen 4y agoIf 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.
- samstave 4y agoPlease ELI5 how people are able to make a CPU/anything-logic-gate etc inminecraft
- nsilvestri 4y agoMinecraft 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.
- samstave 4y agoTank you for explaining how stupid I am <3
- vanderZwan 4y agoI wouldn't consider being uninformed and taking the initiative to fix that stupid.
- joshspankit 4y agoInexperience is not stupidity. I will die on that hill.
- joshspankit 4y agoYou might be an excellent person to ask: How many layers of abstraction is that in total, including (probable virtualization > VM OS > JVM)?