jor1k icon indicating copy to clipboard operation
jor1k copied to clipboard

3D rendering support (edited from: Can it run Minecraft?)

Open Alex-A137 opened this issue 2 years ago • 4 comments

can it run minecraft

Alex-A137 avatar Apr 29 '22 21:04 Alex-A137

i cant install java it says ./java: cannot execute binary file: Exec format error :(((((((((( i really want to play minecraft on this((

iocmet avatar May 15 '22 23:05 iocmet

I think it's possible, but it would take a large, large amount of work. The official game would definitely be a struggle too, as it likely would need OpenGL or Vulkan. Jor1k doesn't have any kind of emulated GPU support, so they'd need to be set up with a software rendering pipeline that writes to the framebuffer device.

If anyone would actually want to take this on, you'd want to start off by getting an OR1K toolchain running in a proper dev environment. You'll then want to go through and test each dependency one-by-one until the whole thing works.

If you wanted decent graphics support, you'd probably also want to look into writing a custom mesa driver that could render to WebGL.

Alternatively, you could also try hacking together a WASM build of the LLVMPipe driver. That code would run natively in the browser, so there'd be no emulation overhead, but it'd still be software rendering. You'd of course still need to add a custom device and mesa driver shim to jor1k however, so that processes within jor1k had some way to communicate with it.

You could also try LLVMPipe within jor1k, but you'd need to build your own OR1K-hosted llvm, which is likely going to be a challenge all to itself, as I don't know if there are any well-maintained OR1K LLVM backend implementations. You might try searching forks of skristiansson/llvm-or1k to see if you can find one.

Suffice to say, it'd be a lot of work. You'd probably have more success and less frustration with a minimal minecraft clone that can run as a statically-linked build w/ its own software rasterization.

benjamincburns avatar May 16 '22 01:05 benjamincburns

Btw my comment from 2022 is joke

iocmet avatar Feb 22 '23 04:02 iocmet

FWIW, I understood that to be the case, but having 3D acceleration via mesa and co has been something I've thought about for a while. I figured it was worth writing it up in case it piques someone's interest. As I understand it, something piquing someone's interest has been the primary driver behind pretty much every major development on this project.

benjamincburns avatar Feb 27 '23 06:02 benjamincburns