Convert Figma logo to code with AI

s-macke logojor1k

Online OR1K Emulator running Linux

1,728
196
1,728
50

Top Related Projects

1,228

Software Automatic Mouth - Tiny Speech Synthesizer

Terrain rendering algorithm in less than 20 lines of code

Quick Overview

JOR1K is an OpenRISC 1000 emulator written in JavaScript. It allows users to run a Linux-based operating system directly in their web browser, providing a complete virtual machine environment with networking capabilities and graphical output.

Pros

  • Runs entirely in the browser, requiring no installation or setup
  • Supports a full Linux environment, including networking and graphical applications
  • Provides an educational tool for learning about operating systems and computer architecture
  • Open-source project with active development and community support

Cons

  • Performance may be limited compared to native emulators or virtual machines
  • Compatibility issues may arise with certain browsers or devices
  • Limited to the OpenRISC architecture, which is not as widely used as x86 or ARM
  • May require significant bandwidth for initial loading of the disk image

Getting Started

To run JOR1K in your web browser:

  1. Visit the JOR1K demo page: https://s-macke.github.io/jor1k/demos/main.html
  2. Wait for the emulator to load and boot the Linux system
  3. Use the terminal window to interact with the emulated system
  4. Explore additional features like networking and graphical applications

To embed JOR1K in your own web page:

<script src="https://s-macke.github.io/jor1k/bin/jor1k-master-min.js"></script>
<script>
var jor1kparameters = {
    system: {
        kernelURL: "vmlinux.bin",
        memorysize: 32,
        cpu: "asm",
        ncores: 1
    },
    fs: {
        basefsURL: "basefs.json"
    }
};
var jor1k = new jor1kGUI("screen", "tty", jor1kparameters);
</script>

For more advanced usage and configuration options, refer to the project's documentation on GitHub.

Competitor Comparisons

1,228

Software Automatic Mouth - Tiny Speech Synthesizer

Pros of SAM

  • Simpler and more focused project, specifically for simulating a software automatic mouth
  • Potentially easier to understand and contribute to for those interested in speech synthesis
  • Smaller codebase, making it more manageable for quick experimentation

Cons of SAM

  • Less versatile compared to jor1k, which emulates an entire operating system
  • Limited to speech synthesis functionality, while jor1k offers a broader range of applications
  • May have fewer contributors and less active development due to its niche focus

Code Comparison

SAM (speech synthesis focus):

void SetMouthThroat(unsigned char mouth, unsigned char throat)
{
    unsigned char initialFrequency = 0;
    unsigned char newFrequency = 0;
    // ... (code for setting mouth and throat parameters)
}

jor1k (system emulation focus):

CPU.prototype.Step = function() {
    var ins = this.GetInstruction(this.pc);
    this.pc += 4;
    this.DelayedPCUpdate();
    this.ins_count++;
    // ... (code for executing CPU instructions)
};

The code snippets highlight the different focuses of the projects, with SAM dealing with speech synthesis parameters and jor1k handling CPU emulation.

Terrain rendering algorithm in less than 20 lines of code

Pros of VoxelSpace

  • Lightweight and focused on a specific rendering technique
  • Easier to understand and implement for beginners
  • Faster performance due to simpler graphics rendering

Cons of VoxelSpace

  • Limited functionality compared to jor1k's full system emulation
  • Less versatile for general-purpose computing tasks
  • Narrower scope of application

Code Comparison

VoxelSpace (main rendering loop):

function RenderScene() {
    var screendata = ctx.getImageData(0, 0, canvas.width, canvas.height);
    Render(screendata.data);
    ctx.putImageData(screendata, 0, 0);
}

jor1k (main emulation loop):

MainLoop: function() {
    if (!this.stop) {
        this.cpu.Step(this.steps);
        this.ips += this.steps;
        if (this.terminal) this.terminal.UpdateScreen();
    }
    window.setTimeout(this.MainLoop.bind(this), 1);
}

The code snippets highlight the difference in focus between the two projects. VoxelSpace concentrates on rendering graphics, while jor1k emulates a complete system with CPU operations and terminal updates.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

jor1k

jor1k

jor1k is a OpenRISC 1000 emulator written in JavaScript running Linux. It runs in almost any modern web browser. Have a try and see if it runs in your browser by opening the demo. More information can be found on the Wiki pages.

Demos

Project Links

  • Bugtracker to report any issues or feature requests
  • Wiki containing more detailed descriptions

LICENSE

  • The program is distributed under the terms of the Simplified BSD License. The license details can be found in the file "LICENSE.md"
  • The ACE editor is BSD licensed.

Developer

Sebastian Macke simulationcorner.net

Contributors

Gerard Braad github.com/gbraad
Ben Burns github.com/benjamincburns
Lawrence Angrave github.com/angrave
Neelabh Gupta github.com/neelabhg