Skip to content

Commit

Permalink
tweak examples, some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
db48x committed Apr 13, 2015
1 parent 302c0b5 commit 4d5cb33
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 30 deletions.
11 changes: 5 additions & 6 deletions README.md
Expand Up @@ -4,9 +4,9 @@

Emularity (also called "The Emularity") is a loader designed to be used with a family of in-browser emulation systems. It is meant to ease the use of in-browser-based javascript emulation by handling housekeeping functions, making it easy to embed emulators in your website, blogs, intranet or local filesystem. The components of each aspect of the software being emulated (including the .js emulator, the program files, and operating system) can be pulled from local filesystems or through URLs.

Emularity downloads the files you specify (with a Progress screen that shows both emulator logos and what is being loaded), arranges them to form a filesystem, constructs the necessary arguments for the emulator, and handles transitions to and from full-screen mode.
Emularity downloads the files you specify (with a progress screen that shows both emulator logos and what is being loaded), arranges them to form a filesystem, constructs the necessary arguments for the emulator, and handles transitions to and from full-screen mode.

The Emularity system has been used by millions of users at the [Internet Archive](https://archive.org).
The Emularity system has been used by millions of users at the [Internet Archive](https://archive.org).

# The Emulators #

Expand All @@ -18,14 +18,13 @@ Currently works with two emulators:

## EM-DOSBox ##

[EM-DOSBox](https://github.com/dreamlayers/em-dosbox/) is a port of DosBox to Javascript. DOSBox emulates an IBM PC compatible running DOS. There are two versions of this emulator, dosbox.js (Standard EM-DOSBOX) and dosbox-sync.js (EM-DOSBOX with considerations for in-program execution of other programs).
[EM-DOSBox](https://github.com/dreamlayers/em-dosbox/) is a port of DosBox to Javascript. DOSBox emulates an IBM PC compatible running DOS. There are two versions of this emulator, dosbox.js (Standard EM-DOSBOX) and dosbox-sync.js (EM-DOSBOX with considerations for in-program execution of other programs).

# Known Bugs #

* documentation is quite poor
* the documentation is quite poor
* splash screen doesn't always fit inside the canvas
* need to improve the download progress indicators
* need to improve the download progress indicators (progress bar?)
* browser feature detection for volume/mute/full-screen
* handling of aspect ratios, and their interaction with full-screen mode
* finish API for volume/mute/full-screen requests

14 changes: 6 additions & 8 deletions TECHNICAL.md
Expand Up @@ -5,10 +5,8 @@ To use this project you'll need to provide it with a canvas element, styled as n
# Emulator API #

The `Emulator` constructor takes three arguments: a canvas element, an
optional callback (which will be called after fully initializing the
emulator but just before it starts running the emulated program), and
a config (as detailed below) or a function which returns a `Promise`
of a config.
optional set of callbacks, and a config (as detailed below) or a
function which returns a `Promise` of a config.

# Configuration #

Expand Down Expand Up @@ -54,7 +52,7 @@ keybindings needed to use the 2600.

### DOS game ###

Here we load the dosbox emulator, and a zip file containing the game
Here we load the DOSBox emulator, and a zip file containing the game
ZZT which we decompress and then mount as the C drive. We also tell
DosBox to immediately start running zzt.exe, which is inside the zip.

Expand All @@ -71,11 +69,11 @@ DosBox to immediately start running zzt.exe, which is inside the zip.
## Configuration API ##

Currently there are two supported emulators, JSMESS and
EM-DosBox. JSMESS provides emulation for arcade games, consoles, and
EM-DOSBox. JSMESS provides emulation for arcade games, consoles, and
early personal computers. As this emulator supports such a wide
variety of hardware it has been broken up into several dozen emulators
each supporting one machine lest the resulting javascript be
intractably large (60+ megabytes). EM-DosBox provides emulation for
intractably large (60+ megabytes). EM-DOSBox provides emulation for
software that runs on x86 PCs using the DOS operating systems common
to the era.

Expand Down Expand Up @@ -103,7 +101,7 @@ same constructor.
* `driver(driverName)`
* `extraArgs(args)`

### EM-DosBox ###
### EM-DOSBox ###

* `startExe(filename)`

Expand Down
6 changes: 3 additions & 3 deletions THEORY.md
Expand Up @@ -6,10 +6,10 @@ The Emularity is the capstone of multiple years of work by many individuals, bot

# In-Browser Emulation: The Approach #

For the current crop of in-browser emulators that Emularity loads, the process of creating them has been the same: take an existing, natively-coded emulator (MESS, MAME, DOSBOX) and, using the Emscripten compile took, convert the output to Javascript. The resulting javascript files, while much more obtuse and arcane, allow the larger development teams working on the original emulators to focus their attentions where they should be (making the most accurate and efficient browsers possible) and not where they shouldn't (hand-porting emulators to Javascript).
For the current crop of in-browser emulators that Emularity loads, the process of creating them has been the same: take an existing, natively-coded emulator (MESS, MAME, DOSBOX) and, using the Emscripten compiler tools, convert the output to Javascript. The resulting javascript files, while much more obtuse and arcane, allow the larger development teams working on the original emulators to focus their attentions where they should be (making the most accurate and efficient browsers possible) and not where they shouldn't (hand-porting emulators to Javascript).

The resulting javascript emulators (JSMESS, JSMAME, EM-DOSBOX) execute against a Canvas Element in a web page, and output their graphics and sound into the browser's audio/video environment.
The resulting javascript emulators (JSMESS, JSMAME, EM-DOSBOX) draw into a canvas element in a web page, and semd the audio created by the emulated program to the new HTML5 audio APIs.

# Why Even Do This? #

The reason for this series of coding acrobatics is to provide portability and universal access to historical computing/computer environments. The load of configuing the emulators, adding the software, and providing the resulting emulation is taken away from the end user, requiring only a browser (of which nearly every system has one installed) to emulate the given software.
The reason for this series of coding acrobatics is to provide portability and universal access to historical computing/computer environments. The load of configuing the emulators, adding the software, and providing the resulting emulation is taken away from the end user, requiring only a browser (nearly every system has one installed) to emulate the given software.
24 changes: 13 additions & 11 deletions example_arcade.html
@@ -1,19 +1,21 @@

<!-- The Emularity: An Example Arcade Machine Loader -->
<!-- For use with The Emularity, downloadable at http://www.emularity.com -->
<!-- For use with The Emularity, downloadable at http://www.emularity.com/ -->

<!-- For a collection of Arcade ROMs to download and test this script, visit http://mamedev.org/roms/ -->

<!-- SIMPLE STEPS to starting your arcade (using the 1980 Exidy Arcade Game TARG -->
<!-- SIMPLE STEPS to starting your arcade (using the 1980 Exidy Arcade Game TARG) -->

<!-- * Put this example_arcade.html file in your browser-accessible directory. -->
<!-- * Put es6-promise.js, browserfs.js, and loader.js into the same directory. -->
<!-- * Put emularity_color_small.png into a "logo" subdirectory. -->
<!-- * Create an "emulators" sub-directory and put in the right emulator from: -->
<!-- https://archive.org/download/emularity_engine_jsmame (example: messexidy.js -->
<!-- * Download the Targ ROM files from http://mamedev.org/roms/targ/ -->
<!-- * Place the Targ ROM .zip file in an "examples" subdirectory. -->
<!-- * Visit your example_arcade.html file with a modern Javascript-capable browser. -->
<!-- * Check out this repository in your browser-accessible directory;
this file as well as es6-promise.js, browserfs.js and loader.js are
required. The logo and images directories are optional, but the
splash screen looks quite a lot better when they're available. -->
<!-- * Use "git annex get <file>" to download emulators/jsmess/messexidy.js;
if you don't have git-annex you can download it from IA manually
(https://archive.org/download/emularity_engine_jsmame/messexidy.js.gz) -->
<!-- * Download the Targ ROM files from http://mamedev.org/roms/targ/ -->
<!-- * Place the Targ ROM .zip file in an "examples" subdirectory. -->
<!-- * Visit your example_arcade.html file with a modern Javascript-capable browser. -->

<html>
<head>
Expand All @@ -30,7 +32,7 @@
null,
new JSMAMELoader(JSMAMELoader.driver("targ"),
JSMAMELoader.nativeResolution(256, 256),
JSMAMELoader.emulatorJS("emulators/messexidy.js"),
JSMAMELoader.emulatorJS("emulators/jsmess/messexidy.js"),
JSMAMELoader.mountFile("targ.zip",
JSMAMELoader.fetchFile("Game File",
"examples/targ.zip"))))
Expand Down
2 changes: 1 addition & 1 deletion example_console.html
Expand Up @@ -13,7 +13,7 @@
null,
new JSMESSLoader(JSMESSLoader.driver("a2600"),
JSMESSLoader.nativeResolution(352, 223),
JSMESSLoader.emulatorJS("emulators/messa2600.js"),
JSMESSLoader.emulatorJS("emulators/jsmess/messa2600.js"),
JSMESSLoader.mountFile("Pitfall_Activision_1982.bin",
JSMESSLoader.fetchFile("Game File",
"examples/Pitfall_Activision_1982.bin")),
Expand Down
2 changes: 1 addition & 1 deletion example_dosbox.html
Expand Up @@ -11,7 +11,7 @@
<script type="text/javascript">
var emulator = new Emulator(document.querySelector("#canvas"),
null,
new DosBoxLoader(DosBoxLoader.emulatorJS("emulators/dosbox.js"),
new DosBoxLoader(DosBoxLoader.emulatorJS("emulators/em-dosbox/dosbox.js"),
DosBoxLoader.nativeResolution(640, 400),
DosBoxLoader.mountZip("c",
DosBoxLoader.fetchFile("Game File",
Expand Down

0 comments on commit 4d5cb33

Please sign in to comment.