mirror of
https://github.com/bdnugget/jor1k.git
synced 2026-11-07 04:27:27 +00:00
Seperate files and added build script
This commit is contained in:
1 parent
0730dc111d
commit
04bc31aae6
5 files changed
+180
-111
No files matched your search
@@ -0,0 +1,3 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.8
|
||||
@@ -0,0 +1,41 @@
|
||||
/*global module:false*/
|
||||
module.exports = function(grunt) {
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
lint: {
|
||||
files: ['grunt.js', 'js/**/*.js', 'test/**/*.js']
|
||||
},
|
||||
qunit: {
|
||||
files: ['test/**/*.html']
|
||||
},
|
||||
watch: {
|
||||
files: '<config:lint.files>',
|
||||
tasks: 'lint qunit'
|
||||
},
|
||||
jshint: {
|
||||
options: {
|
||||
curly: true,
|
||||
eqeqeq: true,
|
||||
immed: true,
|
||||
latedef: true,
|
||||
newcap: true,
|
||||
noarg: true,
|
||||
sub: true,
|
||||
undef: true,
|
||||
boss: true,
|
||||
eqnull: true,
|
||||
browser: true
|
||||
},
|
||||
globals: {
|
||||
jQuery: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('default', 'lint qunit');
|
||||
|
||||
// Travis CI task.
|
||||
grunt.registerTask('travis', 'lint qunit');
|
||||
};
|
||||
Executable
+102
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>jor1k: OR1000 Javascript Emulator Running Linux</title>
|
||||
<meta name="keywords" content="opencore, emulation, or1000, javascript, linux">
|
||||
<meta name="author" content="Sebastian Macke">
|
||||
<style>
|
||||
.term {
|
||||
font-family: courier,fixed,swiss,monospace,sans-serif;
|
||||
font-size: 12px;
|
||||
color: #bbbbbb;
|
||||
background: #000000;
|
||||
border-collapse: collapse
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jor1k: OR1000 Javascript Emulator Running Linux</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table id="Terminal" class="term" border="0" title="tty0"></table>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<canvas id="canvas1" width="320", height="240" title="fb0"></canvas>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="Debug">
|
||||
</table>
|
||||
|
||||
<div id="infobox">
|
||||
<h3>Specifications</h3>
|
||||
<p>
|
||||
<ul>
|
||||
<li>32-Bit OR1000 Emulator with MMU, TICK counter and PIC (Hack for TLB Hardware Refill)</li>
|
||||
<li>32 MB Ram</li>
|
||||
<li>UART 16550</li>
|
||||
<li>ocfb Framebuffer 320x240 32bpp</li>
|
||||
<li>Terminal Emulator</li>
|
||||
<li>5 MB image running Linux 3.1 and buszbox 1.19 (and much more)</li>
|
||||
<li><b>Only 2300 lines of Javascript code! </b></li>
|
||||
<li>Tested under Firefox and Chrome</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<h3>Explore the Emulator</h3>
|
||||
<p>
|
||||
First wait until the operating system finished booting. Then press enter.
|
||||
</p>
|
||||
|
||||
<h3>Get information about the system</h3>
|
||||
<p>
|
||||
Information about the running system<br>can be achieved by the /proc filesystem.<br>
|
||||
<b>cat /proc/cpuinfo</b><br> shows the details about the cpu.<br>
|
||||
<b>cat /proc/meminfo</b><br> shows the details about the memory.<br>
|
||||
<b>top</b> shows all running processes. Stop this program by pressing q.<br>
|
||||
</p>
|
||||
|
||||
<h3>Fun with the framebuffer</h3>
|
||||
<p>
|
||||
First try to find out the details about the framebuffer by the software <b>fbset</b><br>
|
||||
There is a graphic demo demo available called <b>fbinfo</b>. Close the program by pressing CTRL+c .<br>
|
||||
You can fill the buffer manually with random data by executing <br><b>dd if=/dev/urandom of=/dev/fb0</b><br>
|
||||
</p>
|
||||
|
||||
<h3>Play games</h3>
|
||||
<p>
|
||||
Games are available. Try<br>
|
||||
<ul>
|
||||
<li><b>hanoi</b></li>
|
||||
<li><b>bs</b></li>
|
||||
<li><b>knight</b></li>
|
||||
</ul>
|
||||
Close the program by pressing CTRL+c <br>
|
||||
</p>
|
||||
|
||||
<h3>Screensaver worm</h3>
|
||||
<p>
|
||||
Enter <b>worm</b><br> and watch a few worms travelling on your screen.
|
||||
Close the program by pressing CTRL+c <br>
|
||||
</p>
|
||||
|
||||
<h3>Use the arbitrary precision calculator</h3>
|
||||
<p>
|
||||
By executing <b>bc -l</b> you can open a calculator.<br>
|
||||
<b>2^1000</b> to calculate a big power or <br>
|
||||
<b>4.*a(1)</b> to calculate Pi.<br>
|
||||
</p>
|
||||
|
||||
<h3>Destroy the system</h3>
|
||||
<p>
|
||||
Ever wanted to see what happens if you execute <b>rm / -r -f</b><br>Try it now. It's safe.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script src="js/jor1k.js"></script>
|
||||
</html>
|
||||
Executable → Regular
+1
-111
@@ -1,64 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>jor1k: OR1000 Javascript Emulator Running Linux</title>
|
||||
<meta name="keywords" content="opencore, emulation, or1000, javascript, linux">
|
||||
<meta name="author" content="Sebastian Macke" >
|
||||
|
||||
<style>
|
||||
.term {
|
||||
font-family: courier,fixed,swiss,monospace,sans-serif;
|
||||
font-size: 12px;
|
||||
color: #bbbbbb;
|
||||
background: #000000;
|
||||
border-collapse: collapse
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table id="Terminal" class="term" border="0"></table>
|
||||
</td>
|
||||
<td valign="top" style="border:medium solid black">
|
||||
Framebuffer (0.5s refresh):<br>
|
||||
<canvas id="canvas1" width="320", height="240"></canvas>
|
||||
<br>
|
||||
<form>
|
||||
<select id="selectbox" onchange="OnSelect();">
|
||||
<option>Explore the Emulator</option>
|
||||
<option>Get information about the system</option>
|
||||
<option>Fun with the framebuffer</option>
|
||||
<option>Play games</option>
|
||||
<option>Screensaver worm</option>
|
||||
<option>Use the arbitrary precision calculator</option>
|
||||
<option>Destroy the system</option>
|
||||
</select>
|
||||
<div style="width:320px" id="infobox">
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a href="/index.php?page=jor1k"> Back to my website </a> - Written by Sebastian Macke - Tested under Firefox and Chrome
|
||||
|
||||
<table id="Debug">
|
||||
</table>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
"use strict"
|
||||
|
||||
// -------------------------------------------------
|
||||
// --------------- Terminal Emulator ---------------
|
||||
// -------------------------------------------------
|
||||
|
||||
var Colors = new Array( "000000", "BB0000", "00BB00", "BBBB00",
|
||||
var Colors = new Array( "000000", "BB0000", "00BB00", "BBBB00",
|
||||
"0000BB", "BB00BB", "00BBBB", "BBBBBB",
|
||||
"555555", "FF5555", "55FF55", "FFFF55",
|
||||
"5555FF", "FF55FF", "55FFFF", "55FFFF");
|
||||
@@ -2379,59 +2325,3 @@ for (var i=0;i < str.length; i++) term.PutChar(str.charCodeAt(i));
|
||||
//LoadBinaryResource("trace"+ntrace+".dat", TraceFinish);
|
||||
LoadBinaryResource("vmlinux.bin", ImageFinished);
|
||||
|
||||
|
||||
function OnSelect()
|
||||
{
|
||||
var selectbox = document.getElementById("selectbox");
|
||||
var infobox = document.getElementById("infobox");
|
||||
//var selectedValue = selectbox.options[selectbox.selectedIndex].value;
|
||||
var str = "";
|
||||
switch(selectbox.selectedIndex)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
str += "Don't know what to do? <br>Try this list of options.";
|
||||
str += " But first wait until the operating system<br> finished booting.";
|
||||
str += " Then press enter.";
|
||||
break;
|
||||
|
||||
case 1:
|
||||
str += "Information about the running system<br>can be achieved by the /proc filesystem.<br>";
|
||||
str += "<b>cat /proc/cpuinfo</b><br> shows the details about the cpu.<br>";
|
||||
str += "<b>cat /proc/meminfo</b><br> shows the details about the memory.<br>";
|
||||
str += "<b>top</b> shows all running processes. Stop this program by pressing q.<br>";
|
||||
break;
|
||||
case 2:
|
||||
str += "First try to find out the details about the framebuffer by the software <b>fbset</b><br>";
|
||||
str += "There is a graphic demo demo available called <b>fbinfo</b>. Close the program by pressing CTRL+c .<br>";
|
||||
str += "You can fill the buffer manually with random data by executing <br><b>dd if=/dev/urandom of=/dev/fb0</b><br>";
|
||||
break;
|
||||
case 3:
|
||||
str += "Games are available. Try<br><b>hanoi<br>bs<br>knight</b><br>";
|
||||
str += "Close the program by pressing CTRL+c <br>";
|
||||
break;
|
||||
case 4:
|
||||
str += "Enter <b>worm</b><br> and watch a few worms travelling on your screen.";
|
||||
str += "Close the program by pressing CTRL+c <br>";
|
||||
break;
|
||||
case 5:
|
||||
str += "By executing <b>bc -l</b> you can open a calculator.<br>";
|
||||
str += "Try <b>2^1000</b> to calculate a big power or <br>";
|
||||
str += "<b>4.*a(1)</b> to calculate Pi.<br>";
|
||||
break;
|
||||
case 6:
|
||||
str += "Ever wanted to see what happens if you execute <b>rm / -r -f</b><br>Try it now. It's safe.";
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
infobox.innerHTML = str;
|
||||
}
|
||||
OnSelect();
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "jor1k",
|
||||
"version": "0.0.1",
|
||||
"description": "jor1k: OR1000 Javascript Emulator Running Linux",
|
||||
"contributors": [
|
||||
{ "name": "Sebastian Macke", "email": "sebastian@macke.de" },
|
||||
{ "name": "Gerard Braad", "email": "me@gbraad.nl" }
|
||||
],
|
||||
"keywords": [
|
||||
"or1k",
|
||||
"emulation"
|
||||
],
|
||||
"author": "Sebastian Macke",
|
||||
"license": "",
|
||||
"bugs": {
|
||||
"url": "https://github.com/s-macke/jor1k/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/s-macke/jor1k.git"
|
||||
},
|
||||
"main": "index.html",
|
||||
"dependencies": {
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.3.8",
|
||||
"jshint": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt travis --verbose"
|
||||
},
|
||||
"engines": { "node": ">= 0.8.0" }
|
||||
}
|
||||
Reference in new issue
Block a user