Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/pcePublic

Emulates Mac Plus, PC, & Atari ST in the browser using WebAssembly

License

NotificationsYou must be signed in to change notification settings

jsdf/pce

Repository files navigation

PCE.js runs classic computers in the browser. It's a port of Hampa Hug's excellentPCE emulator, put together byJames Friend.

PCE.js currently emulates Mac Plus, IBM PC/XT and Atari ST functionally in recent versions of Chrome and Firefox.

More info:

PCE.js Mac Plus

How to run PCE.js on your own website

Seethis CodePen example.

I recommend installing thenative version of PCE on your computer to create your own disk images. Alternatively, you could useMini vMac.

Installing from npm

PCE.js is available from npm as a set ofbrowserify compatible node packages, which also includeUMD bundles.

There is one for each emulator build:

See each of the above links for install and usage instructions

How to build PCE.js from source

Note: I recommend instead just using the npm packages listed above, unless you want to hack on the C source of the emulators themselves (which is not necessary if you just want to get them running on a page).

Make sure you've installednode.js

These instructions assume you're working withmy fork of PCE on thepcejs branch. Presumably that's where you're reading this right now.

Runnpm install in this directory (the source root). This should install therequired node.js tools to build the commonjs modules and run the examples.

Install theEmscripten SDK.

Install and activate version 1.38.48 of the SDK

cd ../path/to/emsdk/./emsdk install 1.38.48./emsdk activate 1.38.48source ./emsdk_env.sh

Check that runningemcc -v successfully returns current Emscripten version.Detailed installation instructions are on theEmscripten SDK page.

In the same terminal, return to the pcejs repository. Run./pcejs_build env once which will create apcejs_build_conf.sh file if itdoesn't already exist.

Most of the build process involves running the./pcejs_build bash script in theroot of the repo. Commands should be run like./pcejs_build [command] orpcejs_build [command] [arg]

Run./pcejs_build build [target] to build the emulator, where[target] ismacplus,ibmpc oratarist. This will output apce-[target].js file todist/.

After the output file for the target you're interested in has been built, you can:

  • run the examples in theexample/ directory with./pcejs_build example [target] orexample/run_example.sh [target]
  • build the npm packages in thecommonjs/[target]/ directories by runningnpm run prepublish in the respective directory.

Commands you might be interested in:

  • build [target]: Configure, build and compile emulator to JS. [target] is eitherone ofmacplus,ibmpc,atarist ornative. Specifiying an emulator archbuilds the in-browser emulator JS file for that architecture.native buildsall PCE executables normally. If you don't specify a [target] then all JStargets will be built.
  • rebuild: Build last again (eg. after modifying C source)
  • clean: Clean source tree
  • [nothing]: Build all emulator JS targets and (commonjs modules for each)

Other commands (used internally by build scripts)

  • env: Print build environment variables
  • configure: Configure emulator build
  • make: Compile emulator source to LLVM bitcode (used by 'build')
  • remake: Recompile only changed files of emulator source to LLVM bitcode
  • afterbuild: Convert LLVM bitcode to JS
  • module: Build commonjs module (used by commonjs module prepublish scripts)

[8]ページ先頭

©2009-2025 Movatter.jp