-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add extraArgs support for PCE and PCE IBM PC example
- Loading branch information
1 parent
58e2ff2
commit fcdeeb5
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!-- | ||
The Emularity: An Example Computer Loader | ||
For use with The Emularity, downloadable at http://www.emularity.com/ | ||
SIMPLE STEPS for trying an emulated computer ("PC-DOS 1.0" for the | ||
IBM PC Model 5150). | ||
* Check out this repository in your browser-accessible directory; | ||
this file as well as es6-promise.js, browserfs.min.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. | ||
* Download the PCE.js IBM PC emulator from | ||
https://9game.oss-us-west-1.aliyuncs.com/mini-ibmpc/pcejs-ibmpc.min.js | ||
It's a slightly modified version from the NPM one: | ||
https://www.npmjs.com/package/pcejs-ibmpc | ||
* Download the original IBM PC BIOS package | ||
https://9game.oss-us-west-1.aliyuncs.com/mini-ibmpc/rom-ibmpc-1981.zip | ||
* Download the configuration file, it's a minimized version for easiler | ||
to make your configuration based on that | ||
https://9game.oss-us-west-1.aliyuncs.com/mini-ibmpc/pce-mini.cfg | ||
* Download PC-DOS 1.0 disk image | ||
https://9game.oss-us-west-1.aliyuncs.com/mini-ibmpc/pcdos1_0.pfdc | ||
* Visit your example_computer.html file with a modern | ||
Javascript-capable browser. | ||
--> | ||
|
||
<html> | ||
|
||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>PCE.js IBM-PC example</title> | ||
</head> | ||
|
||
<body> | ||
<canvas id="canvas" style="width: 50%; height: 50%; display: block; margin: 0 auto;"></canvas> | ||
<script type="text/javascript" src="es6-promise.js"></script> | ||
<script type="text/javascript" src="browserfs.min.js"></script> | ||
<script type="text/javascript" src="loader.js"></script> | ||
<script type="text/javascript"> | ||
var emulator = new Emulator(document.querySelector("#canvas"), | ||
null, | ||
new PCELoader(PCELoader.model("ibmpc"), | ||
PCELoader.nativeResolution(320, 200), | ||
PCELoader.mountZip("roms", PCELoader.fetchFile("ROM", "rom-ibmpc-1981.zip")), | ||
PCELoader.mountFile("fd0.pfdc", PCELoader.fetchFile("Disk Image", "pcdos1_0.pfdc")), | ||
PCELoader.mountFile("pce-ibmpc.cfg", PCELoader.fetchFile("PCE Config", "pce-mini.cfg")), | ||
PCELoader.emulatorJS("pcejs-ibmpc.min.js"), | ||
/* | ||
Extra Arguments is required if you need video device other than VGA. Use "-g" argument | ||
follows video device model "mda", "cga", "hgc", "plantronics", "ega", "vga" or "wy700" | ||
to select your video card model. | ||
To change the emulation speed, use "-s" argument follows the speed factor, "1" for the | ||
original speed of 4.77Mhz Intel 8088 processor. | ||
*/ | ||
PCELoader.extraArgs(["-g", "cga", "-s", "4"]))) | ||
emulator.start({ waitAfterDownloading: true }); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters