pce

Emulates Mac Plus, PC, & Atari ST in asm.js & WebAssembly

Github星跟踪图

PCE.js

PCE.js runs classic computers in the browser. It's a port of Hampa Hug's excellent PCE emulator, put together by James 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

Installing from npm

PCE.js is available from npm as a set of browserify compatible node packages.

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 installed node.js

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

Install the Emscripten SDK.

Install and activate the latest version of the SDK, then source it, so that running emcc -v successfully returns current Emscripten version. Instructions for doing this are on the Emscripten SDK page.

Run ./pcejs_build env once which will create a pcejs_build_conf.sh file if it
doesn't already exist.

Similarly you should be working with my fork of PCE on the
pcejs branch, but presumably that's where you're reading this right now.

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

Commands you might be interested in:

  • build [target]: Configure, build and compile emulator to JS. [target] is either
    one of macplus, ibmpc, atarist or native. Specifiying an emulator arch
    builds the in-browser emulator JS file for that architecture. native builds all PCE
    executables normally. If you don't specify a [target] then all JS targets will
    be built.
  • rebuild: Build last again
  • 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)

Run ./pcejs_build build [target] to build the emulator, where [target] is macplus,
ibmpc or atarist. This will output a pce-[target].js file to dist/.

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

  • run the examples in the example/ directory with example/run_example.sh [target]
  • build the npm packages in the commonjs/[target]/ directories by running
    npm run prepublish in the respective directory.

主要指标

概览
名称与所有者jsdf/pce
主编程语言C
编程语言Shell (语言数: 9)
平台
许可证GNU General Public License v2.0
所有者活动
创建于2013-10-29 09:02:42
推送于2022-06-23 02:49:26
最后一次提交2018-07-22 07:24:41
发布数18
最新版本名称v0.1.3 (发布于 2014-05-25 19:04:18)
第一版名称pce-0.0.3 (发布于 )
用户参与
星数895
关注者数43
派生数150
提交数1.7k
已启用问题?
问题数23
打开的问题数16
拉请求数1
打开的拉请求数5
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?