• Stars
    star
    829
  • Rank 55,018 (Top 2 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created about 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

How to run PCE.js on your own website

See this CodePen example.

I recommend installing the native version of PCE on your computer to create your own disk images. Alternatively, you could use Mini vMac.

Installing from npm

PCE.js is available from npm as a set of browserify compatible node packages, which also include UMD 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 installed node.js

These instructions assume you're working with my fork of PCE on the pcejs branch. Presumably that's where you're reading this right now.

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 version 1.38.48 of the SDK

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

Check that running emcc -v successfully returns current Emscripten version. Detailed installation instructions are on the Emscripten SDK page.

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

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]

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/.

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

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

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 (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)

More Repositories

1

react-native-htmlview

A React Native component which renders HTML content as native views
JavaScript
2,710
star
2

react-native-refreshable-listview

Deprecated. A pull-to-refresh ListView which shows a loading spinner while your data reloads
JavaScript
1,384
star
3

little-virtual-computer

Learn how computers work by simulating them in Javascript
JavaScript
854
star
4

coffee-react-transform

DEPRECATED – Provides React JSX support for Coffeescript
CoffeeScript
433
star
5

coffee-react

DEPRECATED – Unfancy JavaScript with React JSX markup
CoffeeScript
413
star
6

ReactNativeHackerNews

React Native Hacker News app
JavaScript
256
star
7

browserify-incremental

incremental rebuild for browserify
JavaScript
175
star
8

webpack-combine-loaders

Combine an array of webpack loaders into a loader string
JavaScript
105
star
9

react-ratchet

React components for the Ratchet mobile app UI library
JavaScript
86
star
10

sprockets-coffee-react

DEPRECATED – Sprockets preprocessor for CJSX (Coffeescript with React JSX markup)
Ruby
85
star
11

react-layout

Dynamic subview layout for React
CoffeeScript
83
star
12

goose64

untitled goose game demake for nintendo 64
C++
78
star
13

n64-sdk-demo

n64 homebrew demo app
Objective-C
66
star
14

github-reason-react-tutorial

OCaml
39
star
15

react-commits-graph

react component to render an svg graph of git commits
CoffeeScript
37
star
16

react-form-for

An expressive and intuitive form builder for React in the style of Rails' form_for
JavaScript
37
star
17

deep-freeze

recursively Object.freeze() on objects and functions
JavaScript
32
star
18

hacker-news-mobile

Hacker News mobile web app built in 'Isomorphic' React
JavaScript
27
star
19

lisp.rs

Scheme Interpreter in Rust
Rust
25
star
20

ed64log

printf() and error stacktraces for n64 sdk-based homebrew games running on everdrive64 flashcarts
C
19
star
21

only-if-changed-webpack-plugin

Webpack plugin to only run build if dependent files have changed
JavaScript
18
star
22

flux-coffee

Implements Facebook's Flux pattern in CoffeeScript
CoffeeScript
16
star
23

lisp.re

A LISP interpreter written in ReasonML, targeting native and browser environments
OCaml
16
star
24

inspect-react-element

Prettyprints ReactElements and their children
JavaScript
16
star
25

reason-routing-tutorial

A tutorial for routing in Reason React
JavaScript
15
star
26

applescript-raytracer

a raytracer written in applescript
AppleScript
14
star
27

hacker-news-mobile-api

Turns official Hacker News Firebase API into a REST JSON API
JavaScript
14
star
28

duktape64

javascript on nintendo 64
C
12
star
29

cjsx-codemod

A codemod for migrating off of coffee-react CJSX
JavaScript
11
star
30

strictify

browserify v2 plugin for enforcing strict mode
JavaScript
11
star
31

BussIK-js

Selectively Damped Least Squares for Inverse Kinematics, in JavaScript
JavaScript
11
star
32

find-index

finds an item in an array matching a predicate function, and returns its index
JavaScript
11
star
33

n64soundtools

tools for compiling sound and music data for n64 sdk homebrew games
JavaScript
11
star
34

hacker-news-serverless-api

A hacker news API published as JSON files on S3 by an AWS Lambda function
JavaScript
10
star
35

loader64

USB uploader tool for Everdrive64
C
10
star
36

browserify-cache-api

JavaScript
10
star
37

webpack_rails

DEPRECATED – Integrates Webpack with Rails/Sprockets
Ruby
9
star
38

traceviewer

simple traceviewer renderer
JavaScript
7
star
39

webserial-ed64log

connect to an everdrive 64 from your web browser
JavaScript
6
star
40

oky

An okayish framework for mobile apps with Backbone.
JavaScript
6
star
41

they-live

serverless server monitoring with near-zero running costs
JavaScript
5
star
42

perv

A tool to watch your filesystem and display logged activity via a web interface. Originally created to assist with time tracking.
JavaScript
5
star
43

nvm_auto

automatically `nvm use` when entering a directory with an .nvmrc
Shell
5
star
44

robot-control

3d web ui to simulate and control a robotic arm
JavaScript
4
star
45

cached-loader

DEPRECATED. Adds persistent on-disk caching to webpack loaders
JavaScript
4
star
46

n64-gameoflife

conway's game of life on n64
C
4
star
47

theunarchiver

Automatically exported from code.google.com/p/theunarchiver
C
4
star
48

jamesfriend.com.au

my website
JavaScript
3
star
49

jest-alias-module-loader

JavaScript
3
star
50

rinsefm-feed

Generates iTunes-compatible podcast feeds of Rinse FM via scraping
CoffeeScript
3
star
51

pcejs-embed

easily embed a pcejs emulator anywhere
JavaScript
3
star
52

cosmos

reactjs based cms
CoffeeScript
3
star
53

podcastgen

generate itunes-compatible podcasts from cson or json
CoffeeScript
3
star
54

ruby_node_task

Run node.js scripts from Ruby with a persistent worker
Ruby
3
star
55

bit-packing-explorer

play around with storing multiple pieces of data in a single number value using bit packing
JavaScript
2
star
56

css-modules-loader-core-sync

synchronous version of css-modules-loader-core
JavaScript
2
star
57

minivmac

Browser port of Mini vMac classic mac emulator (and repo mirror)
C
2
star
58

exif2csv

Mac app for dumping image EXIF data to a CSV
Python
2
star
59

aiff-explorer

visualize the contents of an AIFF file
JavaScript
2
star
60

bantam

super lightweight python game engine
Python
1
star
61

fridgemagnets

Realtime alphabet fridgemagnets node.js/browser demo
JavaScript
1
star
62

jspace

space shooter written with only built-in java stuff
Java
1
star
63

spaaaace

love2d game
Lua
1
star
64

scaletoy

chord palette with webmidi output
TypeScript
1
star
65

ReasonPhysics

simple physics simulation for reasonml
OCaml
1
star
66

webaudio

JavaScript
1
star
67

jsdf

github pages
1
star
68

melb-react-animation-talk

JavaScript
1
star
69

robot-arm

robot arm based on the Adafruit PCA9685 board
Python
1
star
70

planetarium

a beat-synced music visualization which controls rgb led strips via bluetooth
JavaScript
1
star