Giter Site home page Giter Site logo

jorconsole's Introduction

JorConsole

About

JorConsole provides a standard console IO to the JOR1K emulator. It provides a working JOR1K emulator running on a local system, using local IO, instead of running in a web browser.

It requires no native node modules, so can be run on systems without a native compiler. Networking support does require a native node module, but this is an optional dependency.

This is the modern implementation, using the current jor1k sources - this includes bugfixes, placing the worker on a separate thread, networking support, and a 9p filesystem.

Running

Ensure your npm modules are installed:

npm install

Please also ensure you have updated your submodules, as the path used for jor1k-sysroot has been updated to a personal fork with more features. This fork includes all of the games and utilities (compilers, etc) for Jor1K.

Run the emulator using:

node index

For network support:

node index -n

Exit the emulator by pressing CTRL+X X, that is CTRL and X, then X again.

Using a local websocket proxy

By default, the websocket proxy at relay.widgetry.org is used. However, you can install Benjamincburn's Docker container and use that for local network and internet access.

To get started quickly with it:

docker run --privileged -p 8080:80 --name relay benjamincburns/jor1k-relay:latest

To start the container at a later date:

docker start relay

To run JorConsole with your local relay:

node index.js --network --relay=http://localhost:8080/

For more information, see the file localnet.sh.

What works

This version, based upon the latest jor1k, currently boots to the shell and waits for input. It can run any programs compiled for OR1K.

Networking support is available, provided you can build the optional dependency websockets - if not available the emulator will continue without networking support. This means that the only feature that requires a native node module is networking.

The asm OR1K engine (default) includes proper timing and will sleep when idle, providing the best emulation experience. The safe engine (selectable in index.js) will always consume 100% cpu, but may be more stable than the asm engine.

Typically however, the asm engine is perfectly stable.

What does not work

  • Framebuffer
  • SMP and RISCV processors
  • Sound
  • Saving files locally (though you can scp files)

Useful Key Combinations

The emulator is controlled by a special key combination, CTRL+X then a special key. For example, pressing CTRL and X at the same time, then X.

Below are the available key sequences. Take note of the exit command, as pressing CTRL+C will not exit the emulator.

  • Press CTRL+X X to exit the emulator

  • Press CTRL+X P to print out the CPU state

  • Press CTRL+X I to enable an instructions-per-second counter

  • CTRL+C will not exit the emulator, as it is useful in linux applications.

  • CTRL+C should be captured by the emulator, but under Cygwin it quits the program

Feature planning

The order of features is intended to be:

  • Optional extras:
    • Implement a Framebuffer device using node-canvas
    • Saving and loading virtual machine state
    • Local filesystem / loop filesystem via 9p
    • Extend abilities of filesystem loader
      • Remove requirement for fs.json
  • SMP and RISCV processors
  • Sound
  • Fix input on Windows or non-TTY devices

jorconsole's People

Contributors

andrakis avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

jorconsole's Issues

Network support

Hi, @andrakis

I'm playing with jorconsole and I think it's really cool project.

Currently the network isn't working for me. It says "No lease, failing". Could you guide me on how to fix it please?

And, I'm not quite sure if I understand jorconsole right. Does jorconsole compile code faster than normal jor1k in browser?

What I've been dreaming about is to see jor1k supports golang program, but currently there's no golang port for openrisc yet. So I'm thinking, if jorconsole compiles faster, maybe I could use it to build golang for jor1k myself?

Sorry if the questions sound stupid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.