Clarified licensing information subject to the received permission of Fabrice Bellard to post this derivative work online.
This commit is contained in:
parent
e7b0f1b321
commit
3bf3d7322a
5
CMOS.js
5
CMOS.js
@ -1,5 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
Fabrix - An annotated version of the original JSLinux which is Copyright (c) 2011 Fabrice Bellard
|
JSLinux-deobfuscated - An annotated version of the original JSLinux.
|
||||||
|
|
||||||
|
Original is Copyright (c) 2011-2012 Fabrice Bellard
|
||||||
|
Redistribution or commercial use is prohibited without the author's permission.
|
||||||
|
|
||||||
Clock Emulator
|
Clock Emulator
|
||||||
*/
|
*/
|
||||||
|
5
KBD.js
5
KBD.js
@ -1,5 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
Fabrix - An annotated version of the original JSLinux which is Copyright (c) 2011 Fabrice Bellard
|
JSLinux-deobfuscated - An annotated version of the original JSLinux.
|
||||||
|
|
||||||
|
Original is Copyright (c) 2011-2012 Fabrice Bellard
|
||||||
|
Redistribution or commercial use is prohibited without the author's permission.
|
||||||
|
|
||||||
Keyboard Device Emulator
|
Keyboard Device Emulator
|
||||||
*/
|
*/
|
||||||
|
4
LICENSE
Normal file
4
LICENSE
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
This is a derivative work of JSLinux and is posted here with permission of the author.
|
||||||
|
|
||||||
|
JSLinux is Copyright (c) 2011-2013 Fabrice Bellard
|
||||||
|
Redistribution or commercial use is prohibited without the author's permission.
|
@ -1,5 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
Fabrix - An annotated version of the original JSLinux which is Copyright (c) 2011 Fabrice Bellard
|
JSLinux-deobfuscated - An annotated version of the original JSLinux.
|
||||||
|
|
||||||
|
Original is Copyright (c) 2011-2012 Fabrice Bellard
|
||||||
|
Redistribution or commercial use is prohibited without the author's permission.
|
||||||
|
|
||||||
Main PC Emulator Routine
|
Main PC Emulator Routine
|
||||||
*/
|
*/
|
||||||
|
5
PIC.js
5
PIC.js
@ -1,5 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
Fabrix - An annotated version of the original JSLinux which is Copyright (c) 2011 Fabrice Bellard
|
JSLinux-deobfuscated - An annotated version of the original JSLinux.
|
||||||
|
|
||||||
|
Original is Copyright (c) 2011-2012 Fabrice Bellard
|
||||||
|
Redistribution or commercial use is prohibited without the author's permission.
|
||||||
|
|
||||||
8259 PIC (Programmable Interrupt Controller) Emulation Code
|
8259 PIC (Programmable Interrupt Controller) Emulation Code
|
||||||
*/
|
*/
|
||||||
|
7
PIT.js
7
PIT.js
@ -1,7 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
Fabrix - An annotated version of the original JSLinux which is Copyright (c) 2011 Fabrice Bellard
|
JSLinux-deobfuscated - An annotated version of the original JSLinux.
|
||||||
|
|
||||||
PIT Emulator
|
Original is Copyright (c) 2011-2012 Fabrice Bellard
|
||||||
|
Redistribution or commercial use is prohibited without the author's permission.
|
||||||
|
|
||||||
|
8254 Programmble Interrupt Timer Emulator
|
||||||
*/
|
*/
|
||||||
function PIT(PC, ah, bh) {
|
function PIT(PC, ah, bh) {
|
||||||
var s, i;
|
var s, i;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
Fabrix - An annotated version of the original JSLinux which is Copyright (c) 2011 Fabrice Bellard
|
JSLinux-deobfuscated - An annotated version of the original JSLinux.
|
||||||
|
|
||||||
|
Original is Copyright (c) 2011-2012 Fabrice Bellard
|
||||||
|
Redistribution or commercial use is prohibited without the author's permission.
|
||||||
|
|
||||||
Serial Controller Emulator
|
Serial Controller Emulator
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
Fabrix - An annotated version of the original JSLinux which is Copyright (c) 2011 Fabrice Bellard
|
JSLinux-deobfuscated - An annotated version of the original JSLinux.
|
||||||
|
|
||||||
|
Original is Copyright (c) 2011-2012 Fabrice Bellard
|
||||||
|
Redistribution or commercial use is prohibited without the author's permission.
|
||||||
|
|
||||||
Clipboard Device
|
Clipboard Device
|
||||||
*/
|
*/
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
Fabrix - An annotated version of the original JSLinux Copyright (c) 2011 Fabrice Bellard
|
JSLinux-deobfuscated - An annotated version of the original JSLinux.
|
||||||
==================================================================================================
|
|
||||||
|
Original is Copyright (c) 2011-2012 Fabrice Bellard
|
||||||
|
Redistribution or commercial use is prohibited without the author's permission.
|
||||||
|
|
||||||
A x86 CPU (circa 486 sans FPU) Emulator
|
A x86 CPU (circa 486 sans FPU) Emulator
|
||||||
|
======================================================================
|
||||||
|
|
||||||
Useful references:
|
Useful references:
|
||||||
======================================================================
|
======================================================================
|
||||||
|
20
readme.md
20
readme.md
@ -3,17 +3,14 @@ De-obfuscated JSLinux
|
|||||||
|
|
||||||
I wanted to understand how the amazing [JsLinux][1] worked.
|
I wanted to understand how the amazing [JsLinux][1] worked.
|
||||||
|
|
||||||
I have no idea if he passed it through a minifier or if the code was generated algorithmically from stuff in the QEMU codebase. In any case, it's hard to follow the action as presented originally, let alone extend it to do new tricks.
|
However the original was passed through a minifier and was completely incomprehensible in that form. (Mr Bellard's standards for the code that he open sources is very high.) I couldn't wait for the proper release of the opus, so in a fit of mania I hand de-obfuscated the codebase (primarily the core cpu-emulation
|
||||||
|
routines and a bit of the rest as well) while studying it over a few days' time.
|
||||||
I hand de-obfuscated the codebase (primarily the core cpu-emulation
|
|
||||||
routines and a bit of the rest as well) while studying it over a few
|
|
||||||
days' time.
|
|
||||||
|
|
||||||
In the off-chance someone else might be interested in this code as a
|
In the off-chance someone else might be interested in this code as a
|
||||||
basis for further weird in-browser x86 hacking I'm posting this
|
basis for further weird in-browser x86 hacking I'm posting this
|
||||||
redacted version of the code here.
|
redacted version of the code here, with permission of Mr. Bellard.
|
||||||
|
|
||||||
There is a much more complete, ground-up project to build a 386-style emulator in javascript called [jslm32][3].
|
Note that there is a much more readable, ground-up project to build an open-source 386-style emulator in javascript called [jslm32][3].
|
||||||
|
|
||||||
### Status
|
### Status
|
||||||
It's still a dense code base, it's an emulator of a rather
|
It's still a dense code base, it's an emulator of a rather
|
||||||
@ -22,6 +19,8 @@ near so incomprehensible as the original. Nearly all of the global variables
|
|||||||
and function names have been named somewhat sensibly. Many comments
|
and function names have been named somewhat sensibly. Many comments
|
||||||
have been added.
|
have been added.
|
||||||
|
|
||||||
|
It seems to run identically to the original.
|
||||||
|
|
||||||
The core opcode execution loop has been autocommented to indicate what
|
The core opcode execution loop has been autocommented to indicate what
|
||||||
instruction operation the opcode refers to.
|
instruction operation the opcode refers to.
|
||||||
|
|
||||||
@ -31,10 +30,9 @@ One mystery is, why does CPUID(1) return 8 << 8 in EBX? EBX[15:8] is now used to
|
|||||||
|
|
||||||
I highly recommend, by the way, the excellent [JSShaper][2] library for transforming large javascript code bases. The hacks I made from it are in this repo: a little symbol-name-transformer node.js script and an emacs function for doing this in live buffers.
|
I highly recommend, by the way, the excellent [JSShaper][2] library for transforming large javascript code bases. The hacks I made from it are in this repo: a little symbol-name-transformer node.js script and an emacs function for doing this in live buffers.
|
||||||
|
|
||||||
### Caveat Coder
|
### License
|
||||||
This is a pedagogical/aesthetic reinterpretation of the original
|
|
||||||
JSLinux code Copyright (c) 2011 Fabrice Bellard. It seems to run
|
This is a pedagogical/aesthetic derivative of the original JSLinux code Copyright (c) 2011-2013 Fabrice Bellard. It is posted here with permission of the original author subject to his original constraints : Redistribution or commercial use is prohibited without the (original) author's permission.
|
||||||
identically to the original.
|
|
||||||
|
|
||||||
### References
|
### References
|
||||||
Some other helpful references for understanding what's going on:
|
Some other helpful references for understanding what's going on:
|
||||||
|
Loading…
Reference in New Issue
Block a user